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

IMS PROCOPT conflict between Parent and child segment


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

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Wed Jul 11, 2007 4:16 pm
Reply with quote

I have to create a PSB such that Root segment can be deleted after i have read the Root and all it's dependent segments.

If i give PROCOPT = D on the root and PROCOPT=G on the child, will a 'DLET' of root segment - delete all it's child segments too.

I am not sure how the conflicting PROCOPT will behave.
Please help on this.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Wed Jul 11, 2007 6:02 pm
Reply with quote

You will be fine......a DLET command automatically deletes anything beneath that parent. Are you using multiple positioning or will you go back and retrieve the root with a GHU? In other words, you will no longer be positioned on the root AFTER you read the child segments unless you use 2 PCBs.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Wed Jul 11, 2007 6:08 pm
Reply with quote

One more thing - too early in the morning here. You must always issue a HOLD on ANY segment that you plan to update - whether it be REPL or DLET. If you do not issue that HOLD prior IMS will not let you update. So, get your parent segment - you can just issue a get without the hold. Read thru all children, load the parent key qualified into your SSA - retrieve the parent with the HOLD - check the status code - issue the DLET. Say goodbye to that parent and all children.
Back to top
View user's profile Send private message
Suthagar

New User


Joined: 01 Jul 2005
Posts: 26
Location: Chennai

PostPosted: Wed Jul 11, 2007 6:13 pm
Reply with quote

Hi kalukakkad,

For the deletion of all child segments the GET HOLD call should be a path call and the DLET call can be given with the SSA.

SSA should be an unqualified (without command codes).

a DLET call using an unqualified SSA will cause the deletion of all its dependents (childs). At the same time above its level cannot be deleted.

Hope this will clarify your query.

Regards,
Suthagar.S
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Wed Jul 11, 2007 6:17 pm
Reply with quote

Suthagar,

You do not need to issue a path call to DLET all of the child segment. You have the parent with a HOLD call - if you just issue the DLET on the parent, all children automatically go bye-bye. They cannot exist in IMS because internally their pointers are gone.
Back to top
View user's profile Send private message
Suthagar

New User


Joined: 01 Jul 2005
Posts: 26
Location: Chennai

PostPosted: Wed Jul 11, 2007 6:32 pm
Reply with quote

Hi Sandy,

If you read my reply I have given the idea as common deletion of the segments and its childs not only the Parent.

Thats why I have mentioned the path call HOLD and also I have mentioned above its segments cannot be deleted.
Back to top
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Wed Jul 11, 2007 6:47 pm
Reply with quote

Thanks Sandy and Suthagar for such a quick reply.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Fri Jul 13, 2007 1:28 am
Reply with quote

Suthagar wrote:
Hi Sandy,

If you read my reply I have given the idea as common deletion of the segments and its childs not only the Parent.

Thats why I have mentioned the path call HOLD and also I have mentioned above its segments cannot be deleted.


Like Sandy says this pathcall brings no light to me. Once positioned at a segment using a HOLD-call the next DELETE-call will delete the segment positioned at and all of its dependents and children. Of course you should make sure there's no one else preventing you from this deletion using a special command code.
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 How to: PK does not exist in several ... DB2 6
No new posts IMS SEGMENT READ ISSUE IMS DB/DC 1
No new posts Inserting records into the empty segm... IMS DB/DC 1
No new posts REORG to reduce segment size new DBD IMS DB/DC 2
No new posts How to find if segment is read in any... IMS DB/DC 12
Search our Forums:

Back to Top