TUFILE - File Status (ONLN/BTCH) Switching Facility (z/OS only)

TUFILE enables you to switch the status of a user file in a currently running Com-plete from ONLN to BTCH or vice versa. Please refer to the description of online utility UUTIL FM for details about switching a file's status.


How to Use TUFILE

TUFILE can be invoked in two different ways:

  • Directly as a BATCH job step using JCL illustrated in sample source library member JCLTUFIL.

  • Load and call TUFILE from any other BATCH program. In this case, the calling program must provide parameters in the same format as the operating system does provide them to a program called from a JCL EXEC statement: Register 1 contains the address of a fullword which, in turn, contains the address of a length halfword. This halfword contains the length of the parameter string which is located immediately following this halfword:

R1 contains address of APARM
APARM DC - A(PARM)
PARM DC - H'length'DC - CL(length)'parameters'

TUFILE is serially reusable, so even if you call it multiple times, it needs to be loaded only once.

Parameter Input

TUFILE expects 3 parameters, which must be separated by commas:

  • The name of the target Com-plete as defined in your ACSTAB (DEST= parameter of an ACSTABLE statement). If you omit this parameter (if the parameter string starts with a comma), the standard rules for defining the target Com-plete take effect as described in the description of Batch.

  • The desired file status, ONLN or BTCH;

  • The DD name of the file.

Example:

PARM='COMPLETE,BTCH,MYFILE1'

Condition Codes / Return Codes

0 Function executed succesfully.
4 Connected to Com-plete, but function failed.
8 An error occurred while connecting to Com-plete.
16 Parameter(s) invalid or missing.

If your job contains a SYSPRINT DD statement, all messages recieved from Com-plete will be logged to SYSPRINT.