I have a file in which I have 20 records. I want my first
record to go into file 1 and second record to go in second
file. I want to copy the alternate records like this in the
two output files. How can I do this using JCL?

Answer Posted / bala

we can add seqnum to each record in the file using SORT
command and copy then use INCLUDE & EXCLUDE COND of SORT
for this.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can you check if a file is empty using jcl?

800


How can an in-stream dataset be terminated?

838


how JCL works?

787


What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?

9202


What is the function of job statement in jcl?

629






Name the parameters which can be used to limit the number of records written to a sysout dataset?

646


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

717


How to run cobol program using jcl?

642


Explain the function of a dd statement?

648


Is it possible to define dd statements as you want?

639


Is automatic restart possible in jcl?

722


What are the jcl procedures?

638


Which dd parameters are required?

678


What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?

802


How do you submit a job for execution?

631