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

how you can access an uncataloged dataset in a JCL?

0 Answers  


Which COND paramter will u use to execute the step only if the previous step does not execute

3 Answers   BoA, HSBC,


What is a procedure?

1 Answers  


i have a jcl in which 4 & 5 step creates a new generation. 4th step output is as input for the 6th step & 5th step output is used as input in the 7th step. How they are refered as in the 6th & 7th steps? If the job abends in 6th step then how the 5th step output is refered in 7th step?

2 Answers   IBM,


WORKING-STORAGE SECTION. 1 GROUP-ITEM. 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50. 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP. PROCEDURE DIVISION. MOVE ZERO TO GROUP-ITEM. ADD 50 TO AMOUNT-1. DISPLAY AMOUNT-1. STOP RUN.

1 Answers  


I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?

0 Answers  


in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?

0 Answers   IBM,


how JCL works?

0 Answers  


What is GDG and what is the maximum limit of versions that can be created?

9 Answers   Convergys,


what is the compile process of cobol program expalin with code

0 Answers   IBM,


how to execute the last 5 steps in jcl

2 Answers   Syntel,


if we give two job cards in a single what happens

3 Answers   IBM,


Categories