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 / muttaiah
Adding to satish answer.
Option copy is similar to sort fields= copy or merge
fields=copy.
It is used to simply copy the records from input to output
file.
Outfil is used when we want to do process records in the
input file.
Here split option is used in Outfil to seperate the input
file into 2, that means it will write the alternate records
into the files specified in fnames.
Other syntax of Outfill would be
//step1 exec pgm=sort
//sortin dd dsn=Inputfile
//sortof01 dd dsn=file1
//sortof02 dd dsn=file2
//sysin dd *
option copy
outfil files=(01,02),split
/*
Here we are giving 01,02 which indicates the DDnames that
are prefixed with sortof.
Hope this makes sense in understanding satish answer
@All: Do correct me if i'm wrong.
Thank u
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
When space is allocated for an output dataset, what units can be used?
What is jcl in mainframe?
What is the function of job statement in jcl?
What does a disposition of (new,catlg,keep) for a dsn mean?
what are the types of abends that occur on job failure? And explain the possible causes of these
what operation is performed by job statement?
How can the attributes of one sms dataset be copied to another dataset?
In sms datasets, what is the function of the dd avgrec keyword?
What is the function of dd disp parameter?
What are the parameter we cannot use in procedure? How many instream we can write in single jcl?
Explain how can a stopped job be started again?
Hello Guys, I have 1+ Year Experience in MAINFRAME TESTING. After 1 Week I have an Interview With a Company on Mainframe Testing. Please Could You Guys Please Suggest me What Sections Should I prepare ?? ___Tell Me the Topic Or Appropriate Site & Links. ?? ---------------Thank You
What is the purpose of dd dummy statement?
I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?
Explain about LMQUERY�give a dialog information about a data set