View previous topic :: View next topic
|
Author |
Message |
krishna_Murty Warnings : 2 New User
Joined: 17 Sep 2006 Posts: 24
|
|
|
|
As we have option called OPTION COPY,STOPAFT=10000
to pull first 10000 records. Do we have any option to pull last 100 records or so like that. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Do we have any option to pull last 100 records or so like that |
Not directly. There is no COPYLAST=nnnn feature that i'm aware of. |
|
Back to top |
|
|
Venugopalsubbiah
New User
Joined: 12 Aug 2008 Posts: 7 Location: Bangalore
|
|
|
|
If you know the total number of records in that file, you can use the sort card to achieve your requirement.
Lets say you have 1000 records in that file and want to select only last 10 records. Then
SORT FIELDS=COPY
OUTFIL FILES=1, STARTREC=901
I we do not have any way to just say lastrec=100
Hope this helps. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Krishna,
If by any chance you have access to DFSORT, you could use this DFSORT/ICETOOL job:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) INPUT KEEP LAST(100)
/*
|
|
|
Back to top |
|
|
|