Forums Register Login

Flat File Index (Very Urgent)

+Pie Number of slices to send: Send
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.

+Pie Number of slices to send: Send
OK, I am confused. flat files do not have an index.
Are you perhaps asking how to SORT the file by ID, AMT and VAL?
In which case you should look at the Collections.sort(List l) method.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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!!
+Pie Number of slices to send: Send
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).]
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1137 times.
Similar Threads
Help required in Dates/ SimpleDateFormat
Read text values in javascript
"Start: Applet is not initialized" error when accessing applet file through web browser
Flat File Index (Very Urgent)
While loop question from SCJP 5.0
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:37:00.