View previous topic :: View next topic
|
Author |
Message |
snm
New User
Joined: 10 Mar 2005 Posts: 11
|
|
|
|
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 |
|
 |
banu
New User
Joined: 09 Aug 2005 Posts: 8 Location: Chennai
|
|
|
|
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 |
|
 |
priyesh.agrawal
Senior Member

Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
 |
|