Joined: 15 Mar 2005 Posts: 17 Location: Toronto, Canada
I have to modify a sort job: It currently copies by SORT 4 datasets with LRECL=71 and RECFM=FB, with a header date and trailer record (end-of-file identifier) created by using HEADER1 and TRAILER1 options.
Now I need to include a PDS member in the SORT which has only one line with 11 characters in it, still keeping OPTION COPY. PDS member should be the first SORTIN file and output file still should be 71 in length.
You just have to increase the length of the PDS member records from 11 characters to 71 characters to match the output length. There are a variety of ways to do that depending on what exactly you're doing. For example, you can use MOD for the output file and do a COPY of the PDS member, using DSN=pds(member), to the output file using:
and then COPY the rest of the input files to the MOD output file.
Or you can do a COPY of the PDS member, using DSN=pds(member), to a temp file again using OUTREC, and then do the other COPY with the temp file concatenated before the other files.