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 / felix

sorry. my previous answer is wrong.
use the following coding in JCL.
First u should sort the file using sort pgm. enter the
sorted file path in input data set.

//SYSIN DD*
REPRO
INDATASET(WRITE THE INPUT PATH)
OUTDATASET(WRITE THE OUTPUT PATH)
COUNT(200)

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?

1000


I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.

965


Define concatenating?

871


how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?

1034


What is the use of disp parameter?

858


What are some jcl statements that are not allowed in procedures?

965


how you can direct the data to spool using SYSOUT option?

1177


Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?

887


in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?

1013


Differentiate between the joblib and the steplib statements?

1079


what is a jcl?

881


how can the same proc be re-used and called by many jobs?

1191


Explain how can an in-stream dataset be terminated?

962


Is it possible to left uncode disp?

918


List the different jcl statements that are not permitted in the procedures?

843