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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I need exexution process for JCL programs

1852


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

711


what is the use of JCL?

666


What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?

1999


What do you understand by jcl?

629






what sort card you will use to copy the data from one dataset to another dataset?

730


what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?

777


what is the purpose of coding notify parameter in job statement?

686


which parameter is used to check the syntax of a jcl without executing it?

798


What is the function of //cntl statement?

831


How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?

718


WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

854


what are the statements that are not valid to be included in an include statement?

776


What is the function of dd name parameter with a 2 part structure; audit.report?

702


I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

2107