Returns a value indicating the current user's NPF authorization for access to a resource.
&NPFDCHK resource [ resource2 .... resourcen ]
&NPFMCHK resource [ resource2 .... resourcen ]
&NPFVCHK resource [ resource2 .... resourcen ]
The Network Partitioning Facility (NPF) restricts the range of network resources a user may reference. The &NPFDCHK, &NPFMCHK, and &NPFVCHK statements are built-in functions that let you test a user's authority to reference a particular resource. Used with &INTCMD and &INTREAD, they let you edit multi-resource displays from VTAM to display only the resources to which that user is allowed access:
Determines whether the user is entitled to use the resource nominated by a VTAM display command, for that procedure.
Determines whether the user is entitled to receive messages relating to the resource nominated, for that procedure.
Determines whether the user is entitled to use VTAM VARY and MODIFY commands in the resource nominated, for that procedure.
Each of these verbs is a built-in function and must be used to the right of an assignment statement.
If the user is authorized for the resource, a YES value is returned in the variable specified, to the left of the assignment statement.
If the user is not authorized, a NO value is returned.
Multiple resources is tested by a single statement-the user must be authorized for each of the specified resources. If the user is not authorized for one or more of the resources, a NO value is returned.
Operands:
The VTAM network name for the resource to be tested. This can optionally be qualified by a network identifier; for example, NET1.TERM001.
Examples: &NPFVCHK
&AUTH = &NPFVCHK NODE1 &IF &AUTH EQ NO &THEN + &ENDAFTER &WRITE ALARM=YES DATA=NOT AUTHORIZED
= &CONTROL NOLABEL &INTCMD D &NODE .READ &INTREAD ARGS &GOTO .&1 &WRITE ALARM=YES DAT=UNEXPECTED MESSAGE &1 &END .ISTnnnI -* -* Processing -* &GOTO .READ .ISTnnnI &AUTH = &NPFDCHK &7 &IF &AUTH = NO &THEN + &GOTO .READ &WRITE &1 &2 &3 &4 &5 &6 &7 &8 &9 &GOTO .READ .IST314I &END
Notes:
The maximum length resource name that is specified is 64 characters.
Using &NPFxCHK functions in procedures executed by a user with no NPF restrictions always returns a YES value.
The &RSCCHECK function can also be used to perform authorization verification.
&NPFDCHK is equivalent to &RSCCHECK $NMCMDD.
&NPFMCHK is equivalent to &RSCCHECK $NMMSG.
&NPFVCHK is equivalent to &RSCCHECK $NMCMD.
| Copyright © 2009 CA. All rights reserved. |
|