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



Here's the situation:

I have an RPG program, WTREZIP, that front-ends the creation of a ZIP file. And it's getting a creation failure on that zip file, for unknown reasons (the joblog tells me that the STMF being added to the ZIP exists, but the ZLIB port tells me that it's "unable to open" it, for unspecified reasons). It was simply locking up the job if it got a creation failure. That, clearly, was not a desirable outcome. So I changed it, so that it would catch the exception and abend (from a halt indicator):
C CALL 'QCMDEXC' 13
C PARM ZIPCMD
C PARM ZIPCMDL
C IF *IN13
C SETON H1LR
C RETURN
C ENDIF

But as you can see, I'm also setting on LR. So I would expect it, when called again, to reactivate from scratch.

This WTREZIP program is being called from a CL program. The CL program monitors for the failure of WTREZIP, waits for a second, and then tries again from scratch:

54 DO_REZIP: DEL OBJLNK(&ZIPPATH)
55 MONMSG MSGID(CPF0000)
56 CALL WTFIXATT
57 CALL WTREZIP PARM(&ZIPPATH)
58 MONMSG MSGID(CPF0000) EXEC(DO)
59 DLYJOB DLY(1)
60 CHGJOB LOGCLPGM(*YES)
61 DSPLNK OBJ(&TMPDIRCONT) OUTPUT(*PRINT) +
62 DETAIL(*EXTENDED) DSPOPT(*ALL)
63 DSPJOBLOG OUTPUT(*PRINT)
64 SNDMSG MSG('The glitch has returned. Retry is ' +
65 *CAT &RETRY *CAT '. Check for problems.') +
66 TOUSR(FOO)
67 IF COND(&RETRY *EQ 'Y') THEN(SNDPGMMSG +
68 MSGID(CPF9898) MSGF(QSYS/QCPFMSG) +
69 MSGDTA('WTREZIP problem. Please inspect +
70 spool files for this job.') MSGTYPE(*ESCAPE))
71 CHGVAR VAR(&RETRY) VALUE('Y')
72 GOTO CMDLBL(DO_REZIP)
73 ENDDO
74 {processing continues}

And the joblog tells me it's going through the DO-block, executing 60-64, then 71 and 72, and back up to 54-57, calling WTREZIP a second time. But the second time it calls WTREZIP, literally nothing happens: no joblog messages to indicate that it even tries to execute.

Did the halt indicator somehow prevent LR from deactivating WTREZIP?
(WTREZIP is activation group QILE, and the CPP for the command it calls is activation group *NEW.) I'm sure there must be a better way for an RPG program to abend itself; the halt indicator was simply the easiest.

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.