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

KEYLEN param for PCB


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

New User


Joined: 01 Jul 2008
Posts: 60
Location: Kolkata

PostPosted: Sat Aug 15, 2009 1:30 am
Reply with quote

Hi,
I have two confusions.
1.
When we mention keylen in the PCB we just mention the key length of the field on which the database segments are kept in sorted order..but how it understands what is that key field for the database(whats the position of the bytes) or is it refer the first bytes of root segment?

2.
My another confusion is when we access a second occurrence of a twin we first reach to the first occurrence with the PCB and SSA where we mentioned the segment names and then using the same PCB but different I/O area we use GN call to access the second occurrence.
but if there is no second occurrence will it fetch the next segment though in the provided PCB the segment name(logical view) not given or it will be status code GB.

Please advise.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Sun Aug 16, 2009 4:32 am
Reply with quote

The key length is defined in the DBD - you need to look at that. You can acess segments in "key sequence" online. But be very careful HDAM is best for online - quicker and more efficient. But, if you are expecting a report in key sequence, you will need to sort it before output. HIDAM has a little more overhead, but it is always in key sequence.

I don't understand your number 2 question. If you qualify your root segment ssa, and then do an unqualifed ssa for the child segment, you will always begin at the first child segment unless you qualify that ssa. If you use an un-qualified ssa for a specific child segment, you will get either a GE (not found) or a GB (end of database). If you do not use an ssa specfic for that child (no ssa) you will get whatever segment comes next.

So, it would be very helpful if you qualify your problem - and the business requirement.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Aug 17, 2009 2:56 pm
Reply with quote

IMS works: Down the hierarchy and then left to right. If you qualify your root segment SSA, and then do an unqualifed SSA for the child segment, you will always begin at the first child segment (left most position) unless you qualify that SSA as Sandy has said.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Mon Aug 17, 2009 6:36 pm
Reply with quote

The pcb-mask contains database name (8 characters), segment level number (2 characters), status code (2 characters), processing options (4 characters), 4 characters reserved space (binary), segment name (8 characters), length of key feedback area (4 characters binary), number of sensitive segments (4 characters binary), and a variable length key feedback area.

Alrighty then......I was just thinking about your question and wanted to clarify something. The key feedback area in your PCB will always hold the keys to the last successful call - up the parent chain. You do not always need to get the parent first. Let's say we have a database with student as the root - a child segment would be classes. We want to know who is taking chemistry. So, we set up our classes SSA as unqualified - no root segment ssa. Once we find a chemistry segment, we look at the keyfeedback area in the PCB. It will contain the root segment key. You can then issue a GU for that student if you want. I would maintain my position by using a second PCB for any GU calls, but you could always reposition yourself.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Mon Aug 17, 2009 6:40 pm
Reply with quote

Oh - let me just say again - you will always be positioned at your last successful call. If you get a GE or GB, you will still be postioned at your last successful call.
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 Executing a Job Step/ Job multiple ti... JCL & VSAM 5
No new posts Calculate Keylen parameter provided i... IMS DB/DC 5
No new posts DATACLAS param in jcl JCL & VSAM 6
No new posts Passing param from a Cobol prog to JC... JCL & VSAM 10
No new posts Can we use If ELSE condition in syncs... JCL & VSAM 2
Search our Forums:

Back to Top