Hi Billy, i followed your suggestion, after a lot of binary chopping, i found out that the RC is issued by a procedure division copybook.
i tried to see where exactly in the PD copybook, the RC is being changed, but a strange thing happened.
All the display statements now print "Return-code = 0000", while in spool JESYSMSG, i am getting COND CODE = 1328
PS0100 JS0200 - STEP WAS EXECUTED - COND CODE 1328
Also , in the below report in JESYSMSG, i am getting COND CODE = 0000.
----------------------------------------------
CONDITION STEP
JOBSTEP PROCSTEP CODE RUN TIME
JS0200 PS0100 R0000 00:00:01.73
Note: Previously this report COND CODE was having some value, which was issued by the program (i kept a display just before GOBACK to check the final RC issued), but this was different than the value MAXCC or statement(PS0100 JS0200 - STEP WAS EXECUTED - COND CODE xxxx) had.
Nicc,
see the snapshot, this is where i get the COND-CODE of the step (and the job in this case)
Dick,
The First snapshot that i've given, it shows me the COND-CODE.You wanted +/- 10 lines of this line, correct.
In this case, those lines don't have much.
All the lines between STEP JS0100 and the Report-table for JS0200 are only SMS dataset allocations. I didnt see any abnormal statement there.