i want to be able to force a program to go into a "needs recovery" mode...
anyone have any insight into the best way to handle this?
i've can't just set the ws-return-code to 2 & "go to 1000-end" because the compiler doesn't like it if you try to go to a label in a section outside of the section you are currently in;
i've tried "STOP RUN." as a line command, lawson compiler doesn't like that one either.
anyone done this before?
i'm trying to come up w/ a standardized routine that i can stick in a few custom programs; the routine would be performed when certain table index subscripts are exceeded. instead of simply watching for the situation and reporting it via the job log ---- based upon the number of systems & programs that the operators are monitoring, it is unrealistic to have them check every job log after every program --- i want my custom 'out of bounds' error message to appear & the program to move from the active job to the job waiting screen;
what about a COMMON-WS field that the lawson programs load up which holds the program's PID value?
can anyone point me to that variable?
I have to admit I haven't tried this, but here's what I think you'd need: 1. Create a simple library code file, and within a paragraph add: MOVE 1 TO RETURN-CODE. STOP RUN. 2. Add your library via libdef 3. To make qcompile/bismark ignore it, add your library routine name to NONSTDLIB.cfg 4. PERFORM the paragraph from within your custom program.
thanks john. after beating my head against the desk, the light bulb finally went off;
solution i came up w/ was to add a simple one line working storage table w/ an occurs of 2;
then within my "standardized" routine, after i display the message letting the developers know which table is being exceeded, i simply use my MAX-IDX value as the subscript into the occurs 2 times table i created --- thus letting lawson put itself into "needs recovery".
i can now put all of that into libraries and the job logs will show what the client wants -- instead of a vague subscript out of range, a useful message pointing to a specific table occurence.
thanks for help. 'preciate it.