MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Vsam Backup

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
Ted Allen
Beginner


Joined: 08 Jul 2005
Posts: 1
Topics: 1

PostPosted: Fri Jul 08, 2005 4:11 pm    Post subject: Vsam Backup Reply with quote

I am a VSE person that sometimes workd on MVS. Does vsam backup work the sam in MVS as it does in VSE ?? Could I get some jcl examples???
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Jul 09, 2005 5:15 am    Post subject: Reply with quote

Ted allen,

I am not sure of VSAM Backup process on VSE. But on MVS there are many tools which can be used to backup and recover vsam clusters. ex: (IDCAMS,FDR,STARTTOOL...). Here are some examples using IDCAMS


Example 1: The following JCL will create a tape backup named VSAM.BACKUP.FILE of the VSAM file named VSAM.FILE. This example uses the EXPORT facility of IDCAMS.
Code:

//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//BACKUP   DD DSN=VSAM.BACKUP.FILE,UNIT=TAPE,
//            DISP=(NEW,CATLG,DELETE),DCB=BLKSIZE=6000
//SYSIN DD *
  EXPORT -
  VSAM.FILE -
  OUTFILE(BACKUP) -
  TEMPORARY
/*

BLKSIZE is not required on the BACKUP dd statement but should be coded if you wish to override the default of 2048.

Example 2: The following JCL restores the VSAM file named VSAM.FILE from the tape backup named VSAM.BACKUP.FILE using the IMPORT facility of IDCAMS.

Code:

//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SOURCE   DD DSN=VSAM.BACKUP.FILE,DISP=OLD
//SYSIN DD *
  IMPORT -
  INFILE(SOURCE) -
  OUTDATASET(VSAM.FILE)
/*


If a VSAM file has an alternate index associated with it, you must IMPORT and EXPORT both the alternate index and the file.

Example 3: The following JCL creates a tape backup named VSAM.BACKUP.ALTNDX of the alternate index named VSAM.ALTNDX associated with the VSAMfile. Both backups will be contained on the same tape volume. The alternate index must be backed up first.
Code:

//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//BACKUP   DD DSN=VSAM.BACKUP.ALTNDX,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=TAPE,LABEL=(1,SL),VOL=(,RETAIN)
//SYSIN DD *
  EXPORT VSAM.ALTNDX -
  OUTFILE(BACKUP)
/*
//STEP2    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//BACKUP   DD DSN=VSAM.BACKUP.FILE,
//            DISP=(,CATLG,DELETE),
//            UNIT=TAPE,LABEL=(2,SL),VOL=(,,REF=*.STEP1.BACKUP)
//SYSIN DD *
  EXPORT VSAM.FILE -
  OUTFILE(RECEIVE)
/*


Another method for backing up and restoring a VSAM file is the REPRO facility of IDCAMS.
Example 4: The following JCL creates a tape backup named VSAM.BACKUP.FILE of the VSAM file named VSAM.FILE using the REPRO facility of IDCAMS.
Code:

//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DD1      DD DSN=VSAM.BACKUP.FILE,UNIT=TAPE,
//            DISP=(,CATLG,DELETE),DCB=(appropriate parameters)
//DD2      DD DSN=VSAM.FILE,DISP=OLD
//SYSIN DD *
  REPRO -
  INFILE(DD2) -
  OUTFILE(DD1)
/*


In order to restore a VSAM file from a backup created with the REPRO facility, the file must first be defined again using the DEFINE facility of IDCAMS. Therefore, you must know the attributes of the file in order to use the REPRO facility.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group