View previous topic :: View next topic
|
Author |
Message |
kousalya26
New User
Joined: 06 Jul 2005 Posts: 21 Location: chennai
|
|
|
|
Hi all,
I wanna download last few records from a dataset that resides on tape.In general, IEBGENER utility can be used to download datasets from tape on to DASD.But then, i want to skip first few records and tehn download only the last ,say 500 records from the dataset on tape.Is it possible through any control statements or thru any other utilty.
Thanks & Regards,
kousalya |
|
Back to top |
|
|
spanda
New User
Joined: 31 Aug 2005 Posts: 48 Location: U.K.
|
|
|
|
Not sure if you can do what you want through IEBGENER, but you may achieve this via IDCAMS. It certainly helps if you know the number of records (n) you have got on the tape file, so you can skip (n-500) records and keep only the last 500.
REPRO INFILE(INDD) OUTFILE(OUTDD) SKIP(n-500)
INDD is the DD name for the tape file, while OUTDD is the DD name for the output DASD dataset.
Apologies if this reply doesn't help.
Panda. |
|
Back to top |
|
|
kousalya26
New User
Joined: 06 Jul 2005 Posts: 21 Location: chennai
|
|
|
|
Hey thanks, it worked out! |
|
Back to top |
|
|
prasanth_thavva
New User
Joined: 28 Jul 2005 Posts: 86 Location: Chennai
|
|
|
|
hi ,
it can be possible with DFSORT. use SORT FIELDS=COPY ,SKIP REC=50 you have to give this info..in CONTROL CARD.include in your JCL in SYSIN DD DSN=...
Thanks and Regards,
Venkata Prasanth |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Plus, sort (DF or SYNC) is much faster than IDCAMS. |
|
Back to top |
|
|
|