Return to the CL Tips
Display Job Locking A Record
name="dsprcdlck.dspf" A******************************************************************** A*%%EC A DSPSIZ(24 80 *DS3) A PRINT A R DSPRCDLCK1 A*%%TS SD 19990920 105406 JOE REL-V4R2M0 5769-PW1 A 1 2DATE A EDTCDE(Y) A 1 65'PGM -' A @PGM 10A O 1 71 A 2 2TIME A 2 65'FMT - DSPRCDLCK1' A 8 8'The following message occurred whi- A le attempting to update a record.' A MSGLIN 78A O 11 2DSPATR(HI) A 14 8'When the job is finished using the- A record, press Enter to re-try.' /*********************************************************************/ /*=82 DSPRCDLCK - DISPLAY JOB LOCKING A RECORD */ /*A 09-20-99 JOE GIUSTO */ /* */ /*M XX-XX-XX PROGRAMMER - MODIFICATION */ /*********************************************************************/ PGM DCLF FILE(DSPRCDLCK) DCL VAR(&MSGKEY) TYPE(*CHAR) LEN(4) DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) DCL VAR(&SENDER) TYPE(*CHAR) LEN(80) /*********************************************************************/ /* MOVE PROGRAM NAME TO SCREEN */ SNDPGMMSG MSG(A) TOPGMQ(*SAME) RCVMSG KEYVAR(&MSGKEY) SENDER(&SENDER) CHGVAR VAR(&@PGM) VALUE(%SST(&SENDER 27 10)) /*********************************************************************/ RCVMSG PGMQ(*PRV) MSGTYPE(*LAST) RMV(*NO) + KEYVAR(&MSGKEY) MSG(&MSGLIN) MSGID(&MSGID) IF COND(&MSGID *EQ 'CPF5027') THEN(GOTO + CMDLBL(SNDRCV)) RCVMSG: RCVMSG PGMQ(*PRV) MSGTYPE(*PRV) MSGKEY(&MSGKEY) + RMV(*NO) MSG(&MSGLIN) MSGID(&MSGID) IF COND(&MSGID *NE 'CPF5027') THEN(GOTO + CMDLBL(RCVMSG)) SNDRCV: SNDRCVF SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) + MSGDTA('Continuing with update...') + TOPGMQ(*EXT) MSGTYPE(*STATUS) /*********************************************************************/ ENDPGM: ENDPGM
[report a broken link by clicking here]