Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
IMS Insert at 3 Level

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
Author Message
raveendra_ibm
Currently Banned

New User


Joined: 07 Jan 2006
Posts: 45

PostPosted: Tue Jan 24, 2006 7:52 pm    Post subject: IMS Insert at 3 Level
Reply with quote

Hi All,

I am new to IMS - DB.

Could anyone please give me a cobol sample code to insert a record at the 3rd level of a IMS database segment, assuming any simple schema and explain the same.

Thanks and Regards,
Raveendra.
Back to top
View user's profile Send private message
References
Bitneuker

IMS Moderator


Joined: 07 Nov 2005
Posts: 1140
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 24, 2006 10:00 pm    Post subject:
Reply with quote

Hi Raveendra,

If you're new to IMS I advise you to read the manual(s). There's a lot to know about IMS so teaching and training in this forum would take too much time and effort. As for your question I'll answer it this time. Like in all data management systems you first position where you want to add data. In this case (IMS) it's a hierarchy so you will have to position. I'll give you two ways to do it.

If segments 1 (root) and 2 (parent) are present and the keys are known. You issue 2 SSA's in your GU-call to establish position.
CALL CBLTDLI USING GU, DB-PCB,IO-AREA,SSA-ROOT(KEY=),SSA-PARENT(KEY=).
Then you just perform the ISRT-call:
CALL CBLTDLI USING ISRT, DB-PBC, IO-AREA, SSA-CHILD.

If root and parent are not present you may insert them too in a pathcall. Your IO-area should contain all data and the first SSA should contain the command code *D. This will insert the complete sequence. From the manual I copied this for you. Do some further investigation yourself please.

1.1.8.1.2.2 Inserting a Sequence of Segments

With ISRT calls, you can use the D command code to insert a path of segments at once. When you are using D with ISRT, you do not have to include D for each SSA in the path. You just specify D on the first segment that you want IMS to insert. IMS inserts the segments in the path that follow.
For example, suppose you had the following request:

Judy Jennison visited the clinic for the first time. Add a record
that includes PATIENT, ILLNESS, and TREATMNT segments.

After building the segments in your I/O area, issue an ISRT call with the following SSAs:

ISRT PATIENTb*Db
ILLNESSbb
TREATMNTb


Not only is the PATIENT segment added, but the segments following the PATIENT segment, ILLNESS and TREATMNT, are added to the database.

Cheers,
Back to top
View user's profile Send private message
Bitneuker

IMS Moderator


Joined: 07 Nov 2005
Posts: 1140
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 24, 2006 10:12 pm    Post subject:
Reply with quote

By the way: I consulted this manual: IMS/ESA V4 Application Programming DL/I Calls
Back to top
View user's profile Send private message
harshavmr
Currently Banned

New User


Joined: 10 Jun 2005
Posts: 5
Location: Hyderabad

PostPosted: Sun Jan 29, 2006 1:50 pm    Post subject:
Reply with quote

george can you give any URL which gives the complete explination of this
Back to top
View user's profile Send private message
Bitneuker

IMS Moderator


Joined: 07 Nov 2005
Posts: 1140
Location: The Netherlands at Hole 19

PostPosted: Mon Jan 30, 2006 3:14 pm    Post subject:
Reply with quote

At your service:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFSP30B8/CCONTENTS?DT=19981013171259
Back to top
View user's profile Send private message
rajesh_1183

Active User


Joined: 24 Nov 2005
Posts: 130
Location: Tadepalligudem

PostPosted: Tue Feb 28, 2006 5:08 pm    Post subject:
Reply with quote

click here

Corrections welcomed.........

Thanks,
Rajesh
Back to top
View user's profile Send private message
Bitneuker

IMS Moderator


Joined: 07 Nov 2005
Posts: 1140
Location: The Netherlands at Hole 19

PostPosted: Tue Feb 28, 2006 6:16 pm    Post subject:
Reply with quote

Hi Rajesh,

Could you explain what you mean with the post? The latest answer to this topic was given about a month ago and no further requirements have been posted since. What brings you to re-open the topic?
Back to top
View user's profile Send private message
rajesh_1183

Active User


Joined: 24 Nov 2005
Posts: 130
Location: Tadepalligudem

PostPosted: Wed Mar 01, 2006 9:54 am    Post subject: Re: IMS Insert at 3 Level
Reply with quote

ooooooooppppps.....sorry I thought it is updation.sorry for that icon_sad.gif icon_sad.gif


Thanks,
Rajesh
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1