Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VSE/ESA + Job-Control + VS COBOL II 1

Status
Not open for further replies.

PeterPimm

Programmer
Apr 23, 2003
4
DE
In Job-Control (JCL) my Cobol-Program is invoked like this:

...
SETPARM RETCODE='0000'
// EXEC PGM=WEB1900,SIZE=AUTO,PARM='&RETCODE'
/*
IF RETCODE=100 THEN...
IF $RC=200 THEN ......
...

Parts of my Cobol-Program:

...
LINKAGE SECTION.
01 VCC-LINK.
03 VCC-LINK-LENGTH PIC S9(03) COMP.
03 VCC-LINK-PARAMS PIC 9(04).
PROCEDURE DIVISION USING VCC-LINK.
...
IF ..... MOVE 100 TO VCC-LINK-PARAMS
ELSE ... MOVE 200 TO RETURN-CODE
ENDIF
...
GOBACK.

The situation:

- JCL RETCODE='0000' is correctly given to
COBOL VCC-LINK-PARAMS
- VCC-LINK-PARAMS=100 is not(!) given back to JCL
- RETURN-CODE=200 is correctly given to JCL

Questions:

- Can I succeed in giving back VCC-LINK-PARAMS in any way?
- JCL handles RETURN-CODE=200 as an severe error and gives the JOBLOG message MAX.RETURN-CODE=0200.
How can I suppress this message or set $MRC to zero?

Thanks a lot.
 
VCC-LINK-PARAMS is stored in system buffer area that is no longer available when your program terminates. Why don't you just "MOVE 100 TO RETURN-CODE" as you are doing with the "200" return code and change the conditional JCL to check $RC instead of RETCODE?

"Code what you mean,
and mean what you code!
But by all means post your code!"

Razalas
 
Peter -

AFAIK, a passed parm is stored in partition GETVIS and cannot be interogated in JCL, only set. Probably the best way to do what you apparently are trying to do is to set the RETURN-CODE special register and use it to set the parm. E.g.:
Code:
// ON $RC>0 CONTINUE
// EXEC PROG,SIZE=...
// SETPARM RETCODE=$RC
// IF RETCODE=0100 THEN ...
[\CODE]
There are a number of other approaches to building in flexibility in COBOL jobstreams in VSE.  If this is not along the lines of what you want to achieve, let us know your overall goal and we'll see what we can dream up.

Regards.

Glenn
 
Thanks for your tips.

I only need the RETURN-CODE=200 as a parameter for the next job-step.

But JCL handles RETURN-CODE=200 as an severe error and gives at the end of the job the message MAX.RETURN-CODE=0200.

How can I suppress this message or set $MRC to zero?

At the end of all job steps should be MAX.RETURN-CODE=0000.
?!?!




 
The //ON $RC>0 CONTINUE takes care of the problem with the job canceling due to the high return code.

To set the $MRC to zero, use the command:

SET MRCZERO

Note that the // is not used.

Glenn
 
Hi Glenn,

you exactly met the point.
Now my job runs like I want it.
Thanks a lot and have a nice weekend.

PeterPimm.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top