EZTP program to compare the records of two given files

Saturday, September 21, 2013

EZTP program to compare the records of two given files

//*JOB CARD
//**********************************************************************
//*       EZTP PROGRAM TO COMPARE THE RECORDS OF TWO GIVEN FILES       *
//**********************************************************************
//*
//STEP01   EXEC PGM=EZTPA00
//SYSPRINT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SYSOU1   DD  SYSOUT=*
//EZTVFM   DD  UNIT=DISK,SPACE=(6144,(500,900),,,ROUND)
//PANDD    DD  DSN=SYS1.EZTPLUS.MACLIB,DISP=SHR
//SORTLIB  DD  DSN=SYS1.SORTLIB,DISP=SHR
//SORTWK01 DD  UNIT=DISK,SPACE=(4096,500,,,ROUND)
//SORTWK02 DD  UNIT=DISK,SPACE=(4096,500,,,ROUND)
//SORTWK03 DD  UNIT=DISK,SPACE=(4096,500,,,ROUND)
//SORTWK04 DD  UNIT=DISK,SPACE=(4096,500,,,ROUND)
//SORTWK05 DD  UNIT=DISK,SPACE=(4096,500,,,ROUND)
//SORTWK06 DD  UNIT=DISK,SPACE=(4096,500,,,ROUND)
//*
//INFILE1  DD  DSN=IN DATASET NAME 1,DISP=SHR
//INFILE2  DD  DSN=IN DATASET NAME 2,DISP=SHR
//*
//OUTFIL1  DD  DSN=OUT DATASET NAME 1,
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(250,250),RLSE),UNIT=SYSDA,
//             DCB=(RECFM=FB,LRECL=20,BLKSIZE=0)
//*
//OUTFIL2  DD  DSN=OUT DATASET NAME 2,
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(250,250),RLSE),UNIT=SYSDA,
//             DCB=(RECFM=FB,LRECL=20,BLKSIZE=0)
//*
//COMMON    DD  DSN=OUT DATASET NAME 3,
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(250,250),RLSE),UNIT=SYSDA,
//             DCB=(RECFM=FB,LRECL=20,BLKSIZE=0)
//*
//SYSIN    DD  *

FILE INFILE1
 IN1-REC            1  20 A
 IN1-ID               1  20 A
*
FILE INFILE2
 IN2-REC            1  20 A
 IN2-ID                1  20 A
*
FILE OUTFIL1
 PUT1-REC            1  20 A
*
FILE OUTFIL2
 PUT2-REC            1  20 A
*
FILE COMMON
 PUT3-REC            1  20 A
*
****************************************************************
*            M A I N    J O B
****************************************************************
JOB INPUT (INFILE1  KEY ( IN1-ID ) +
           INFILE2  KEY ( IN2-ID ))
*
     IF MATCHED
         PUT3-REC   = ' '
         PUT3-REC  = IN1-REC
         PUT COMMON
         GOTO JOB
     ELSE
         IF INFILE1
             PUT1-REC   = ' '
             PUT1-REC   = IN1-REC
             PUT OUTFIL1
     ELSE
         IF INFILE2
             PUT2-REC   = '  '
             PUT2-REC   = IN2-REC
             PUT OUTFIL2
         END-IF
     END-IF
     END-IF
//*
//**********************************************************************
//**********************************************************************

Error 404

The page you were looking for, could not be found. You may have typed the address incorrectly or you may have used an outdated link.

Go to Homepage