View previous topic :: View next topic
|
Author |
Message |
changeurlife2003 Currently Banned New User
Joined: 22 May 2006 Posts: 15
|
|
|
|
Hi,
There is a IMS Database. I would like to Search the database and write it into a flat file.Could anybody please tell me the procedure to write it into a flat file.
Tell me what are the steps i have to use. |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
erm...
When you say search, does that mean that you are selecting some and not all of the segments in the database?
is there more than one type of segment?
do you want to write all of the segment types to the same file?
have you got any utilities in your shop to do it for you eg FileAid? |
|
Back to top |
|
|
changeurlife2003 Currently Banned New User
Joined: 22 May 2006 Posts: 15
|
|
|
|
Hi,
I dont have any Utilities.
Simply search the database and write it in to flat file.
There are more than one segment. |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
Well if it is only for the one database and you dont want to write anything fancy for 'any' database
then I might start with looping through the database using an unqualified get next
for each segment read, determine segment type (using the PCB)
and write a record out for that segment type,
possibly to a Variable length file - the length of the record depending on the length of the data in each segment type, or to a flat file where the LRECL is the length of the biggest database segment
Using the segment name as a header is probably a good idea also. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
Back to top |
|
|
|