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

How to submit jcl through a cobol program?

672


Explain the function of dd disp parameter?

590


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

1757


whats the diff bw the evaluate also and and?

1847


what is DD statement is used in JCL?

675






Explain about ISPF/TSO Commands

1308


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' ?

1579


What is the function of job statement in jcl?

634


what is JCL?

688


How to do automated restart when a job abend?

787


is there any way to execute more than one proc in the same exec statement at the same time..?

2100


How can a jobs execution priority be modified?

793


which utility is used to sort a file in jcl?

743


What are some jcl statements that are not allowed in procedures?

722


How is a type of file defined in the jcl that executes the cobol program?

705