Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


i just need the first and last record from a sequencial
file?how

Answers were Sorted based on User's Feedback



i just need the first and last record from a sequencial file?how..

Answer / paray2x

The best option is to used File-Aid processing options.

If not,

1. Use SORT FIELDS=COPY, STOPAFT=1 to get the first record.

2. Insert line numbers in the file using SEQNUM fucntion of
SORT. Then, do a SORT FIELDS on this line number in
descending order, save it a temp file.
3. Use SORT FIELDS=COPY, STOPAFT=1 on this temp file to get
the last record.

Is This Answer Correct ?    0 Yes 3 No

i just need the first and last record from a sequencial file?how..

Answer / sneha

USE SKIP(N) To skip number of records
if 10 accounts are there and u want to skip first 7 records
use
//sysin dd*
repro infile(dd1) -
outfile(dd2) -
skip(07) -
count(03)
/*
for 1st and last
//sysin dd*
repro infile(dd1) -
outfile(dd2) -
count(1) -
skip(08) -
count(01)
/*

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More JCL Interview Questions

What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?

5 Answers   CitiGroup,


How to send different PARM values based on the any condition to the program in a JCL? For example :- If the time is before 12:00 pm, I want to send "A" to some program and if it past 12:00 pm , I want to send "B" as a PARM value to that program. How to do it thur JCL only?

0 Answers   UHG,


how many types of sorts are there in jcl?

2 Answers   IBM,


what happens when time=0 is given in jcl code. what happens when blksize=0 is given in jcl code. what is symbolic and overriding parameters and a example program.

6 Answers   HCL,


what is use of space parameter in dd statement?

0 Answers   IBM,


ihave ten flatfile in that iwant to concatinate all the files except file 5,6 into output file by uing jcl? how to do this? give me detail yntax for tis?

4 Answers   IBM,


in production region 100 steps are running,but i need to run only step5 without changing code how can i do it?

4 Answers   HCL,


what is JCLLIB and PROCLIB in jcl and their syntax

3 Answers   IBM,


How is the keyword DUMMY used in JCL?

4 Answers  


Explain COND used in JCL?

1 Answers   Patni,


What is the function of dd disp parameter?

0 Answers  


what is use of dsn parameter in dd statement?

0 Answers   IBM,


Categories