View previous topic :: View next topic
|
Author |
Message |
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi,
I have a KSDS file. I want to use File Aid Batch to retrieve the records after positioning using KEY=C'key' option.
I have used the following File Aid card:
Code: |
$$DD09 CBVS KEY=C'001123456789012345 ',IF=(87,EQ,C'MM'),OUT=0 |
However this is throwing as error as:
Code: |
ER121-VSAM Logical error has occurred. Feedback code = 0088 (decimal) for record 000000001 |
I looked up in Fileaid Help & found out the error as:
Code: |
088(58) You issued a Sequential GET request without having caused VSAM
to be positioned for it, or you changed from Addressed Access
to Keyed Access without causing VSAM to be positioned for Keyed-
Sequential Retrieval; there was no Sequential PUT insert for a
Relative Record data set, or you attempted an illegal switch
between forward and backward processing. |
However I do not know how to position for KSDS record.
Kindly let me know how to approach this defect. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
You could use IDCAMS REPRO with FROMKEY and TOKEY. |
|
Back to top |
|
|
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi PeterHolland,
REPRO using IDCAMS is an option like you have suggested. But this will copy all the records belonging to the particular key.
However I want to copy just the records that have 'MM' present from 87th byte.
Please let me know if IDCAMS provides an option of selecting records (like the above condition) that needs to be copied.
Thanks |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Hi,
Sorry... these are untested.
SORT step... Not sure if this will work for your condition(You need to check the fields length and format).
Code: |
INCLUDE COND=(1,19,CH,GE,C'001123456789012345 ',AND,87,2,CH,EQ,C'MM') |
File-AID batch...
Code: |
...... IF=(1,GE,C'001123456789012345 '),IF=(87,EQ,C'MM') |
Please let me know the results. |
|
Back to top |
|
|
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi Gnana Sekaran Nallathambi,
I am sure the above codes will work. But I wanted to read KSDS file Skip-Sequentially. This actually saves some CPU units.
Can you kindly let me know if we can read KSDS Skip-Sequentially using File Aid batch.
Thanks |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Learncoholic wrote: |
Hi PeterHolland,
However I want to copy just the records that have 'MM' present from 87th byte.
Thanks |
No, thats not possible with IDCAMS |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Hi,
Please let me know what CBVS will do?
I'm not seeing that keyword in File-AID/MVS Batch Reference Manual Release 8.9
Also I'm unable to refer the error message ID and description(you mentioned in the first post) in the same manual. |
|
Back to top |
|
|
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi Gnana Sekaran Nallathambi,
CBVS is equivalent to COPYBACKVS i.e. File Aid will Copy records Backwards. Also it will treat the file as VSAM.
I referred File-AID/MVS Batch Reference Manual Release 8.8 & found a similar example in page 23 under the topic Dataset Identifier.
Also I copied the error message ID & description from Fileaid product tutorial supplied along with Fileaid in mainframe & then went to option "Message tutorial (system error codes)" & then into "VSAM LOGICAL ERROR CODES" wherein I pressed Enter to get to the description.
Thanks. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Learncoholic wrote: |
Hi Gnana Sekaran Nallathambi,
I am sure the above codes will work. But I wanted to read KSDS file Skip-Sequentially. This actually saves some CPU units.
Can you kindly let me know if we can read KSDS Skip-Sequentially using File Aid batch.
Thanks |
About how many CPU inits are we talking here?
As far as i see it FileAid will read the data sequential, just like sort
would do. Beside that real sorting is not necessary while the reading
is on key sequence. So a sort/copy would suffice. |
|
Back to top |
|
|
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi PeterHolland,
Quote: |
About how many CPU inits are we talking here? |
The input VSAM file is quite large. Hence quite a few CPU units will be saved. I have not come around with the actual data though.
I have currently done this with Sorting. But I am open to skip sequential reading using keys parameter in File Aid.
Thanks. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Ok,
so why would you read backward? If you use COPY KEY= that will be
skipsequential too.
Did you try that? |
|
Back to top |
|
|
Learncoholic
New User
Joined: 20 Sep 2007 Posts: 97 Location: India
|
|
|
|
Hi PeterHolland,
Quote: |
so why would you read backward? If you use COPY KEY= that will be
skipsequential too. |
I want to read backward because the VSAM contains many records pertaining to the key. I expect to find the 'MM' code towards the end of the records present under the same key. Hence I want to read it backwards. This particular method also reads the VSAM Skip-Sequentially.
Yes, I have tried this & this works perfectly alright.
So my guess is that File Aid does not allow to read Skip-Sequentially backwards.
Thanks |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Learncoholic wrote: |
Hi PeterHolland,
Yes, I have tried this & this works perfectly alright.
So my guess is that File Aid does not allow to read Skip-Sequentially backwards.
Thanks |
Yes, and thats why i asked that question.
But then with COPY you have skip sequential forward, i dont know
how many records that skip is, for the rest its only IO with some
testing.
So that CPU units bussiness, is quite redundant. |
|
Back to top |
|
|
|