by anoopm7 » Wed Feb 13, 2008 5:33 pm
to add to the above.There is a sort step above the step which has the program.The output from the sort step does have only one input(seems a header)..I got the below reason for u4038..iam not sure whether this is the reason.
We have a Production job that occasionally abends with U4038 and the LE
messages showing the underlying cause to be a File Status 46. According
to the Enterprise COBOL V3R3 Language Reference, the status 46 means:
"A sequential READ statement was attempted on a file open in the input
or I-O mode and no valid next record had been established because:
° The preceding READ statement was unsuccessful but did not cause an
at-end condition.
° The preceding READ statement caused an at-end condition."
When the abend occurs, the preceding jobstep (DFSORT) created an empty
sequential dataset; i.e., the //SORTOUT DD statement gives a DSN= and a
DISP=(NEW,CATLG), and the //SORTIN dataset contained zero records.
HOWEVER, the abending program is coded to accept an empty input dataset
(the SORTOUT from the preceding jobstep), and usually handles it
gracefully. To make matters worse, we cannot seem to be able to
reproduce the File Status=46 condition, no matter how we define the
empty dataset (in the Production environment it is an SMS-managed
dataset). Every test attempt returns a "normal EOF" (File status = 10)
on first read.
Thanks in advance.