I have 15 flat files. each record in the files have the
monthly salary for 12 months with the employee number. Now
I want to concatenate the 15 files such that for the
employee numbers that are common the o/p file should have
only one record and the salaries should be concatenated to
that record. How can we do it with JCL?
Answer Posted / sk
For understandability just concatenate all the 15 flat file
use of simple concatenation.(It's like use first file name
with DD name and all the other 14 files without DD name and
write in adjucent). so you got the 15 files data in one
file, Next step is , sort the file using key as employee
number and use SUM FIELDS for concatenating the salaries,
so it will remove the duplicateas well as it will get the
concatenated result of the salary.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
List the different jcl statements that are not permitted in the procedures?
which parameter is use to declare the name of dataset in dd statement?
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?
How can a fb file convert to vb file using sort program?
How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
Can I share my data with other jobs? How?
Explain the job statement in jcl?
what are the statements that are not valid to be included in an include statement?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
How do you overcome this limitation ?
Are there any set of rules for the names of the steps used in a job? What are they?
Explain about ISPF/TSO Commands
State the uses of syspring, sysin, sort fields, sum fields and dummy.
What is jcl in mainframe?