Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Insert Segment

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: Insert Segment
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts How do I right justify a string in an... rakesh17684 DB2 1 Wed Jun 08, 2016 8:01 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us