View previous topic :: View next topic |
Author |
Message |
rkdivvela Beginner
Joined: 26 Mar 2004 Posts: 4 Topics: 3
|
Posted: Thu Apr 08, 2004 5:16 am Post subject: Passing RETURN CODE from COBOL to JCL |
|
|
1). I am setting a Return Code in COBOL program. I want that return code to be passed to JCL and execute some steps.
I tried to move return code into COBOL's RETURN CODE and tested, but no luck.
How does it can be done. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Thu Apr 08, 2004 5:39 am Post subject: |
|
|
rkdivvela,
The following sample pgm shows the setting of return code
Code: |
WORKING-STORAGE SECTION.
01 A PIC S9(5) COMP-3 VALUE 0.
01 B PIC S9(5) COMP-3 VALUE 1.
PROCEDURE DIVISION.
IF A < B
MOVE 16 TO RETURN-CODE
DISPLAY 'THE RETURN-CODE IS:' RETURN-CODE
ELSE
MOVE 0 TO RETURN-CODE
DISPLAY 'THE RETURN-CODE IS:' RETURN-CODE
END-IF.
GOBACK.
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
rkdivvela Beginner
Joined: 26 Mar 2004 Posts: 4 Topics: 3
|
Posted: Fri Apr 09, 2004 9:46 pm Post subject: |
|
|
Kolusu,
I have coded the same way in my program. When I sumbit the JCL, the RETURN-CODE is not being passed to the JCL. Is there any special mechanism required to get this Return Code ?
Thank You |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Mon Apr 12, 2004 8:36 am Post subject: |
|
|
rkdivvela,
You need to give us more details when you say that it is not working. Please post the JCL and your requirement clearly.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|