Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Volume swap exits (044/045)

&pagelevel(3)&pagelevel

In addition to the CLOSE exits for magnetic tape files (see above: 042/043) two exits are offered for intervention during volume swapping:

  • the request exit routine is activated at the beginning of every tape volume swap, i.e. during the end processing of the tape to be closed

  • the return exit routine is called after the start processing of the new magnetic tape volume.

As for the CLOSE exits for tape files, the address of the exit parameter area, which contains the address of the P1-FCB, in passed in both cases.

For tape files, the corresponding exit routines can be used under the TSOS user ID to monitor and keep a record of the use of tapes, and thus to implement an individual tape file management facility.

The following information is transferred to the exit routine:

R1 = A($DOCSYS parameter area)
R12 = A(TPR program manager)
R13 = A(save area of calling component)
R14 = A(indirect return)
R15 = A(exit routine)

Notes

  • Registers 12, 13 and 14 must not be destroyed by the exit routine.

  • If there is an error in the exit base mechanism, message DMS0D15 is displayed on the console and then processing continues.

    %  DMS0D15 CALLING BASE MECHANISM OF SYSTEM EXIT '(&00)' RESULTS IN ERROR 
    CODE '(&01)'
    (&00): exit number.
    (&01): error code of $SYSX interface 
    

Parameter area

The layout of the exit parameter area can be generated with the $DOCSYS macro.

         $DOCSYS MF=D
         MFTST MF=D,PREFIX=D,MACID=OCS,ALIGN=F,                        C
               DMACID=OCS,SUPPORT=(D,C,M,L),DNAME=OCS_MDL
DOCS_MDL DSECT ,
               *,##### PREFIX=D, MACID=OCS #####
*   parameterarea description
DOCSHDR  FHDR  MF=(C,DOCS),EQUATES=NO                    Standardheader
DOCSHDR  DS    0A
DOCSFHE  DS    0XL8            0   GENERAL PARAMETER AREA HEADER
*
DOCSIFID DS    0A              0   INTERFACE IDENTIFIER
DOCSFCTU DS    AL2             0   FUNCTION UNIT NUMBER
*                                  BIT 15    HEADER FLAG BIT,
*                                  MUST BE RESET UNTIL FURTHER NOTICE
*                                  BIT 14-12 UNUSED, MUST BE RESET
*                                  BIT 11-0  REAL FUNCTION UNIT NUMBER
DOCSFCT  DS    AL1             2   FUNCTION NUMBER
DOCSFCTV DS    AL1             3   FUNCTION INTERFACE VERSION NUMBER
*
DOCSRET  DS    0A              4   GENERAL RETURN CODE
DOCSSRET DS    0AL2            4   SUB RETURN CODE
DOCSSR2  DS    AL1             4   SUB RETURN CODE 2
DOCSSR1  DS    AL1             5   SUB RETURN CODE 1
DOCSMRET DS    0AL2            6   MAIN RETURN CODE
DOCSMR2  DS    AL1             6   MAIN RETURN CODE 2
DOCSMR1  DS    AL1             7   MAIN RETURN CODE 1
DOCSFHL  EQU   8               8   GENERAL OPERAND LIST HEADER LENGTH
*
*   main return codes
DOCSNOER EQU   0                         no error detected
DOCSRREJ EQU   4                         request rejected
*
DOCSFCB@ DS    A                         address of P1-FCB
DOCS#    EQU   *-DOCSHDR

Return exit (044)

The exit routine cannot send a return code to the system module. In the case of output files, the address of a 320-byte area containing the VOL1, HDR1, HDR2 and HDR3 labels is contained in D2LGINF in the P2-FCB.

Return exit (045)

The return code is passed in the standard header of the parameter area in the DOCSMRET field.

Return code: DOCSNOER = X'0000' = no error

Return code: DOCSRREJ = X'0004' = OPEN is to be rejected

If the attempt to carry out a volume swap is rejected, the user receives message DMS0E10 on SYSOUT or error code X’0E10’ in the ID1ECB field of the FCB:

DMS0E10 SYSTEM ADMINISTRATION RESTRICTS THE USE OF VOLUME SWITCHING

In the case of output files, the address of a 320-byte area containing the VOL1, EOF1, EOF2 and EOF3 labels is contained in D2LGINF in the P2-FCB.