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

Regarding accessing the database


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: Wed Jun 21, 2006 2:49 pm
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: 1208
Location: Bangalore,India

PostPosted: Wed Jun 21, 2006 5:07 pm
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
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: 1448
Location: Chicago, IL

PostPosted: Tue Aug 01, 2006 9:10 am
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts What database does Jobtrac use CA Products 4
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Capturing COBOL job and program names... All Other Mainframe Topics 2
No new posts Accessing ABENDCC in JCL JCL & VSAM 6
No new posts Products/Tools to Optimize Adabas Dat... Compuware & Other Tools 2
Search our Forums:

Back to Top