Post by somitcwFor viewing CVOL catalogs, you may care
FROM CBT TAPE 325 FEB? 91, FILE 134
REVCAT - TSO COMMAND FOR EXAMINING AN OS CATALOG
(SYSCTLG) ON A 3270 DISPLAY STATION SCREEN
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
WRITTEN BY: GREG PRICE, PRYCROFT SIX PTY LTD
DATE WRITTEN: DECEMBER 6 1988.
DATE UPDATED: DECEMBER 6 1988.
I've got a lot of gaps in my knowledge about
catalogs, including CVOL. I'm filling them
in as I go. I can't find any SYSCATLG.*
datasets and SYS1.VMASTCAT is VSAM, so now
I know why LOCATE on CAMLST BLOCK doesn't
find anything:-)
So, thanks for the info and the suggestion.
Since I'm working with VSAM catalogs, I'll be
linking to IDCAMS for now.
Roo
LOCATE/CAMLST also work well for VSAM
and ICF catalogs to look up data set info.
Calling IDCAMS within a program overriding
SYSIN and SYSPRINT with routines and specify:
LISTCAT LEVEL(x) NAME
might be simpler for your use.
RPF 3.4 probably does that. Check the source.
Here is a production program that is part
of one of the tape volume management systems
that I wrote. It should work for CVOL and
VSAM in MVS 3.8j and currently works for ICF
in OS/390. Yes, I allow sloppy code in
production. For better formatting, start a
reply to this message.
//SOMITCWT JOB (xxxxxxxx,xxxx,1439,9999),TAPEOFF-SOMITCW,
// CLASS=x,MSGCLASS=x,
// NOTIFY=SOMITCW,PERFORM=x,COND=(0,NE)
//HLASMCL EXEC HLASMCL
//SYSLIB DD UNIT=SYSDA ,VOL=SER=??????
// DD DSN=SYS1.MODGEN,DISP=SHR ,UNIT=SYSDA,VOL=SER=??????
PASS TITLE 'TAPEOFF - Program to list offsite tapes.'
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
* This program:
*
* 1. Reads control cards from SYSIN, containing a data set
* name in columns 1 thru 44. The data set name may have
* a relative or an absolute generation number. It does
* not have to be a generation data set.
* Example:
* BKUP.VSTOR02(-3) or BKUP.VPUB002.G____V00
*
* 2. The volume information for the data set is then obtained
* from the catalog and the number of volumes containing
* the data set are checked. If the data set resides on
* more than 20 volumes, a warning message is issued and
* this program abends.
*
* 3. Reports
*
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
EJECT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Sample JCL:
*
* //JOB JOB JOB,JOB JOB,MSGCLASS=A,
* //TAPEOFF EXEC PGM=TAPEOFF
* FIRST.DATA.SET.TO.LIST(-2) (See note)
* FIRST.DATA.SET.TO.LIST(-1) (See note)
* FIRST.DATA.SET.TO.LIST(-0) (See note)
* SECOND.DATA.SET.TO.LIST(-2) (See note)
* SECOND.DATA.SET.TO.LIST(-1) (See note)
* SECOND.DATA.SET.TO.LIST(-0) (See note)
* //SYSPRINT DD SYSOUT=*
*
* Note: There can be multiple control statements.
* = = = = = = = = = = = = = = = = = = = = =
*
* Programmer name: I ain't saying.
*
*
* Date written: 1998-9-21
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
EJECT
PRINT GEN
TAPEOFF CSECT ,
USING *,R15 Set temporary base register
SAVE (14,12),,'TAPEOFF.&SYSDATE..&SYSTIME' Save reg.s
LA R12,SAVEAREA Load the address of the new save
area
ST R12,8(,R13) Connect old and new save areas
ST R13,4(,R12) Connect old and new save areas
LR R13,R12 Connect old and new save areas
DROP R15 Drop the temporary base register
LR R12,R15 Load the program's base register
USING TAPEOFF,R12 Give the assembler the new base
OPEN (SYSIN,,SYSPRINT,OUTPUT) OPEN the files
LA R7,999 Indicate page full ( to get
header )
L R1,16 Load address of CVT
USING CVT,R1 Tell assembler where CVT address is
MVC SSSSSSSS,CVTSNAME Move system name to print header
DROP R1
SPACE 3
GETLOOP DS 0H
GET SYSIN,RECORD Read a card image into area RECORD
LOCATE LOCLIST Read a catalog entry
LTR R15,R15 See if zero return code
BNE LOCATERR If not zero, write error msg
MVC DSNLINE+1(44),RECORD Move data set name for print
LA R7,2(,R7) Double space line-per-page counter
C R7,FIFTY6 See if page is already full
BH NEWPAGE Over 56 lines, go start new page
GETLOOP2 DS 0H
PUT SYSPRINT,DSNLINE Print the data set name
LH R5,LOCAREA Load volume count for data set
C R5,=F'20' More than 20 volser's?
BNH COPYVOLS No - continue processing data set
B VOL20ERR If high, write error message, abend
COPYVOLS DS 0H
LA R6,LOCAREA+6 Load current colser pointer
LA R8,VOLLINE+L'VOLLINE-8 Find end of vol ser print area
COPYVOL2 DS 0H
MVI VOLLINE,C' ' Space out vol ser print line
MVC VOLLINE+1(79),VOLLINE Space out vol ser print line
LA R4,VOLLINE+1 Load address of vol ser print area
COPYLOOP DS 0H
CR R4,R8 Will vol ser fit on print line?
BH NEWLINE No - Go print line, and start one
MVC 0(6,R4),0(R6) Copy vol ser to print line
LA R4,8(,R4) Bump up current table entry pointer
LA R6,12(,R6) Bump up current volser pointer
S R5,=F'1' Sub 1 from table entry avail ctr
BP COPYLOOP If not last volser - go to loadloop
LA R7,1(,R7) Single space line-per-page counter
PUT SYSPRINT,VOLLINE Print volumes for data set
B GETLOOP Go get next data set
SPACE 3
EOF DS 0H
CLOSE (SYSIN,,SYSPRINT) CLOSE the files
L R13,4(,R13) Restore the caller's save area
addr.
LR R15,R11 Set return code
RETURN (14,12),,RC=0 Return to caller
EJECT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
* Sub-routines
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
SPACE 1
NEWPAGE DS 0H
TIME DEC Get current time and date
ST R0,TIME Save the time in HHMMSSTH format
UNPK WORK(7),TIME Unpack the time as HHMMSST
MVC HH,WORK Move the hour
MVC MM,WORK+2 Move the minute
MVC SS,WORK+4 Move the second
ST R1,DATE Save the date in 0CYYDDDF format
AP DATE,P1900000 Add 1900.000 to the century
indicator
OI DATE+3,X'0F' Correct the sign for printing
UNPK WORK(7),DATE Unpack the date as CCYYDDD
MVC YYYY,WORK Move the year
MVC DDD,WORK+4 Move the day number of the year
AP PAGENUM,ONE Find new page number
UNPK PPP,PAGENUM Put page number in page heading
OI PPP+2,X'F0' Fix the page number sign
PUT SYSPRINT,PAGETOP Advance to a new page
PUT SYSPRINT,HEADER Write the page heading
SLR R7,R7 Clear the line number counter
B GETLOOP2 Return to print Data Set Name
NEWLINE DS 0H
LA R7,1(,R7) Single space line-per-page counter
PUT SYSPRINT,VOLLINE Load volume count for data set
B COPYVOL2 Return to print next vol ser line
EJECT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
* Error Routines
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
LOCATERR DS 0H
MVC DSNLINE+1(44),RECORD Move data set name for print
PUT SYSPRINT,DSNLINE Print the data set name
WTO 'LOCATE Failed, TAPEOFF program
Abending...',ROUTCDE=11
ABEND 123,DUMP
*
VOL20ERR DS 0H
WTO 'Maximum of 20 tapes for a data set..',ROUTCDE=11
WTO 'TAPEOFF program abending..',ROUTCDE=11
ABEND 321,DUMP
*
EJECT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
* Workarea and constants
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
SPACE 2
WORK DS D Double word work area
SAVEAREA DC 18F'0' Register save area
SPACE 1
ONE DC P'1' To increment page number
PAGENUM DC PL2'0' Current page number
FIFTY6 DC A(56) Number of lines per page
TIME DS F Hold area for HHMMSSTH time
P1900000 DC PL4'1900000' Constant to convert date to Y2K
DATE DS F Hold area for CCYYDDDF date
SPACE 1
LOCLIST CAMLST NAME,RECORD,,LOCAREA Locate data set parameter list
SPACE 1
LOCAREA DS 0D
DS 265C Area to receive catalog information
SPACE 1
RECORD DS CL80 Input data set name card image
*
EJECT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
* Report Data Area
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
PAGETOP DC CL80'1 '
HEADER DC CL45' hostsite Off Site Tapes by Data Set Name '
DC CL35'hh:mm:ss ccyy-ddd Page nnn '
SSSSSSSS EQU HEADER+2,8 Label for Host name in the header
HH EQU HEADER+45,2 Label for the hour in the header
MM EQU HEADER+48,2 Label for the minute in the header
SS EQU HEADER+51,2 Label for the second in the header
YYYY EQU HEADER+55,4 Label for the year in the header
DDD EQU HEADER+60,3 Label for day-of-year in the header
PPP EQU HEADER+71,3 Label for the page number in header
DSNLINE DC CL80'0 ' Data set name to print
VOLLINE DC CL80' ' Vol sers to print
EJECT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
* Data Control Blocks
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
SPACE 3
SYSIN DCB
DDNAME=SYSIN, *
MACRF=GM, *
RECFM=FB, *
LRECL=80, *
DSORG=PS, *
EODAD=EOF
SPACE 3
SYSPRINT DCB
DDNAME=SYSPRINT, *
MACRF=PM, *
RECFM=FBA, *
LRECL=80, *
DSORG=PS
EJECT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
* Literal Pool
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
SPACE 3
LTORG ,
EJECT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
* DSECTs
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
SPACE 3
CVT DSECT=YES Dsect for Communication Vector
Table
EJECT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
*
* Register Equates
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
SPACE
R0 EQU 0 Register equate for register 0
R1 EQU 1 Register equate for register 1
R2 EQU 2 Register equate for register 2
R3 EQU 3 Register equate for register 3
R4 EQU 4 Register equate for register 4
R5 EQU 5 Register equate for register 5
R6 EQU 6 Register equate for register 6
R7 EQU 7 Register equate for register 7
R8 EQU 8 Register equate for register 8
R9 EQU 9 Register equate for register 9
R10 EQU 10 Register equate for register 10
R11 EQU 11 Register equate for register 11
R12 EQU 12 Register equate for register 12
R13 EQU 13 Register equate for register 13
R14 EQU 14 Register equate for register 14
R15 EQU 15 Register equate for register 15
END , The end of the program
//L.SYSLMOD DD DSN=SYSx.LOADxxxx,DISP=SHR,SPACE= , , , , , ,
//* * * * * UNIT=SYSDA,VOL=SER=------
NAME TAPEOFF
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/turnkey-mvs/
<*> To unsubscribe from this group, send an email to:
turnkey-mvs-unsubscribe-***@public.gmane.org
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/