how can we pass the return codes from cobol to jcl?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

how can we pass the return codes from cobol to jcl?

Postby mylavarapuvinay » Thu Jan 06, 2011 10:21 pm

how can we pass the return codes from cobol to jcl?
mylavarapuvinay
 
Posts: 11
Joined: Thu Jan 06, 2011 9:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how can we pass the return codes from cobol to jcl?

 

Re: how can we pass the return codes from cobol to jcl?

Postby steve-myers » Thu Jan 06, 2011 10:27 pm

When any program started by the EXEC JCL statement terminates it leaves a return code that can be used by JCL. If your Cobol program terminates with a return code, the return code should be available for use in JCL.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: how can we pass the return codes from cobol to jcl?

Postby Robert Sample » Thu Jan 06, 2011 11:31 pm

Look up return-code in the COBOL Language Reference manual.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: how can we pass the return codes from cobol to jcl?

Postby gugul » Thu Jan 13, 2011 8:29 pm

move 12 to return-code
stop run.

include in JCL step: ,COND=(0,NE)
gugul
 
Posts: 6
Joined: Thu Jan 13, 2011 8:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how can we pass the return codes from cobol to jcl?

Postby franky226 » Tue Apr 12, 2011 3:42 pm

the return-code in the cobol PGM can full ur requirement, return-code is a key var
just like:
move 4 to return-code

or

in the jcl, u can set return-code= 4
franky226
 
Posts: 2
Joined: Tue Apr 12, 2011 3:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how can we pass the return codes from cobol to jcl?

Postby NicC » Tue Apr 12, 2011 5:37 pm

in the jcl, u can set return-code= 4


Oh yeah? How? Has something new been added to JCL? Did you check in the JCL Language Reference manual?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post