key feedback area after unsuccessful GU



IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)

key feedback area after unsuccessful GU

Postby Mike1304 » Mon Aug 08, 2011 12:21 am

Hi,

I can't understand, how DL1 handles the key feedback area.

I do a GU on a root segment with a key, that is not in the database.
The key contains more than one field and I only know the first one, the rest I put to null.

The ASMTDLI returns a segment level 00 and a status code GE, but a KFB lenth of 0.
Nevertheless, if I do a GN, DLI knowns the current position and returns the next root.

Why do I not get the key in the KFB?

I hope sombody can explain this to me!

Mike
Mike1304
 
Posts: 36
Joined: Mon Feb 28, 2011 4:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: key feedback area after unsuccessful GU

Postby Ed Goodman » Mon Aug 08, 2011 7:14 pm

Your position never changed during the bad call. That does NOT mean the position didn't exist.

You were positioned SOMEWHERE before the bad call, right? So if you skip the bad call, you could still do the GN and get a valid segment.

The first unqualified GN on a given PCB will return the first segment in the database, the same as if you start with an unqualified GU.

Try adding a few unqualified GNs before your bad GU call, and see if makes more sense to you.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: key feedback area after unsuccessful GU

Postby NicC » Tue Aug 09, 2011 12:33 am

I think you need to look at generic keys - the first call using key (say key*) positions the location immediately before the first segment with a key beginning 'key'. It does not position ON asegment but BETWEEN so it does not retrieve anything. The GN will then retrieve the record that is currently immediately after this location.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: key feedback area after unsuccessful GU

Postby Mike1304 » Tue Aug 09, 2011 12:51 am

Ed Goodman wrote:Your position never changed during the bad call. That does NOT mean the position didn't exist.

You were positioned SOMEWHERE before the bad call, right? So if you skip the bad call, you could still do the GN and get a valid segment.

The first unqualified GN on a given PCB will return the first segment in the database, the same as if you start with an unqualified GU.

Try adding a few unqualified GNs before your bad GU call, and see if makes more sense to you.


Sorry, but that is not the behavior I got (and described).

The GU is the first call and if a bad call does not change the position, why do I get with a GN the next root after the used key?
I defititly do not get the first root!
Mike1304
 
Posts: 36
Joined: Mon Feb 28, 2011 4:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: key feedback area after unsuccessful GU

Postby Mike1304 » Tue Aug 09, 2011 12:54 am

NicC wrote:I think you need to look at generic keys - the first call using key (say key*) positions the location immediately before the first segment with a key beginning 'key'. It does not position ON asegment but BETWEEN so it does not retrieve anything. The GN will then retrieve the record that is currently immediately after this location.


Yes, that is exactly the situation!
My question is: Why do I not get the key* in the key feedback area?
Mike1304
 
Posts: 36
Joined: Mon Feb 28, 2011 4:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: key feedback area after unsuccessful GU

Postby NicC » Tue Aug 09, 2011 4:11 pm

the key of which - th GU or the GN? You do not get a key in the KFB for a GU because you are not positioned ON a segment but between segments. If it is for the GN then I do not know - you would have to check in the manual to see what it says.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: key feedback area after unsuccessful GU

Postby Mike1304 » Wed Aug 10, 2011 1:24 am

I mean the GU!

DL1 stored the position before a root, because the following GN gets the next root.
But it seams, that DL1 stores the position only in an internal KFB, not in the PCB.

Is this the normal behavior of DL1?
Can I do something, to get the KFB in the PCB? (without changing the call)
Mike1304
 
Posts: 36
Joined: Mon Feb 28, 2011 4:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: key feedback area after unsuccessful GU

Postby NicC » Wed Aug 10, 2011 9:37 am

As no segment has been retrieved there is no key to save. IMS probably has a cyl/track/sector reference so that it knows where to advance from. Whatever, until it retrieves a segment there is nothing to feed back except the success, or otherwise, of the call. I believe it is in the manual. If it is not in the manual than it doesn't happen.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: key feedback area after unsuccessful GU

Postby Ed Goodman » Wed Aug 10, 2011 8:31 pm

The KFB contains everything that IMS was able to successfully get. In your case, that was nothing, so the KFB length is 0.

I've lost track a little bit... Does your GU SSA have a key 'EQ' or a key 'GE'. ? That changes the behavior somewhat.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: key feedback area after unsuccessful GU

Postby Mike1304 » Thu Aug 11, 2011 10:33 am

The GU SSA have a EQ ( = ) and it gets a GE as status code.

If I summarize all the answers correct, the normal behavior is, that DL1
- clears the KFB after a not successful call
- fills the KFB only after a successful call
- always keeps the position internally independed of the success
Mike1304
 
Posts: 36
Joined: Mon Feb 28, 2011 4:14 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to IMS DB/DC

 


  • Related topics
    Replies
    Views
    Last post