Hi,
I am new to programming and Cobol in particular. I have two files:
1. file defining tag names and order of tags in the final document
2. file containing tag names and values associated with them
These files contain tens of thousands of records identified by ID common for both files. I want to combine the files to get the resulting file containing tagged values from file 2, with tags shown in an order defined in file 1. I came up with this solution:
* filter out tags of interest (based on ID) from file 1 and sort them based on their names into a temporary file (3)
* filter out values from file 2 (based on ID) and sort them based on their names into another file (4)
* merge records from the temporary files (3,4) into yet another file (5)
* sort this last file (5) according to order taken over from file 1 (copied to file 3 to file 5) - the final file (6)
Is there some other method, how to do it, without creating three temporary files? Thanks in advance for suggestions.
I am new to programming and Cobol in particular. I have two files:
1. file defining tag names and order of tags in the final document
2. file containing tag names and values associated with them
These files contain tens of thousands of records identified by ID common for both files. I want to combine the files to get the resulting file containing tagged values from file 2, with tags shown in an order defined in file 1. I came up with this solution:
* filter out tags of interest (based on ID) from file 1 and sort them based on their names into a temporary file (3)
* filter out values from file 2 (based on ID) and sort them based on their names into another file (4)
* merge records from the temporary files (3,4) into yet another file (5)
* sort this last file (5) according to order taken over from file 1 (copied to file 3 to file 5) - the final file (6)
Is there some other method, how to do it, without creating three temporary files? Thanks in advance for suggestions.