I have a MVS Dataset named A.1 whose record length is 30 and the data containing reads as 3065 511111 012. I need to write to a flat file with the following structure 3065 - (ID) 4 chars 511111 - (AMT) 6 digits 012 - (VAL) 3 digits How do I do the index in the order of ID, AMT and VAL.
the easiest implementation if the file is read only is to build the index files when you create the flat file. if it's read/write then it's something you don't want to code yourself. get a flat file library. I don't know any myself. the index file contains the column indexed (sorted) and it's index (position) in the flat file. If this does not make any sense to you then I'm sorry, just read documentation on ISAM. Otherwise enjoy.
Joined: Sep 14, 2001
Let me clear what exactly I want I have a MVS Dataset named A.1 whose record length is 30 and the data containing reads as 3065 511111 012. I need to write to a flat file with the following structure 3065 - (ID) 4 chars 511111 - (AMT) 6 digits 012 - (VAL) 3 digits If I had to insert into a table I can easily insert the values and create a primary key or a index for the above fields. How do I achieve this same functionality if I have to use the flat file (index in the order of ID, AMT and VAL) I hope I'm clear. Any thougths and suggestions . Very Urgent!!
The way you explain your problem makes me quite confused because you come with a solution and not with a problem. My question is : WHAT do you want to do and not HOW do you want to do ? Maybe when you'll explain that we can help you. Do you want to have quick access to data ? Do you want to sort the data ? ------------------ Laurent Leonard Laurent.Leonard@advalvas.be [This message has been edited by Laurent Leonard (edited September 19, 2001).]