April 16, 2007, 02:46 PM
RonnIBATCH JCL return code
I tried using the IBATCH JCL in the ...WFM.DATA MVS library that came with our WebFocus 715 installation. It worked successfully, but whenever the report fails due to an error, it continued to send a zero return code.
Is there a way to make WebFocus to override or populate the MVS RC system variable so I can force an abend when a report ended unsuccessfully?
April 16, 2007, 04:05 PM
RonnThanks for the reply.
The problem with the -QUIT FOCUS
, it only works when a TABLE FILE or MODIFY fails. Things like syntax error, invalid data types, and other kinds of error stops the focexec immediately, so the -QUIT does not get executed.
What I am trying to do here is to force the JCL to abend so that the operator would get notified and our job scheduler (CA7) would not kick off any other job that the abended job normally would. This means any type of error.
April 16, 2007, 04:09 PM
Tom FlynnRonn,
If you have any of those errors, you can:
Branch on
-IF &FOCERRORNUM NE 0 GOTO NO_GOOD;
-IF &FOCERRORNUM
If creating a hold:
-IF &LINES EQ 0 GOTO NO_GOOD;
-NO_GOOD
-QUIT FOCUS 99
Tom
April 16, 2007, 04:25 PM
Diptesh PatelWe normally include the FIN in the Focexec itself. f it fails halfway, the fin does not get executed, and FOCUS then returns a COND CODE of 8
April 16, 2007, 04:25 PM
Jim MorrowWe have a series of ABORT routines, designed for the COBOL programer. I call the one of them that allows setting a USER ABEND Code, with this DM.
-RUN
-SET &ABORT = IF &RECORDS NE 0 THEN 0 ELSE ABORT3(0333);
The sub-routine is in LINKPAC area so the MVS can find it without a special STEPLIB. You may have to ask someone who wastes time doing COBOL what the use to ABORT a program, and use that module instead of my ABORT3,
April 17, 2007, 10:42 AM
RonnThanks again for all the replies.
I tried the -QUIT anyway and even the -QUIT FOCUS 12 but it did not affect the return code of the JCL. I also tried this with and without the FIN command in the JCL but it did not have any affect.
I haven't tried creating a subroutine to pupulate a variable, but eventually it will all boil down to modifying the RC mvs system variable which the -QUIT is not doing anyway.
Maybe I'll try executing a TSO command to run a JCL that calls a program that does not exist if I get a &RETCODE that is greater than 1.
I can also DYNAMIC ALLOCATE a file on a &RETCODE that is greater than 1. Then I can check for the existence of that file, and if it exists that means there was an error, then I will execute that non existent program to force an abend.
Keep the suggestions coming. I am open for any idea to work around this.
Thanks again for all the replies!