As told, are the input files sorted? is/are there any common key(s) between two files? if answer to this is yes then the quickest way is to use JOINKEYS.
How is(&&S1)
Quote:
Code:
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
being used here?
And as Dick suggested, please provide the SYOUT/Spool messages related to the failure for the exact rectifications and it is best practice to use a CODE tag.
However if there is no common key then you can use the trick "Join fields from two files record-by-record" from the below link (ofcource please do necessary modifications as per your offset instead of a whole record),
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
You really have to clarify what it is you are trying to do.
Show a sample of data from both input files, and the expected output for that data, and a description of how that should happen.
Your S013 is probably because you haven't defined your SYMNAMES DSN as F/FB LRECL 80, which you could do by specifying an extra ..,80:X) where you are defining your record.
Please use BUILD instead of INREC/OUTREC FIELDS or OUTFIL OUTREC, which only exist for backwards-compatibility.
I don't think your generated symbol is doing what you want, even though I don't know what you want.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Your have SyncSort (WER messages) not DFSORT, so your topic has been moved to the JCL forum where SyncSort questions live.
You have to take note of all that is said, and not just a bit which is superficially useful to you. I suggested your code would not work.
You are generating a symbol. Symbols have to be unique. Unless your file has only one record, this idea is not going to work.
If you describe, fully, answering anything remaining which was asked of you, there will probably be a reasonably short solution. But until we know what you want, including the compare part, there is not much point in suggesting anything.
I have one file (namely FILE1) with multiple records having values 'VC111.242.1B' residing in position 118 to 130 and values 'C102C118' residing in position 192 to 200'
Similarly I have another file (namely FILE2) with multiple records having values 'VC111.242.1B' residing in position 118 to 130 and values 'C102C240' residing in position 192 to 200'
Using JCL SORT, i need to generate a 3rd file (FILE3), which contains above FILE1 and FILE2 values residing in below manner
VC111.242.1B C102C118 VC111.242.1B C102C240
I tried using SYSNAMES, but that do not support with multiple records. Is there a any better solution using SORT utility to attain the above objective
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Sumeendar,
Please re-read all the posts and reply to the questions asked. Post some sample input records, some 4-5 records from both the files (showing relevant fields) and the expected output out of it and the rules by which you arrived at that output.