Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Search the database and write it into a flat file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: Search the database and write it into a flat file
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    Post subject: Re: Search the database and write it into a flat file
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    Post subject: Search the database and write it into a flat file
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    Post subject: Re: Search the database and write it into a flat file
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: 1452
Location: Chicago, IL

PostPosted: Wed Jun 21, 2006 4:05 am    Post subject: Re: Search the database and write it into a flat file
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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us