How do you set a return code to the JCL from a COBOL
program?
Answers were Sorted based on User's Feedback
Answer / suresh
Move a value to RETURN-CODE register. RETURN-CODE should
not be declared in your program.
MOVE 4 TO RETURN-CODE
| Is This Answer Correct ? | 34 Yes | 4 No |
Answer / sudheer kumar
in you cobol program you have to code
move 8 to return-code
from jcl we have to check
if re=8
step12 exec pgm=progname
else
step13 exec pgm=progname3
end-if.
| Is This Answer Correct ? | 14 Yes | 2 No |
Answer / bodasureshreddy
you have to passes the returncode from cobol to jcl
| Is This Answer Correct ? | 11 Yes | 4 No |
Answer / suresh . e
01 RETURN-CODE-OUT PIC S9(09) USAGE COMP.
01 RETURN-CODE-IND PIC S9(04) USAGE COMP. first
declaration is to define the variable for return
code.Second declaration is for defining a Null indicator.
| Is This Answer Correct ? | 0 Yes | 14 No |
How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)
what is the difference between implicit and explicit scope terminator with example?
What is the maximum length of a field you can define using COMP-3 in COBOL?
I have a occurs for 100 times but it has executed 101 time what could be the reason?
What are differences between Static Call and Dynamic Call?
10 Answers IBM, KBC, Keane India Ltd, Verizon,
whn do i get soc7 abend while moving alphanumeric to numeric or while moving numeric to aplhanumeric please reply ASAP?
How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)
What is the difference between copy and include in cobol?
i have a file which contains records like 10,30,90,50,20,40,80,60,70 i want to display these records in reverse order like 70,60,80,40,20,50,90,30,10 please give me the cobol code (do not sort the records)
3 Answers Cap Gemini, Mind Tree,
What is the difference between PIC 9.99 and 9v99 in COBOL?
0 Answers SwanSoft Technologies,
Extract only those records from a PS file which are having word 'TEXT' in the records using COBOL? The word TEXT is not present in a particular position in all the records.
where do u use low-value and high value in cobol