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
 

 

Regarding accessing the database

 
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: Wed Jun 21, 2006 2:49 pm    Post subject: Regarding accessing the database
Reply with quote

Hi,

soultion is simple for all but complex for me.

There is a root segment GROUP ROOT(GPGRU)----->Child segment GROUP PACKAGE (GPPAC)

My requirement is :

There is a input file with some group numbers.
read this input file and get that group number and search in the GROUP ROOT and retrieve from the database and put it in to the flat file.

Could anybody please help me in this regard.

Am very new for IMS Please brief me.
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Jun 21, 2006 5:07 pm    Post subject:
Reply with quote

What is group number ?
Is it the field of root segment ?
If so u want to insert child segment for that root also in flat file
Back to top
View user's profile Send private message
changeurlife2003
Currently Banned

New User


Joined: 22 May 2006
Posts: 15

PostPosted: Wed Jun 21, 2006 6:12 pm    Post subject:
Reply with quote

Yes Group number is the key.

based up on the group number i need to extract the data and write it in to the flat file.

output file contains both root segment data and child segment data.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Tue Aug 01, 2006 9:10 am    Post subject: Re: Regarding accessing the database
Reply with quote

ok, let me try if I make any sense... Chk this psudo code....

Quote:
suppose

GROUP ROOT (GPGRU)
Group Number (Key)
Root Field
-----> Child segment GROUP PACKAGE (GPPAC)
Child Field 1
Child Field 2


Code:
READ INPUT FILE and GET Group Number in some WS-GRP-NUM
PERFORM GU-ROOT UNTIL END-OF-FILE.


GU-ROOT.
MOVE WS-GRP-NUM to GPGRU-KYVAL (this u can find from SSA def for GPGRU).
GU CALL on GPGRU. (with qualified SSA)
IF RET-CODE = SPACES (means value found in root)
   PERFORM GNP-CHILD
ELSE
   NOT FOUND.


GNP-CHILD.
GNP CALL on GPPAC. (with un-qualified SSA)
IF RET-CODE = SPACES (means value found in root)
   WRITE TO O/P.
ELSE
   DISPLAY NO CHILD RECORD FOR THIS GRP NUM.
Back to top
View user's profile Send private message
komalnik

New User


Joined: 28 May 2005
Posts: 7

PostPosted: Wed Aug 09, 2006 12:56 pm    Post subject: Re: Regarding accessing the database
Reply with quote

Please Find Attached the Complete Program. Try to Execute the same and if u find any Problems Just log in a Call...
Back to top
View user's profile Send private message
komalnik

New User


Joined: 28 May 2005
Posts: 7

PostPosted: Wed Aug 09, 2006 1:59 pm    Post subject: Re: Regarding accessing the database
Reply with quote

Please Find Attached the Complete Program. Try to Execute the same and if u find any Problems Just log in a Call...
Back to top
View user's profile Send private message
gautam79

New User


Joined: 30 Aug 2006
Posts: 11
Location: India

PostPosted: Wed Aug 30, 2006 11:52 am    Post subject:
Reply with quote

I think you first need to create a PSB, get it generated by DBA, then get a ACBGEN done for your program and then do a normal compile of the program.

After that you can run it using DFSRRC00
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 Accessing first bit of PD value rajatbagga DFSORT/ICETOOL 11 Wed May 03, 2017 6:03 am
No new posts IMS Database backup info ashek15 IMS DB/DC 14 Wed Nov 16, 2016 5:29 am
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am
No new posts Database access from COBOL amitmahalkar DB2 1 Wed Jan 27, 2016 11:33 am


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