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

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,


Why we us SYSTSIN DD with IKJEFT01 (TSO Utility) to execute a COBOL DB2 program? Why can't we use SYSIN DD?  

1 Answers   TCS,


What does the one advantange of using IEBUPDTE?????

2 Answers  


What are the basic JCL Statements for a Job?

1 Answers  


what if any ,is the syntax error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) ........ IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.

1 Answers  


SORT card to eliminate duplicity.

1 Answers   Syntel,


how to see the latest generation in gdg?

3 Answers   Deloitte,


what is the function of spool command?

4 Answers  


What is model dataset label(Model DSCB)?

1 Answers  


what are the ways of passing data to a cobol program from jcl?

1 Answers   IBM,


How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.

0 Answers   CSC, SPIC,


Can we use two or more SYSPUNCH DD statements in a JCL for multiple unload (SYSREC00 & SYSREC01)..?

1 Answers  


Categories