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
 

 

Retrieve records sequentially from KSDS using Fileaid Batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 73
Location: India

PostPosted: Thu Mar 04, 2010 4:13 pm    Post subject: Retrieve records sequentially from KSDS using Fileaid Batch
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Mar 04, 2010 4:39 pm    Post subject:
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: 73
Location: India

PostPosted: Thu Mar 04, 2010 5:40 pm    Post subject: Reply to: Retrieve records sequentially from KSDS using File
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: 785
Location: Chennai, India

PostPosted: Thu Mar 04, 2010 6:00 pm    Post subject: Reply to: Retrieve records sequentially from KSDS using File
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: 73
Location: India

PostPosted: Thu Mar 04, 2010 7:25 pm    Post subject: Reply to: Retrieve records sequentially from KSDS using File
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Mar 04, 2010 7:30 pm    Post subject: Re: Reply to: Retrieve records sequentially from KSDS using
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: 785
Location: Chennai, India

PostPosted: Thu Mar 04, 2010 7:44 pm    Post subject:
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: 73
Location: India

PostPosted: Fri Mar 05, 2010 12:31 pm    Post subject: Reply to: Retrieve records sequentially from KSDS using File
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Mar 05, 2010 1:34 pm    Post subject: Re: Reply to: Retrieve records sequentially from KSDS using
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: 73
Location: India

PostPosted: Fri Mar 05, 2010 2:11 pm    Post subject: Reply to: Retrieve records sequentially from KSDS using File
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Mar 05, 2010 2:59 pm    Post subject:
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: 73
Location: India

PostPosted: Fri Mar 05, 2010 4:12 pm    Post subject: Reply to: Retrieve records sequentially from KSDS using File
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Mar 05, 2010 4:18 pm    Post subject: Re: Reply to: Retrieve records sequentially from KSDS using
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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