links: コピーブランド スーパーコピー 財布 スーパーコピーブランド ブランド コピー 時計 スーパーコピー ブランドコピー激安

VSAM utilities

CONTENTS:

 Bottom

 Case1. Copy/move VSAM files and full disk volumes to disk

     1.1. Move(condense) VSAM files to free disk volume/s in a storage group

     1.2. Copy VSAM files frome one storage group and create/allocate a new

copy in the same or another storage group

     1.3. Copy full disk volumes

Case2. Backup/restore VSAM files and PDS /libraries/ to /from tape

     2.1. Backup VSAM files and PDS

     2.2. Restore VSAM files and PDS

Case3. Repro VSAM files to save current contents

     3.1. Copy existing file

     3.2. Repro multiple VSAM files

Case4. Rename VSAM files in the same catalog

Case5. Export/Import VSAM file(VSE to z/os) – USING A TAPE FOR

OUTPUT/INPUT

     5.1. Export/VSE (version 1)

     5.2. Export/VSE (version 2)

     5.3. Import z/os (version 1)

     5.4. Import z/os (version 2)

Case6. Export/Import VSAM (VSE to z/os) – USING A DISK FOR OUTPUT/INPUT

     6.1. Export/VSE

     6.2. Import z/os

Case7. GL (General Ledger) bank account files processing management
Case8. Mass delete VSAM files

Case9. Delete files and garbage

     9.1. Delete/purge VSAM cluster/s

     9.2. Delete non VSAM file

     9.3. Delete VVR or NVR RECORDS

     In the following 9 examples some frequently occurring cases with z/os VSAM in Mainframe are documented. Relocation VSAM files to obtain more free disk volumes, copy of disks and files from one storage group to another are described. Backup/restore of VSAM files and PDS /libraries/ to/from tape, repro VSAM file to save old contents and rename VSAM files in the same catalog are also shown. Export/Import VSAM files using output/input tapes or output/input disk files between two different systems (z/os and VSE) in one environment are very usefull and are used often in practice . GL management – restore GL -files , processing and routing them to local PC server is one convenient way to route VSAM application data to PC . Mass delete VSAM files, delete/purge VSAM cluster files and delete garbage (non VSAM, VVR and NVR files) are the procedures that keep the VSAM space always clean and at minimum usable size.

 

          Case1. Copy/move VSAM files and full disk volumes to disk 

               1.1. Move(condense) VSAM files to free disk volume/s in a storage group

Copy all VSAM files from one or more volumes to volumes in the same storage group (SGPRODDS – with enough available free space) to free volumes (job COPROD). After each copy find the physical volume addresses copied – PRD034 address /050C/ and PRD035 address /054B/ (using TSO/ISPF panel – p6 – rmf – 2 – 2 – 3 – f PRD034/5). Then set these volumes offline with TSO/ISPF – sd.log – /v 50C,offline and /v 54B,offline to avoid using them if second such copy/move happened in the same storage group SGPRODDS! The freed volumes (PRD034, PRD035) must be excluded from the old group SGPRODDS (disable) and can be set as spare volumes or can be added to another storage group in the same or in another LPAR.

//COPROD JOB MSGLEVEL=(1,1),MSGCLASS=X,TIME=1440,NOTIFY=&SYSUID
//* Copy existing files KCI02.DMNSNDSK.CIKCREL/ CIKMTRK/ GLKMSTR selectively in volumes //* PRD0034, PRD035 of storage group SGPRODDS to free volumes
//COPY EXEC PGM=ADRDSSU,REGION=0M,TIME=1440 PARM=’TYPRUN=NO
//SYSPRINT DD SYSOUT=*
//I1 DD DISP=SHR,UNIT=3390,VOL=SER=PRD034
//I2 DD DISP=SHR,UNIT=3390,VOL=SER=PRD035
//O01 DD DISP=SHR,UNIT=3390,VOL=SER=PRD001 /* PRD001 contains SGPRODDS catalog */
/SYSIN DD *
COPY DATASET(INCLUDE( –
KCI01.DMNSNDSK.CIKCREL –
KCI01.DMNSNDSK.CIKMTRK –
KCI01.DMNSNDSK.GLKMSTR –
)) –
LOGINDD(I1,I2) OUTDD(O01) –
SELECTMULTI(ANY) WAIT(0,0) SPHERE –
RECATALOG(CATALOG.MVSICF1.VPRD001) DELETE PURGE
/*
The same copy may be performed for all KCI01 files on volumes PRD034, PRD035 if the following SYSIN sequence is used:
//I1 DD DISP=SHR,UNIT=3390,VOL=SER=PRD034
//I2 DD DISP=SHR,UNIT=3390,VOL=SER=PRD035
//O01 DD DISP=SHR,UNIT=3390,VOL=SER=PRD001
//SYSIN DD *
COPY DATASET(INCLUDE( –
KCI01.** –
)) –
LOGINDD(I1,I2) OUTDD(O01) –
SELECTMULTI(ANY) WAIT(0,0) SPHERE –
RECATALOG(CATALOG.MVSICF1.VPRD001) DELETE PURGE
/*

               1.2. Copy VSAM files frome one storage group and create/allocate a new copy in the same or another storage group

– Copy of one (or more) different file/s (KCI01.DMNSNDSK.LAKMSTR/CIKCREL) frome one storage group with the same file prefix KCI01 to another storage group with another file prefix KCI03 (KCI03.DMNSNDSK.LAKMSTR/CIKCREL) in job FCOPMULT using RENAMEU for the new name of the files with commom prefix.

//FCOPMULT JOB (,0100),CLASS=R,MSGCLASS=R
//*
//* JOBLIB DD DSN=KCD00.LIB.PROD.LOAD,DISP=SHR
//STEP04 EXEC PGM=ADRDSSU,REGION=0M,TIME=1440 PARM=’TYPRUN=NO’
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY DATASET(INC( –
KCI01.DMNSNDSK.LAKMSTR –
KCI01.DMNSNDSK.LAKPMST –
KCI01.DMNSNDSK.LAKPRCN –
KCI01.DMNSNDSK.CIKAREL –
KCI01.DMNSNDSK.CIKCREL –
)) –
RENAMEU(KCI01.**, –
KCI03.**) –
OPT(4) –
SHARE –
ALLEXCP –
ALLDATA(*) –
CATALOG
/*
– Copy one single file (KCI05.DMNSNDSK.CIKCREL) from one storage group with file prefix KCI05 to another storage group with file prefix KCI02 using RENAMEU for the totally new name of the file (KCI02.CIKCREL.YYYY2006.MM06.DD30 ) in job FCOPSING.

//FCOPSING JOB (,0100),CLASS=R,MSGCLASS=R
//*
//STEP04 EXEC PGM=ADRDSSU,REGION=0M,TIME=1440 PARM=’TYPRUN=NO
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY DATASET(INCLUDE(KCI05.DMNSNDSK.CIKCREL)) –
RENAMEU(KCI05.DMNSNDSK.CIKCREL, –
KCI02.CIKCREL.YYYY2006.MM06.DD30) –
OPT(4) –
SHARE –
ALLEXCP –
ALLDATA(*) –
CATALOG
/*

               1. 3. Copy full disk volumes

– Copy full disk volumes directly from old disk addresses 700-70f (PRD001, …) to spare volumes (SP1A00, …) at new disk addresses 1A00-1A0F on the same disk environment in job COPY1A0.

//COPY1A0 JOB,MSGCLASS=X,NOTIFY=IBMUSER,TIME=1440
//DSS EXEC PGM=ADRDSSU,REGION=0M
//* COPY 700-70F => 1A00-1A0F
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
/* RUN ELIGIBLE TASKS IN PARALLEL */
PARALLEL
COPY FULL IDY(PRD001) ODY(SP1A00) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD004) ODY(SP1A01) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD007) ODY(SP1A02) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD010) ODY(SP1A03) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD013) ODY(SP1A04) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD016) ODY(SP1A05) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD019) ODY(SP1A06) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD022) ODY(SP1A07) COPYVOLID ADMINISTRATOR
COPY FULL IDY(ARH201) ODY(SP1A08) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD028) ODY(SP1A09) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD031) ODY(SP1A0A) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD034) ODY(SP1A0B) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD037) ODY(SP1A0C) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD040) ODY(SP1A0D) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD043) ODY(SP1A0E) COPYVOLID ADMINISTRATOR
COPY FULL IDY(PRD046) ODY(SP1A0F) COPYVOLID ADMINISTRATOR
/*

– Copy full disk volumes using procedure (COPYPACK PROC IVOL=IIIIII,OVOL=OOOOOO) on spare volumes at the same disk environment in job CPYAKS7K .

//CPYAKS7K JOB (9999,IPO,10,10),
// ‘CORNERSTONE’,
//,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// NOTIFY=,
// TIME=1440,
// USER=
//CRESYSIN EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD DISP=(,PASS),SPACE=(TRK,1),RECFM=F,LRECL=80
//SYSUT1 DD *,LRECL=80
COPY FULL INDDNAME(IPACK) OUTDDNAME(OPACK) COPYVOLID
/*
//COPYPACK PROC IVOL=IIIIII,OVOL=OOOOOO
//DFDSS EXEC PGM=ADRDSSU,REGION=0M,TIME=1440
//SYSIN DD DISP=(OLD,PASS),DSN=*.CRESYSIN.SYSUT2
//IPACK DD DISP=OLD,UNIT=3390,VOL=SER=&IVOL
//OPACK DD DISP=OLD,UNIT=3390,VOL=SER=&OVOL
//SYSPRINT DD SYSOUT=*
// PEND
//BC2SP2 EXEC COPYPACK,IVOL=BC2SP2,OVOL=SP190B
//CTSC01 EXEC COPYPACK,IVOL=CTSC01,OVOL=SP190C
//CTSC02 EXEC COPYPACK,IVOL=CTSC02,OVOL=SP190D
//LOGR1C EXEC COPYPACK,IVOL=LOGR1C,OVOL=SP190E
//LOGR2C EXEC COPYPACK,IVOL=LOGR2C,OVOL=SP190F
//OAMC01 EXEC COPYPACK,IVOL=OAMC01,OVOL=SP1910
//TSOC01 EXEC COPYPACK,IVOL=TSOC01,OVOL=SP1911
//TSOC02 EXEC COPYPACK,IVOL=TSOC02,OVOL=SP1912
//TSOC03 EXEC COPYPACK,IVOL=TSOC03,OVOL=SP1913

 

          Case2. Backup/restore VSAM files and PDS /libraries/ to /from tape

               2.1. Backup VSAM files and PDS(Partitioned Data Set – library) files

Backup KCI01* security files from disk to tape CB1014 with physical address 301 as file DSN= BKPSEC10.SAVE in job BKPSEC10:

//BKPSEC10 JOB (9999
//,
// REGION=0M,TIME=1440,
// MSGCLASS=X,MSGLEVEL=(1,1)
//*
//****************************************************************
//* BKPRINT BACKUP DATA SET PRINT01* FILES
//****************************************************************
//JOBLIB DD DSN=KCI00.LIB.PROD.LOAD,DISP=SHR
//* DD DSN=D3500.R050100.LOAD.LIB,DISP=SHR
//*
//BACKUP EXEC PGM=ADRDSSU
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DEPHSTR DD DSN=BKPSEC10.SAVE,
// DCB=(KCI01.DMNSNTAP.MODEL.DCB,
// RECFM=U,LRECL=0,BLKSIZE=32760,
// DSORG=PS),VOL=SER=CB1014, *   or VOL=(,,,25) for scratch tape to be required!
// UNIT=(301,,DEFER),
// LABEL=(1,SL),DISP=(NEW,CATLG,KEEP)
//SYSIN DD *
DUMP –
OUTDDNAME(DEPHSTR) –
DATASET(INCLUDE ( –
KCI01.DMNSNDSK.CSKCONF –
KCI01.DMNSNDSK.CSKSECU –
KCI01.DMNSNDSK.CSKSECW –
KCI01.DMNSNDSK.TTKCTRL –
)) –
SHARE –
ALLDATA (*) –
SPHERE –
OPT(4) –
TOL(ENQF)
/*
//*
– Backup user and system libraries from disk to tape CB0167 (on device with physical address 300) as DSN= BKPUSLIB.SAVE in job BKPUSLIB:

//BKPUSLIB JOB (9999,IPO,10,10),
// ‘OPERATOR’,
//,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// NOTIFY=,
// TIME=1440,
// USER=
//* /*JCTRL*/
//* *******************************************************************
//* *******************************************************************
//DFDSS EXEC PGM=ADRDSSU,TIME=1440,REGION=8M
//SYSPRINT DD SYSOUT=*
//DEPHSTR DD DSN=BKPUSLIB.SAVE,
// DCB=(KCI01.DMNSNTAP.MODEL.DCB,
// RECFM=U,LRECL=0,BLKSIZE=32760,
// DSORG=PS),VOL=SER=CB0167,
// UNIT=(300,,DEFER),
// LABEL=(1,SL),DISP=(NEW,CATLG,KEEP)
//SYSIN DD *
DUMP –
OUTDDNAME(DEPHSTR) –
DATASET(INCLUDE (BC2A.ZOS140.OPER.LIB –
BC2A.ZOS140.PARMLIB –
BC2A.ZOS140.STCPROC –
BCA1MGP.STEF.JCL –
BCP1*.** –
KCI0*.** –
)) –
OPT(4) –
SPHERE –
TOL(ENQF) –
ALLDATA(*) –
ALLEXCP
/*

               2.2. Restore VSAM files and PDS(Partitioned Data Set – library) files

– Restore one or more VSAM files from tape CB1015 and dsn= BKPKCI08.AKSAK5 with the same prefix KCI08* of one backed up storage group to another storage group on disk as KCI09* and the same remaining part of the name in job RESKCI08.

//RESKCI08 JOB (9999),
//,
// REGION=0K,TIME=1440,
// MSGCLASS=X,MSGLEVEL=(1,1)
//* *************************************************
//* *************************************************
//JOBLIB DD DSN=KCI00.LIB.PROD.LOAD,DISP=SHR
// DD DSN=CEE.SCEERUN,DISP=SHR
//* Job09594 Aks(90)
//CSDEFINE EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
PARM MARGINS(1 80)
/*
//DFDSS EXEC PGM=ADRDSSU,REGION=0M,TIME=1440 PARM=’TYPRUN=NORUN’
//SYSPRINT DD SYSOUT=*
//TAPE DD DSN=BKPKCI08.AKSAK5,DISP=(NEW,CATLG),
// VOL=SER=(CB1015),UNIT=(301,,DEFER),
// DCB=(KCI01.DMNSNTAP.MODEL.DCB,
// RECFM=U,LRECL=0,BLKSIZE=32760,
// DSORG=PS),LABEL=(1,SL)
//SYSIN DD *
RESTORE –
DS(INC( –
KCI08.CIKAREL.YYYY1996.MM06.DD28 –
KCI08.CIKCREL.YYYY1996.MM06.DD28 –
)) –
INDDNAME(TAPE) –
RENAMEU(KCI08.**,KCI09.**) –
SPHERE

– Restore one or more VSAM files from tape with the same prefix KCI01* to different storage groups on disk with different prefixes KCI08, KCI07 and changed remaining part of the name (KCI08.D1103.LAKMSTR, KCI07.D1103.TDKMSTR) in job RESKCI01:

//RESKCI01 JOB (9999),
//,
// REGION=0K,TIME=1440,
// MSGCLASS=X,MSGLEVEL=(1,1)
//* *************************************************
//* *************************************************
//JOBLIB DD DSN=KCI00.LIB.PROD.LOAD,DISP=SHR
// DD DSN=CEE.SCEERUN,DISP=SHR
//* Job09594 Aks(90)
//CSDEFINE EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
PARM MARGINS(1 80)
/*
//DFDSS EXEC PGM=ADRDSSU,REGION=0M,TIME=1440 PARM=’TYPRUN=NORUN’
//SYSPRINT DD SYSOUT=*
//TAPE DD DSN=BKPKCI08.AKSAK5,DISP=(NEW,CATLG),
// VOL=SER=(CB1015),UNIT=(301,,DEFER),
// DCB=(KCI01.DMNSNTAP.MODEL.DCB,
// RECFM=U,LRECL=0,BLKSIZE=32760,
// DSORG=PS),LABEL=(1,SL)
//SYSIN DD *
RESTORE INDDNAME(TAPE) –
DS(INC( –
KCI01.DMNSNDSK.LAKMSTR –
KCI01.DMNSNDSK.TDKMSTR –
)) –
RENAMEU((KCI01.DMNSNDSK.LAKMSTR,KCI08.D1103.LAKMSTR) –
(KCI01.DMNSNDSK.TDKMSTR,KCI07.D1103.TDKMSTR)) –
SPHERE
– Restore multiple VSAM files (including files with alternate indexes) from tape to disk with the same prefix KCI01* to different storage groups with different prefixes KCI02, KCI08, KCI07 and changed names in job RESTROZ0.
If you restore VSAM files with base cluster, data and index components, alternate indexes (AIXs) (as KCI02.D0595.CIKMSTR) – the AIX components and path names of a sphere must be included in the restore resolving to the same catalog of KCI02 – AIX (CIXMST2, CIXMSTR) and path (CIHMST2, CIHMSTR).

//RESTROZ0 JOB (9999),
//,
// REGION=0K,TIME=1440,
// MSGCLASS=X,MSGLEVEL=(1,1)
//* *************************************************
//* *************************************************
//JOBLIB DD DSN=KCI00.LIB.PROD.LOAD,DISP=SHR
// DD DSN=CEE.SCEERUN,DISP=SHR
//*
//CSDEFINE EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
PARM MARGINS(1 80)
/*
//DFDSS EXEC PGM=ADRDSSU,REGION=0M,TIME=1440 PARM=’TYPRUN=NORUN’
//SYSPRINT DD SYSOUT=*
//TAPE DD DSN=KCI01.DMNSNTAP.D310595,DISP=(NEW,CATLG),
// VOL=SER=(HV0361),UNIT=(300,,DEFER),
// DCB=(KCI02.DMNSNTAP.MODEL.DCB,
// RECFM=U,LRECL=0,BLKSIZE=32760,
// DSORG=PS),LABEL=(1,SL)
//SYSIN DD *
RESTORE INDDNAME(TAPE) –
DS(INC( –
KCI01.DMNSNDSK.CIXMST2 –
KCI01.DMNSNDSK.CIXMSTR –
KCI01.DMNSNDSK.CIHMST2 –
KCI01.DMNSNDSK.CIHMSTR –
KCI01.DMNSNDSK.CIKMSTR –
KCI01.DMNSNDSK.CIKAREL –
KCI01.DMNSNDSK.CIXXRE2 –
KCI01.DMNSNDSK.CIXXREF –
KCI01.DMNSNDSK.CIHXRE2 –
KCI01.DMNSNDSK.CIHXREF –
KCI01.DMNSNDSK.CIKXREF –
KCI01.DMNSNDSK.BAKMSTR –
KCI01.DMNSNDSK.DAKMSTR –
KCI01.DMNSNDSK.LAKMSTR –
KCI01.DMNSNDSK.TDKMSTR –
)) –
RENAMEU((KCI01.DMNSNDSK.CIXMST2,KCI02.D0595.CIXMST2) –
(KCI01.DMNSNDSK.CIXMSTR,KCI02.D0595.CIXMSTR) –
(KCI01.DMNSNDSK.CIHMST2,KCI02.D0595.CIHMST2) –
(KCI01.DMNSNDSK.CIHMSTR,KCI02.D0595.CIHMSTR) –
(KCI01.DMNSNDSK.CIKMSTR,KCI02.D0595.CIKMSTR) –
(KCI01.DMNSNDSK.CIKAREL,KCI02.D0595.CIKAREL) –
(KCI01.DMNSNDSK.CIXXRE2,KCI02.D0595.CIXXRE2) –
(KCI01.DMNSNDSK.CIXXREF,KCI02.D0595.CIXXREF) –
(KCI01.DMNSNDSK.CIHXRE2,KCI02.D0595.CIHXRE2) –
(KCI01.DMNSNDSK.CIHXREF,KCI02.D0595.CIHXREF) –
(KCI01.DMNSNDSK.CIKXREF,KCI02.D0595.CIKXREF) –
(KCI01.DMNSNDSK.BAKMSTR,KCI07.D0595.BAKMSTR) –
(KCI01.DMNSNDSK.DAKMSTR,KCI08.D0595.DAKMSTR) –
(KCI01.DMNSNDSK.LAKMSTR,KCI08.D0595.LAKMSTR) –
(KCI01.DMNSNDSK.TDKMSTR,KCI07.D0595.TDKMSTR)) –
SPHERE

– Restore user and system libraries to disk from tape CB0167 (on device with physical address 300) with DSN= BKPUSLIB.SAVE in job RSTLIBS:

//RSTLIBS JOB (9999,IPO,10,10),
// ‘CORNERSTONE’,
//,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// NOTIFY=,
// TIME=1440,
// USER=
//* /*JCTRL*/
//DFDSS EXEC PGM=ADRDSSU,REGION=0M,TIME=1440 PARM=’TYPRUN=NORUN’
//SYSPRINT DD SYSOUT=*
//TAPE DD DSN= BKPUSLIB.SAVE,DISP=(NEW,CATLG),
// VOL=SER=( CB0167),UNIT=(300,,DEFER),
// DCB=(KCI01.DMNSNTAP.MODEL.DCB,
// RECFM=U,LRECL=0,BLKSIZE=32760,
// DSORG=PS),LABEL=(1,SL)
//SYSIN DD *
RESTORE –
DS(INC( –
BC2A.ZOS140.PARMLIB –
BC2A.ZOS140.STCPROC –
BCA1MGP.STEF.JCL –
KCI05.LIB.PROD.LOAD –
)) –
INDDNAME(TAPE) –
SPHERE
//RESDB5 JOB ‘CRDI- SYSTEMS’,CLASS=A,MSGCLASS=X
//* UNIT=(CART35,,DEFER),VOL=SER=(CB0945),
//DFDSS EXEC PGM=ADRDSSU,REGION=0M,TIME=1440 PARM=’TYPRUN=NORUN’
//SYSPRINT DD SYSOUT=*
//TAPE DD DSN=KCI01.DMNSNTAP.SOVBDB.G0695V00,DISP=OLD,
// UNIT=300,VOL=SER=(CB0894),
// LABEL=(1,SL)
//DASD1 DD DISP=SHR,UNIT=3390,VOL=SER=DEV201
//DASD2 DD DISP=SHR,UNIT=3390,VOL=SER=DEV202
//DASD3 DD DISP=SHR,UNIT=3390,VOL=SER=DEV203
//DASD4 DD DISP=SHR,UNIT=3390,VOL=SER=DEV204
//SYSIN DD *
RESTORE –
DS(INC( –
KCI01.DMNSNDSK.** –
) –
EXCLUDE(KCI01.DMNSNDSK.CSKCONF –
KCI01.DMNSNDSK.CSKSECU –
KCI01.DMNSNDSK.CSKSECW –
KCI01.DMNSNDSK.TTKCTRL –
KCI01.DMNSNDSK.TTKSECU –
)) –
INDDNAME(TAPE) –
RENAMEU(KCI01.**,KCI05.**) –
OUTDDNAME(DASD1,DASD2,DASD3,DASD4) –
SPHERE

 

          Case3. Repro VSAM files to save current contents

               3.1. Copy existing file

KCI08.DMNSNDSK.NEWBAKMS is copied as old one with changed name KCI08.DMNSNDSK.OLDBAKMS in the same storage group to save file NEWBAKMS as a copy OLDBAKMS with the same parameters in job FCOPOLD.

//FCOPOLD JOB (,0100),CLASS=R,MSGCLASS=R
//STEP04 EXEC PGM=ADRDSSU,REGION=0M,TIME=1440 PARM=’TYPRUN=NO
//SYSPRINT DD SYSOUT=*
//DASD1 DD DISP=SHR,UNIT=3390,VOL=SER=ARH201
//DASD2 DD DISP=SHR,UNIT=3390,VOL=SER=ARH202
//DASD3 DD DISP=SHR,UNIT=3390,VOL=SER=ARH203
//DASD4 DD DISP=SHR,UNIT=3390,VOL=SER=ARH204
//SYSIN DD *
COPY DATASET(INCLUDE(KCI08.DMNSNDSK.NEWBAKMS)) –
RENAMEU(KCI08.DMNSNDSK.NEWBAKMS, –
KCI08.DMNSNDSK.OLDBAKMS) –
OUTDDNAME(DASD1,DASD2,DASD3,DASD4) –
SPHERE –
OPT(4) –
SHARE –
ALLEXCP –
ALLDATA(*) –
CATALOG
/*
               3.2. Repro multiple VSAM files

Save the current contents of the existing files in their previous copies with ‘reuse’ parameters (the target data sets are to be opened as a reusable data sets) – modifying the contents of the saved VSAM files as a new copy in job REPROMUL.

// REPROMUL JOB (9999,IPO,10,10),
// ‘CORNERSTONE’,
//,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// NOTIFY=,
// TIME=1440,
// USER=
//REPRO EXEC PGM=IDCAMS,REGION=1024K
//IN1 DD DSN=KCI08.DMNSNDSK.NEWBAKMS,DISP=SHR
//IN2 DD DSN=KCI02.D1206.GLKHS01,DISP=SHR
//IN3 DD DSN=KCI02.D1206.GLKHS02,DISP=SHR
//OUT1 DD DSN=KCI08.DMNSNDSK.OLDBAKMS,DISP=SHR
//OUT2 DD DSN=KCI09.D1206.GLKHS01,DISP=SHR
//OUT3 DD DSN=KCI09.D1206.GLKHS02,DISP=SHR
//SYSPRINT DD SYSOUT=X
//SYSIN DD *
REPRO IFILE(IN1) OFILE(OUT1) REUSE
REPRO IFILE(IN2) OFILE(OUT2) REUSE
REPRO IFILE(IN3) OFILE(OUT3) ,REUSE
/*

 

          Case4. Rename VSAM files in the same catalog

–  The old files KCI02.DMNSNDSK.CIKMSTR /CIKAREL/CIKCREL are altered to the new file names KCI02.DMNSNDSK.CIKMSTR.TODAY /CIKAREL/CIKCREL (for cluster, data and index components) in job ALTCI1.

//ALTCI1 JOB (9999,IPO,10,10),
// ‘CORNERSTONE’,
//,
// MSGCLASS=X,
// MSGLEVEL=(1,1),USER=,
// TIME=1440
//* LIB: CORNERST.OS390210.DASD.UTILITY.LIB(ALTRVSAM)
//* DOC: THIS IS JOB WILL RENAME VSAM FILES
//*
//ALTERTD EXEC PGM=IDCAMS,REGION=512K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ALTER KCI02.DMNSNDSK.CIKMSTR –
NEWNAME(KCI02.DMNSNDSK.CIKMSTR.TODAY)
ALTER KCI02.DMNSNDSK.CIKMSTR.DATA –
NEWNAME(KCI02.DMNSNDSK.CIKMSTR.TODAY.DATA)
ALTER KCI02.DMNSNDSK.CIKMSTR.INDEX –
NEWNAME(KCI02.DMNSNDSK.CIKMSTR.TODAY.INDEX)
ALTER KCI02.DMNSNDSK.CIKAREL –
NEWNAME(KCI02.DMNSNDSK.CIKAREL.TODAY)
ALTER KCI02.DMNSNDSK.CIKAREL.DATA –
NEWNAME(KCI02.DMNSNDSK.CIKAREL.TODAY.DATA)
ALTER KCI02.DMNSNDSK.CIKAREL.INDEX –
NEWNAME(KCI02.DMNSNDSK.CIKAREL.TODAY.INDEX)
ALTER KCI02.DMNSNDSK.CIKCREL –
NEWNAME(KCI02.DMNSNDSK.CIKCREL.TODAY)
ALTER KCI02.DMNSNDSK.CIKCREL.DATA –
NEWNAME(KCI02.DMNSNDSK.CIKCREL.TODAY.DATA)
ALTER KCI02.DMNSNDSK.CIKCREL.INDEX –
NEWNAME(KCI02.DMNSNDSK.CIKCREL.TODAY.INDEX)
/*

 

          Case5. Export/Import VSAM file(VSE to z/os) – USING A TAPE FOR OUTPUT/INPUT

               5.1. Export/VSE (version 1)

The Job EX697CIK in VSE exports two (or more) files KCI01.DMNSNDSK.CIKAREL (as ‘EXPORT.FILE1’) and KCI01.DMNSNDSK.CIKCOLL (as ‘EXPORT.FILE2’) to tape ON DEVICE 201 (type 3490).

* $$ JOB JNM=EX697CIK,DISP=D,PRI=3,CLASS=B
* $$ LST DISP=H
// JOB EX697CIK
* THIS JOB EXPORTS A VSE/VSAM FILE.
// LIBDEF PHASE,SEARCH=IJSYSRS.SYSLIB
// DLBL IJSYSCT,’VSAM.MASTER.CATALOG’,,VSAM
// ASSGN SYS005,XXX
*
* THIS FUNCTION USES A TAPE FOR OUTPUT
* MOUNT TAPE TAPENM ON DEVICE 201
* THEN CONTINUE. IF NOT POSSIBLE CANCEL THIS JOB.
// PAUSE
* // MTC REW,201
// DLBL IJSYSUC,’D3500.TEST.CATALOG’,,VSAM
// TLBL EXPTAP1,’EXPORT.FILE1′,,S00106 – /tape VTOC ID= S00106/
// EXEC IDCAMS,SIZE=AUTO
EXPORT –
KCI01.DMNSNDSK.CIKAREL –
OUTFILE (EXPTAP1 –
ENVIRONMENT ( –
BLOCKSIZE (2056) –
STDLABEL –
NOREWIND –
PRIMEDATADEVICE (2400) –
) –

) –
RECORDMODE –
TEMPORARY –
NOINHIBITTARGET
/*
// LBL IJSYSUC,’D3500.TEST.CATALOG’,,VSAM
// TLBL EXPTAP1,’EXPORT.FILE2′,,S00106
// EXEC IDCAMS,SIZE=AUTO
EXPORT –
KCI01.DMNSNDSK.CIKCOLL –
OUTFILE (EXPTAP1 –
ENVIRONMENT ( –
BLOCKSIZE (2056) –
STDLABEL –
NOREWIND –
PRIMEDATADEVICE (2400) –
) –
) –
RECORDMODE –
TEMPORARY –
NOINHIBITTARGET
/*
// MTC RUN,SYS005
/&
* $$ EOJ

               5.2. Export/VSE (version 2)

The Job EXPCI2 in VSE exports two (or more) files KCI01.D0601.DAKMSTR (as ‘CIKMST1.VSE’) and KCI01.D0601.TDKMSTR (as ‘CIKMST2.VSE’) files to tape ON DEVICE 301 (type 3590).

* $$ JOB JNM=EXPCI2,DISP=D,PRI=3,CLASS=B
* $$ LST DISP=H
// JOB EXPCI2
* THIS JOB EXPORTS A VSE/VSAM FILE.
// LIBDEF PHASE,SEARCH=IJSYSRS.SYSLIB
// DLBL IJSYSCT,’VSAM.MASTER.CATALOG’,,VSAM
// DLBL IJSYSUC,’D3500.TEST.CATALOG’,,VSAM
// TLBL VSAMBK1,’CIKMST1.VSE’,,,,1
// TLBL VSAMBK2,’CIKMST2.VSE’,,,,2
*
* THIS FUNCTION USES A TAPE FOR OUTPUT
* MOUNT TAPE HV0259 ON DEVICE 301
* THEN CONTINUE. IF NOT POSSIBLE CANCEL THIS JOB.
// PAUSE
// MTC REW,301
// ASSGN SYS005,301
// EXEC IDCAMS,SIZE=AUTO
EXPORT –
KCI01.D0601.DAKMSTR –
OUTFILE (VSAMBK1 –
ENVIRONMENT ( –
BLOCKSIZE (2056) –
STDLABEL –
NOREWIND –
PRIMEDATADEVICE (2400) –
) –
) –
RECORDMODE –
TEMPORARY –
NOINHIBITTARGET
EXPORT –
KCI01.D0601.TDKMSTR –
OUTFILE (VSAMBK2 –
ENVIRONMENT ( –
BLOCKSIZE (2056) –
STDLABEL –
NOREWIND –
PRIMEDATADEVICE (2400) –
) –
) –
RECORDMODE –
TEMPORARY –
NOINHIBITTARGET
/*
/&
* $$ EOJ

               5.3. Import z/os (version 1)

The job IMP1CIK in z/os imports two (or more) files KCI01.DMNSNDSK.CIKAREL (as ‘EXPORT.FILE1’) and KCI01.DMNSNDSK.CIKCOLL (as ‘EXPORT.FILE2’) from tape S00106) ON DEVICE 200 (type 3490) (created from previous point 1).

//IMP1CIK JOB (9999,IPO,10,10),
// ‘CORNERSTONE’,
//,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// NOTIFY=,
// TIME=1440,
// USER=
//IMPORT1 EXEC PGM=IDCAMS,REGION=1024K
//IN1 DD DSN=EXPORT.FILE1,DISP=SHR,
// LABEL=(1,SL),VOL=SER=( S00106),
// UNIT=(200,,DEFER),BLKSIZE=2056
//IN2 DD DSN=EXPORT.FILE2,DISP=SHR,
// LABEL=(2,SL),VOL=SER=(HV0262),
// UNIT=(200,,DEFER),BLKSIZE=2056
//SYSPRINT DD SYSOUT=X
//SYSIN DD *
IMPORT –
INFILE(IN1) –
OUTDATASET(KCI01.DMNSNDSK.CIKAREL) –
OBJECTS((KCI01.DMNSNDSK.CIKAREL –
VOLUME(PRD001) –
NEWNAME(KCI01.DMNSNDSK.CIKAREL)) –
(KCI01.DMNSNDSK.CIKAREL.DATA –
VOLUME(PRD001) –
NEWNAME(KCI01.DMNSNDSK.CIKAREL.DATA)) –
(KCI01.DMNSNDSK.CIKAREL.INDEX –
VOLUME(PRD001) –
NEWNAME(KCI01.DMNSNDSK.CIKAREL.INDEX) –
)) –
CATALOG(CATALOG.MVSICF1.VPRD001)
IMPORT –
INFILE(IN2) –
OUTDATASET(KCI01.DMNSNDSK.CIKCOLL) –
OBJECTS((KCI01.DMNSNDSK.CIKCOLL –
VOLUME(PRD001) –
NEWNAME(KCI01.DMNSNDSK.CIKCOLL)) –
(KCI01.DMNSNDSK.CIKCOLL.DATA –
VOLUME(PRD001) –
NEWNAME(KCI01.DMNSNDSK.CIKCOLL.DATA)) –
(KCI01.DMNSNDSK.CIKCOLL.INDEX –
VOLUME(PRD001) –
NEWNAME(KCI01.DMNSNDSK.CIKCOLL.INDEX) –
)) –
CATALOG(CATALOG.MVSICF1.VPRD001)

               5.4. Import z/os (version 2)

The job IMPVSE2 in z/os imports two (or more) files KCI01.D0601.DAKMSTR (as ‘CIKMST1.VSE’) and KCI01.D0601.TDKMSTR (as ‘CIKMST2.VSE’) from tape HV0259 ON DEVICE 300 (type 3590) (created from previous point 2).

//IMPVSE2 JOB (9999,IPO,10,10),
// ‘CORNERSTONE’,
//,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// NOTIFY=,
// TIME=1440,
// USER=
//IMPORTM EXEC PGM=IDCAMS,REGION=1024K
//IN1 DD DSN=’CIKMST1.VSE,DISP=SHR,
// LABEL=(1,SL),VOL=SER=( HV0259),
// UNIT=(300,,DEFER),BLKSIZE=2056
//IN2 DD DSN=’CIKMST2.VSE,DISP=SHR,
// LABEL=(2,SL),VOL=SER=(HV0247),
// UNIT=(300,,DEFER),BLKSIZE=2056
//SYSPRINT DD SYSOUT=X
//SYSIN DD *
IMPORT –
INFILE(IN1) –
OUTDATASET(KCI01.D0601.DAKMSTR) –
OBJECTS((KCI01.D0601.DAKMSTR –
VOLUMES(DEV280 DEV281 DEV282 DEV283 DEV284 DEV286) –
NEWNAME(KCI01.D0601.DAKMSTR)) –
(KCI01.D0601.DAKMSTR.DATA –
VOLUMES(DEV280 DEV281 DEV282 DEV283 DEV284 DEV286) –
NEWNAME(KCI01.D0601.DAKMSTR.DATA)) –
(KCI01.D0601.DAKMSTR.INDEX –
VOLUMES(DEV280 DEV281 DEV282 DEV283 DEV284 DEV286) –
NEWNAME(KCI01.D0601.DAKMSTR.INDEX) –
)) –
CATALOG(CATALOG.MVSICF1. VPRD001)
IMPORT –
INFILE(IN2) –
OUTDATASET(KCI01.D0601.TDKMSTR) –
OBJECTS((KCI01.D0601.TDKMSTR –
VOLUMES(DEV280 DEV281 DEV282 DEV283 DEV284 DEV286) –
NEWNAME(KCI01.D0601.TDKMSTR)) –
(KCI01.D0601.TDKMSTR.DATA –
VOLUMES(DEV280 DEV281 DEV282 DEV283 DEV284 DEV286) –
NEWNAME(KCI01.D0601.TDKMSTR.DATA)) –
(KCI01.D0802.BAKMSTR.INDEX –
VOLUMES(DEV280 DEV281 DEV282 DEV283 DEV284 DEV286) –
NEWNAME(KCI01.D0601.TDKMSTR.INDEX) –
)) –
CATALOG(CATALOG.MVSICF1.VPRD001)
/+

 

          Case6. Export/Import VSAM (VSE to z/os) – USING A DISK FOR OUTPUT/INPUT

               6.1. Export/VSE

The Job EXPDGLK in VSE exports three (or more) files ‘KCI01.DMNSNDSK.GLKACCT’ and ‘KCI01.DMNSNDSK.GLKBAAC’ on disk volume= CB0001 (type 3390) and KCI01.DMNSNDSK.GLKARMS on disk volume= CB0002 (type 3390).

* $$ JOB JNM=EXPDGLK,DISP=D,PRI=3,CLASS=B
* $$ LST DISP=H
// JOB EXPDGLK
* THIS JOB EXPORTS A VSE/VSAM FILES.
LIBDEF PHASE,SEARCH=IJSYSRS.SYSLIB
// DLBL IJSYSCT,’VSAM.MASTER.CATALOG’,,VSAM
// DLBL IJSYSUC,’D3500.TEST.CATALOG’,,VSAM
// ASSGN SYS005,DISK,VOL=CB0001,SHR
// DLBL RECEIV1,’KCI01.DMNSNDSK.GLKACCT’,0,SD
// EXTENT SYS005,CB0001,1,0,15,60
// EXEC IDCAMS,SIZE=AUTO
EXPORT –
KCI01.DMNSNDSK.GLKACCT –
OUTFILE (RECEIV1 –
ENVIRONMENT ( –
BLOCKSIZE (2056) –
) –
) –
RECORDMODE –
TEMPORARY –
NOINHIBITTARGET
/*
// DLBL IJSYSCT,’VSAM.MASTER.CATALOG’,,VSAM
// DLBL IJSYSUC,’D3500.TEST.CATALOG’,,VSAM
// ASSGN SYS006,DISK,VOL=CB0002,SHR
// DLBL RECEIV2,’KCI01.DMNSNDSK.GLKARMS’,0,SD
// EXTENT SYS006,CB0002,1,0,15,50000
// EXEC IDCAMS,SIZE=AUTO
EXPORT –
KCI01.DMNSNDSK.GLKARMS –
OUTFILE (RECEIV2 –
ENVIRONMENT ( –
BLOCKSIZE (2056) –
) –
) –
RECORDMODE –
TEMPORARY –
NOINHIBITTARGET
/*
// DLBL IJSYSCT,’VSAM.MASTER.CATALOG’,,VSAM
// DLBL IJSYSUC,’D3500.TEST.CATALOG’,,VSAM
// ASSGN SYS007,DISK,VOL=CB0001,SHR
// DLBL RECEIV3,’KCI01.DMNSNDSK.GLKBAAC’,0,SD
// EXTENT SYS007,CB0001,1,0,75,15
// EXEC IDCAMS,SIZE=AUTO
EXPORT –
KCI01.DMNSNDSK.GLKBAAC –
OUTFILE (RECEIV3 –
ENVIRONMENT ( –
BLOCKSIZE (2056) –
) –
) –
RECORDMODE –
TEMPORARY –
NOINHIBITTARGET
/*
/&
* $$ EOJ

               6.2. Import z/OS

The Job IMPDGLK in z/os imports three (or more) files ‘KCI01.DMNSNDSK.GLKACCT’ and ‘KCI01.DMNSNDSK.GLKBAAC’ from disk volume= CB0001 (type 3390) and KCI01.DMNSNDSK.GLKARMS from disk volume= CB0002 (type 3390).

//IMPDGLK JOB (9999,IPO,10,10),
// ‘CORNERSTONE’,
//,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// NOTIFY=,
// TIME=1440,
// USER=
//IMPORT1 EXEC PGM=IDCAMS,REGION=1024K
//IN1 DD DSN=KCI01.DMNSNDSK.GLKACCT,UNIT=3390,DISP=OLD,
// VOL=SER=CB0001,
// SPACE=(TRK,(60,2)),DCB=(RECFM=VBS,LRECL=2052,BLKSIZE=2056)
//IN2 DD DSN=KCI01.DMNSNDSK.GLKARMS,UNIT=3390,DISP=OLD,
// VOL=SER=CB0002,
// SPACE=(TRK,(49830,100)),DCB=(RECFM=VBS,LRECL=2052,BLKSIZE=2056)
//IN3 DD DSN=KCI01.DMNSNDSK.GLKBAAC,UNIT=3390,DISP=OLD,
// VOL=SER=CB0001,
// SPACE=(TRK,(15,2)),DCB=(RECFM=VBS,LRECL=2052,BLKSIZE=2056)
//SYSPRINT DD SYSOUT=X
//SYSIN DD *
IMPORT –
INFILE(IN1) –
OUTDATASET(KCI01.DMNSNDSK.GLKACCT) –
OBJECTS((KCI01.DMNSNDSK.GLKACCT –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
NEWNAME(KCI01.DMNSNDSK.GLKACCT)) –
(KCI01.DMNSNDSK.GLKACCT.DATA –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
NEWNAME(KCI01.DMNSNDSK.GLKACCT.DATA)) –
(KCI01.DMNSNDSK.GLKACCT.INDEX –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
NEWNAME(KCI01.DMNSNDSK.GLKACCTT.INDEX) –
)) –
CATALOG(CATALOG.MVSICF1.VPRD001)
IMPORT –
INFILE(IN2) –
OUTDATASET(KCI01.DMNSNDSK.GLKARMS) –
OBJECTS((KCI01.DMNSNDSK.GLKARMS –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
NEWNAME(KCI01.DMNSNDSK.GLKARMS)) –
(KCI01.DMNSNDSK.GLKARMS.DATA –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
NEWNAME(KCI01.DMNSNDSK.GLKARMS.DATA)) –
(KCI01.DMNSNDSK.GLKARMS.INDEX –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
NEWNAME(KCI01.DMNSNDSK.GLKARMS.INDEX) –
)) –
CATALOG(CATALOG.MVSICF1.VPRD001)
IMPORT –
INFILE(IN3) –
OUTDATASET(KCI01.DMNSNDSK.GLKBAAC) –
OBJECTS((KCI01.DMNSNDSK.GLKBAAC –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
NEWNAME(KCI01.DMNSNDSK.GLKBAAC)) –
(KCI01.DMNSNDSK.GLKBAAC.DATA –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
NEWNAME(KCI01.DMNSNDSK.GLKBAAC.DATA)) –
(KCI01.DMNSNDSK.GLKBAAC.INDEX –
VOLUMES(PRD001 PRD002 PRD003 PRD004) –
NEWNAME(KCI01.DMNSNDSK.GLKBAAC.INDEX) –
)) –
CATALOG(CATALOG.MVSICF1.VPRD001)

 

          Case7. GL (General Ledger) bank account files processing management
To produce production bank account print reports of GL archive files from 06.2005 (month/year) and to send it at PC-server, the following steps should be executed:
– Restore GL from archive tape – files KCI02.D0605.GLKHS01 etc. – look and care for the last file with the actual data on 30.06.2005 (KCI02. D0605.GLKHS10) to be restored.
– Update JOB JHIS0605 – in step STEP10D for the last GL- file (KCI02. D0605.GLKHS10) where the program PGM=GLVKALL processes the restored last file KCI02.D0605.GLKHS10 and starts SPLTREP2 Rexx procedure from library BCI01..LIB.BASE.EXEC to generate net split job GFTPG10 (with FTP).

//JHIS0605 JOB MSGLEVEL=(1,1),MSGCLASS=X,TIME=1440
//JOBLIB DD DSN=BCI01.LIB.PROD.LOAD,DISP=SHR
// DD DSN=KCI01..LIB.PROD.LOAD,DISP=SHR
//*
……….
//STEP10D EXEC PGM=IEFBR14
//UPDPRIN DD DSN=PRINT01.KCI02..B6600.HDESK.HISGLACC.G10,
// DISP=(MOD,DELETE),
// DCB=(RECFM=FB,LRECL=205,DSORG=PS,BUFNO=50),
// SPACE=(TRK,1),UNIT=VIO
//*
//STEP10 EXEC PGM=GLVKALL,REGION=6M
//GLTRAN DD DSN=KCI02.D0605.GLKHS10,DISP=SHR
//UPDPRIN DD DSN=PRINT01.KCI02..B6600.HDESK.HISGLACC.G10,
// DISP=(NEW,CATLG),
// DCB=(RECFM=FB,LRECL=205,DSORG=PS,BUFNO=50),
// SPACE=(CYL,(50,5),RLSE),UNIT=VIO
//INFILE DD *
01-01-2003
31-12-2005
53059002 0027
END
/*
//STSPLI10 EXEC PGM=IKJEFT01,DYNAMNBR=20,REGION=4M
//SYSPROC DD DSN=BCI01.LIB.BASE.EXEC,DISP=SHR
//* INPUT FILE
//REPORT DD DSN=PRINT01.KCI01..B6600.HDESK.HISGLACC.G10,DISP=SHR
//SYSTSPRT DD SYSOUT=B
//SYSTSIN DD *
PROFILE NOPREFIX
%SPLTREP2 @@** NCC 0
/*
//*
– The Rexx procedure SPLTREP2 in library BCI01.LIB.BASE.EXEC(SPLTREP2) generates inside job GFTPG10 with the following FTP address – IP=10.150.0.78:

SPLTREP2 PROC
…………….
/* SETS THE FTP DYNJOB HEADER */
QUEUE “//GFTP”P_1″ JOB (GENPUTS),’BIOCHIM’,”
QUEUE “// USER=,”
QUEUE “// GROUP=,”
QUEUE “// PASSWORD=,”
QUEUE “// TIME=1440,”
QUEUE “// NOTIFY=&SYSUID,”
QUEUE “// REGION=8M,”
QUEUE “//,”
QUEUE “// MSGCLASS=X,”
QUEUE “// MSGLEVEL=(1,1)”
QUEUE “// EXEC PGM=FTP,PARM=’10.150.0.78 (EXIT’ ”
QUEUE “//SYSPRINT DD SYSOUT=* ”
QUEUE “//OUTPUT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=160,BLKSIZE=3200)”
QUEUE “//INPUT DD * ”
QUEUE “// EXEC PGM=FTP,PARM=’10.150.0.78 (EXIT’ ”
*** If necessary 10.150.0.78 is changed to the appropriate PC server
The generated job is GFTPG10 with FTP,PARM=’10.150.0.78 which transfers the produced report file ‘PRINT01.KCI01.B6600.HDESK.HISGLACC.G10.RC1’ from z/os to PC-server with IP=10.150.0.78 in folder KCI01\B6600\HDESK\ARCH as PC file HISGLACC.G10:

//GFTPG10 JOB (GENPUTS),’BIOCHIM’,
// USER=,
// GROUP=,
// PASSWORD=,
// TIME=1440,
// NOTIFY=&SYSUID,
// REGION=8M,
//,
// MSGCLASS=X,
// MSGLEVEL=(1,1)
// EXEC PGM=FTP,PARM=’10.150.0.78 (EXIT’
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=160,BLKSIZE=3200)
//INPUT DD *
OPERATOR OPERATOR
SENDSITE
LOCSITE SBD=BCA1VTF.FTP.TCPXLBIN
CD /KCI01
CD B6600
CD HDESK
CD ARCH
PUT ‘PRINT01.KCI01.B6600.HDESK.HISGLACC.G10.RC1’ HISGLACC.G10
CLOSE
QUIT
//*

 

          Case8. Mass delete VSAM files

If you want to delete more VSAM files only with their common prefix use the job DSNDEL for
Massdel – Mass delete VSAM files:

//DSNDEL JOB (,0100),CLASS=R,MSGCLASS=R
//*FDSS EXEC PGM=ADRDSSU,REGION=0M,TIME=1440,PARM=’TYPRUN=NORUN’
//DFDSS EXEC PGM=ADRDSSU,REGION=4096K,TIME=1440
//SYSPRINT DD SYSOUT=*
//NOTAPE DD DUMMY
//SYSIN DD *
DUMP –
DS(INC(KCI08.CIKAREL.**, –
)) –
OUTDDNAME(NOTAPE) –
TOL(ENQF) ALLX OPT(4) DELETE PURGE

 

          Case9. Delete files and garbage

Sometimes more VSAM file components are still existing after some error operations/executions and take up a lot of disk space that is necessary to be used for user applications. ?Occasionally the files are not existing/available  but they are not deleted from catalog  and there are still records for them. If we want to create a new file with the old name it appears impossible.  The following examples show how to deal with this garbage:
               9.1. Delete/purge VSAM cluster/s

If these files are VSAM files with all components – cluster, data, index) use  job DELCHK:

//DELCHK JOB (9999),
//,
// REGION=0K,TIME=1440,
// MSGCLASS=X,MSGLEVEL=(1,1)
//* *************************************************
//* *************************************************
//JOBLIB DD DSN=KCI00.LIB.PROD.LOAD,DISP=SHR
// DD DSN=CEE.SCEERUN,DISP=SHR
//*
//CSDEFINE EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
PARM MARGINS(1 80)
DEL KCI03.D0602.LAKMSTR PURGE CLUSTER
DEL KCI03.D0603.LAKMSTR PURGE CLUSTER
/*

               9.2. Delete non VSAM file

Use  batch job (with job DELD1NOS) or manually using del command via TSO/ISPF – P.3.4:

//DELD1NOS JOB (9999),
//,
// REGION=0K,TIME=1440,
// MSGCLASS=X,MSGLEVEL=(1,1)
//* Delete NonVSAM Scratch /NOS/
//* Manual –DEL (/) NONVSAM – enter / to confirm
//* Manual – del ent (/) all
//* Manual – del (/) nos
//* Verify – ist cent(/) all
//NEWUSS EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DEL ‘KCI03.DMNSNDSK.DWIPLAM.X2007073’ NOS
/*

9.3. Delete VVR or NVR RECORDS

 What is VVR or NVR RECORD in VVDS?
The VVDS (catalog Volume Data Set) contains VSAM volume records (VVRs) that hold information about VSAM data sets residing on the volume. The VVDS also contains non-VSAM volume records (NVRs) for SMS-managed non-VSAM data sets on the volume. Two jobs are to be executed for VVDS definition in z/os SMS (Storage Management System): INITSM, DEFVVDS.
– INITSM job – old volume dev320 is initialized as a new volume dev201 for SMS use:

//INITSM JOB (,0100),CLASS=R,MSGCLASS=R
//S1 EXEC PGM=ICKDSF,REGION=3072K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
INIT UNITADDRESS(0528) VOLID(DEV201) VTOC(0,1,195) –
INDEX(14,0,45) NOVALIDATE STORAGEGROUP VERIFY(DEV320)
/*
– DEFVVDS job – on volume dev201 is defined VVDS (catalog Volume Data Set – SYS1.VVDS.VDEV201) which contains VSAM volume records (VVRs) that hold information about VSAM data sets residing on the volume.

//DEFVVDS JOB (,0100),CLASS=R,MSGCLASS=R
//IDCAMS EXEC PGM=IDCAMS,REGION=1024K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER(NAME(SYS1.VVDS.VDEV201) VOL(DEV201) –
NONINDEXED –
CYLINDERS(8 2)) –
CAT(CATALOG.MVSICFM.VBC2MCC)
/*

How to delete VVR or NVR error/garbage records with DELVVR job?

//DELVVR  JOB (,0100),CLASS=R,MSGCLASS=R
//* DELETE PRINT01.KCI01.B6600.LOCAL.CS000023.X111 FILE(VVDSDD) NVR
//* IF IDC3009I VSAM CATALOG RETURN CODE IS 90 REASON 42 – NVR
//* DOC: THIS IS JOB WILL DELETE A VVR RECORD.
//*
//VVR EXEC PGM=IDCAMS,REGION=512K
//SYSPRINT DD SYSOUT=*
//VVDSDD DD DSN=SYS1.VVDS.VDEV201,DISP=SHR,UNIT=3390,
// VOL=SER=DEV201,AMP=(‘AMORG’)
//SYSIN DD *
DELETE BIO05.SYSTEM.HSDML FILE(VVDSDD) VVR
CATALOG(CATALOG.MVSICF1.VBC2MCC)
/*
or delete one VSAM component KCI01.DMNSNDSK.DAKTR04.DATA on PRDB02:
//VVR EXEC PGM=IDCAMS,REGION=512K
//SYSPRINT DD SYSOUT=*
//DD1 DD VOL=SER=PRDB02,DISP=OLD,UNIT=3390
//SYSIN DD *
DELETE KCI01.DMNSNDSK.DAKTR04.DATA –
FILE(DD1) –
VVR
/*

 

Incoming search terms:

  • vsam utilities
  • adrdssu utility
  • vsam export-import utility
  • adrdssu parallel
  • ADRDSSU
  • adrdssu copy vsam
  • ftp vsam file mainframe

Leave A Reply

Comments

No comments yet, be the first to add one!

Places

 

Choose donation amount:
您要找的资源已被删除、已更名或暂时不可用。 Clef two-factor authentication