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
 

 

Fetch only last 4 records from 1000 records using FILEAID

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

New User


Joined: 28 Oct 2006
Posts: 18

PostPosted: Fri Oct 26, 2007 11:26 am    Post subject: Fetch only last 4 records from 1000 records using FILEAID
Reply with quote

I have a file having 1000 records in it, I need to fetch only last 4 records in that file ,Please say How can i do tht?
Back to top
View user's profile Send private message

Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Fri Oct 26, 2007 11:54 am    Post subject: Re: How ro fetch the Records
Reply with quote

You can do it by sorting right.
SORT FIELDS=COPY
STARTREC=996

kris22_24 wrote:
I have a file having 1000 records in it, I need to fetch only last 4 records in that file ,Please say How can i do tht?
Back to top
View user's profile Send private message
kris22_24

New User


Joined: 28 Oct 2006
Posts: 18

PostPosted: Fri Oct 26, 2007 11:58 am    Post subject: Reply to: How ro fetch the Records
Reply with quote

Yes we can do tht using sort, but i need it by using File Aid
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Fri Oct 26, 2007 12:00 pm    Post subject: Re: How ro fetch the Records
Reply with quote

Sorry it is

SORT FIELDS=COPY
STARTREC=997
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri Oct 26, 2007 12:21 pm    Post subject:
Reply with quote

Hi,

Try this is FILEAID
Code:
//SYSIN    DD  *     
$$DD01 COPYBACK OUT=4
/*
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Fri Oct 26, 2007 12:26 pm    Post subject: Re: Reply to: How ro fetch the Records
Reply with quote

We can use copy utility/ Selection Criteria Options/ Starting record key

. . . . . . . . . . . . . . . . . . . . . . . . . . .
File-AID -------------- Selection Criteria Options --------------------------
COMMAND ===>

Specify Selection Criteria Options:
Start at the following record key
(both blank for start of dataset)
Starting record key ===>
- OR - OR at the following RBA or RRN
Starting RBA or RRN ===>

Initial records to skip ===> 0 then skip this many records

Subsequent Selection Interval: then repeat the following
Records to select ===> 1 - select this many records
Records to skip ===> 0 - then skip this many records
until
Number of records to search ===> ALL you have read this many records
Number of records to select ===> ALL or selected this many records

SEQ/VSAM processing direction ===> F (F = Forward; B = Backward)


Use ENTER to return to selection criteria menu
Back to top
View user's profile Send private message
vcjadhav
Warnings : 1

New User


Joined: 27 May 2008
Posts: 19
Location: India

PostPosted: Thu Sep 05, 2013 8:14 pm    Post subject:
Reply with quote

I tried Copyback and it threw RC=08 any reason for it?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1753
Location: Bloomington, IL

PostPosted: Thu Sep 05, 2013 8:23 pm    Post subject:
Reply with quote

Yes, you did something wrong. As you were careful not to show messages, we can't say exactly what.

ETA: I just realized that this thread has been re-opened after nearly six years. Perhaps that's the problem icon_biggrin.gif
Back to top
View user's profile Send private message
vcjadhav
Warnings : 1

New User


Joined: 27 May 2008
Posts: 19
Location: India

PostPosted: Thu Sep 05, 2013 8:31 pm    Post subject:
Reply with quote

I think, I found the problem, it looks like, we cant give PDS(member) as the input file. It works only with flat or VSAM file but not with PDS member.
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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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