Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts TBSARG - Deleting the search criteria... ISPFHerc TSO/ISPF 5 Thu Dec 14, 2017 8:18 am
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us