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

Is it possible to left uncode disp?

0 Answers  


What are isolation levels? Where do we need to specify them in compiling JCL?

3 Answers  


Can you delete the GDG base without deleting GDG generations ?

7 Answers   Cap Gemini,


What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?

0 Answers  


How to release a JOB (from the input queue) held by TYPRUN = HOLD ? and how to see the installation default time after which a JOB will be automatically released ? How to see the list of currently HELD JOBS ?

5 Answers   IBM,


Can we use COND=EVEN on a job card, when jobs are scheduled through scheduler?

5 Answers   L&T,


what is the meaning of keyword in jcl?what is is opposite?

4 Answers  


what is the compile process of cobol program expalin with code

0 Answers   IBM,


if we give TIME=0 how many sec that job/step

13 Answers  


What is maximum length of block size?

5 Answers   Cap Gemini, Kanbay, TCS,


what are the options in file-aid to edit vsam dataset and to compare data sets.

2 Answers   Ocwen,


How to delete AIX ? i) IEBGENER ii) IDCAMS iii) PURGE iv) All of the above

3 Answers   HSBC,


Categories