sdJDE
Member
Dear All,
I am working on JDE Worldsoft a7.3 cum 9.
Could anyone help me in understanding the JDE standard CL logic for a report program in Worldsoft. Some of the commands are given below. I need an explanation for the same. Your help is highly appreciated.
/* --------- Global CPF error intercept. --------------------------- */
MONMSG MSGID(CPF0000 CPC0000 CPD0000) EXEC(GOTO +
CMDLBL(ABEND))
/* --------- Override JDE Message File for Language Preference ----- */
CALL PGM(J98850) PARM(&LANGMSGF)
MONMSG MSGID(CPF0000 CPD0000 CPC0000)
OVRMSGF MSGF(QJDEMSG) TOMSGF(&LANGMSGF)
MONMSG MSGID(CPF0000 CPD0000 CPC0000)
* --------- Retrieve job name and submitting message queue. ------- */
RTVJOBA JOB(&JOBID) SBMMSGQ(&PSMSGQ) TYPE(&JOBTYPE)
IF COND(&JOBTYPE='1') THEN(DO)
SNDPGMMSG MSGID(JDE9991) MSGF(QJDEMSG) +
MSGDTA('J58510 ') TOPGMQ(*EXT)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
GOTO EOJ
ENDDO
/* --------- Set special printer file library, if specified. ------- */
RTVDTAARA DTAARA(*LDA (1 10)) RTNVAR(&PRTFLIB)
IF COND(&PRTFLIB *NE ' ') THEN(DO)
ADDLIBLE LIB(&PRTFLIB) POSITION(*FIRST)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
ENDDO
/* --------- Output file override for OPNQRYF, *SHARE. ------------- */
OVRDBF FILE(F04573 ) SHARE(*YES)
/* --------- Call DDS Writer file processor. ----------------------- */
CALL PGM(P98315) PARM(&PSPID &PSVERS &PSFILE +
&PSMBR &PSMSGQ)
IF COND(%SWITCH(1XXXXXXX)) THEN(DO)
GOTO EOJ
ENDDO
/* --------- Issue override if not processing open query. ---------- */
IF COND((&PSMBR *NE '*OPNQRYF') +
*AND (&PSMBR *NE '*SQL')) THEN(DO)
OVRDBF FILE(F04573 ) TOFILE(&PSFILE) MBR(&PSMBR)
ENDDO
ABEND:
SNDPGMMSG MSGID(JDE9999) MSGF(QJDEMSG) MSGDTA(&JOBID) +
TOMSGQ(&PSMSGQ)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
CHGJOB LOG(4 00 *SECLVL) SWS(1XXXXXXX)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
/* --------- End of job processing --------------------------------- */
EOJ:
/* --------- Remove Dream Writer logical file member: -------------- */
/* --------- If job switch 2 is on, logical is permanent --------- */
/* --------- system logical, do not remove member. --------------- */
IF COND(%SWITCH(X0XXXXXX) +
*AND (&PSMBR *NE '*OPNQRYF') +
*AND (&PSMBR *NE '*SQL')) THEN(DO)
DLTF FILE(&PSFILE)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
ENDDO
IF COND(&PSMBR = '*OPNQRYF') THEN(DO)
CLOF F04573
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
DLTOVR F04573
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
ENDDO
/* --------- If a Recursive version, delete version. --------------- */
IF COND(&PSPID *LT 'A') THEN(DO)
CALL PGM(P98305) PARM(&PSPID &PSVERS)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
ENDDO
ENDPGM
In addition, could anyone explain the LOKUP command in RPG.
Thanks.
Regards,
SD
I am working on JDE Worldsoft a7.3 cum 9.
Could anyone help me in understanding the JDE standard CL logic for a report program in Worldsoft. Some of the commands are given below. I need an explanation for the same. Your help is highly appreciated.
/* --------- Global CPF error intercept. --------------------------- */
MONMSG MSGID(CPF0000 CPC0000 CPD0000) EXEC(GOTO +
CMDLBL(ABEND))
/* --------- Override JDE Message File for Language Preference ----- */
CALL PGM(J98850) PARM(&LANGMSGF)
MONMSG MSGID(CPF0000 CPD0000 CPC0000)
OVRMSGF MSGF(QJDEMSG) TOMSGF(&LANGMSGF)
MONMSG MSGID(CPF0000 CPD0000 CPC0000)
* --------- Retrieve job name and submitting message queue. ------- */
RTVJOBA JOB(&JOBID) SBMMSGQ(&PSMSGQ) TYPE(&JOBTYPE)
IF COND(&JOBTYPE='1') THEN(DO)
SNDPGMMSG MSGID(JDE9991) MSGF(QJDEMSG) +
MSGDTA('J58510 ') TOPGMQ(*EXT)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
GOTO EOJ
ENDDO
/* --------- Set special printer file library, if specified. ------- */
RTVDTAARA DTAARA(*LDA (1 10)) RTNVAR(&PRTFLIB)
IF COND(&PRTFLIB *NE ' ') THEN(DO)
ADDLIBLE LIB(&PRTFLIB) POSITION(*FIRST)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
ENDDO
/* --------- Output file override for OPNQRYF, *SHARE. ------------- */
OVRDBF FILE(F04573 ) SHARE(*YES)
/* --------- Call DDS Writer file processor. ----------------------- */
CALL PGM(P98315) PARM(&PSPID &PSVERS &PSFILE +
&PSMBR &PSMSGQ)
IF COND(%SWITCH(1XXXXXXX)) THEN(DO)
GOTO EOJ
ENDDO
/* --------- Issue override if not processing open query. ---------- */
IF COND((&PSMBR *NE '*OPNQRYF') +
*AND (&PSMBR *NE '*SQL')) THEN(DO)
OVRDBF FILE(F04573 ) TOFILE(&PSFILE) MBR(&PSMBR)
ENDDO
ABEND:
SNDPGMMSG MSGID(JDE9999) MSGF(QJDEMSG) MSGDTA(&JOBID) +
TOMSGQ(&PSMSGQ)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
CHGJOB LOG(4 00 *SECLVL) SWS(1XXXXXXX)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
/* --------- End of job processing --------------------------------- */
EOJ:
/* --------- Remove Dream Writer logical file member: -------------- */
/* --------- If job switch 2 is on, logical is permanent --------- */
/* --------- system logical, do not remove member. --------------- */
IF COND(%SWITCH(X0XXXXXX) +
*AND (&PSMBR *NE '*OPNQRYF') +
*AND (&PSMBR *NE '*SQL')) THEN(DO)
DLTF FILE(&PSFILE)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
ENDDO
IF COND(&PSMBR = '*OPNQRYF') THEN(DO)
CLOF F04573
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
DLTOVR F04573
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
ENDDO
/* --------- If a Recursive version, delete version. --------------- */
IF COND(&PSPID *LT 'A') THEN(DO)
CALL PGM(P98305) PARM(&PSPID &PSVERS)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
ENDDO
ENDPGM
In addition, could anyone explain the LOKUP command in RPG.
Thanks.
Regards,
SD