Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with systartup_v5.com file not working properly

Status
Not open for further replies.

DaveyCrockett

Programmer
Jul 15, 2003
36
US
Let me first state that I am fairly new to OpenVMS and have been trying to learn how to fix some of the issues that I have been stuck with by my predescessors and was hoping that someone might be able to help me fix it.

In our systartup_v5.com file we have the following lines:

$ @USERDISK:[EZBRIDGE_NEW.EBMGR]EZMSET.COM
$ START_CI ! start EZbridge processes
$!
$! NAS PIPELINE STARTUP
$ @sys$startup: APS_$PIPELINE_STARTUP.COM

What this is basically doing is trying to start EZBridge communication between the Vax and an AS/400 system.

Everytime we reboot we have to manually STOP_CI (Stop the communication) and then START_CI (Start the communication). The problem is that when START_CI is called, it doesn't always connect properly, thus never actually communicating. What I was hoping to do was, Check to see if the Status Returned by START_CI is good, If not, then STOP_CI and then START_CI until the communication is GOOD.

I am familiar w/ VB, but this is way different.
VB would be something like:

STARTIT: 'label
intStatus = START_CI()
If intStatus = 0 Then
'Connection BAD
STOP_CI
GOTO STARTIT
Exit_Sub
Endif

Do any of you know how I could implement this?
Thank you in advance.
 
Is the "START_CI" (use the SHOW SYS command) process actually running on the VAX when you have the communication problem? If it's not running, I have a routine which will
loop x number of times to start it.

If it is running:
Can you test communications from DCL? Such as, receive a file from the A/S400 and see if it exists on the VAX.

If the file does not exist, we could issue the STOP_CI & START_CI and try the receive again (for say 9 times,
then send a VAX mail message to yourself).

Thanks, Glen

glen@kirbyassociates.com

 
The START_CI is not actually a process, but it opens communication to the AS/400. When this communication link is not active, then no information is recieved on the 400. So, what we typically have to do is do STOP_CI, followed by the START_CI until the communication become successful. What I was hoping is that there is a way to loop through doing the START_CI, checking to see if the communication becomes successful and if so, continue on. However, if the communication is NOT SUCCESSFUL, a STOP_CI is issued, followed by the START_CI until it indeed comes back successful. Could we do this without a loop for x number of times, but with an if statement checking for a value?

Thanks again
 
First and foremost, check that you are executing the initial startup after any dependent network protocols (e.g., after TCP/IP if it uses that).

It is usually considered a bad idea to put indefinite loops in the SYSTARTUP_xxx.com procedure. It would probably be a better idea to have a batch queue that is available at startup, and submit a small command procedure to that queue after running the startup.

The batch job would only need the following (approximately):

$ set noon ! turn off 'on' error processing
$start_it:
$ STOP_CI
$ START_CI
$ if .not. $status then goto start_it
$exit

NOTE: This assumes that the START_CI will return an appropriate error to DCL if the communication does not start properly. You will have to test this by examining the value of $STATUS after you issue the START_CI command and it down't work.
 
Thank you all for your replies. After further investigation based on your suggestions, I was wondering if it would be better to do this loop in the start_ci.com procedure. Would it? The below is the script ran when Start_ci is called.

$ sysname = F$LOGICAL("EZSYSNAME")
$ IF sysname .NES. "" THEN GOTO start
$ WRITE SYS$OUTPUT -
"The rooted logical name EZSYSNAME must be defined."
$ WRITE SYS$OUTPUT -
"Execute: EZBRIDGE:[EBMGR]EZSETUP.COM"
$ EXIT 2
$!
$ start:
$ thisdir = f$environment("default")
$ set default ezbridge:[ebmgr]
$ cm -l EZBRIDGE:[EBSCRATCH]CM.LOG
$ wait 00:00:10
$ snac 'sysname'_ci.cfg -batch -start
$!update @stci_'sysname'.com
$ set default 'thisdir'


Could I just modify the start: label to the following?

$ start:
$ thisdir = f$environment("default")
$ set default ezbridge:[ebmgr]
$ cm -l EZBRIDGE:[EBSCRATCH]CM.LOG
$ wait 00:00:10
$ snac 'sysname'_ci.cfg -batch -start
$!update @stci_'sysname'.com
$ set default 'thisdir'
$ if .not. $status then goto start:


All help is much appreciated..
Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top