We have two PS files,want to compare those files and put
the duplicate records in one file.
Input file 1 contains(1,2,4,9,10)
Input file 2 contains (1,4,5,11,12,14,16).

Help me with jcl.

Answer Posted / abhusha

Use join keys
//STEP01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=INPUT.FILE.ONE,DISP=SHR
//SORTJNF2 DD DSN=INPUT.FILE.TWO,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILE,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,200),RLSE),
// DCB=(RECFM=FB,BLKSIZE=0,LRECL=80)
//SYSIN DD *
SORT FIELDS=COPY
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
REFORMAT FIELDS=(F1:1,71,F2:1,9)
/*

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is jcl in mainframe, and how many types of jcl statements are there for a job?

623


What are the 4 fields in dd statement?

732


Is their any set of rules for dd? Explain.

648


How does jcl specify the job to the operating system?

740


WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

846






how to do automated restart when a job abends?

837


How can the disposition of sysout datasets be set for an entire jobstream?

830


what is a jcl?

680


In job processing, what happens in execution stage?

691


Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?

712


List the different jcl statements that are not permitted in the procedures?

631


What are the difference between jcl and jes?

1036


How can unused space allocation be returned to the system when a dataset is closed?

800


What statement can be used to send data to another mvs jes3 node?

806


how JCL works?

787