View previous topic :: View next topic
|
Author |
Message |
changeurlife2003 Currently Banned New User
Joined: 22 May 2006 Posts: 15
|
|
|
|
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 |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
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 |
|
|
changeurlife2003 Currently Banned New User
Joined: 22 May 2006 Posts: 15
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
komalnik
New User
Joined: 28 May 2005 Posts: 7
|
|
|
|
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 |
|
|
komalnik
New User
Joined: 28 May 2005 Posts: 7
|
|
|
|
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 |
|
|
gautam79
New User
Joined: 30 Aug 2006 Posts: 11 Location: India
|
|
|
|
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 |
|
|
|