Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6254
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: 1789
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 DFSMShsm Dataset Recovery with B and ... Joerg.Findeisen JCL & VSAM 2 Sat Oct 05, 2019 10:01 pm
No new posts Duplicating records in a PDS memebr/I... imcoolleo COBOL Programming 5 Mon Sep 16, 2019 3:32 pm
No new posts Need to fetch data from database base... Satandale COBOL Programming 8 Sun Sep 08, 2019 12:01 am
No new posts Compare duplicate records in same file pshongal DFSORT/ICETOOL 3 Fri Aug 09, 2019 9:37 am
No new posts How to count duplicate key records co... sergeyken SYNCSORT 0 Thu Jul 25, 2019 8:03 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us