IDCAMS Repro

IDCAMS Print IDCAMS Import & Export

Advertisements


REPRO is the general purpose command that can operate on both VSAM and non-VSAM datasets.


Syntax:

						
 REPRO {INFILE(ddname[/password]                                   
      INDATASET(entryname[/password]                                   
      {OUTFILE(ddname[/password])]                                  
       OUTDATASET(entryname[/password])}                       
   [FROMKEY(key)]FROMADDRESS(address)]                       
     FROMNUMBER(number)]SKIP(count)]                         
   [REPLACE]NOREPLACE]                                       
   [REUSE]NOREUSE]                                           
   [TOKEY(key)]TOADDRESS(address)]                           
     TONUMBER(number)]COUNT(count)]                          
                                                       

REPRO functioning can be divided into three types..


The main function of the REPRO function is to copy the data from one dataset to other datset.

REPRO used to load the empty VSAM cluster with records and while loading the data and index components for KSDS are built automatically.

REPRO used to creates a backup of a VSAM dataset on physical sequential dataset and later it can be used for restore/rebuild the VSAM dataset.


Empty file-check:


The major advantage of PRINT command is to check particular file is empty or not.

If the file is empty, PRINT COUNT (1) ends with return-code as 4.


Practical Example-1:


						
//JOB CARD
//*------------------------------------------------------------------
//* IDCAMS - REPRO
//*------------------------------------------------------------------
//STEP01  EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//INPUT    DD   DSNAME=userid.KSDS.INPUT,DISP=SHR
//OUTPUT   DD   DSNAME=userid.KSDS.INPUT,DISP=SHR
//SYSIN    DD   *
          REPRO 			-
               INFILE(INPUT) 		-
               OUTDATASET(OUTPUT)
/*


Practical Example-2:



//JOB CARD
//*------------------------------------------------------------------
//* IDCAMS - REPRO
//*------------------------------------------------------------------
//STEP01  EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//INPUT    DD   DSNAME=userid.KSDS.INPUT,DISP=SHR
//OUTPUT   DD   DSNAME=userid.KSDS.INPUT,DISP=SHR
//SYSIN    DD   *
          REPRO 			-
               INFILE(INPUT) 		-
               OUTDATASET(OUTPUT)  	-
               FROMKEY(KEY1) 		-
               TOKEY(KEY2)

/*


Practical Example-3:


						
//JOB CARD
//*------------------------------------------------------------------
//* IDCAMS – REPRO COPY TO NEW DATASET
//*------------------------------------------------------------------
//STEP01  EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//INPUT    DD   DSNAME=userid.KSDS.INPUT,DISP=SHR
//OUTPUT   DD   DSNAME=userid.KSDS.OUTPUT,
//     DISP=NEW,UNIT=3480,VOL=SER=XXXXX,
//     DCB=(DEN=10,RECFM=FB,LRECL=200,BLKSIZE=2000)
//SYSIN    DD   *
          REPRO 			-
               INFILE(INPUT) 		-
               OUTDATASET(OUTPUT)
/*


Practical Example-4:


						
//JOB CARD
//*------------------------------------------------------------------
//* IDCAMS – REPRO BACKUP
//*------------------------------------------------------------------
//STEP01  EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//INPUT    DD   DSNAME=userid.KSDS.INPUT,DISP=SHR
//OUTPUT   DD   DSNAME=userid.KSDS.OUTPUT,
//     DISP=NEW,UNIT=3480,VOL=SER=TAPEXX,
//     DCB=(DEN=10,RECFM=FB,LRECL=200,BLKSIZE=2000)
//SYSIN    DD   *
          REPRO 			-
               INFILE(INPUT) 		-
               OUTDATASET(OUTPUT)
/*



IDCAMS Print IDCAMS Import & Export

Advertisements