View previous topic :: View next topic
|
Author |
Message |
PL1user
New User
Joined: 26 Nov 2008 Posts: 13 Location: UK
|
|
|
|
Hi
Code: |
Step1 : GU CUSTOMER(CUSTNUM =‘DV0001’)
SHIPTO (SHPTOSEQ=‘01’)
Step2 : ISRT RECVABLE |
The above code inserts a new segment called RECVABLE in the database.
I see that there is an other SSA which does the above in a different way,
Code: |
ISRT CUSTOMER(CUSTNUM =‘DV0001’)
SHIPTO (SHPTOSEQ=‘01’)
|
If there are different segment types under SHPTO, as per the above ISRT SSA, how will IMS know the segment name where this insert needs to be performed ?
Thanks again for the help.
Regards. |
|
Back to top |
|
|
arivazhagan_k
New User
Joined: 05 Dec 2007 Posts: 57 Location: chennai
|
|
|
|
we should know the physical structure of the ims data base to do any function call. If possible if you post the physical structure then it would be better to guide your query.
Any how in DBDGEN we have something like
that will tell where to insert the new record if any specfice information provided |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
The very very first thing you should do is to determine what your return code is when you try to retrieve the customer. If it is blank - then everything is wonderful. If it is "GE", then you do not have the parent segment necessary to insert the child segment. You would need to insert the parent.
Look at your DBD - it will show you who is the parent and any child segments. Remember always that IMS is POSITIONAL. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
One more thing - look up what you need to do for an insert. I am a COBOL person, but it looks like you are trying to insert a new receivable segment under the CUSTOMER (root) and it's child segment SHIPTO. Notice that the RECEIVABLE SSA is unqualified. |
|
Back to top |
|
|
|