|
To help settle the great "is it batch/is it
interactive" question of the day a kind hearted volunteer with access to a
server model and some free time is needed.
The question to be answered is "what causes a job on a
server model to be classified as interactive or batch?" Is it any job
that has a 5250 session ( opens a dsply file )?, any job that is initiated by
signing onto a 5250 display, or something else.
The test I am proposing is a pgm that acquires a display
device, writes a menu screen to that display, then runs a loop that is intended
to use a lot of cpu. While the test pgm is running, the tester should
WrkSysAct to see if the CFINTxx task runs in response to the test.
The test pgm, called BATMENU, should be run as a submitted job
and from the command line of a signon initiated display session.
The code at the end of the email will create a
cmd, dspf and cl pgm. The pgm, cmd and dspf are all named BatMenu.
Note: Cutting and pasting the code from the
email msg to the edit session of a client access display window should reduce
the code keying needed.
The cl pgm will prompt a menu on the display and
execute the selected option.
The cmd is used to call the cl pgm with two
parms. Parm 1 is the name of the display device to write the menu to. Parm 2 is
the cpu consuming loop count.
To run the pgm, do the following:
1. Get the device name of a
display that has a signon screen ( not signed on )
2. SBMJOB CMD(BATMENU
DEVICE(sssss)) JOB(BATMENU)
Thank you in advance for your service to iseries
programmers everywhere!!
Steve Richter
1. Add the following to a srcmbr BatMenu in
qgpl/qcmdsrc:
CMD PROMPT('Batch job display
test')
PARM KWD(DEVICE) TYPE(*CHAR) LEN(10) + PROMPT('Device name') PARM KWD(LOOPC) TYPE(*DEC) LEN(5) DFT(50) + PROMPT('Loop count') 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. CPU TEST' A 10 2'90. END' A 12 2'OPTION:' A OPTN 2 0B 12 10EDTCDE(Z) A MSGLN1 78 O 14 2 A MSGLN2 78 O 15 2 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
&LOOPC)
DCL VAR(&DEVICE) TYPE(*CHAR) LEN(10) DCL VAR(&LOOPC) TYPE(*DEC) LEN(5) DCLF FILE(BATMENU) DCL VAR(&JOB) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&JOBTYPE) TYPE(*CHAR) LEN(1) DCL VAR(&LC1) TYPE(*DEC) LEN(5) DCL VAR(&LC2) TYPE(*DEC) LEN(5) DCL VAR(&CH5) TYPE(*CHAR) LEN(5) CHGJOB LOGCLPGM(*NO) CHGDSPF FILE(BATMENU) DFRWRT(*NO) 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)) /* 1=RUN CPU TEST. */ B2: IF COND(&OPTN *EQ 1) THEN(DO) CHGVAR VAR(&LC1) VALUE(0) CHGVAR VAR(&LC2) VALUE(0) B3: IF COND(&LC2 *LE &LOOPC) THEN(DO) RTVJOBA JOB(&JOB) USER(&USER) TYPE(&JOBTYPE) CHGVAR VAR(&LC1) VALUE(&LC1 + 1) B4: IF COND(&LC1 *EQ 1000) THEN(DO) CHGVAR VAR(&LC1) VALUE(0) CHGVAR VAR(&LC2) VALUE(&LC2 + 1) CHGVAR VAR(&CH5) VALUE(&LC2) CHGVAR VAR(&MSGLN1) VALUE('Batch or interactive? + Job' *BCAT &JOB *BCAT ' Type' *BCAT &JOBTYPE) CHGVAR VAR(&MSGLN2) VALUE('Outer loop count' *BCAT + &CH5) SNDF RCDFMT(BATMENU1) E4: ENDDO GOTO CMDLBL(B3) E3: ENDDO E2: ENDDO /* OPTION = 1 */ GOTO CMDLBL(B1) E1: ENDDO ENDPGM 6. Create the cl pgm
CrtClPgm qgpl/batmenu qgpl/qclsrc
|
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.