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

Insert Segment


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

New User


Joined: 26 Nov 2008
Posts: 13
Location: UK

PostPosted: Wed Oct 07, 2009 11:48 am
Reply with quote

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
View user's profile Send private message
arivazhagan_k

New User


Joined: 05 Dec 2007
Posts: 57
Location: chennai

PostPosted: Wed Nov 04, 2009 7:06 pm
Reply with quote

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
Code:
RULES=(,), 

that will tell where to insert the new record if any specfice information provided
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 05, 2009 2:09 am
Reply with quote

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
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 05, 2009 2:16 am
Reply with quote

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
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 Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts Identify Program Insert DB2 7
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
Search our Forums:

Back to Top