IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Search the database and write it into a flat file


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
changeurlife2003
Currently Banned

New User


Joined: 22 May 2006
Posts: 15

PostPosted: Mon Jun 19, 2006 5:41 pm
Reply with quote

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
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Tue Jun 20, 2006 2:39 pm
Reply with quote

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
View user's profile Send private message
changeurlife2003
Currently Banned

New User


Joined: 22 May 2006
Posts: 15

PostPosted: Tue Jun 20, 2006 8:35 pm
Reply with quote

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
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Tue Jun 20, 2006 9:10 pm
Reply with quote

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
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Jun 21, 2006 4:05 am
Reply with quote

changeurlife2003,

See if these links help you understanding the process better...

http://ibmmainframes.com/viewtopic.php?t=4953
http://ibmmainframes.com/viewtopic.php?t=4159
http://ibmmainframes.com/viewtopic.php?t=4014
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top