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

how to retrieve data from d/b?


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
snm

New User


Joined: 10 Mar 2005
Posts: 11

PostPosted: Thu Aug 11, 2005 12:47 pm
Reply with quote

hi
in my d/b i have 3 levels and in each level 1 segment is there. parent is 1 and child in level1 is 1 and child in level 2 is 1. and for each segment there r 10 occurences. here parent has 10 seg occurences, next level child has 10 occurences and the last level has 10 occurences.
here what i want to do is retrieve all the records.
by specifying a GN call can we do this or any other way is there?



thanks & regards
Back to top
View user's profile Send private message
banu

New User


Joined: 09 Aug 2005
Posts: 8
Location: Chennai

PostPosted: Thu Aug 11, 2005 5:22 pm
Reply with quote

hi,

The logic for ur prgm goes like this
"1. Give a call to 1st parent(1st level) using GU call with status code ?ge?

Do while pcb-status code1 = ? ? ( successful call)
Give a call to 1st child (2nd level) using GU with qualified SSA using SSA of 1st parent

Do while pcb-status code2 = ? ?
Give a call to 1st child (3rd level) using GU with qualified SSA using SSA of 1st parent &child of (2nd level)
Do while pcb-status code3 = ? ?
Do some operations?.
Give a call to successive segments in 3rd level using GN until status code ?gb?
End;
Give a call to successive segments in 2nd level using GN until status code ?gb?
End;
Give a call to successive segments in 1st level using GN until status code ?gb?
End;
"
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Thu Aug 11, 2005 5:47 pm
Reply with quote

Hi snm,

You can start with a GN Call for parent segment, as you need to retreive all the records, think no need to use GU....

First Loop GN CALL UNTILL END of DB....that you can check by return code of GN Call

Insdie this loop, GNP CALL For 1st level child segment UNTILL END of DB...

Insdie the loop with GNP...another GNP for 2nd level child segment same as above.....

All the calls with unqualified SSA, as you are not going to make a GU Call......

Corrections are wel come

Regards,

Priyesh.
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 Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top