Write a JCL by using the below requirement:
File1 =1, File2 =11 and output needs to come as File3 =111?
Answer Posted / mdv
Step 1.
Add SEQNUM for both the files @ positions 3 to 8 and 2 to 7
respectively.
Step 2.
Join based on key and reformat as needed.
// SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(3,6,A)
JOINKEYS FILE=F2,FIELDS=(2,6,A)
REFORMAT FIELDS=(F1:1,2,F2:1,1)
SORT FIELDS=COPY
/*
Note: Not tested.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Name what parameter directs the output of the job log dataset?
What are the parameter we cannot use in procedure? How many instream we can write in single jcl?
What is job control language?
When output dataset space is required, what quantity categories are used?
What is the function of the dd mgmtclas keyword in sms datasets?
How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
what is DD statement is used in JCL?
Name the statement which can be used to send data to another mvs jes3 node?
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 ?
What is concatenating?
Which dd parameters are required?
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
How can values be passed from the job stream to an executable program?
I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.
What is the significance of addrspc parameter in the exec statement?