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...


How I sort the records in a file and copy the first 10
records to another file

Answers were Sorted based on User's Feedback



How I sort the records in a file and copy the first 10 records to another file..

Answer / kk

hi,

Using dfsort

//step10 exec pgm=sort
//sirtin dd dsn=userid.qulifier.psname,disp=shr
//sortout dd dsn=userid.qulifier.psname,disp=shr

sort fields=(starting position,length,cha,asc/dsc)
stopaft=10

now u get result sortout ps.

Is This Answer Correct ?    23 Yes 0 No

How I sort the records in a file and copy the first 10 records to another file..

Answer / balasukumar

//SORTIN DD DSN=INF1
//SORTOT DD DSN=OTF
//SYSIN DD *
SORT FIELDS = COPY
SKIP=0
STOPAFT=10
/*

Is This Answer Correct ?    6 Yes 1 No

How I sort the records in a file and copy the first 10 records to another file..

Answer / haleema

Keep first 10 sorted output records.
SUBSET FROM(IN1) TO(OUT1) OUTPUT KEEP FIRST(10)USING(CTL1)
//CTL1CNTL DD *
SORT FIELDS=(11,5,CH,A)
/*
Do this using ICETOOL job.

Is This Answer Correct ?    2 Yes 2 No

How I sort the records in a file and copy the first 10 records to another file..

Answer / srinivasa yadav

//sysin dd *
sort fields=(starting postion,length,data-type,order)
skip rec=0
stop rec=10
/*

and also we can use file-aid tool. in file-aid
there is an option 3.3

Is This Answer Correct ?    1 Yes 1 No

How I sort the records in a file and copy the first 10 records to another file..

Answer / girish kumar

just write like this

sysin dd *
sort fields=copy
stop after=10
/*
//
i tryed it's working

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More JCL Interview Questions

What is the purpose of the dd keylen parameter?

0 Answers  


Can we call instream to catalog and catalog to instream?

0 Answers  


What are the rules employed while naming the steps in a job?

0 Answers  


i have 10 steps in jcl program but i have to exicute only 2,4,6,8th and 10th ?how it's possible?

10 Answers   IBM,


What is model dataset label(Model DSCB)?

1 Answers  


Brief description of inline procedure of jcl.

0 Answers  


how to run JCL thru COBOL.

1 Answers   Patni,


How many types we can give input to JCL

5 Answers   UHG,


If a JOBSTEP abends, AND without using COND also, all the subsequent steps execute, then what is the use of using EVEN ? Why do we use EVEN when without it also all the JOBSTEPs execute ?

2 Answers   IBM,


What is jcl in mainframe?

0 Answers  


How I sort the records in a file and copy the first 10 records to another file

5 Answers  


Is condition checking possible in jcl? If yes, how?

0 Answers  


Categories