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 resolution for sb37 error

7732


What is concatenating?

644


How do you submit a job for execution?

645


Step 1 RC 4 Step 2 Step 3 I want to know the COND parameter which can be coded in step 2 or 3. Step 2 should be executed based on Step 1 RC and Step 3 should not be executed based on step 1's RC

988


What are the rules employed while naming the steps in a job?

669






how you can access an uncataloged dataset in a JCL?

658


Explain how can values be passed from the job stream to an executable program?

635


What is NOTCAT ?

750


How can a jobs execution priority be modified?

806


WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99 VALUE 123.45. PROCEDURE DIVISION. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. compiler : IGYGR1080-S A "VALUE" clause literal was not compatible with the data category o subject data item. The "VALUE" clause was discarded. WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99. PROCEDURE DIVISION. MOVE 123.45 TO W-B. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. 2375

1046


How to execute 2nd and 4th steps among 5 steps in jcl proc?

754


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

1770


what are the statements that are not valid to be included in an include statement?

783


what is JCL?

701


Explain about LMFREE�free data set from its association with data ID

1012