View previous topic :: View next topic
|
Author |
Message |
murali922
New User
Joined: 25 Jul 2005 Posts: 92 Location: India
|
|
|
|
Hi,
How do you return a bad return code from a cobol program to the job ?
Also how do you send a bad return code to the cobol program from the JCL to the program ?
Please let me know...
Regards. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
What do you consider to be a "bad" return-code vs. a "good" one? |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
What means BadReturnCode? From a CobolProgramm you could send an RC to JCL by using the field return-code.
Move 16 to return-code.
Then in JCL you could handel the rc-16.
The other way is to transfer a parameter from JCL to the CobolProgramm.
STEP090 EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSIN DD *
PROFILE
DSN SYSTEM(DB2T)
RUN PROGRAM(MDL50310) PLAN(GK210307) PARM('VEDL 16 FF 0000')
END
//*
So programm gets 'VEDL 16 FF 0000' as a parameter at ProgrammStart.
Be shure that you handel parm in your programm correctly. Define parm
fields in linkage.
Regards, UmeySan |
|
Back to top |
|
|
murali922
New User
Joined: 25 Jul 2005 Posts: 92 Location: India
|
|
|
|
I am sorry for typing it that way. All I needed was how do I send a return code (e.g. 60) over to the job ? And how do I do the same from the job to the cobol program ? |
|
Back to top |
|
|
murali922
New User
Joined: 25 Jul 2005 Posts: 92 Location: India
|
|
|
|
Thanks Umeysan ! |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Jobs don't return codes back to any programs. What you're asking for is a function that doesn't exist in JCL. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
So, that's wat I descibed in my answer.
Regards, UmeySan |
|
Back to top |
|
|
murali922
New User
Joined: 25 Jul 2005 Posts: 92 Location: India
|
|
|
|
Ok. Thanks Superk. |
|
Back to top |
|
|
|