1. I have 2 files. The first file has the data as shown below.
ACN_NO 1 CHAR 12,
RESTALL 13 CHAR 980
The second file has the data as shown below.
ACN_NO1 1 CHAR 12,
RESTALL1 13 CHAR 980
Condition is to see whether the ACN_NO of the input file 1 and ACN_NO1 of the input file 2 are are the same. Then only those records wherein ACN_NO and ACN_NO1 are not equal are moved to the output file and the ACN_NO,RESTALL fields of the input file 1 are reformatted.
Can I know how to give the syncsort command here for the required fields.
2. Also I have another file with the data as shown below.
A condition is checked wherein the ACN_NO is equal to '900000000000' and cif is equal to 'CIF'. Then all the records which satisfy the above condition are rejected and the remaining records are sorted based on the ACN_NO and the final list of records is moved into the output file and the fields ACN_NO,RESTALL are reformatted.
Can I know how to give the syncsort command here for the required fields.
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
Sripriya,
Quote:
Condition is to see whether the ACN_NO of the input file 1 and ACN_NO1 of the input file 2 are are the same. Then only those records wherein ACN_NO and ACN_NO1 are not equal are moved to the output file and the ACN_NO,RESTALL fields of the input file 1 are reformatted.
Can I know how to give the syncsort command here for the required fields.
I don't know of any SYNCSORT commands that will accomplish this. Maybe someone will know of some SYNCSORT tricks.
Quote:
A condition is checked wherein the ACN_NO is equal to '900000000000' and cif is equal to 'CIF'. Then all the records which satisfy the above condition are rejected and the remaining records are sorted based on the ACN_NO and the final list of records is moved into the output file and the fields ACN_NO,RESTALL are reformatted.
Can I know how to give the syncsort command here for the required fields.
Are you giving the file layout here or the actual data in the file.
If your are giving the file layout, then there is an easy solution to your first question also if you have DFSORT supported by your shop. You can use ICETOOL to sort all the records from both the input files 1 & 2 on ACN_NO to another file 3 and then you can select all records that are not dulpicates on to anther output file which I beleive is your requirement
I couldn't undersdtand the later part of your first question when you said "and the ACN_NO,RESTALL fields of the input file 1 are reformatted". Can you please elaborate this?
Your second requirement can be fulfilled using Dave's solution.
Please let me know if I'm not clear or in case you have any questions.