A return code of S422 may occur for a job when multiple files are assigned to a single DD (concatenated) and one or more of the files are empty.
For example my sample job has the following JCL:
//GS0512F1 DD DSN=FILE1,DISP=SHR
// DD DSN=FILE2,DISP=SHR
// DD DSN=FILE3,DISP=SHR
All datasets exists in the catalog before step starts and exists in the catalog after the job fails, but one is empty.
File concatenation order does not seem to matter, the problem seems to only occur when the read is transitioning from a file with data to an empty file.
For example, this job has 3 files concatenated.
-
If the files are 1)has data 2)empty 3)empty - the S422 happens on dataset #2.
-
If the files are 1)empty 2)has data 3)empty- the S422 happens on dataset #3.
-
If the files are 1)empty 2)empty, 3) has data - it does not fail.
Full article: https://portal.microfocus.com/s/article/KM000011768
#SupportTips/KnowledgeDocs
#EnterpriseDeveloper