Focal Point
IBATCH JCL return code

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9321057322

April 16, 2007, 02:46 PM
Ronn
IBATCH 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?


Thanks,
Ronnel C
WebFocus 7.1.5
IBM ZOS 1.6
April 16, 2007, 03:45 PM
Tom Flynn
-QUIT FOCUS 99


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 16, 2007, 04:05 PM
Ronn
Thanks 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.


Thanks,
Ronnel C
WebFocus 7.1.5
IBM ZOS 1.6
April 16, 2007, 04:09 PM
Tom Flynn
Ronn,

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


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 16, 2007, 04:25 PM
Diptesh Patel
We 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


Diptesh
WF 7.1.7 - AIX, MVS
April 16, 2007, 04:25 PM
Jim Morrow
We 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,


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



April 17, 2007, 10:42 AM
Ronn
Thanks 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!


Thanks,
Ronnel C
WebFocus 7.1.5
IBM ZOS 1.6