I use SEQNBR(1) CLEAR(*ALL) on the first save in the backup (SAVSECDTA) - 
AFTER I have checked that the correct tape volume is inserted.
A brief code snippet on how to check the volume id of the mounted tape:

            DCL        VAR(&CHKTAP) TYPE(*LGL) VALUE('1') /* 1 = + 
                         CHKTAP not run; 0 = CHKTAP already run */ 

             DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7) 
             DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(100) 
             DCL        VAR(&MSGKEY) TYPE(*CHAR) LEN(4) 

             DCL        VAR(&TAPEDEV) TYPE(*CHAR) LEN(10) + 
                          VALUE(TAP01) /* Device name defaulted to +
                          TAP01. */ 
             DCL        VAR(&TAPEDEVB) TYPE(*CHAR) LEN(50) 
             DCL        VAR(&TAPVOLID) TYPE(*CHAR) LEN(6) 

/* CHECK THAT TAPE DRIVE IS READY WITH CORRECT TAPE.                 */
/*  (Volume ids for Nightly Backup tapes begin with:                 */
/*  DCMONn, DCTUEn, DCWEDn, DCTHUn, DCFRIn, DCSATn, DCSUNx (n=seq #).*/
CHKTAP:      CHKTAP     DEV(&TAPEDEV) ENDOPT(*REWIND) 
 
             MONMSG     MSGID(CPF6708) /* Command ended due to error + 
                          - possibly "CPF4120 Tape device + 
                          equipment check" if tape from last nights + 
                          backup sitting unloaded in drive with + 
                          drive door open. */ 
             MONMSG     MSGID(CPF6718) /* Cannot allocate device. */ 
             MONMSG     MSGID(CPF6760) /* Device not ready. */ 
             MONMSG     MSGID(CPF6772) /* Volume cannot be processed */
             RCVMSG     MSGTYPE(*LAST) RMV(*NO) KEYVAR(&MSGKEY) + 
                          MSGDTA(&MSGDTA) MSGID(&MSGID) 

             IF         COND(&MSGID *EQ CPF6760) THEN(DO) 
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('>>> + 
                          Tape device ' *CAT %SST(&MSGDTA 1 10) + 
                          *TCAT ' was not ready.  Nightly backup + 
                          job ended') TOUSR(*SYSOPR) 
             GOTO       CMDLBL(BYPASS) 
             ENDDO 
 
             ELSE       CMD(DO) 
 
             IF         COND(&MSGID *EQ CPF6708) THEN(DO) 
/* If CHKTAP fails first time and we get a CPF6708 it may be caused  */ 
/*  by a CPF4168/MCH1668 and tape device may be in a FAILED state.   */ 
/*  Try once to vary off/on the tape device and retry CHKTAP.        */ 
              IF         &CHKTAP THEN(DO) 
              CHGVAR     VAR(&CHKTAP) VALUE('0') /* CHKTAP run once */ 
              VRYCFG     CFGOBJ(&TAPEDEV) CFGTYPE(*DEV) STATUS(*OFF) 
              MONMSG     MSGID(CPF2600) /* Ignore vary command error */ 
              DLYJOB     DLY(5) 
              VRYCFG     CFGOBJ(&TAPEDEV) CFGTYPE(*DEV) STATUS(*ON) 
              MONMSG     MSGID(CPF2600) /* Ignore vary command error */ 
              GOTO       CMDLBL(CHKTAP) 
              ENDDO 
             RCVMSG     MSGTYPE(*PRV) MSGKEY(&MSGKEY) RMV(*NO) + 
                          MSGDTA(&MSGDTA) MSGID(&MSGID) 
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('>>> + 
                          CHKTAP command ended due to error.  See + 
                          message ' *CAT &MSGID *CAT ' in joblog.  + 
                          Nightly backup job ended') TOUSR(*SYSOPR) 
             GOTO       CMDLBL(BYPASS) 
             ENDDO 
 
             ELSE       CMD(DO) 
 
             IF         COND(&MSGID *EQ CPF6718) THEN(DO) 
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('>>> + 
                          Cannot allocate device ' *CAT + 
                          %SST(&MSGDTA 1 10) *TCAT ' - in use by + 
                          another job.  Nightly backup job ended') + 
                          TOUSR(*SYSOPR) 
             GOTO       CMDLBL(BYPASS) 
             ENDDO 
 
             ELSE       CMD(DO) 
 
             IF         COND(&MSGID *EQ CPF6772) THEN(DO) 
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('>> Tape +
                          volume on device ' *CAT %SST(&MSGDTA 1 + 
                          10) *TCAT ' cannot be processed.  Tape + 
                          may be un-initialized, or initialized in + 
                          an unsupported format or density.  + 
                          Nightly backup job ended') TOUSR(*SYSOPR) 
             GOTO       CMDLBL(BYPASS) 
             ENDDO 
 
             ELSE       CMD(DO) 
 
             CHGVAR     VAR(&TAPVOLID) VALUE(%SST(&MSGDTA 11 6)) 
 
             IF         COND((&MSGID *EQ CPC6778) & + 
                          (%SST(&MSGDTA 11 5) *NE 'DCMON') & + 


<<OR - depending on day of week>>
                          (%SST(&MSGDTA 11 5) *NE 'DCTUE') & + 
                          (%SST(&MSGDTA 11 5) *NE 'DCWED') & + 
                          (%SST(&MSGDTA 11 5) *NE 'DCTHU') & + 
                          (%SST(&MSGDTA 11 5) *NE 'DCFRI') & + 
                          (%SST(&MSGDTA 11 5) *NE 'DCSAT') & + 
                          (%SST(&MSGDTA 11 5) *NE 'DCSUN')) 

                                                                THEN(DO) 
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('>>> + 
                          Tape volume ' *CAT &TAPVOLID *TCAT ' + 
                          found on device ' *CAT %SST(&MSGDTA 1 10) + 
                          *TCAT ' - not a 1/4" Nightly Backup tape + 
                          (volid starting with "DC" + first 3 + 
                          letters of day of week).  Nightly backup + 
                          job ended') TOUSR(*SYSOPR) 
<< Tailor message to your needs >>


 
             GOTO       CMDLBL(BYPASS) 
             ENDDO 
             ENDDO 
 
             ENDDO 
             ENDDO 
             ENDDO 




...Neil




"Rick Rayburn" <the400man@xxxxxxxxxxx> 
2003/09/10 06:44



To
midrange-l@xxxxxxxxxxxx
cc

Subject
Question For Backup Automation






Trying to automate nightly backups but running into a problem when save 
command first executes. OS is reporting "an active volume is found" and 
wants a reply (c, i, r). I am rotating 5 tapes each week so there is stuff 

on each tape when the backup is initiated. I know if an INZTAP command 
precedes the save operation, the problem is solved but...

is there any way to avoid this message under these circumstances without 
having to do the INZTAP?

Thanx.

Rick Rayburn
NYC




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.