hi
What you can do is -> first get the total number of records in the file (you may use File-aid -> Utilities - > Copy by this your file would be copied to another file giving total number of records copied). say the number of records is 100. so you need to copy only the 1st & the last record( record no 1 & 100).use following code to get the 1st & last record copied.
//STEP1 EXEC PGM IDCAMS
//DDIN01 DD DSN INPUT FILE NAME
//DDOUT01 DD DSN OUTPUT FILE NAME
//SYSPRINT DD SYSOUT *
//SYSIN DD *
REPRO -
INFILE(DDIN01) -
OUTFILE(DDOUT01) -
SKIP(1) - << THIS OPTION WILL SKIP YOUR FIRST
<< RECORD IN OUTPUT FILE AND
<< START COPYING FROM 2nd RECORD upto 99th record
COUNT(98)
/*
//
Output file will only have 1st & last record.
please let me know if you have some other tweak.
thanks
Prashant