MIS.USER Level Security via Attributes - Example #2
Control viewing of response to a customer-defined field
For this example, we will use the same MIS query to control the access as in the previous example. In this example, we need to erase the query IAT.CONF, if the user doesn’t have access, when the screen displays (in the first query on the screen ADMDRSTR).

The macro being called is again stored in our macro library:
;--------------------------------------------------------------------------------
;Macro will nill out a particular query based on the row, col, and field length
;Query is passed in as argument A
;--------------------------------------------------------------------------------
@INITIALIZE,
@GET.ROW.COL.LEN,
@ADJUST.VALS,
@ZAP.QUERY,
END;
;--------------------------------------------------------------------------------
INITIALIZE
A^MIS.QUERY.mnemonic,
/CDS^MIS.SCREEN.mnemonic,
""^/ROW^/COL^/LEN
GET.ROW.COL.LEN
IF{@MIS.SCREEN.resp.row'="SAME";
@MIS.SCREEN.query.row}^/ROW,
@MIS.SCREEN.resp.col^/COL,
IF{@MIS.SCREEN.resp.len;
@MIS.QUERY.length}^/LEN
ADJUST.VALS
/ROW+3^/ROW,
/COL-1^/COL
ZAP.QUERY
P(/ROW,/COL," ":/LEN)^#
Obviously, control from example 1 should be added so that in addition to not viewing a field,
we don’t give restricted users access to Enter/Edit the field as well.
With restricted user (Frank) the field confidential information is not viewable.

With non-restricted user (Joel) the field is viewable.

