COBOL Retum code

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS
amdparsn
Posts: 2
Joined: Sat Dec 15, 2007 4:27 pm
Skillset: COBOL,CICS,JCL,DB2
Referer: Ravikiran

COBOL Retum code

Postby amdparsn » Sat Dec 15, 2007 4:30 pm

How to pass return codes from cobol to jcl?

User avatar
MrSpock
Global moderator
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Skillset: REXX, JCL, DFSORT, Syncsort, Axway MFT, Connect:Direct, FTP, SFTP
Referer: ibmmainframes.com
Location: Raleigh NC USA
Contact:

Re: COBOL Retum code

Postby MrSpock » Sat Dec 15, 2007 10:27 pm

MOVE some value between 0 and 4095 TO RETURN-CODE.
STOP RUN.

User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am

Re: COBOL Retum code

Postby dick scherrer » Sun Dec 16, 2007 8:21 am

Hello,

Many sites prohibit the use of STOP RUN these days.

GOBACK will also set the return code from the COBOL program.
Hope this helps,
d.sch.