• Subject: Re: batch job that uses a dspf.
  • From: "Steve Richter" <srichter@xxxxxxxxxxxxx>
  • Date: Sun, 22 Apr 2001 14:14:42 -0400

booth,

>I am curious how you get a program without a user-open display file to
>even start in batch without a severe error.  I just had catastrophic
>results from exactly this scenario.


what is the error? Are you overriding the dspf to the device? Is the device
not signed on? You can only acquire a device that is not signed on.

here is code that works for me:


1. Add the following to srcmbr BatMenu in qgpl/qcmdsrc:
            CMD        PROMPT('Batch job display test')
            PARM       KWD(DEVICE) TYPE(*CHAR) LEN(10) +
                         PROMPT('Device name')

2. Create the command:
        CrtCmd  qgpl/batmenu qgpl/qcmdsrc batmenu

3. Add the following source code to dspf srcmbr BatMenu in qgpl/qddssrc:
 A          R BATMENU1
 A                                  2  2'MENU'
 A                                  4  2' 1. SNDMSG'
 A                                 10  2'90. SIGNOFF'
 A                                 12  2'OPTION:'
 A            OPTN           2  0B 12 10EDTCDE(Z)

4. Create the dspf:
        CrtDspf qgpl/batmenu qgpl/qddssrc batmenu

5. Add the following source code to clp srcmbr BatMenu in qgpl/qclsrc:
             PGM        PARM(&DEVICE)
             DCL        VAR(&DEVICE) TYPE(*CHAR) LEN(10)

             DCLF       FILE(BATMENU)
             DCL        VAR(&JOB) TYPE(*CHAR) LEN(10)
             DCL        VAR(&USER) TYPE(*CHAR) LEN(10)
             DCL        VAR(&JOBTYPE) TYPE(*CHAR) LEN(1)

             OVRDSPF    FILE(BATMENU) DEV(&DEVICE)
/* OVERRIDE YOUR APPLICATIONS DISPLAY FILES HERE.      */

 B1:         DO
             CHGVAR     VAR(&OPTN) VALUE(0)
             SNDRCVF    RCDFMT(BATMENU1)
             IF         COND(&OPTN *EQ 90) THEN(GOTO CMDLBL(E1))

             IF         COND(&OPTN *EQ 1) THEN(DO)
             RTVJOBA    JOB(&JOB) USER(&USER) TYPE(&JOBTYPE)
             SNDMSG     MSG('Job' *BCAT &JOB *BCAT 'is job type' +
                          *BCAT &JOBTYPE) TOUSR(&USER)

             ENDDO

             GOTO       CMDLBL(B1)
 E1:         ENDDO

             ENDPGM

6. Create the cl pgm
            CrtClPgm  qgpl/batmenu  qgpl/qclsrc

7. submit the job
            SBMJOB CMD(BATMENU DEVICE(DSPxx)) JOB(BATMENU)


+---
| 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
+---

This thread ...


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

This mailing list archive is Copyright 1997-2019 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].