How can I list all logonid that start with the characters SR that are suspended have TSO privileges and were canceled today?
The LIST subcommand lets a logonid with the ACCOUNT, SECURITY, or AUDIT privilege display logonid records. The TSO ACF LIST command can be used to LIST logonid based on flexible record selection criteria using the If(field,...,field) parameter.
If(field,...,field)
Lets you define flexible record selection criteria. This parameter is formatted similarly to a high-level programming language IF statement. The variables available for processing are the various logonid record field names or constants (defined in the following). The available operators are also defined in the following. The full IF expression is evaluated as an algebraic expression yielding a TRUE (that is, select record) or FALSE (that is, bypass record) value. If the result of the IF expression is a quantity, NONZERO is considered TRUE (selected) and a zero value is considered FALSE (not selected). Parentheses can group expressions to override the normal precedence order.
When specifying a constant (specific value) in the IF statement, use the formats listed in the following table:
Format | Contents | Type | |
'aaaa' or C'aaaa' | Alphanumerics | Character fields | |
Nnnn | Numerics | Binary number fields | |
X'xx' | Hex numbers | Hex fields | |
B'n' | 1 or 0 (1=on, 0=off) | Bit (flag) fields | |
P'nn' | Numerics | Packed decimal fields | |
D'mm/dd/yy' or D'dd/mm/yy' or D'yy/mm/dd' or | Numerics with dividing
| ||
U'xxxx' | Any of the previous |
Example: To list all logonid that start with the characters SR that are suspended have TSO privileges and were canceled on a specific date:
ACF
list like(SR-) if(suspend, tso, csdate = d'04/13/17')