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
How does jcl act on code(if you take a cobol program)?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE
which parameter is use to declare the name of dataset in dd statement?
How can the attributes of one sms dataset be copied to another dataset?
What is the significance of addrspc parameter in the exec statement?
What is the purpose of dd dummy statement?
what sort card you will use to copy the data from one dataset to another dataset?
Does jcl support automatic restart?
How can an in-stream dataset be terminated?
Explain how can the submitting users racf authority be overridden in a job stream?
How do you access an uncatalogued dataset in a jcl?
What is the significance of addrspc parameter in exec statement?
How to do automated restart when a job abend?
Can we use DISP=SHR in output file in JCL