View previous topic :: View next topic
|
Author |
Message |
kalukakkad
New User
Joined: 10 Mar 2005 Posts: 81
|
|
|
|
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 |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
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 |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
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 |
|
|
Suthagar
New User
Joined: 01 Jul 2005 Posts: 26 Location: Chennai
|
|
|
|
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 |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
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 |
|
|
Suthagar
New User
Joined: 01 Jul 2005 Posts: 26 Location: Chennai
|
|
|
|
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 |
|
|
kalukakkad
New User
Joined: 10 Mar 2005 Posts: 81
|
|
|
|
Thanks Sandy and Suthagar for such a quick reply. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
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 |
|
|
|