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 is a type of file defined in the jcl that executes the cobol program?
What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
Explain how can values be passed from the job stream to an executable program?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
In job processing, what happens in execution stage?
how can you check if a file is empty using jcl?
Are there any set of rules for the names of the steps used in a job? What are they?
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?
What is the use of disp parameter?
What are the parameters that are used in creating a gdg?
List the different jcl statements that are not permitted in the procedures?
What is the function of //jcllib statement?
Name the parameters which can be used to limit the number of records written to a sysout dataset?
How to execute 2nd and 4th steps among 5 steps in jcl proc?