View previous topic :: View next topic
|
Author |
Message |
srikar tenali
New User
Joined: 07 Feb 2007 Posts: 22 Location: hyderabad
|
|
|
|
Database Structure:
Parent segment
-Child segment 1
-Child segment 2
Requirement:
Read the parent segment. check for the field "Route ID".
If it is equal to 'AA' then update it to 'BB'.
Then check if this record has Child segment 1.
If it is not present then insert one.
Logical flow:
1. A GHU call was made on Parent segment( Qualified Parent segment SSA). then the validation processing is done.
2. Then a REPL call was made with the updated values for the parent segment.
3. A GNP call was made for the Child segment 1(Qualified Parent SSA and Unqualfied Child segment SSA)
4. If not present make an ISRT call(Qualified Parent segment SSA and unqualified Child segment SSA).
In the above scenario, steps 1-3 are working fine. but there is a problem in ISRT call. while making an ISRT call, the insertion of child segment is made into first record of the Database. this proves that there is some problem in establishing the parentage though i am using a qualified Parent segment SSA in ISRT call.
Please suggest ways to overcome this problem.
Thanks in advance,
Srikar |
|
Back to top |
|
|
rajesh1183
New User
Joined: 07 Jan 2008 Posts: 98 Location: Hyderabad
|
|
|
|
Instead of GNP in step 3, try a GU(Qualified Parent SSA and Unqualfied Child segment SSA), becoz GU or GN also sets the parentage... |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
You can combine step 3 and 4 if the child has a sequence field. If it already existed status code II will be returned. And the reach of a GNP is limited to the root segment so you don't need the qualification SSA for the root. |
|
Back to top |
|
|
|