Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

KEYLEN param for PCB

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: KEYLEN param for PCB
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    Post subject:
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

Senior Member


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

PostPosted: Mon Aug 17, 2009 2:56 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing a Job Step/ Job multiple ti... beeram527 JCL & VSAM 5 Fri Dec 12, 2014 7:28 am
No new posts Calculate Keylen parameter provided i... kratos86 IMS DB/DC 5 Wed Aug 27, 2014 1:19 am
No new posts DATACLAS param in jcl sriramvempaty JCL & VSAM 6 Wed May 28, 2008 12:49 pm
No new posts Passing param from a Cobol prog to JC... prabhu v JCL & VSAM 10 Mon Feb 18, 2008 6:03 pm
No new posts Can we use If ELSE condition in syncs... ravven16 JCL & VSAM 2 Tue Aug 29, 2006 7:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us