r
&EPA
United States
Environmental Protection
Agency
Environmental Monitoring
Systems Laboratory
PO Box 15027
Las Vegas NV 89114
EPA-600/8 80 013
March 1980
Research and Development
Command Procedures
for Manipulating Tape
Data Files:
A Set of Procedures
Developed for Use With
the Coment Alpha Time-
Sharing System
-------
EPA-600/8-80-013
March 1980
COMMAND PROCEDURES FOR
MANIPULATING TAPE DATA FILES:
A Set of Procedures Developed for Use
with the COMNET ALPHA Time Sharing System
by
R. A. McCrory
Computer Sciences Corporation
P. 0. Box 15027
Las Vegas, Nevada 89114
and
L. R. Williams
'/^s
«v Environmental Monitoring Systems Laboratory
^ Las Vegas, Nevada 89114
V
^
o
ENVIRONMENTAL MONITORING SYSTEMS LABORATORY
OFFICE OF RESEARCH AND DEVELOPMENT '.
U.S. ENVIRONMENTAL PROTECTION AGENCY
LAS VEGAS, NEVADA 89114
-------
DISCLAIMER
This report has been reviewed by the Environmental Monitoring Systems
Laboratory-Las Vegas, U.S. Environmental Protection Agency, and approved for
publication. Mention of trade names or commerical 'products does not constitute
endorsement or recommendation for use.
ii
-------
FOREWORD
Protection of the environment requires effective regulatory actions
based on sound technical and scientific information. This information
must include the quantitative description and linking of pollutant sources,
transport mechanisms, interactions, and result-ing effects on man and his
environment. Because of the complexities involved, assessment of specific
pollutants in the environment requires a total systems approach that
transcends the media of air, water, and land. The Environmental Monitoring
Systems Laboratory-Las Vegas contributes to the formation and enhancement
of a sound monitoring data base for exposure assessment through programs
designed to:
• develop and optimize systems and strategies for moni-
toring pollutants and their impact on the environment
• demonstrate new monitoring systems and technologies
by applying them to fulfill special monitoring needs
of the Agency's operating programs
The storage, access, and manipulation of large environmental quality
data files on magnetic tape at the U.S. Environmental Protection Agency1s
Washington Computer Center have posed special problems to Agency programmers
and scientists. To aid organizational units in realizing the potential cost-
savings associated with tape storage, this report presents a set of simple
terminal commands to facilitate the manipulation and integration of large
data sets on magnetic tape. By removing the obstacles to dynamic utilization
of tape storage, the information provided should stimulate increased use of
this economical storage mode and thereby effect significant cost reductions
both within and outside the agency. For further information contact the
Advanced Monitoring Systems Division.
frge B. Mopgan
Director
Environmental Monitoring Systems Laboratory
Las Vegas
111
-------
SUMMARY
The problem addressed by this report is the lack of simple terminal
commands to manipulate tape data files at the U.S. Environmental Protection
Agency's Washington Computer Center. This work was performed to enable
relatively inexperienced programmers or scientists to maintain large
infrequently used data sets on magnetic tape. The report documents a set of
terminal command language procedures which greatly simplify the maintenance of
data files on magnetic tape. The command procedures are invoked by entering a
single word at the computer terminal. The computer queries the user for
specific information and then submits a job to accomplish the actual data
transfer. Ancillary procedures are included to facilitate the housekeeping
requirements of tape management. The storage of large infrequently used data
sets on magnetic tape saves ADP funds and frees system resources for other
applications. Such savings lessen capital investment requirements as the
Agency's ADP needs expand. We have cut its monthly disk storage charges by
50% using these procedures. We feel that the procedures presented will both
facilitate the manipulation and integration of large data sets on magnetic
tape and result in substantial cost reductions for workers in many fields both
within and outside the Agency.
iv
-------
CONTENTS
Foreword iii
Summary iy
List of Figures vi
Introduction 1
Procedures 2
DTOTAPE 2
TTODISK 5
CATAPE 8
CATALOG 10
UNCATAPE 12
DELTAPE 14
SPACEL 16
TAPELIST 18
Considerations for using tape files 20
Discussion 21
References 23
-------
FIGURES
Number Page
1 Terminal listing and example of the procedure DTOTAPE which
reproduces a disk file on magnetic tape 3
2 Terminal listing and example of the procedure TTODISK which
reproduces a tape file onto a disk pack 6
3 Terminal listing and example of the procedure CATAPE which
catalogs a tape file 9
4 Terminal listing and example of the procedure CATALOG which
catalogs a disk file 11
5 Terminal listing and example of the procedure UNCATAPE which
uncatalogs and optionally deletes a tape file 13
6 Terminal listing and example of the procedure DELTAPE which
deletes uncataloged tape files 15
7 Terminal listing and example of the procedure SPACEL which
lists the unused space remaining on a disk pack 17
8 Terminal listing and example of the Job Control Language
file TAPELIST which generates a listing of
tape data sets 19
-------
INTRODUCTION
The use and maintenance of tape files at the U.S. Environmental Protec-
tion Agency's Washington Computer Center (WCC-COMNET) is not as easy as it is
for disk files. Disk files can be created, destroyed, edited, replaced, and
inventoried using simple terminal commands. The purpose of this report is to
describe ALPHA command language "procedures" which enable relatively casual
or inexperienced programmers to use tape files at COMNET.
The principal reason for using tape storage is pecuniary. The cost of
maintaining large disk files at COMNET is significant and real savings can be
realized by transferring infrequently used disk files to tape.
The procedures have been written in the ALPHA command language which is
fully described in the ALPHA User's Guide (1977). To transfer these procedures
to another USERID (ALPHA terminal user) the programmer loads them individually
from the EPABZF source library as:
LOAD DTOTAPE:EPABZF;SAVE
and then saves them with the SAVE command into his own source library. Note
that the procedure DTOTAPE uses a JCL file named TTAPE which must also be
loaded and saved into the user's source library.
These procedures submit jobs which must then be executed before the de-
sired transfer or action is accomplished and the job's JCL (job control lan-
guage) and system messages must be examined afterwards to confirm that the
expected result has occurred.
The figures in this report are facsimiles of actual terminal output. The
capital letters are those sent to the terminal from the computer while the
small letters represent information typed at the terminal by the user. Also
note that the procedure can be aborted at any point by depressing the break/
attention key on the terminal keyboard.
-------
PROCEDURES
DTOTAPE
Figure 1 shows a terminal listing of the procedure DTOTAPE and the JCL
file, TTAPE, which DTOTAPE modifies before submitting it as a job. The last
portion of Figure 1 shows an example of the actual use of the procedure and
the squared numbers beside some of the lines correspond to the numbers con-
tained in the following notes:
1. To execute the procedure, type "dtotape" followed by a carriage
return.
2. This message identifies the procedure.
3. At this place input the name of the file to be written on tape.
4. At this place enter the name of the file to be reproduced.
5. A response of "yes" will uncatalog the old file, "no" or any other
response will not.
6. This number should be the same as the LRECL (logical record length)
of the disk file. If this is unknown then stop the procedure (hit-
ting the break/attention key) and describe the disk file with
"options=attributes" and then start over.
7. Hit the "carriage return" key, , to place the file on a new
(scratch) tape. This allows you to specify the retention period
(the time that the tape volume will be reserved for your use in the
WCC Tape Library) and avoids possible problems associated with
keeping more than one file on a tape volume.
8. This number can have 1 to 4 digits. Estimate the time necessary to
retain this file but don't overestimate. You can change the expir-
ation date at some later time by filling out the tape expiration
form which is mailed to the project supervisor periodically and
returning it to the tape librarian at the WCC.
9. Enter the priority that you want for the job this procedure sub-
mits. The priorities are 1 (overnight), 2 (4 hours), 3 (2 hours),
and 4 (30 minutes).
-------
lis dtotape
100 SET @TERMOUT='THIS PROC SUBMITS A JOB TO COPY A DISK FILE TO TAPE +
200 AND CATLG IT'-LOA TTAPE:DEC ULX
400 REP /XNAME/,/CN.%@USERID..%@ACCOUNT.%@TERMIN('NAME FOR TAPE FILE ?')./
500 REP /XIN/,/CN.%@USERID. .%@ACCOUNT.%@TERMIN('DISK FILE TO BE COPIED ?')./
510 IF @TERMIN('UNCATALOC THE OLD FILE ?')><'YES',C='GOTO 600'
520 REP /KEEP/,/UNCATLG/,360
600 REP /=80/,/=%@TERMIN('LRECL ?')./, 600
710 SET ULX=<3TERMIN('VOLUME AS OS9874 OR IF WANT SCRATCH TAPE')
720 IF (3LENGTH(ULX)<6,C='GOTO 790'
730 REP /)/./),VOL=SER=%ULX./,700
740 REP /(,SL.RETPD=365)/,/%@TERMIN('FILE NUMBER ?')./
750 REP /NEW/,/OLD/.500:COTO 800
790 REP /365/./%@TERMIN('4 DIGIT RETENTION PERIOD ?')./,700
800 LIS;SUB *,PRTY=%@TERMIM('PRIORITY FOR JOB ? '). ,TI1-1E=( , 5)
ALPH lis ttape
100 //DTOTAPE EXEC PCM=IEBGENER,REGION=80K
200 //SYSPRINT DD SYSOUT=P.DCB=(RECFM=FB,LRECL=121,3LKSIZE=3630)
300 //SYSIN DD DUMMY
350 //SYSUT1 DD DSN=XIN,
360 // DISP=(OLD.KEEP)
400 //SYSUT2 DD DSN=XNAME,
500 // UNIT=3400-5,DISP=(NEW,CATLG).
600 // DCB=(LRECL=80.RECFM=FB,BLKSIZE=8000.DSORC=PS),
700 // LABEL=(,SL,RETPD=365)
ALPH dtotapeLT]
THIS PROC SUBMITS A JOB TO COPY A DISK FILE TO TAPE AND CATLG ITlAl
NAME FOR TAPE FILE ?.new.data[|]
DISK FILE TO BE COPIED ?.p73.test
UNCATALOC THE OLD FILE ?yes|Ti
LRECL ?133[6J
VOLUME AS OS9874 OR IF WANT SCRATCH TAPEJT]
4 DIGIT RETENTION PERIOD 7365 |T|
PRIORITY FOR JOB ?lf9J
100 //DTOTAPE EXEC PGM=IEBGENER,REGION=80K'
200 //SYSPRINT DD SYSOUT=P,DCB=(RECFM=FB,LRECL=121,BLKSIZE=3630)
300 //SYSIN DD DUMMY
350 //SYSUT1 DD DSN=CN.EPABZF:XXXX.P73.TEST,-
360 // DISP=(OLD,UNCATLG)
400 //SYSUT2 DD DSN=CN,EPABZF.XXXX".NEV/.DATA,
500 // UNIT=3400-5,DISP=(NEW,CATLG),
600 // DCB=(LRECL=133,RECFM=FB,BLKSIZE=13300,DSORG=PS),
700 // LABEL^T,SL,RETPD=365)
199: WH SUBMITTEDffll
Figure 1. Terminal listing and example of the procedure DTOTAPE
which reproduces a disk file on magnetic tape.
-------
10. This is a listing of the modified JCL file which the procedure sub-
mits as a job. It is located in your workspace if you want to keep
it or use it after the procedure finishes.
11. This is the ALPHA message indicating the JOBID of the submitted job.
12. The return of your ALPHA prompt ("ALPHA" here) indicates that the
procedure is finished.
This procedure is stored in the ALPHA source library named CL.SLIB.EPABZF
as member "dtotape" and uses the JCL DECK "ttape" in the same library.
DTOTAPE can be used to transfer data files to tape while keeping the same
name in the system catalog. To accomplish this use the same name for the new
tape file as for the disk file to be copied and uncatalog the old file. When
you are sure that the file has been successfully transferred to the tape vol-
ume you can purge the disk file with the ALPHA command:
PURGE .DATA.SET"USER69
using whatever volume is applicable.
The ALPHA edit commands cannot be used to modify tape files. To update
a tape file with the ALPHA commands the file must be transferred to a disk.
The next procedure, TTODISK, can be used for this purpose.
-------
TTODISK
Figure 2 shows a terminal listing of the procedure TTODISK and the JCL
file, DDISK, which the procedure modifies before submitting as a job. Prior
to invoking this procedure the user should use the SPACEL procedure on page
16 or the ALPHA DESCRIBE command to find a user disk pack with sufficient
space to store the tape file. This information is required when the procedure
queries the use for the volume (see note 9). The last portion of Figure 2
shows an example of the actual use of the procedure. The squared numbers
beside some of the lines correspond to the numbers contained in the following
notes:
1. To invoke the procedure, type "ttodisk" at the terminal.
2. This message identifies the procedure.
3. Enter the name of the tape file to be reproduced on the disk.
4. If the tape file is cataloged hit the carriage return key, otherwise
type in the volume on which the file is located. To find out if the
file is cataloged, use the ALPHA describe command. If it is not cat-
aloged submit the TAPELIST program, described elsewhere in this re-
port, to obtain a listing of volumes for your tape files.
5. Type "yes" to uncatalog the tape file, or any other response for no.
6. Enter a valid name. If desired you can check the validity of the
name by loading a dummy file (any file) into your workspace and
saving it under the name. If it is accepted (ALPHA file "saved"
message returned at your terminal), don't forget to purge it before
using this procedure.
7. Enter the LRECL (logical record length) of the input (tape) file.
8. The block size (BLKSIZE) must be less than 4253, but as large as
possible to minimize transfer cost.
9. Enter the disk volume. If you put the file on a work pack it will
not be backed up and you could lose it. So use the SPACEL procedure,
described on page 16, to locate a user volume with enough space.
10. Enter a rough estimate of the space needed to store the file.
-------
ALPH lis ttodisk
100 SET (?TERMOUT='PROC TO COPY TAPE FILE TO DISK';LOA DDISKrDEC UX
300 REP /XIN/,/CN.%@USERID..%(aACCOUNT.%(?TERMIN('TAPE FILE TO BE COPIED AS .+
500. DATA ?')./;SET UX=@TERMIN('IF.TAPE FILE HOT CATALOGED. GIVE VOLUME ')
700 IF @LENGTH(UX)<6,C='GOTO 800';REP /EEP)/,/EEP),VOL=SER=%UX,.UNIT-3400-5/
710 GOTO 850
800 IF @TERMIN('UNCATALOC TAPE FILE ?')='YES',C='REP /KEEP/,/UNCATLC/,500'
850 REP /XNAME/,/CN.%@USERID..%@ACCOUNT.%@TERMIN('NAME FOR NEW DISK FILE, A+
900 S .NEW ?')./.-REP /LXL/,/%@TERMIN('LRECL ?')./
1100 REP /BXB/,/%@TERMIN('BLKSIZE ?')./:REP /VXV/,/%QTERMIN('VOLUME ?')./
1300 REP /TXT/./%@TERMIN('NUMBER OF TRACKS ?')./
1400 LIS:SUB *,PRTY=%@TERMIN('PRIORITY FOR JOB ?').,TIME=(.5)
ALPH lis ddisk
//TTODISK EXEC PCM=IEBGENER,REGION=80K
//SYSPRINT DD SYSOUT=P.DCB=(RECFM=FB,LRECL=121.BLKSIZE=3630)
//SYSIN DD DUMMY
//SYSUT1 DD DSN-XIN,
// DISP=(OLD,KEEP)
//SYSUT2 DD DSN=XNAME,
// UNIT=3330-1,D1SP=(NEW,CATLC,DELETE),SPACE=(TRK,(TXT,TXT),RLSE),
// DCB=(RECFM=FB.LRECL=LXL,BLKSIZE=BXB) , VOL=SER=VXV
.DATA ?.old.data
GIVE VOLUME[4~1
100
200
300
400
500
600
700
800
ALPH ttodiskQJ
PROC TO COPY TAPE FILE TO
TAPE FILE TO BE COPIED AS
IF TAPE FILE NOT CATALOGED
UNCATALOG TAPE FILE ?yes[5j '—'
NAME FOR NEW DISK FILE, AS .NEW ?.new.dataH&l
LRECL 7133JY]
BLKSIZE ?4123|8|
VOLUME ?user5fa [9]
NUMBER OF TRACKS ?3|jo]
PRIORITY FOR JOB ?1 KJI
100 //TTODISK EXETTT>GM=IEBGENER,REGION=80K
200 //SYSPRINT DD SYSOUT=P,DCB=(RECFM=FB,LRECL=121,BLKSIZE=3630)
300 //SYSIN DD DUMMY
400 //SYSUT1 DD DSN=CN.EPABZF.XXXX.OLD.DATA,
500 // DISP=(OLD,UNCATLG)
600 //SYSUT2 DD DSN=CN.EPABZF.XXXX.NEW.DATA,
700 // UNIT»3330-1,DISP=(NEW,CATLG DELETE),SPACE=(TRK,(3,3),RLSE),
800 // DCB=£RECF1-1=FB,LRECL=133,BLKSIZE=4123),VOL=SER=USER56
199. WJ SUBMITTED |13l
Figure 2. Terminal listing and example of the procedure TTODISK
which reproduces a tape file onto a disk pack.
6
-------
11. Enter the job priority, 1 to 4;
1 overnight turnaround
2 4 hour turnaround
3 2 hour turnaround
4 30 minute turnaround
12. This is a listing of the JCL which is submitted by the procedure.
13. This is the ALPHA job message. To verify that the job is in the
queue use the "status all" command.
TTODISK can be used to move a cataloged file from tape to disk, keeping
the same file name in the system catalog. Use the same name for the new disk
file as for the tape file to be copied and uncatalog the tape file by answer-
ing 'yes' to the question at step (5). After the program is run, check that
the new file has been successfully copied and cataloged and then, unless you
want to keep it as a backup copy, delete the uncataloged tape copy with
DELTAPE.
-------
CATAPE
Figure 3 shows a terminal listing of the CATAPE procedure and the JCL
file CTAPE which the procedure modifies and submits as a job. The last part
of Figure 3 shows an example of the operation of the procedure. The squared
numbers to the right of some of the print lines correspond to the following
notes:
1. To execute the procedure type "catape" followed by a carriage return.
2. This is a message which identifies the procedure.
3. Enter here the name of the existing tape file which is to be cata-
loged.
4. Enter the volume that contains the file. If this is not known it
can be obtained by running the TAPELIST JCL described later (page 18).
5. Enter the desired priority for the job.
6. This is a listing of the JCL deck which the procedure submits.
7. The ALPHA "submitted" message shows that the job has been queued.
8
-------
ALPH lis catape
100 LOA CTAPE;SET @TERMOUT='PROC TO CATALOG A TAPE FILE'
200 REP /FILENAME/,/CN.%@USERID..%@ACCOUNT,%@TERMIN('FILE NAME ?')./
300 REP /OSXXXX/,/%@TERMIN('VOLUME AS OS4994 ?')./
400 LIS:SUB *,PRTY=%@TERMIN('PRIORITY FOR JOB ?').,TIME=(.1)
ALPH lis ctape
100 //TAPECAT EXEC PGH=IEFBR14
200 //FILE1 DD DSN-FILENAME,
300 // DISP=(OLD,CATLG).UNIT=(3400-5..DEFER),VOL=SER=OSXXXX,
400 // DCB=(DEN=4)
ALPH catapeffl
PROC TO CATALOG A TAPE FILE (Tj
FILE NAME ?.new.test.data[3l
VOLUME AS OS4994 ?os9987 JTJ
PRIORITY FOR JOB ?l[J]
100 //TAPECAT EXEC PGM=IEFBR14 m
200 //FILE1 DD DSN=CN.EPABZF .XXXX;NE\-7.TEST.DATA, '—'
300 // DISP=(OLD,CATLG),UNIT=(3400-5,,DEFER),VOL=SER=OS9987,
400 // DCB=(DEN=4)
199: WL SUBMITTED f7|
Figure 3. Terminal listing and example of the procedure CATAPE
which catalogs a tape file.
-------
CATALOG
This procedure catalogs an existing disk file using the ALPHA "rename"
command. It does not submit a job but operates immediately. Figure 4 shows
a listing of the procedure and an actual example of its use. The squared num-
bers to the right of some lines in the figure correspond to the following com-
ments:
1. To use the procedure, type "catalog" followed by a carriage return.
2. This message identifies the procedure.
3. Enter the file name to be cataloged.
4. Enter the disk pack on which the file resides.
5. These two lines are the normal ALPHA response to this procedure.
You can now use the ALPHA "describe" command to check that the file is
cataloged.
10
-------
ALPH lis
100 DEC DSNA:SET (?TERMOUT='PROC TO CATALOG DISK FILES'
200 SET DSNA=@TERMIN('.DSNAME TO BE CATALOGED ?')
300 REN %DSNA."%@TERMIN('VOLUME" ?').,%DSNA.
ALPH catalogm
PROC TO CATALOG DISK FILESJYJ
.DSNAME TO BE CATALOGED ?.new.test.data [3]
VOLUME ?work5l[4"|
REN .NEW.TEST.DATA"WORK51..NEW.TEST.DATA _-
056: DATA SET ALREADY EXISTS ON VOLUME
Figure 4. Terminal listing and example of the procedure
CATALOG which catalogs a disk file.
11
-------
UNCATAPE
This procedure uncatalogs (and deletes optionally) a cataloged tape file.
Figure 5 shows a listing of the procedure and the JCL file THEUNCAT which the
procedure modifies and submits as a job. The last portion of Figure 5 demon-
strates the actual use of the procedure. The squared numbers to the right of
some of the lines correspond to those in the following notes:
1. Type "uncatape" followed by a carriage return to invoke the procedure.
2. This message identifies the procedure.
3. Enter the file name which is to be uncataloged.
4. Enter "yes" if you have more files to uncatalog.
5. Another file name to be uncataloged.
6. Type "no" followed by a carriage return or just a carriage return
when all files have been entered.
7. Enter "yes" followed by a carriage return or any other response
followed by a carriage return for no.
8. Enter priority for job.
9. This is the ALPHA-job-submitted message indicating the job identifi-
cation.
10. This is a listing of the contents of the workspace showing the JCL
deck submitted by the procedure.
12
-------
ALPH lis uncatape
100 SET @TERMOUT='PROC TO UNCATALOC & OPT. DELETE TAPE FILES'
200 DEC JtSET J=l;LOA THEUNCAT(100-300)
300 REP /XNAME/,/CN.%@USERID. ,%(?ACCOUNT. %@TERMIN('FILE NAME AS .DATA ?')./
400 IF '%@TERMIN('MORE FILES ?').'x'YES', C='COTO 1000'
500 APP THEUMCAT(200-300):SET J=J+1;REP /DD1/,/DD%J./;300-LAS:COTO 300
1000 APP THEUNCAT(400);REP /3330-1/./3400-5/
1200 IF '%f?TERMIN( 'DELETE ALSO ?'),'x'YES',C='COTO 2200'
1300 REP /UHCATLG/,/DELETE/
2200 SUB *,PRTY=%@TERMIN('PRIORITY FOR JOB ?').,TIME=(,2):LIS
ALPH lis theuncat
100 //THEUNCAT EXEC PCM=IEFBR14
200 //DD1 DD DSN=XNAME,
300 // DISP=(OLD,UNCATLG),UHIT=(3330-1.,DEFER)
400 /*
ALPH uncatape|l |
PROC TO UNCATALOG & OPT. DELETE TAPE FILESJT]
FILE NAME AS .DATA ?.new.test.
MORE FILES Tyespf
FILE NAME AS .D
?.old.test.data[5J
MORE FILES ?no [6]
DELETE ALSO ?yes [7]
PRIORITY FOR JOB ? 1 [jf|
199: WM SUBIlITTEDfp]
100 //THEUNCAT EXEC PGM=IEFBR14
200 //DD1 DD DSN=CN.EPABZF.XXXX.NEW.TEST.DATA,
300 // DISP=(OLD,DELETE),UNIT=(3400-5,,DEFER)
400 //DD1 DD DSN=CN.EPABZF.XXXX.OLD.TEST.DATA,
500 // DISP=(OLD,DELETE),UNIT=(3400-5,,DEFER)
600 /*
Fiaure 5. Terminal listing and example of the procedure UNCATAPE
which uncatalogs and optionally deletes a tape file.
13
-------
DELTAPE
This procedure deletes an uncataloged tape file. It is used only to
delete uncataloged files. Use UNCATAPE to delete cataloged tape files;
otherwise the catalog reference remains in the system catalog even though
the file has been purged. Figure 6 shows a terminal listing of DELTAPE
together with file THEUNCAT, the JCL file that the procedure modifies and
submits as a job. The last portion of Figure 6 is an actual example of the
use of this procedure. The squared numbers to the right of some lines cor-
respond to those following:
1. Enter "deltape" to start the procedure.
2. This message identifies the procedure.
3. Enter the name of the tape file to be deleted.
4. Type "yes" to enter another file name or any other response for no.
5. Enter the volume where the file resides. This information can be
obtained from an output listing generated by running the TAPELIST
JCL file described later.
6. Enter the job priority.
7. The ALPHA job submit may come either before or after the JCL listing.
8. This is the listing of the JCL deck submitted by the procedure.
14
-------
ALPH lis deltape
100 SET @TERMOUT='PROC TO DELETE UNCATALOGED TAPE FILES'
200 DEC J;SET J=J+1;LOA THEUNCAT(100-300)
300 REP /XNAME/,/CN.Z@USERID..Z@ACCOUNT.Z@TER!IIN('FILE NAME AS .DATA ?'
400 IF '%@TERMIN('MORE FILES ?').'x'YES', C='GOTO 1000'
700 APP THEUMCAT(200-300) ;SET J=J+1 REP /DD1/ , /DDZJ. I. 300-LAS ,:GOTO 300
1000 APP THEUNCAT(400);REP /3330-1/./3400-5/
1200 REP /DEFER)/./DEFER),VOL-SER-Z@TERMIN('VOLUME AS OS4994 ?')./
1300 REP /UNCATLG/,/DELETE/
2200 SUB *.PRTY=%@TERMIN('PRIORITY FOR JOB ?'). TIME=(,2);LIS
ALPH lis theuncat
100 //THEUNCAT EXEC PG11=IEFBR14
200 //DD1 DD DSN=XNAME,
300 // DISP=(OLD,UNCATLG).UNIT=(3330-1.,DEFER)
400 /*
ALPH deltape [Q
PROC TO DELETE UNCATALOGED TAPE FILESfYj
FILE NAME AS .DATA ?.old.data [T|
MORE FILES Tnoffl
VOLUME AS OS499T?os5678f5l
PRIORITY FOR JOB ?l|"5"|
199- WN SUBMITTEDiyi
100 //THEUWCJTT EXEC PGM=IEFBR14
200 //DD1 DD DSN=CN.EPABZF,XXXX. OLD.DATA,
300 // DISP=(OLD,DELETE).UNIT=(3400-5.,DEFER),VOL=SER=OS5678
400 /*
Figure 6. Terminal listing and example of the procedure
DELTAPE which deletes uncataloged tape files.
15
-------
SPACEL
This procedure, written by COMNET USER SUPPORT (HELPWC), is used to find
space on a disk pack in order to place a file on a USER pack as opposed to a
work pack. The work disk packs are not back-up so any files on them are lost
if the disk or'system malfunctions. Direct Access (DSORG=DA) data sets, as
opposed to Sequential (DSORG=PS) data sets, are not automatically moved to
the USER packs by the ALPHA disk-management utilities.
Figure 7 shows a listing of SPACEL and an example of its output. The
squared numbers on the Figure correspond to the following comments:
1. Type "space!" to start the procedure.
2. This is the terminal output of this procedure with the remainder of
the cut-off lines underneath.
3. The remainder.
16
-------
ALPH lis spacel
100 DEC PACKID
200 LIS DS.HELPWC.SPACE((FIR)),0=NOS
300 SET @TERMOUT="
400 SET @TERMOUT='CURRENT DATE AND TlME:'
500 TIME J
600 SET @TERMOUT='(%@DATE)'
700 SET @TERMOUT="
800 SET PACKID=@TERMIN CENTER PACK PREFIX : ')
900 IF @LENGTH(PACKID)=0,C=EXIT
1000 LIS DS.HELPWC.SPACE(-%PACKID-)
1100 GOTO 700
ALPII
REPORT OH UCC ONLINE DISKS AS OF 15:10:56 ON 79/017
CURRENT DATE AND TIME:
15-43:52, 79.017
(01/17/79)
ENTER PACK PREFIX • user67
USER67 3330-11 FREE SPACE' 0137 CYLS AND 0049 TRKS IN 0005 EXTENTS
ENTER PACK PREFIX -[g
ALPH
LARGEST EXTENT IS 0089 CYLS AND 0011 TRKS
Figure 7. Terminal listing and example of the procedure SPACEL
which lists the unused space remaining on a disk pack.
17
-------
TAPELIST
This is a job control language (JCL) deck which outputs a list of tape
data sets for the user's initials and account. The output includes both cata-
loged and uncataloged files. Figure 8 shows the listing of TAPELIST followed
by a listing of the output file for user EPABZF. The listing includes the
volume name and expiration date for each file.
18
-------
ALPH lis tapclist
100 //* TO GENERATE A LISTING OF TAPE DATA SETS
200 //TAPEWORM EXEC TAPELIST,PRINT=P
ALPH nes
(14 05:42. 01/12/79) RETRY ENABLED. ENTER ALARM TO STOP.
(14:06-38. 01/12/79) ZC STARTED 79-012 14:06:38
(14:07:40, 01/12/79) ZC ENDED 79-012 14:07:40
(14:07:57, 01/12/79) ZC OUTPUT " 79-012 14:07:45
(17:49:08, 01/16/79) WE STARTED 79-016 17:49:08
(17.53:38, 01/16/79) WE ENDED 79-016 17'53:38
(17:54 41, 01/16/79) WE OUTPUT 79-016 17:54:41
ALPH ret we,s
Remote Output - EPABZFWE
*0 = System Messages
*1 = DSNLIST.SYSLSTO
*2 = TAPELIST.SYSLSTO
ALPH lis *2
TAPELIST - Inventory of TllS-Controlled Tapes 79.016 01/16/79 05:52:39 I
Volume Owning Vol Fil
Name Userid Account Seq Seq Dataset Name
OS2039 EPABZF XXXX 11 CN.EPABZF.XXXX.STW.COND73.0NE
OS2114 EPABZF XXXX 1 1 CN.EPABZF.XXXX.STW.COND73-TWO
M Page 1
Last Creating
Credt Expdt Used Job Den Lbl
78207 80265 78207 EPABZF9K 6250 SL
78207 80265 78207 EPA3ZF9L 6250 SL
Figure 8. Terminal listing and example of the Job Control Language
file TAPELIST which generates a listing of tape data sets.
19
-------
CONSIDERATIONS FOR USING TAPE FILES
This section makes several general comments about the use of tape stor-
age at the Washington Computer Center. The default message level (MS6LEVEL)
at COMNET is (2,0) which prints only the JCL deck that was submitted with
the job. Using a JOBPARM command statement is the ALPHA signon procedure
(file $$SIGNON in your source library) with MSGLEVEL=(1,1) will enable the
user to check the system messages file, labeled "*0" in the ALPHA job output
(SYSOUT=P) file listing, and verify that the program has been successful.
This or some other method should be used to check that the job has success-
fully transferred a file before the user purges the old file.
More than one file can be placed on a volume (tape reel). However this
can lead to difficulty since any subsequent files on a tape are rendered in-
accessible whenever a file is uncataloged or deleted. Also the expiration
date of the first file on a tape applies to all files on that reel. Normal
procedure at the Washington Computer Center (COMNET) seems to be to put only
one file on a volume.
A formula for determining the length of tape necessary to store a file
is found in Brown (1977). This might be useful if a file is to contain
100,000 or more records, although the "VOLUME" JCL parameter can be modified
to use additional volumes (tape reels) if the transfer program runs out of
space on the first volume.
Sources of additional information on magnetic tape usage are Brown (1977),
and "ALPHA User's Guide" (1977). The WCC "SIGNON" publication, distributed
monthly to registered users of the WCC facility, also contains useful infor-
mation.
20
-------
DISCUSSION
The set of command procedures (programs) described here enable the ALPHA
terminal user to use magnetic digital computer tape as a storage medium with-
out a detailed knowledge of tape conventions at the U.S. EPA Washington Com-
puter Center. The procedures are used as terminal commands to copy disk data
sets to tape, to copy data sets to disk, and to maintain and back up tape data
files. These terminal commands ask the user for specific information, use
this information to modify a short JCL file, and submit that JCL file as a
computer job.
The use of tape to store large infrequently used data sets results in
significant savings of ADP funds. A one-hundred track disk data set (15000
card images or 9000 print lines) currently costs $20 per month at COMNET.
That disk data set can be transferred at nominal cost to tape for which there
is no current monthly charge. The Water and Land Quality Branch has recently
(May to September, 1978) used 4000 to 6000 tracks of disk storage with many
files requiring 100 to 200 tracks. The data files for a single national
water quality survey alone represent 75 thousand print lines of biological
and 2.5 million physical and chemical water quality parameter data entries.
Our average cost for disk storage for May to September 1978 was $1126. In
November, after many of the large files had been put on tape, the correspond-
ing figure was $439. The savings for the Water and Land Quality Branch are
$400 to $600 per month or roughly 10% of our current COMNET ADP charges.
Other EPA entities should be able to effect similar savings if they maintain
large infrequently-used data sets on disk.
The advantages of using these procedures are ADP cost reduction and
ease of use. One drawback to tape data storage is that the file is not in-
stantly available for editing at the terminal. In order to edit a file from
the terminal, the file must be resident on a disk. In this case one of the
procedures can be used to submit a job to copy the tape file back to a disk.
For large infrequently-used files the cost of moving the file back and forth
is much less than keeping the file on a disk all the time.
Unlike disk files, tape files are not backed up at COMNET since they
are much less likely to be destroyed by system malfunctions. There are two
possible solutions to this. One is to save the old version of the tape file,
uncataloged but still accessible by any program and by the procedures de-
scribed here. The old version and a copy of the changes would be sufficient
to recreate the new version. The other possible solution is tc use these
procedures to create a back-up copy of the new version which vould be saved
on a separate volume.
21
-------
Large infrequently used data files currently residing on disks at the
EPA Washington Computer Center may be reliably maintained on tape volumes.
Relatively inexperienced programmers may use the procedures outlined here to
do this without a detailed understanding of tape usage. The placement of
these files on magnetic tape results in reduced ADP costs.
22
-------
REFERENCES
Brown, Gary DeWard, "System 370 Job Control Language," John Wiley & Sons,
1977.
"ALPHA User's Guide," Computer Network Corporation, 5185 MacArthur Boulevard,
NW, Washington, D.C., 20016, 1977.
"OS/VS Utilities," IBM Corporation, Order No. GC35-005-3, 1974.
23
-------
TECHNICAL REPORT DATA
(Please read Instructions on the reverse before completing)
1. REPORT NO.
EPA-600/8-80-013
2.
3. RECIPIENT'S ACCESSION-NO.
4. TITLE AND SUBTITLE
COMMAND PROCEDURES FOR MANIPULATING TAPE DATA FILES:
A Set of Procedures Developed for Use with the COMNET
ALPHA Time Sharing System.
5. REPORT DATE
March 1980
6. PERFORMING ORGANIZATION CODE
7. AUTHOR(S)
R. A. McCrory and L. R. Williams
8. PERFORMING ORGANIZATION REPORT NO.
9. PERFORMING ORGANIZATION NAME AND ADDRESS
Environmental Monitoring Systems Laboratory
Office of Research and Development
U.S. Environmental Protection Agency
Las Vegas, NV 89114
10. PROGRAM ELEMENT NO.
1BD884
11. CONTRACT/GRANT NO.
12. SPONSORING AGENCY NAME AND ADDRESS
U.S. Environmental Protection Agency—Las Vegas, NV
Office of Research and Development
Environmental Monitoring and Support Laboratory
Las Vegas, Nevada 89114 '
13. TYPE OF REPORT AND PERIOD COVERED
Final Report. fi/7R -
14. SPONSORING AGENCY CODE
EPA/600/07
15. SUPPLEMENTARY NOTES
NTIS-Only distribution
16. ABSTRACT
The problem addressed by this report is the lack of simple terminal commands
to manipulate tape data files at the U.S. Environmental Protection Agency's Washington
Computer Center. This work was performed to enable relatively inexperienced
programmers or scientists to maintain large infrequently used data sets on magnetic
tape. The report documents a set of terminal command language procedures which greatly
simplify the maintenance of data files on magnetic tape. The command procedures are
invoked by entering a single word at the computer terminal. The computer queries the
user for specific information and then submits a job to accomplish the actual data
transfer. Ancillary procedures are included to facilitate the housekeeping
requirements of tape management. The storage of large infrequently-used data sets on
magnetic tape saves ADP funds and frees system resources for other applications. Such
savings lessen capital investment requirements as the Agency's ADP needs expand. We
have cut our group's monthly disk storage charges by 50% using these procedures.
17.
KEY WORDS AND DOCUMENT ANALYSIS
DESCRIPTORS
b.lDENTIFIERS/OPEN ENDED TERMS
c. COSATI Field/Group
data storage
executive routines
magnetic tapes
utility routine
U.S. EPA Washington
Computer Center, tape
file management, ALPHA,
command language
procedures
09/B
18. DISTRIBUTION STATEMENT
RELEASE TO PUBLIC
19. SECURITY CLASS (ThisReport)
UNCLASSIFIED
21. NO. OF PAGES
32
20. SECURITY CLASS (Thispage)
UNCLASSIFIED
22. PRICE
EPA Form 2220-1 (9-73)
------- |