|
|
| Author |
Message |
srebba Warnings : 1 New User
Joined: 26 Apr 2007 Posts: 46 Location: USA
|
|
|
|
Hi All,
In CICS, we can change the key length and we can read the KSDS file.
for example, if key has 10 bytes( 2 fields), then we can change the key length dynamically to 5 bytes and get the records instead START on the file.
Like this can we do in batch also.. same VSAM KSDS file.
Please let me know
Thank you
Sree |
|
| Back to top |
|
 |
References
|
Posted: Wed Apr 02, 2008 11:16 pm Post subject: Re: Change the key length in batch |
 |
|
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1190 Location: At my desk
|
|
|
|
| srebba wrote: |
In CICS, we can change the key length and we can read the KSDS file.
for example, if key has 10 bytes( 2 fields), then we can change the key length dynamically to 5 bytes and get the records instead START on the file.
Like this can we do in batch also.. same VSAM KSDS file. |
Yes, sort of, but not without the START verb.... |
|
| Back to top |
|
 |
srebba Warnings : 1 New User
Joined: 26 Apr 2007 Posts: 46 Location: USA
|
|
|
|
so you mean, we have to use START verb in batch program..
am i right ? |
|
| Back to top |
|
 |
Bill O'Boyle
Active User
Joined: 14 Jan 2008 Posts: 293 Location: Orlando, FL, USA
|
|
|
|
Well, you CAN issue a partial-key direct READ, using a keylength-halfword value along with the GENERIC option.
But for the most part, a STARTBR is the most popular command used to begin reading a KSDS file using a partial-key.
Again, don't forget the GENERIC parameter, which is required. Otherwise, you'll raise an INVREQ condition.
HTH....
Regards,
Bill |
|
| Back to top |
|
 |
Bill O'Boyle
Active User
Joined: 14 Jan 2008 Posts: 293 Location: Orlando, FL, USA
|
|
|
|
Oops! That one went right by me.
Do what CICS Guy has suggested.
Regards,
Bill |
|
| Back to top |
|
 |
srebba Warnings : 1 New User
Joined: 26 Apr 2007 Posts: 46 Location: USA
|
|
|
|
HI Bill O'Boyle
we can do it in CICS as you said,
but can we do in batch.. I dont want use START command as in CICS.. |
|
| Back to top |
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1190 Location: At my desk
|
|
|
|
| srebba wrote: |
we can do it in CICS as you said,
but can we do in batch.. I dont want use START command as in CICS.. |
If you want to use a key shorter than the one defined for the dataset, you will need to use the START followed by READ NEXT/PREVIOUS..... |
|
| Back to top |
|
 |
rpuhlman
Active User
Joined: 11 Jun 2007 Posts: 75 Location: Columbus, Ohio
|
|
|
|
Hi Sree,
There is a great book called "VSAM for the COBOL Programmer" by Doug Lowe. Go to www.murach.com ... they have it for $22.00 dollars. You will learn many processing techniques in both the batch and online environments.
Rick |
|
| Back to top |
|
 |
|
|