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

how to identify a vasam dataset by seeing in 3.4(browse)

5 Answers   Cap Gemini,


What does the keyword DCB mean and what are some of the keywords associated with it?

3 Answers   ITC Infotech,


if you have big pgm. during compilation is abends with (soc7)how do you know which line has soc 7 error.

4 Answers   IBM,


what is a null indicator in db2?

5 Answers   Fiserv, IBM,


How to submit a jcl from cics?

0 Answers  


SORT card to eliminate duplicity.

1 Answers   Syntel,


I have a Symbolic Parameter which can have a value say 01 or 02 etc. Now consider i have another Symbolic parameters which is used to get 3 digit code of months (JAN, FEB, etc) but for that i need to check the first symbolic parameter's value and provide its corresponding month's name in the second symbolic parameter. Say IF sym1 = 01 then sym2='Jan' ENDIF etc... In JCL, IF condition is used for RC, ABEND purposes of a step etc. When i use Symbolic parameter in IF clause it is showing Error message. Is there a way to get the above result possible in JCL. If you could provide me with an example, i would understand it better.

0 Answers  


How is the keyword DUMMY used in JCL?

4 Answers  


A file has dta in S9(09) COMP format. How do I move the data into a character field X(10)?

2 Answers  


Explain the hierarchy levels in jcl?

0 Answers  


Can we use DISP=SHR in output file in JCL

0 Answers  


is there any utility for restarting a particular step in jcl reply soon ?

5 Answers  


Categories