I have 2 files: file1 and file2. Each has 10 rows of data. record format is same for both.
file 1 has 5 fields and out of that 1st 4 fileds has data.
file2 has 5 fields and data in 1st and 5th field only.
1st field is common data for both the files.
i want it to a single file with all the data in proper order.
Can someone help meout this thru any type of sorting...
Joined: 14 Mar 2007 Posts: 8631 Location: Back in jolly old England
Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.
If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.
If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
If the messages start with WER or SYT then the product is SYNCSORT and will be moved into the JCL forum by one of the moderators. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.
You also need to provide more detail than you already have.
What is the RECFM & LRECL of both files.
What is the RECFM and LRECL of the desired output file.
What are the positions, lengths and formats of the key fields in both datasets.
Also, your question is not very clear, so please show the input that you have and the output that you expect to see.
Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.