Show POSIX user attributes
| Component: | SRPMNUC | 
| Functional area: | User management | 
| Domain: | USER-ADMINISTRATION | 
| Privileges: | STD-PROCESSING | 
Function
The SHOW-POSIX-USER-ATTRIBUTES command shows the POSIX user attributes of a BS2000 user ID, as recorded in the user catalog of the specified pubset. It is available to the following users:
- holders of the POSIX-ADMINISTRATION or USER-ADMINISTRATION privilege, for all BS2000 user IDs on all pubsets. 
- group administrators, for all the group and subgroup members they are in charge of on the pubset they manage. 
- each user for his or her own BS2000 user ID. 
The command supports structured output in S variables (see "Output in S variables").
Format
| SHOW-POSIX-USER-ATTRIBUTES | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Operands
USER-IDENTIFICATION =
Identifies the BS2000 user IDs for which the POSIX user attributes are to be shown.
USER-IDENTIFICATION = *OWN
Shows the POSIX user attributes of the user’s own BS2000 user ID, as recorded in the user catalog of the specified pubset.
USER-IDENTIFICATION = *ALL
Shows the POSIX user attributes of all the BS2000 user IDs that the caller is authorized to examine.
USER-IDENTIFICATION = list-poss(20): <name 1..8>
Shows the POSIX user attributes of the specified user ID.
PUBSET =
Identifies the pubset for which the POSIX user attributes in the user catalog are to be shown.
PUBSET = *HOME
Shows the POSIX user attributes of the home pubset.
PUBSET = *ALL
Shows the POSIX user attributes of all the pubsets available at command runtime.
PUBSET = list-poss(20): <cat-id 1..4>
Shows the POSIX user attributes of the specified pubset.
SELECT =
Selects BS2000 user IDs on the basis of the specified selection criteria.
SELECT = *ALL
POSIX user attributes are not used as selection criteria.
SELECT = *BY-ATTRIBUTES(...)
Selects BS2000 user IDs on the basis of their POSIX user attributes. If more than one POSIX user attribute is specified, the criteria are logically ANDed.
USER-NUMBER =
The user number is used as a selection criterion.
USER-NUMBER = *ANY
The user number is not used as a selection criterion.
USER-NUMBER = *BY-POSIX-USER-DEFAULTS
Restricts the selection to BS2000 user IDs with a user number matching the value of the corresponding POSIX default attribute.
USER-NUMBER = *OWN
Restricts the selection to BS2000 user IDs which have the same user number as the caller in the user catalog of the specified pubset.
USER-NUMBER = <integer 0..60002>
Restricts the selection to BS2000 user IDs which have the specified user number in the user catalog of the specified pubset.
GROUP-NUMBER =
The group number is used as a selection criterion.
GROUP-NUMBER = *ANY
The group number is not used as a selection criterion.
GROUP-NUMBER = *BY-POSIX-USER-DEFAULTS
Restricts the selection to BS2000 user IDs with a group number matching the value of the corresponding POSIX default attribute.
GROUP-NUMBER = *OWN
Restricts the selection to BS2000 user IDs which have the same group number as the caller in the user catalog of the specified pubset.
GROUP-NUMBER = <integer 0..60002>
Restricts the selection to BS2000 user IDs which have the specified group number in the user catalog of the specified pubset.
COMMENT =
The comment associated with an BS2000 user ID is used as a selection criterion.
COMMENT = *ANY
The comment associated with an BS2000 user ID is not used as a selection criterion.
COMMENT = *BY-POSIX-USER-DEFAULTS
Restricts the selection to BS2000 user IDs with a comment matching the value of the corresponding POSIX default attribute.
COMMENT = *NONE
Restricts the selection to BS2000 user IDs with no comment.
COMMENT = <c-string 1..255 with-low>
Restricts the selection to BS2000 user IDs with the specified comment.
DIRECTORY =
The login directory is used as a selection criterion.
DIRECTORY = *ANY
The login directory is not used as a selection criterion.
DIRECTORY= *BY-POSIX-USER-DEFAULTS
Restricts the selection to BS2000 user IDs with a login directory matching the value of the corresponding POSIX default attribute.
DIRECTORY = *ROOT
Restricts the selection to BS2000 user IDs with the root directory “/” as their login directory.
DIRECTORY = <posix-pathname 1..1023 without-wild>
Restricts the selection to BS2000 user IDs with the specified login directory.
PROGRAM =
The program started up after login is used as a selection criterion.
PROGRAM = *ANY
The startup program is not used as a selection criterion.
PROGRAM = *BY-POSIX-USER-DEFAULTS
Restricts the selection to BS2000 user IDs with a startup program matching the value of the corresponding POSIX default attribute.
PROGRAM = *SHELL
Restricts the selection to BS2000 user IDs with *SHELL as their startup program.
PROGRAM = <posix-pathname 1..1023 without-wild>
Restricts the selection to BS2000 user IDs with the specified startup program.
INFORMATION =
Specifies the scope of the information to be output.
INFORMATION = *ALL
Shows all the POSIX user attributes of a BS2000 user ID.
INFORMATION = *USER-LIST
Shows a list of BS2000 user IDs but no POSIX user attributes.
OUTPUT = list-poss(2): *SYSOUT / *SYSLST(...)
Specifies the system file to which the output is to be sent.
OUTPUT = *SYSOUT
The information is sent to the SYSOUT system file.
OUTPUT = *SYSLST(...)
The information is sent to the SYSLST system file.
SYSLST-NUMBER =
Selects a SYSLST number.
SYSLST-NUMBER = *STD
Selects the default SYSLST output.
SYSLST-NUMBER = <integer 1..99>
Selects the specified SYSLST number.
LINES-PER-PAGE =
Specifies the number of lines per page.
LINES-PER-PAGE = 64
By default, 64 lines are printed per page.
LINES-PER-PAGE = <integer 20..255>
The specified number of lines are printed per page.
Notes
As a rule, users with no administration duties are supplied with information about their own BS2000 user IDs only. The exceptions to this rule are:
- INFORMATION=*USER-LIST,SELECT=*BY-ATTRIBUTES(USER-NUMBER=*OWN)In this case you will also be shown the identity of users who have the same user number as you, unless your user number is the default user number.
- INFORMATION=*USER-LIST,SELECT=*BY-ATTRIBUTES(GROUP-NUMBER=*OWN)In this case you will also be shown the identity of members of your POSIX group, unless your POSIX group is the default group.
If INFORMATION=*ALL is selected, the user number and the group number will be marked if assigned the corresponding value of the POSIX default attributes (SHOW output will include “(DEFAULT)”; S variables will include the suffix “-DEF”).
Return codes
| (SC2) | SC1 | Maincode | Meaning | 
|---|---|---|---|
| 0 | CMD0001 | Command executed without error | |
| 2 | 0 | SRM6001 | Command executed with warning | 
| 32 | CMD2009 | Error during generation of output variables | |
| 32 | SRM6020 | Command rejected owing to system error | |
| 64 | OPS0002 | K2 interrupt on output to S variables | |
| 64 | SRM6040 | Command rejected with error message | |
| 130 | OPS0001 | Insufficient resources for output to S variables | |
| 130 | SRM6030 | Command rejected owing to insufficient resources | 
Output in S variables
The INFORMATION identifies the S variables which are to be created. The possible values for INFORMATION are *ALL and *USER-LIST.
Note that S variables are generated only if the related conditions (see “Condition” column) apply.
| Output information | Name of the S variable | T | Contents | Condition | 
|---|---|---|---|---|
| Comment | var(*LIST).COMMENT | S | *NONE | INF=*ALL | 
| Login directory | var(*LIST).DIR | S | <posix-pathname 1..1023> | INF=*ALL | 
| POSIX group ID | var(*LIST).GROUP-NUM | I | <integer 0..60002> | INF=*ALL | 
| Default POSIX group ID | var(*LIST).GROUP-NUM-DEF | B | FALSE | INF=*ALL | 
| Name of the program | var(*LIST).PROG | S | *SHELL | INF=*ALL | 
| Pubset catalog ID | var(*LIST).PUBSET | S | <cat-id 1..4> | INF=*ALL/ | 
| BS2000 user ID with the displayed POSIX user attributes | var(*LIST).USER-ID | S | <name 1..8> | INF=*ALL | 
| var(*LIST).USER-ID(*LIST) | S | <name 1..8> | INF= | |
| POSIX user ID | var(*LIST).USER-NUM | I | <integer 0..60002> | INF=*ALL | 
| Default POSIX user ID | var(*LIST).USER-NUM-DEF | B | FALSE | INF=*ALL | 
Examples
Output in S variable
/declare-var var-name=var(type=*structure),multiple-elem=*list
/exec-cmd (show-posix-user-attr inf=*all),text-output=*none,struct-output=var
/show-var var,inf=*par(value=*c-literal)
VAR(*LIST).PUBSET = '2OSH' VAR(*LIST).USER-ID = 'USER1' VAR(*LIST).USER-NUM = 100 VAR(*LIST).USER-NUM-DEF = TRUE VAR(*LIST).GROUP-NUM = 100 VAR(*LIST).GROUP-NUM-DEF = TRUE VAR(*LIST).COMMENT = 'POSIX Gastzugang' VAR(*LIST).DIR = '/home/gast' VAR(*LIST).PROG = '*SHELL' *END-OF-VAR
/exec-cmd (show-posix-user-attr inf=*user-list),text-output=*none,
          struct-output=var
  /show-var var,inf=*par(value=*c-literal)
VAR(*LIST).PUBSET = '2OSH' VAR(*LIST).USER-ID(*LIST) = 'USER1' *END-OF-VAR
Output to SYSOUT
/show-posix-user-attr user1
%POSIX-USER-ATTRIBUTES --- PUBSET 2OSH 2012-03-14 17:18:06 %------------------------------------------------------------------------------ %USER-ID USER1 PUBSET 2OSH %USER-NUMBER 100 (DEFAULT) %GROUP-NUMBER 100 (DEFAULT) %COMMENT POSIX Gastzugang %DIRECTORY /home/gast %PROGRAM *SHELL %------------------------------------------------------------------------------