Tape creation and retention using MVS
JCL
OLD CURRENTAll 3480 drives attached to MVS are IDRC-capable. Using UNIT=TAPE with DCB=TRTCH=COMP to write the first file on a tape will result in all files on that tape being in IDRC-compact format. Compact format tapes may hold up to 5 times more data than non-compacted cartridges. Cartridges in compacted format can be read on any IDRC-capable drive with no special instruction from the user. Users who intend to transport data to systems which do not have IDRC-capable drives should not use TRTCH=COMP when preparing tapes. To write on a 1600 bpi tape DCB=DEN=3 must be specified. To use a 1600 bpi tape the UNIT parameter in JCL should say UNIT=TAPE1600. To use a 6250 bpi tape, the UNIT parameter in JCL should say UNIT=TAPE6250.
Unit Tape DCB Type Density DEN= UNIT= UNIT=
3420-6 1600 3 TAPE TAPE1600 3420-6 6250 4 TAPE TAPE6250 3480 38K - - TAPE
98000 Alien tape (not stored in tape library). 98nnn Retain tape nnn days after last access. 99000 Retain tape as long as dsname is cataloged on MVS. 99nnn Retain tape for nnn cycles. 99365 Retain tape permanently; read access only.Because dates in the year range 1998-1999 have special meanings, you must, if you want your tape to have an EXPDT in 1998-1999, include an extra DD statement, ddname //TMNOKEY in your JCL to show that the EXPDT you have specified should NOT be interpreted as a keyword date.
RETPD=yy, where yy is the number of days the tape is to be held, 3 in this case.
//FILEB DD DSN=J999991.PUTTER8.OUTPUT,UNIT=TAPE, // DISP=(NEW,KEEP),LABEL=RETPD=3
EXPDT=yyddd, where yy is the year, 95 in this case, and ddd is the Julian day of the year, 001 in this case.
EXPDT=yyddd, where yy is the year, 98 in this case, and ddd is the Julian day of the year, 001 in this case. The presence of the TMNOKEY DD statement tells the tape management system NOT to interpret the date as a keyword date.//TESTOUT DD DSN=J999991.PUTTER8.DATA79,DISP=(NEW,CATLG), // UNIT=TAPE,DCB=(RECFM=FB,LRECL=100,BLKSIZE=6400), // LABEL=EXPDT=96001
To save a tape data set until January 1, 1998
//TESTOUT DD DSN=J999991.PUTTER8.DATA79,DISP=(NEW,CATLG), // UNIT=TAPE,DCB=(RECFM=FB,LRECL=100,BLKSIZE=6400), // LABEL=EXPDT=98001 //TMNOKEY DD DUMMY
If a valid DSN is given and no EXPDT or RETPD is specified, the tape data set is kept seven days.
//FILEB DD DSN=J99991.FUDGE8.SHORT, // DISP=(NEW,CATLG),UNIT=TAPE
//OUTPUT DD DSN=J999991.PUTTER8.JUNE,UNIT=TAPE, // LABEL=EXPDT=99000,DISP=(NEW,CATLG)
1. The last time the dataset is used code:
//ZONK DD DSN=J99991.FUDGE8.JUNE,DISP=(OLD,UNCATLG)
2. Run UCCUPDTE to set expiration date to TODAY (see section entitled TAPE RELEASE). The next time the tape management utility to return expired tapes to the scratch pool is run, the tape will be set scratch and entries for any data sets on the tape (except generation data group data sets) will be removed from the MVS system catalog. The expiration utility is normally run early each morning.
3. Run IEHPROGM (See chapter 10, UTCC IBM User's Guide ) to uncatalog the data set. The next time the tape expiration utility runs it will set the tape scratch.
Note: Do not provide a DD statement for the tape which is to be uncataloged
Note: Although CA-1 recognizes a date of 99000, MVS expects the day portion of the date to be between 001 and 365. Therefore, in response to an EXPDT of 99000, MVS will print the message "IEF604I EXPDT SUBPARAMETER OF LABEL KEYWORD SPECIFIES ZERO DAYS VALUE." This is, however, only an informatory message, and the data set will be properly cataloged.
//FT08F001 DD DSN=J99991.FUDGE8.DATA,DISP=(NEW,KEEP), // LABEL=EXPDT=98005,DCB=(RECFM=FB,LRECL=80,BLKSIZE=6400), // UNIT=TAPE
In order to release a permanent tape data set, Form U01-0510 can be completed and returned to the I/O Clerk, SMC M1; or UCCUPDTE can be used to modify the expiration date so that the tape may be released (see section entitled TAPE RELEASE).//FILEB DD DSN=J99991.FUDGE8.EASYOUT,UNIT=TAPE, // LABEL=EXPDT=99365,DISP=(NEW,CATLG)
//OIRIPS DD DSN=J99991.FUDGE8.INVENT,DISP=(NEW,KEEP), // UNIT=TAPE,LABEL=EXPDT=99003,DCB=(RECFM=FB, // BLKSIZE=13000,LRECL=130)
//OIRIPS DD DSN=J99991.FUDGE8.INVENT,DISP=(NEW,KEEP), // UNIT=TAPE,LABEL=EXPDT=2001/015,DCB=(RECFM=FB, // BLKSIZE=13000,LRECL=130)
//REWRITE DD DSN=J99991.FUDGE8.ITG,DISP=OLD, // LABEL=EXPDT=98001
//APPEND DD DSN=J99991.FUDGE8.DATA,DISP=MOD
1. Use the CA-1 Utility, UCCUPDTE described on Form U01-0527.
//ZAP JOB ,DELANEY,GROUP=J999991,USER=P999998,PASSWORD=FUDGE /*ROUTE PRINT RMT0 //STEP1 EXEC UCCUPDTE //SYSIN DD * VOL 109652 VER DSN=J999991.OLD.STUFF REP EXPDT=TODAY
VOL Indicates the Volume Serial Number (VSN) of the tape for which to modify the expiration date.
VER Verify the data set name for the first file (may be omitted for a pre-TMC tape that has not been used under CA-1).
REP Replace the expiration date. TODAY indicates present date.
2. Fill out Form U01-0510 and return it to the I/O Clerk, SMC M1.
3. Uncatalog the tape data set if saved with EXPDT=99000. (See Section entitled RETENTION BASED ON THE CATALOG)
/*MESSAGE OK TO WRITE ON DATE-PROTECTED DSN J999991.NODE1.NODE2
/*MESSAGE internal=external where "internal" is the volume number of the tape and "external" is the external U number
Note: Tapes out-of-area should not be updated and if a tape is checked out of the area the expiration date should be such that the tape will not expire until after the tape is returned.
VOL Specifies volume about which information is to be modified.
VER Specifies the data set name of the first file, and may specify the current values of other fields, to verify that the proper tape is accessed
REP Specifies fields to be modified
Note: Each control statement must begin in column one. Column four is always blank. Any number of VER or REP statements may be specified, but neither a VER nor REP statement may extend beyond column 72 or be continued. The CA-1 fields described below may be coded on the VER and REP statements, beginning in column 5.
DSN data set name (always required on the VER statement except for tapes created before the use of the CA-1 tape management system).
EXPDT expiration date (yyyy/ddd) or CA-1 keyword. Use yyyy/ddd if you want a 'real' date and keyword if you want special retention criteria.
PASSWRD password
LDATE last date used (yyyy/ddd or "TODAY")
OUTCODE out-of-area code (ENTX, FICH, AHT, or USER. If USER is specified, see COMMENT)
TACCT responsible project code (always specified as six digits, including leading zeroes if necessary)
COMMENT comments (1-31 characters. If USER is specified on the OUTCODE statement, the name and destination to which the tape is sent must be coded as comments.)
Note: These fields apply to the first or only file on the tape. Information about other files on the tape may not be modified. In the case of a multi-volume data set or a multi-volume, multi-data set aggregate, information may be changed for the first volume only. This information, however, is then applied to all volumes containing the data set or data set aggregate.
Note: "HEXZERO" may be used to indicate hexadecimal zeroes for any field.
Note: If the DSN or COMMENT field contains special characters or blanks, the data set name or comment must be enclosed in apostrophes.
//jobname JOB ,name,GROUP=J999991,USER=P999998, // PASSWORD=current /*ROUTE PRINT dest /*JOBPARM ROOM=BINS //stepname EXEC UCCUPDTE //SYSIN DD * (control statements)
Note: The project code on the JOB statement must be the project code responsible for the tape.
Releasing a tape
VOL 999999 VER DSN=J999991.DATA REP EXPDT=TODAY
Modifying the expiration date
VOL 999999 VER DSN=J999991.COBOL.SOURCE REP EXPDT=1998/030
Changing Expiration Date to "30 days since last used" and Changing Last Date Used to today
VOL 999999 VER DSN=J99991.TEST REP LDATE=TODAY,EXPDT=LDATE/030
Checking a tape out-of-area to user
VOL 999999 VER DSN=J999991.ZINC REP OUTCODE=USER,COMMENT='BINSzJOHN DOE'
Note: Destination and user name must be specified in the comment field.
Checking a tape out-of-area to Entrex
VOL 999999 VER DSN=J999991.FUNPACK REP OUTCODE=ENTX
Adding a password
VOL 999999 VER DSN=J999991.CASH.COLLECT REP PASSWRD=ABCDEF (ABCDEF is the new password)
Removing a password
VOL 999999,PASSWORD=SECRET (SECRET is the old password)
VER DSN=J999991.DATA
REP PASSWRD=$REMOVE$ ($REMOVE$ is a keyword which removes
the old password)
Note: The spelling of the password keyword differs on the VOL (PASSWORD=) and the REP (PASSWRD=) control statements.
Changing a password
VOL 999999,PASSWORD=FUDGE (FUDGE is the old password) VER DSN=J999991.DSATE REP PASSWRD=THUD (THUD is the new password)
Note: The old password (FUDGE) on the VOL statement must be specified to change the password to THUD.
Releasing a password protected tape
VOL 999999,PASSWORD=R2D2 VER DSN=J999991.MASTER REP EXPDT=TODAY
Note: The password is required on the VOL statement to modify any information about a password protected tape.
Assigning a tape to another project code
VOL 999999 VER DSN=J999994.TEST REP TACCT=999994
Adding or replacing a comment about a tape
VOL 999999 VER DSN=J999994.ZAP REP COMMENT='FIX OF JUNE DATA'
Note: The new comment is added if there is not a previous comment; otherwise the old comment is replaced.
Removing a comment about a tape
VOL 999991 VER DSN=J999991.OLD REP COMMENT=' '
Note: The blank character in single apostrophes (' ') causes the old comment to be replaced by blanks.
Several tasks combined
VOL 999991 VER DSN=J999991.OLD REP EXPDT=TODAY VOL 999992 VER DSN=J999991.GOOD REP EXPDT=CATALOG,COMMENT='OLD 999991'
Changing the expiration date of a pre-CA-1 tape
VOL 999999 REP EXPDT=99365
1. No DSN is specified 2. DSN starts with && 3. DISP=(NEW,DELETE) 4. LABEL=RETPD=0
//TSTAE DD DSN=J99991.FUDGE8.TIMECARD,UNIT=TAPE, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=6400), // LABEL=(1,NL,EXPDT=99000),DISP=(NEW,CATLG)
To read the above NL tape data set
//INTSTAE DD DSN=J99991.FUDGE8.TIMECARD,DISP=SHR, // LABEL=(,NL),DCB=(RECFM=FB,LRECL=80,BLKSIZE=6400)
To release the last time it is used
//ZAP DD DSN=J99991.FUDGE8.TIMECARD,DISP=(OLD,UNCATLG), // LABEL=(,NL),DCB=(RECFM=FB,LRECL=80,BLKSIZE=6400) (or use IEHPROGM to uncatalog the tape data set or use UCCUPDTE (see section entitled TAPE RELEASE))
1. Create a disk data set with the attributes required by the GDG.
//GDGDISK JOB ,FRED.GRIMM,GROUP=J999991,USER=P999998, // PASSWORD=SECRET /*ROUTE PRINT RMT15 //SA EXEC IEFBR14 //A DD DSN=J999991.MODEL.DCB,DISP=(NEW,CATLG), // UNIT=ONLINE,SPACE=(TRK,(0)),LABEL=EXPDT=99000, // DCB=(RECFM=FB,LRECL=400,BLKSIZE=6400)
DSN - any permanent data set name; cannot be the same as your tape GDG data set name
DISP - catalog
UNIT - can be any online disk pack
SPACE - only the attributes are needed so no space is required
LABEL - sets GDG up to rely on the catalog as the means of scratching old generations
DCB - DCB attributes for the tape generations
2. Build the GDG index using IDCAMS:
//GDGDISK JOB ,FRED.GRIMM,GROUP=J999991,USER=P999998, // PASSWORD=SECRET /*ROUTE PRINT RMT15 //START EXEC PGM=IDCAMS //SYSIN DD * DEFINE GDG (NAME(J999991.PUTTER8.MASTER) LIMIT(5))
DEFINE GDG - tells IDCAMS to build a GDG index
NAME(DSN) - tells the qualified name of the GDG
LIMIT(#) - tells how many generations are to be contained in the GDG
3. Add data sets to the GDG:
//OUTTAPE DD DSN=J999991.PUTTER8.MASTER(+1), // DISP=(NEW,CATLG),DCB=(J999991.MODEL.DCB), // UNIT=TAPE
TAPELIST will sort on one major and up to nine minor CA-1 keywords. You simply add a //SYSIN DD * statement and then a line with the verb: SORTDSNB keyword1,keyword2,...,keyword10. The first keyword listed is the major keyword; any others are considered minor keywords for this jo A complete listing of CA-1 keywords is given in the section entitled CA-1 Keywords in the; IBM User's Guide For example SORTDSNB DSN will give a listing sorted by DSN rather than by the default of VOLSER.//LIST JOB ,FRED.SMITH,GROUP=J999991,USER=P999998, // PASSWORD=SECRET /*ROUTE PRINT RMT0 /*JOBPARM ROOM=BINS //SA EXEC TAPELIST
//SORTLIST JOB ,'FRED.SMITH',GROUP=J999991,USER=P999998, // PASSWORD=SECRET /*ROUTE PRINT RMT0 /*JOBPARM ROOM=BINS //SA EXEC TAPELIST //SYSIN DD * SORTDSNB DSN
To print the tape labels on a 1600 BPI tape execute the procedure TLABELS as follows.//LABEL JOB ,FRED.SMITH,GROUP=J999991,USER=P999998, // CLASS=T,PASSWORD=SECRET /*ROUTE PRINT RMT0 /*JOBPARM ROOM=BINS //SA EXEC TLABELS,VOLID=999999
To print the tape labels on a 6250 BPI tape execute the procedure TLABELS as follows.//LABEL JOB ,FRED.SMITH,GROUP=J999991,USER=P999998, // CLASS=T,PASSWORD=SECRET /*ROUTE PRINT RMT0 /*JOBPARM ROOM=BINS //SA EXEC TLABELS,VOLID=999999,UNIT=TAPE1600
//LABEL JOB ,FRED.SMITH,GROUP=J999991,USER=P999998, // CLASS=T,PASSWORD=SECRET /*ROUTE PRINT RMT0 /*JOBPARM ROOM=BINS //SA EXEC TLABELS,VOLID=999999,UNIT=TAPE6250
COLUMNS REQUIRED INFORMATION
1-8 DDNAME of DD statement that password is to be associated with.10-17 1 to 8 character password
COLUMNS OPTIONAL INFORMATION
19-80 Keyword options, each option separated by a comma.
KEYWORD OPTIONS:
READ=YES Tape can be read without password.
READ=NO (DEFAULT) Tape cannot be read without password.
WRITE=NO Tape cannot be written on.
NEW=new password Assign new password to this tape.The old password in columns (10-17) must match the old password to change a password.
NEW=REMOVE Remove password protection from this tape. Old password must match.
DSN=dsname Fully qualified data set name of a concatenated data set. This is used only for the concatenated data sets. The DDNAME (1-8) is left blank.
B. Creating a password protected tape
//ZINGER DD DSN=J99991.FUDGE8.SECRET,DISP=(NEW,CATLG), // UNIT=TAPE,LABEL=EXPDT=99000 //TMSDSS DD *,DCB=BLKSIZE=80 ZINGER FUDGE
C. Using a password protected tape
//INPUT DD DSN=J99991.FUDGE8.SECRET,DISP=OLD //TMSDSS DD *,DCB=BLKSIZE=80 INPUT FUDGE
D. Changing the password of a password protected tape
//FILEA DD DSN=J99991.FUDGE8.SECRET,DISP=OLD //TMSDSS DD *,DCB=BLKSIZE=80 FILEA FUDGE NEW=THUD
Note: Tapes out-of-area should not be updated and if a tape is checked out of the area the expiration date should be such that the tape will not expire until after the tape is returned.
OUT=AHTb Tape is to be sent to the librarian at AHT P204.
OUT=ENTX Tape is to be sent to the Entrex system operator at 101 AHT.
OUT=FICH Microfiche tape is to be picked up.
OUT=USER
Note: When columns 20 through 50 are used, the comment information about the tape is replaced with the name and destination information. See the section entitled COMMENTS FIELD.
Columns Required Information
20 Comma ","21-50 user name; destination
provide a name and destination where the tape is to be sent.
Example to check out a tape
//TIMEDATA DD DSN=J99991.FUDGE8.DATA,DISP=OLD //TMSDISP DD *,DCB=BLKSIZE=80 TIMEDATAXF OUT=USER,FRED GRIMM;BINS
The control statement for the comment can be instream or a disk data set. A DD statement with the DDNAME of TMSDISP must be supplied in the job step using the tape. To store a comment:
Columns Required Information
1-8 DDNAME associated with the tape 10 * 12-16 COMM= 17-47 Comment
//TIMERPRT DD DSN=J99991.FUDGE.DATA,DISP=OLD //TMSDISP DD *,DCB=BLKSIZE=80 TIMERPRT * COMM=TIME REPORT FOR JUNE AND JULY
Note: If you use the Tape Check Out procedure to check a tape out of the area with OUT=USER in columns 12-19, the comment field will be changed to contain the user name and the destination supplied in the tape check out statement.
IECTMS1 DDD, ,ENTER VSN
Operator verifies VSN for NL tape
IECTMS2 DDD,bbbbbb,VERIFY FROM OUTSIDE LIBRARY
Job cancelled if not an alien tape and LABEL=EXPDT=98000
IECTMS3 DDD bbbbbb IS NOT aaaaaa
Operator responded tape number bbbbbb when user requested tape number aaaaaa
IECTMS3 DDD bbbbbb IS NOT SCRATCH(XX)
(XX) 04 Tape is not an alien tape 08 Tape is alien and LABEL=EXPDT=98000 not coded 12 Permission denied to write on an alien tape. (See IECTMS4) 16 Operator did not reply a specific NL VSN. (See IECTMS1) 20 TMC EXPDT=99365 24 Volume marked out of area 28 TMC DSN does not match tape DSN 32 Volume has not expired 36 Same volume re-mounted for EOV output request 40 Volume part of a valid multi-volume chain 44 Specific VSN required 48 Volume has DSNB's 52 Trying to create file 'N' and 'N-1' does not exist 56 Trying to create file 'N' and 'N+1' already exists 60 Trying to create file 'N' but 'N' already exists 64 Trying to recreate a data set with DISP=NEW 68 Label check occurred at open on file >1 72 Label check occurred at open on password protected tape 76 An attempt has been made to recreate a data set with RETPD=0.
To write on the tape the user must supply the following MESSAGE statement:
/*MESSAGE OK TO WRITE ON DATE-PROTECTED DSN J999991.NODE1.NODE2
IECTMS9 DDD,bbbbbb,**WORK TAPE**
Work tape not saved.
IECTMS9 DDD,bbbbbb,**WORK FILE**
Temporary file created on a multifile tape.
IEFTMS50 Nyy-rc,jobname,stepname,ddname
** UCC1-ABEND..Refer to UTCC document 0509(Nyy) 1D9 Invalid data set name. The DSN in JCL does not match the DSN in the TMC.
2D9 Invalid secondary data set. For input probably wrong file number. For output see rejection code in IECTMS3 message.
3D9 Invalid TMC record. Contact the Tape Librarian.
4D9 Invalid multi-volume data set. Make sure volume being mounted is part of the multi-volume data set.
5D9 Mixed expiration date disallowed.
6D9 Invalid password. Use the correct password.
7D9 DISP=MOD rejected. See rejection code in IECTMS3 message.
9D9 No output to alien tape in CA-1 range.
ED9 Invalid alien output tape or tape mounted as scratch.
FD9 Invalid SVC. See IBM messages and codes manual.
1D8 IPL required. Contact the Tape Librarian.
2D8 All DSNB's are allocated. Contact the Tape Librarian.
3D8 Invalid DSNB record. Contact the Tape Librarian.
4D8 Invalid parameter list. Contact the Tape Librarian.
FD8 Invalid SVC. See IBM messages and codes manual.
/RETAIN=UNTIL=date Retain tape until specified date. The date may be specified as:
dd-mmm-yyyy VMS date format: day-month-year/RETAIN=CYCLE=nnn Retain nnn most recent tapes with this dataset name.
yyyy.ddd Julian date: year.day/RETAIN=DAYS=nnn Retain until nnn days from today.
/RETAIN=LDATE=nnn Retain until nnn days after last date used.
/RETAIN=PERMANENT Retain the tape permanently. NOTE: Tapes retained permanently cannot subsequently be mounted for writing.
/RETAIN=RELEASE Release the tape into scratch pool.
The /RETAIN qualifier may be used when mounting a scratch tape, when mounting a tape for writing, or when the /TMS_UPDATE_ONLY qualifier is specified. The /RETAIN qualifier may not be used with alien tapes.
$ TMOUNT * SCRTCH mytape: /DSN=EXAM /RETAIN=UNTIL=31-DEC-2001
$ TMOUNT * 001234 mytape: /DSN=EXAM /WRITE /RETAIN=LDATE=100
$ TMOUNT * 001234 mytape: /DSN=EXAM /RETAIN=DAYS=30 /TMS_UPDATE_ONLY
$ TMOUNT * 001234 mytape: /DSN=EXAM /TMS_INFO_ONLY
$ HELP TMOUNT
For comprehensive documentation of magnetic tape usage on the VAX/VMS system, see the Guide to VAX/VMS Disk and Magnetic Tape Operations VAXcluster User's Guide , Form U01-0572 is available in the UT Bookstore and provides details on the use of magnetic tape on the VAXcluster at UTCC. For a description of the MOUNT command, see the VAX/VMS Mount Utility Reference Manual