× 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.



The help desk did it the first time.  The operator did it the second time.
And we can't let it happen again.  One of the jobs used by PC support to
link a wholllllle bunch of users to the AS/400 got cancelled.

Our thought is that a validation program on the ENDJOB command will allow
us to block this error in the future.

My problem is discovering the parameters and their sizes for the command
processing program living under the ENDJOB command.

So far, I've got the right number of parameters (and the program does check
for valid job name), but the other fields are totally out of whack.  The
field lengths are my best guesses.

Is there a manual that lists the parameters and their sizes for IBM
commands?  Or a helpful list member who has such a thing?

Paul E Musselman
PaulMMn@ix.netcom.com

  SOURCE FILE . . . . . . .  HQPGPEM/QCLSRC
  MEMBER  . . . . . . . . .  ENDJOBVLD

  SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6
...+... 7 ...+
    100              PGM        PARM(&JOB &USER &NBRA &OPTION &DELAY
&SPLFILE +
    200                           &LOGLMT &ADLINTJOBS &DUPJOBOPT)

    300

    400              DCL        VAR(&JOB26     ) TYPE(*CHAR) LEN(  30)

    500              DCL        VAR(&JOB       ) TYPE(*CHAR) LEN(  10)

    600              DCL        VAR(&USER      ) TYPE(*CHAR) LEN(  10)

    700              DCL        VAR(&NBR       ) TYPE(*DEC ) LEN(15 5) <-
integer
    800              DCL        VAR(&NBRA      ) TYPE(*CHAR) LEN(   6)

    900              DCL        VAR(&OPTION    ) TYPE(*CHAR) LEN(   7)

   1000              DCL        VAR(&DELAY     ) TYPE(*DEC ) LEN(15 5) <-
integer
   1100              DCL        VAR(&SPLFILE   ) TYPE(*CHAR) LEN(   4)

   1200              DCL        VAR(&LOGLMT    ) TYPE(*DEC ) LEN(15 5) <-
integer
   1300              DCL        VAR(&ADLINTJOBS) TYPE(*CHAR) LEN(   7)

   1400              DCL        VAR(&DUPJOBOPT ) TYPE(*CHAR) LEN(   7)

   1500

   1600              CHGVAR     VAR(&NBRA) VALUE(*NBR)

   1700              SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Job '
+
   1800                           *CAT &JOB *CAT 'User ' *CAT &USER *CAT +

   1900                           'Number ' *CAT &NBRA) TOUSR(HQPGPEM)

   2000

Just a sample command to guide my muse...


   2100          /*  ENDJOB     JOB(&NBR/&USER/&JOB) OPTION(&OPTION) +
*/
   2200          /*               DELAY(&DELAY) SPLFILE(&SPLFILE) +
*/
   2300          /*               LOGLMT(&LOGLMT) ADLINTJOBS(&ADLINTJOBS) +
*/
   2400          /*               DUPJOBOPT(&DUPJOBOPT)
*/
   2500

I thought at first that the nbr/usr/job would be passed as a single
concatenated field, but the number of parameters didn't match 'till I split
them apart...


   2600      /*      CHGVAR     VAR(&JOB ) VALUE(%SST(&JOB26  1 10))
*/
   2700      /*      CHGVAR     VAR(&USER) VALUE(%SST(&JOB26 11 10))
*/
   2800      /*      CHGVAR     VAR(&NBR ) VALUE(%SST(&JOB26 21  6))      */


   2900

   3000              IF         COND(&JOB *EQ 'QPWFSERV  '  +

   3100                          *OR &JOB *EQ 'QPASVRP   '  +
   3200                          *OR &JOB *EQ 'TESTJOBNAM'  +

   3500                          *OR &JOB *EQ 'QPASVRS   ') THEN(DO)

   3600                SNDPGMMSG  MSGID(UTL3001) MSGF(UTLMSGF)
MSGDTA('0000' +
   3700                             !! &JOB !! &USER !! &NBRA) MSGTYPE(*DIAG)
   37xx                             /* message says, "Can't touch that!" */

   3800                SNDPGMMSG  MSGID(CPF0002) MSGF(QCPFMSG)
MSGTYPE(*ESCAPE)
   3900              ENDDO

   4000

   4100              ENDPGM

                                  * * * *  E N D  O F  S O U R C E  * * * *



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.