Read that there is no need of SSA for ISRT, DLET, REPL?

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Raunak Singh
Registered Member
Posts: 11
Joined: Wed Mar 26, 2014 4:49 pm

Read that there is no need of SSA for ISRT, DLET, REPL?

Post by Raunak Singh »

I read that there is no need of SSA for ISRT, DLET, REPL. I'm confused why is this so?
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Read that there is no need of SSA for ISRT, DLET, REPL?

Post by Anuj Dhawan »

In simple words, you usually don't need any SSA on a DLET call because before delete you'd issuse a GH call and DLET will delete the segment you just retrieved, as I said, with a GET HOLD call. However, with a path call - you might retrieve more than one segment while you want to delete a specific segment then on a DLET (after a path call) one unqualified SSA is REQUIRED to tell IMS which one of the segments just retrieved is to be deleted.

It should be noted that only one SSA is allowed on a DLET and the SSA on a DLET MUST be UNQUALIFIED. Along with it, an I/O area is required. You will get an AB statcode if an I/O area is not present.

You might not need an SSA for an ISRT call **if** you're okay with the current "position in IMS database". Otherwise, an ISRT MUST have at least one unqualified SSA, naming the segment you are inserting. If there are no other SSAs, which parent(s) the new segment gets under depends on database position before the ISRT call, as I said earlier. With SSA , you can implicitly establish where a new segment goes by previous calls.

On the other hand the IMS manuals tells that a programmer should explicitly tell IMS exactly where the new segments should go by using qualified SSAs for all the higher level segments when an ISRT is issued. This way IMS checks the hierarchical path to the new segment and in case any parents are missing, the ISRT call will fail - which is correct.

It is possible to do a "path ISRT". But in any case where there is more than one SSA on an ISRT, the lowest-level SSA MUST be UNQUALIFIED. When there is only one SSA, it MUST be UNQUALIFIED.

Similarly, one do not use SSAs on a REPL call if the preceding GET HOLD gets only got one segment, you, as a programmer know that what segment is to be replaced, so no SSA is needed. But again, if the preceding GET HOLD was a path call which retrieves more than one segment - SSAs may be necessary on a REPL. Because with call if you get more than one segments and you issue a REPL they will all be replaced. If you want some of them to NOT be replaced you'd need an unqualified SSA for those segments with the *N command code. And with a qualified SSA on a REPL will give you an AJ status code.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Raunak Singh
Registered Member
Posts: 11
Joined: Wed Mar 26, 2014 4:49 pm

Re: Read that there is no need of SSA for ISRT, DLET, REPL?

Post by Raunak Singh »

Thanks for the explanation Anuj!
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Read that there is no need of SSA for ISRT, DLET, REPL?

Post by Anuj Dhawan »

You're welcome! :)
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”