|
As Shannon sugeests, I use data areas, data queues or even file records to set "checkpoints" for this type of process. The example below shows how a data area can be used. Have a controlling driver program that checks the data area values, DCL &ALLX *CHAR 6 VALUE('XXXXXX') DCL &VALUE *CHAR 6 DCL &ERROR *LGL VALUE('0') Loop: RTVDTAARA MYDTAARA &VALUE If %SST(Value:1:1) = ' ' Do Call firstpgm monmsg cpf0000 exec(goto error) /* firstpgm sets first character of the data area to 'X' in final step */ Goto loop Enddo If %SST(value:1:2) = 'X ' Do Call secondpgm /* at end of secondpgm mark second character of data area to X */ monmsg cpf0000 exec(goto error) Go To Loop EndDo /* do same for the rest of the characters */ /* if the program calls fail the data area position will not be updated */ GoTo EndPgm Error: /* do error handling here */ CHGVAR &ERROR '1' EndPgm: If (&Error = '0') Do CHGDTAARA MYDTAARA ' ' EndDo Return EndPgm This will allow you to restart the program process where it left off until it completes normally. Thanks, Tommy Holden -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Shannon O'Donnell Sent: Wednesday, September 27, 2006 9:33 AM To: Midrange Systems Technical Discussion Subject: **SPAM** RE: Pause technique Or a data area, that's even easier. -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Greg Wenzloff Sent: Wednesday, September 27, 2006 9:27 AM To: midrange-l@xxxxxxxxxxxx Subject: Pause technique I've got a multi step job that is run only once at the end of each fiscal year (this weekend). Each step updates data related to standard costs. Each subsequent step is dependant on the success of the one before it and I need to verify this by examining the data at each step else I can end up with a real mess. The job is designed to run in batch mode although it could be run interactively since I will be the only one on the computer when it is run. My question is what is a simple technique to pause the CLP after each step of the job? If I set it to run interactively I could add a simple program to put up a display file which waits for the Enter key. But I would like to keep this in batch mode for speed. Any suggestions? Simple is better. Thanks, Greg
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.