Previous Topic: $SRV_SYS_STATXNext Topic: Special Purpose IMODs


$SRV_TPCF

The $SRV_TPCF routine interfaces with the CA MIA Tape Sharing Preferencing Control Facility and returns information about one or more tape drives. Information on the selected devices is returned on the stack.

Syntax

CALL $SRV_TPCF {loaddr-hiaddr} [,{loaddr-hiaddr}]
               {addr}          [,{addr}]

Parameters

addr

Address of a tape device. The address is in printable hexadecimal format; for example, 8C0.

loaddr

The beginning, low address of a range of tape devices. The address is in printable hexadecimal format; for example, 5D0.

hiaddr

The ending, high address of a range of tape devices. The address is in printable hexadecimal format; for example, 5DF.

Notes:

The user data field, returned as a stack-record field, could contain embedded delimiter characters. Note how the parse statement is used in the example.

Returned Data

Data is returned on the stack, one device per record. The first character in each record is the delimiter character. This character is used to separate the returned fields:

  1. Unit name (the device address) as a printable hexadecimal value.
  2. Volume serial number, if any.
  3. Preference.
  4. O if overgenned, N if not under TPCF control, else a null field.
  5. Device type and features.
  6. Status of device on this system.
  7. If reserved for a job, the JOBNAME.
  8. Owning system name, if allocated.
  9. Owning JOBNAME, if allocated.
  10. User information string. This field is always eight characters long and can contain binary data. this field can also include one or more delimiter characters as data.
  11. TPCF return code.
  12. Reserved, null.
  13. Reserved, null.
  14. Reserved, null.
  15. Reserved, null.
  16. Name of System 1.
  17. Flags for System 1.
  18. 18 - 47: Name and flag fields for Systems 2 through 16.

Return String

This routine returns a blank string to indicate successful completion. Otherwise, error text is returned.

Note: Even if error text is returned, some data can be added to the stack.

Example

A complete example is contained in the EXAMPLE ISET under the name TPCF.

call $srv_tpcf '5c0-5cf'
do i = 1 to queued()
   parse pull 1 d +1 unit (d) volser (d) pref (d) stat1   ,
               (d) devt (d) stat2 (d) resjob (d) sysname   ,
               (d) jobname (d) user +8 . +1 retcode   ,
               (d) flags (d) . (d) . (d) rest
 /*  additional processing  */
   end i