Previous Topic: Called ByNext Topic: USERACNT User Exit


Example

Have CA VM:Tape select non-labeled (NL) tapes from the NONLABEL scratch pool when the user did not specify the POOL option on the MOUNT command. Also have CA VM:Tape reject any nonstandard label (NSL) tapes.

COMMAND User Exit Sample

'EXTRACT /COMMAND/'
/* Is this a nonstandard label mount? */
if wordpos('LABEL NSL',command.1) > 0 |,
wordpos('(LABEL NSL',command.1) > 0
then exit 8 /* Reject command */
/* Is this a standard label mount? */
if wordpos('LABEL NL',command.1) == 0 &,
wordpos('(LABEL NL',command.1) == 0
then exit 0 /* Accept command */
/* Did user specify a pool name? */
if wordpos('POOL',command.1) > 0 |,
wordpos('(POOL',command.1) > 0
then exit 0
/* This is an NL mount and the user did not specify a pool. */
/* Set the pool that contains non-labeled tapes. */
NewCommand = command.1||' POOL NONLABEL'
'SET COMMAND' NewCommand
exit 4 /* Command changed */