Subject: | |
From: | |
Reply To: | VANCE,JEFF (HP-Cupertino,ex1) |
Date: | Mon, 26 Jun 2000 11:29:35 -0600 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hello Raghu,
...
> !SETVAR CH_JOBNO010 "J" + CH_JOBNO010
> !SETVAR COUNT010 FALSE
> !WHILE COUNT010 <> TRUE DO
I recommend using the ERRCLEAR command before the PAUSE, or at least
setting CIERROR to 0. The CIERROR and HPCIERR CI variables track
the most recent *error* from the CI. They are never cleared by the
CI, except when created when the CI is first loaded. Also, I
recommend using the CONTINUE command after setting CIERROR to zero
and prior to the PAUSE command below. Without CONTINUE the PAUSE
command could produce an error, and your job would be unable to
detect the error (unless previously you have set the HPAUTOCONT
variable to true, which IMO is generally not a good idea).
> ! PAUSE 60;JOB="CHILDT01,ISDEV.AIHWORK";INTERVAL=10;EXIST
Note: for debugging you might want to insert "SHOWVAR cierror" here
> ! IF CIERROR = 0
Note: again, you may want to insert CONTINUE here.
> ! LISTSPF O@;SELEQ=[JOBNUM=!CH_JOBNO010 AND &
> ! JOBNAME=!CH_JOBNM010 AND FILEDES = $STDLIST AND JOBABORT = FALSE]
> ! IF CIERROR = 4809
> ! TELL @.!HPACCOUNT *E*
> ! TELL @.!HPACCOUNT *E* !CH_JOBNM010 HAS ABORTED......
> ! TELL @.!HPACCOUNT *E* !HPJOBNAME IS ABORTING IN STEP : 020
> ! TELL @.!HPACCOUNT *E*
> ! ABORT > $NULL
Note: the RETURN or ESCAPE CI commands may accomplish the same thing
you are trying to do with "abort" here.
> ! ENDIF
> ! SETVAR COUNT010 TRUE
> ! ELSE
Note: there is an ELSEIF command that makes nested IF's easier to
code and maintain.
> ! IF CIERROR = 9032
> ! COMMENT ** TIME LIMIT EXCEEDED. STARTING PAUSE FROM FRESH **
> ! TELL @.!HPACCOUNT *I* !HPJOBNAME IS WAITING ON !CH_JOBNM010
> ! PAUSE 120
> ! SETJCW CIERROR 0
> ! ELSE
> ! ECHO *E*
> ! ECHO *E* !HPJOBNAME ABORT : PAUSE ON !CH_JOBNM010 ABORTED..
> ! ECHO *E*
> ! ABORT > $NULL
> ENDIF
> ! ENDIF
> !ENDWHILE
> !DELETEVAR COUNT010 > $NULL
HTH,
Jeff Vance, CSY
|
|
|