Subject: | |
From: | |
Reply To: | |
Date: | Mon, 9 Aug 1999 15:31:23 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Okay, Okay,
Slap my hand, I said it was my $.02 worth.
You raise some good points.
Tanks for the feed back.
L.A. Barnes
Tad Bochan wrote:
> Hi Larry,
> If you are going to use this technique, which I am personally
> not very fond of, you should not bother with the FINFO.
> It is superfluous.
>
> Instead, you should,
> :ERRCLEAR
> :BUILD JOBFILE.GROUP.ACCOUNT;DISC=1
> :IF HPCIERR <> 0
> : { try again later }
> : EXIT
> :ENDIF
> or
> :ERRCLEAR
> :BUILD JOBFILE.GROUP.ACCOUNT;DISC=1
> :WHILE HPCIERR <> 0
> : ERRCLEAR
> : PAUSE 1
> : BUILD JOBFILE.GROUP.ACCOUNT;DISC=1
> : EXIT
> :ENDIF
>
> This is because a second job can get in *after* the FINFO and
> build the file before the first job can build it, in which case you
> have to test the success of the build command anyway.
> Unlikely as it seems, it happens.
>
> Cheers,
> Tad.
>
> -----Original Message-----
> From: Larry Barnes <[log in to unmask]>
> To: [log in to unmask] <[log in to unmask]>
> Date: 09 August 1999 23:10
> Subject: Re: Using MPEX to check job status
>
> >Since there are as many was to solve this challenge as there are creative
> >thinkers, I will add my .02 worth.
> >
> >At the beginning of the job you could build a file;
> >
> >:IF FINFO('JOBFILE.GROUP.ACCOUNT',"exists")
> >: TELL !HPJOBNAME,!HPUSER.!HPACCOUNT You can't execute this job now.
> >: TELL !HPJOBNAME,!HPUSER.!HPACCOUNT It is already executing.
> >: TELL !HPJOBNAME,!HPUSER.!HPACCOUNT Try again later
> >: EOJ
> >:ELSE
> >: BUILD JOBFILE.GROUP.ACCOUNT;DISC=1
> >:ENDIF
> >
> >The last step in the jobstream would be to delete the file created at the
> >beginning.
> >
> >This serves a two fold purpose.
> >1. It keeps multiple copies of this job from running together.
> >2. If the job aborts it keeps this job from running until the file is
> manually
> >purge (assuming the error has been investigated)
> >
> >You can also make the IF statement more elaborate, depending on your needs.
> >
> >I hope my two cents helps.
> >
> >L. A. Barnes
> >
|
|
|