× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jose wrote:

> this is the code. I am using. Basically submitting the command after
> checking the flag to make sure the tape drive was not empty.

Jose, there are a few problems with your code.

> SBMJOB     CMD(SAVCHGOBJ OBJ(*ALL) +
  <snip>
> MONMSG MSGID(CPF3774 CPF3770 CPF3702 CPF3707)

You are monitoring for messages from the save command but your program has
not executed a SAVCHGOBJ. It's only executed a SBMJOB command. The
SAVCHGOBJ will be performed in the submitted job so this MONMSG will never
be triggered.

> RCVMSG     MSGDTA(&DATA1)    *this is where it pulls in the device name
> and volume identifier.*
> CHGVAR     VAR(&JOBNAM1) VALUE(%SST(&DATA1 1 10))
> CHGVAR     VAR(&USRNAM1) VALUE(%SST(&DATA1 11 10))
> CHGVAR     VAR(&JOBNUM1) VALUE(%SST(&DATA1 21 6))

Here is where you are trying to get the identifier of the submitted job.
This will be in a CPC1221 informational message. My guess is that you are
picking up instead a message generated when you tested the tape drive to
see if it was empty. Notice you will also do this if you skipped the SBMJOB
because the drive was empty. Is this what you want?

>    /* Stays in loop until backup job have completed */
>
> LOOP: DSPJOB   JOB(&JOBNAM1/&USRNAM1/&JOBNUM1)                    *This
> is where it is bombing*

This isn't be S/38 CL? I don't think it can be as your SBMJOB command has
the CMD parameter and IIRC that didn't exist on the S/38. So it looks to me
as though the job ID parameters are specified in the wrong order. If you
had picked up the CPC1221 and assuming the JOB parameter was correct you
would now display the submitted job.

>       MONMSG   MSGID(CPF1164 CPF1241 CPF2443 CPF1070) +

This MONMSG applies only to the DSPJOB command; not to the job it is
attempting to display. You cannot therefore monitor for CPF1164 or CPF1241.
These are meaningless in this place. Only the CPF2443 and CPF1070 are
possible. Without testing I can't be sure but I'm not convinced that either
of these would ever occur unless the save job  ends without producing a job
log, or you actually print the job log. However, assuming you do get one of
these messages you flag the backup as done and then break out of the loop.

>        EXEC(CHGVAR VAR(&DONE1) +
>                           VALUE('1'))>
>
>             IF  COND(&DONE1 *NE '1') THEN(DO) +
>
>                GOTO       CMDLBL(LOOP)

Otherwise you go round and display the job again. I have to ask, is this
part running interactively or in batch. If it's interactive presumably
someone has to keep hitting enter to move to the next DSPJOB. If it's batch
it's going to be doing an awful lot of unnecessary processing before the
loop ends (if it ever does) maybe producing thousands of pages of DSPJOB
output.

I think I can see what you are trying to do. As it happens I now have to
jump on my bicycle and join my mates for a quick ride (it now being 7 p.m.
in the UK). However, tomorrow I'll have a go at putting together something
that should work a bit better and annotating it for you. There's a good
chance that someone may have beaten me to it by then. However, in the
meanwhile have a close look at it and see if my comments make sense to you.

Dave...

"The sooner we get behind schedule, the more time we will have to make it
up." -- Anon Construction Superintendent

=======================================================
The opinions expressed in this communication are my own and do not
necessarily reflect those of my employer.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.