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 / satish
//job statement
//step1 exec pgm=sort
//sortin dd dsn=input file that contain 20 records
//file1 dd dsn=output file
//file2 dd dsn=another output file
//sysout dd sysout=*
//sysin dd *
option copy
outfil fnames=(file1,file2),split
/*
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is catelog procedure and how many catelog procedure to use in one job?
When space is allocated for an output dataset, what units can be used?
define cond parameter in jcl?
How does jcl act on a cobol code?
What is the function of the dd dcb keyword?
if the submitter of a job wants to inform another user about the job completion, how can it be done?
How do you create a temporary dataset?
What is the purpose of the dd keylen parameter?
a set statement is used to define commonly used symbolic across job steps or procedures. It initializes the previous values in the symbolic names. It has to be defined before the first use of the symbolic names in the jcl. State whether true or false?
When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?
What do you understand by the terms: joblib and steplib?
how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?
What is the function of dd name parameter with a 2 part structure; audit.report?
How can a fb file convert to vb file using sort program?
Explain the function of dd name parameter with a 2 part structure; audit.report?