|
Bob, On Sat, 07 Jun 1997 07:42:56 -0700, Bob Larkin wrote: >Using an OPM RPG program as a VCP for the CHGJOB command. When certain >conditions are met, a CPD0006 message is sent using the SNDPGMMSG API, >followed by a CPF0002 *Escape message. Probllllem is that the CPF0002 >causes the program to end, but does not close the program. If user >attempts another CHGJOB command in the same session, program acts as if >a RETRN with LR *Off had been used to end the prior instance of the >program. > This is the down side of using RPG to send an escape message. You'll also find that after setting LR on and sending an escape message, the next time the program is called, it will end immediately. This is because: 1) RPG uses static storage. 2) LR was set on, but an escape message causes an immediate end to the program. This does not allow RPG to completely close down. 3) Since the program's static storage is still "active", LR is still on when the program is called again. Because the RPG cycle checks for LR before doing the "real work" of your program (i.e. total time), it ends. The bottom line is that you really should use at least a CL shell around your RPG VCP program, and have CL send the escape message after the RPG program ends normally. ------------------------- Greg Thielen Innovative Systems Design gregt@isda.com http://www.isda.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the Midrange System Mailing List! To submit a new message, * * send your mail to "MIDRANGE-L@midrange.com". To unsubscribe from * * this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe MIDRANGE-L' in the body of your message. Questions * * should be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
As an Amazon Associate we earn from qualifying purchases.
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.