*NOSEQ
.PROC,SETTASV*I
,D=(*A,*N=GE)
,F=(*A,*N=I)
,V1=(*S6..6/AD)
,V2=(*S6..6/AD,*N=)
,T=(*F,*N=TAPE)
,VF=(*F,*N=PFVER)
,TFSI=(*N=#DATA)
.
.***************************************
.* *
.* *SETTASV* IS THE PROCEDURE CALLED *
.* BY THE PROGRAM *GETTASV* AFTER IT *
.* HAS SELECTED THE SYSTEM VSN(S) TO *
.* BE USED FOR TAPE ALTERNATE STORAGE *
.* FOR DESTAGED MASS STORAGE FILES. *
.* *GETTASV* MUST PASS THE DENSITY(D) *
.* FORMAT(F), ONE OR TWO SYSTEM VSNS *
.* (V1,V2), AND THE LFN(S) FOR THE *
.* DESTAGE TAPES(T,VF). *SETTASV* *
.* MUST RESERVE THE SELECTED VSN(S) *
.* AND REQUEST THE TAPES. THE VSN(S) *
.* ARE RESERVED UNDER THE USERNAME IN *
.* EFFECT AT THE TIME *SETTASV* IS *
.* CALLED. IF THE SIZE OF FILES TO *
.* BE DESTAGED EXCEEDS THE CAPACITY *
.* OF A SINGLE VSN, ADDITIONAL VSNS *
.* WILL BE ASSIGNED FROM THE SCRATCH *
.* POOL AS REQUIRED. ADDITIONAL VSNS *
.* ASSIGNED WILL NOT BE SYSTEM VSNS. *
.* *
.* NOTE- IT IS THE RESPONSIBILITY OF *
.* THE JOB CALLING *GETTASV* TO ISSUE *
.* THE APPROPRIATE *RESOURC* COMMAND *
.* IF MULTIPLE TAPES AND/OR PACKS ARE *
.* REQUIRED BY THE JOB (AS WHERE TWO *
.* VSNS ARE REQUIRED FOR DESTAGING). *
.* *
.***************************************
.SET,USERNAM=STR(USER).
$TFSP,OP=I,I=TFSI.
$UNLOAD,T,TFSI.
$LABEL,T,#D=D,#F=F,PO=W,VSN=V1.
.IF,$V2$.NE.$$,BACK1.
$UNLOAD,VF.
$LABEL,VF,#D=D,#F=F,PO=W,VSN=V2.
.ENDIF,BACK1.
$REVERT,NOLIST.
.DATA,TFSI.
USER=USERNAM
FILEV=V1
#D=D
#F=F
LB=KL
M=NULL
RESERVE
.IF,$V2$.NE.$$,BACK2.
FILEV=V2
#D=D
#F=F
LB=KL
M=NULL
RESERVE
.ENDIF,BACK2.
DROP
DROP
.* END OF SETTASV PROCEDURE.