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

Retrieve records sequentially from KSDS using Fileaid Batch


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Thu Mar 04, 2010 4:13 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Mar 04, 2010 4:39 pm
Reply with quote

You could use IDCAMS REPRO with FROMKEY and TOKEY.
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Thu Mar 04, 2010 5:40 pm
Reply with quote

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
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Mar 04, 2010 6:00 pm
Reply with quote

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
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Thu Mar 04, 2010 7:25 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Mar 04, 2010 7:30 pm
Reply with quote

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
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Mar 04, 2010 7:44 pm
Reply with quote

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
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Fri Mar 05, 2010 12:31 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Mar 05, 2010 1:34 pm
Reply with quote

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
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Fri Mar 05, 2010 2:11 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Mar 05, 2010 2:59 pm
Reply with quote

Ok,

so why would you read backward? If you use COPY KEY= that will be
skipsequential too.
Did you try that?
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 97
Location: India

PostPosted: Fri Mar 05, 2010 4:12 pm
Reply with quote

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.

Quote:
Did you try that?


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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Mar 05, 2010 4:18 pm
Reply with quote

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
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 -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top