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


Please Help Members By Posting Answers For Below Questions

What is the function of the dd dcb keyword?

837


How can an in-stream dataset be terminated?

859


Explain the function of the steplib dd statement?

660


What is catelog procedure and how many catelog procedure to use in one job?

7486


how you will the direct the data to spool using sysout option?

1775






Differentiate between the joblib and the steplib statements?

868


How can a jobs execution priority be modified?

807


Explain the job statement in jcl?

661


What do you understand by jcl?

634


Explain how can return codes be tested before execution of a job step?

841


Why include statement is used in a jcl?

696


what operation is performed by job statement?

668


Can I share my data with other jobs? How?

681


How jcl work to handle various input output file operations?

664


How can the attributes of one sms dataset be copied to another dataset?

871