i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that??
Answer Posted / sivakumar sekharannair
Kavya's answer is correct.
i used the following control card
//SYSIN DD *
SORT FIELDS=(1,3,CH,A),
STOPAFT=8
Input file contained the following records
IMSDEVELOPER CSAA
IMSPRODSUPPORTXEROX
IMSTESTER EMDAC
IMSDEVELOPER CSAA
CICPRODSUPPORTXEROX
IMSTESTER EMDAC
The output i got was
CICPRODSUPPORTXEROX
DB2PRODSUPPORTEMDAC
IMSDEVELOPER XEROX
IMSDEVELOPER CSAA
IMSDEVELOPER CSAA
IMSPRODSUPPORTXEROX
IMSTESTER EMDAC
IMSTESTER EMDAC
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what JCL Procedures?
how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?
Matching Logic in Jcl not in cobol.Could any one please answer this question
Explain how can an in-stream dataset be terminated?
What is multithreading in jcl?
What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?
What are steplib and joblib? What for they are used?
Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
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?
What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?
Name the parameters which can be used to limit the number of records written to a sysout dataset?
Explain the purpose of dd * statement in jcl?