MODE (Unit Mode)

The MODE (Unit Mode) command tells the system that the write-enable status of a unit has been changed. The command also sets the automatic unload status of a magnetic tape unit. The system preserves these status settings of a unit across halt/loads.

Syntax

Explanation

MODE DK <unit number> IO

MODE PK <unit number> IO

MODE MT <unit number> IO

Allow the device to revert to normal operation.

MODE DK <unit number> IN

MODE PK <unit number> IN

Prevent new files from being created on the specified unit. This prohibition extends to new RESERVEDISK and BADDISK files, so that most RESERVE functions are effectively blocked. These commands also prevent the allocation of new file areas to existing files, and, if applied to the base unit of the family, file removal through the WFL statement REMOVE A/B, C/= FROM D. However, user programs can still write to existing file areas, and can remove individual files through the CLOSE with PURGE statement.

When a file is accessed or executed, the following file attributes are not updated in the disk file header in the system directory if the base unit of the family has a MODE of IN. The memory copy of the disk file header is updated regardless of the MODE setting.

ACCESSDATE

BACKUPTIMEUT

COPYSOURCETZ

ACCESSTIME

BACKUPTZ

READDATE

ACCESSTZ

COPYSOURCEDATE

READDATEUT

BACKUPDATE

COPYSOURCEDATEUT

READTIME

BACKUPDATEUT

COPYSOURCETIME

READTIMEUT

BACKUPTIME

COPYSOURCETIMEUT

READTIMETZ

MODE MT <unit number> IN

Prevent new files from being created on the specified unit.

MODE DK <unit number> OUT

MODE MT <unit number> OUT

MODE PK <unit number> OUT

Allow the device to revert to normal operation.

MODE MT <unit number> AUTOUNLOAD ON

Instructs the MCP to unload a tape on the device when the unit is closed and released or when the MCP performs a reel switch from the unit.

MODE MT <unit number> AUTOUNLOAD OFF

Instructs the MCP to unload a tape on the device only when specifically directed by a programmatic close or by the RW (Rewind) system command.

Examples

Example 1

MODE MT 48 AUTOUNLOAD OFF
     MT 48 MODE IS AUTOUNLOAD OFF

Considerations for Use

The effect of the AUTOUNLOAD MODE option on programmatic file closes is summarized in the following table.

Option Value

Effect on File CLOSE

Result

ON

CLOSE(F)

Rewound/unloaded

CLOSE(F,REWIND)

Just rewound

CLOSE(F,REEL)

Rewound/unloaded

CLOSE(F,PURGE)

Rewound/unloaded

CLOSE(F,*)

Position retained

CLOSE(F,LOCK)

Rewound/unloaded

REWIND(F)

Just rewound

F.OPEN:=FALSE

Just rewound

Block exit close

Rewound/unloaded

Implicit close on reel switch

Rewound/unloaded

OFF (default)

CLOSE(F)

Just rewound

CLOSE(F,REWIND)

Just rewound

CLOSE(F,REEL)

Just rewound

CLOSE(F,PURGE)

Just rewound

CLOSE(F,*)

Position retained

CLOSE(F,LOCK)

Rewound/unloaded

REWIND(F)

Just rewound

F.OPEN:=FALSE

Just rewound

Block exit close

Just rewound

Implicit close on reel switch

Just rewound

The default value of OFF for the AUTOUNLOAD option is preserved across a halt/load. A program can override the setting of the AUTOUNLOAD MODE by using the AUTOUNLOAD file attribute. You can interrogate the value of AUTOUNLOAD by using the system command OL (Display Label and Paths).

For mirrored pack units, the effect of the MODE command is carried through to all members of the mirrored set.