3270 User Record Format

The format of the 3270 user record is shown below. The first structure definition is an LU/session information record, which includes details of a 3270 LU; the second is the 3270 user record, which includes a number of LU/session information records.

Note that the user record is not a fixed length, because the number of LU/session information records in the remap list is variable. The structures used below are provided simply as a template to allow you to map to the correct offset in the record.

typedef struct tecwrksd {
    UCHAR   cwshost[9];
    USHORT  cwsestyp;
    USHORT  cwsmodov; 
    USHORT  cwspad;
} TECWRKSD;
 

Members

cwshost[9]
LU/pool name accessed.
cwsestyp
Session type (M2, M3, M4, M5, printer).
cwsmodov
Whether or not the user has override permission.
cwspad
Two bytes of padding.
typedef struct tecwrkus {
    USHORT   cwlen;
    USHORT   cwtype;
    UCHAR    cwname[21];
    UCHAR    cwremark[26];
    UCHAR    cwstylef[9];
    USHORT   cwvewrtm;
    USHORT   cwalert;
    USHORT   cwchghan;
    USHORT   cwmaxses;
    USHORT   cwnumrec;
    TECWRKSD cwsesdat[10];
    USHORT   cwmodisf;
    UCHAR    cwstatus;
    UCHAR    cwpad;
    USHORT   cwnumrmp;
    TECWRKSD cwremap[1];
} TECWRKUS;
 

Members

cwlen
Length of record.
cwtype
Type of record.
cwname[21]
User name.
cwremark[26]
Comment field.
cwstylef[9]
Initial style file name.
cwvewrtm
Whether or not user can view RTM information.
cwalert
Whether or not user has ALERT permission.
cwchghan
Whether or not user can change LU/pool name accessed.
cwmaxses
Maximum number of active sessions (1–10).
cwnumrec
Number of sessions for user.
cwsesdat[10]
Session information records.
cwmodisf
Permission to modify initial style.
cwstatus
Status byte: user or group.
cwpad
One byte of padding.
cwnumrmp
Number of LUs/pools in remap list.
cwremap[1]
LU/Pool remap list.

For Win32

Microsoft® SNA Server for Microsoft® Windows NT® and Microsoft® Windows® 95 permits configuration of more than 10 sessions per user. If this is done, the first 10 sessions are placed in the cwsesdat array with cwnumrec set to 10 and the remainder are placed in the location of the remap list. The cwnumrmp member indicates the number of TECWRKSD structures in the remap list. Note that this permits cwmaxses to be greater than cwnumrec.

The following paragraphs explain the meaning of each field in the structures, and indicate how the application should use it. The sections on configuring 3270 users and LUs in the Microsoft SNA Server Administration Guide should also be used as a cross-reference.

Members

cwshost
The name (up to eight characters) of the LU or LU pool that this session is configured to use. The application specifies this name on the Open(SSCP) Request.
cwsestyp
The LU type (display or printer) of the LU used by this session and (if it is a display LU or a pool of display LUs) the screen model. The possible values are:

CERTMOD2 (0) Model 2 display (24 by 80)
CERTMOD3 (1) Model 3 display (32 by 80)
CERTMOD4 (2) Model 4 display (43 by 80)
CERTMOD5 (3) Model 5 display (27 by 132)
CERTPRNT (4) Host printer

The application should use this value to distinguish between display and printer sessions and to set the appropriate screen model for display sessions.

cwsmodov
TRUE if the user has permission to override the screen model for display sessions — that is, to change the session to use a different screen model from the one configured. If this value is FALSE, the user should not be permitted to change the screen model. This field is not used for printer sessions and should not be checked.
cwlen
The length of the 3270 user record (this is variable because it contains a variable number of LU/session records in the remap list). The application should use this value to locate the start of the next 3270 user record when searching for the correct record.
cwtype
Identifies this as a 3270 user record.
cwname
The LAN Manager user name, or other identifying name, of the 3270 user (up to 20 characters). The application uses this to search for the correct 3270 user record.
cwremark
An optional comment field (up to 25 characters), used in the configuration program to give more information about the user (for example, the user's full name).
cwstylef
The name (up to eight characters) of the default style file used by this user (a file containing the user's 3270 customization settings, used by the SNA Server 3270 emulation programs). This field can be used to identify the equivalent file for your 3270 emulator, if appropriate.

If this field is blank, no style file is used and the 3270 emulator should revert to its default settings (unless overridden by a style file specified by the user).

cwvewrtm
TRUE if this user is permitted to view a display of Response Time Monitor (RTM) statistics for his or her 3270 sessions. If this field is FALSE, the application should not display RTM statistics and should not display a last transaction time indicator (LTTI) on the status line of display sessions. See Diagnostics Record Format for more information on the use of RTM.
cwalert
TRUE if the user is permitted to send NetView user alerts. If this field is FALSE, the user should not be permitted to send alerts. See Diagnostics Record Format for more information on the use of alerts.
cwchghan
TRUE if the user is permitted to remap a 3270 session to use a different LU (in which case it can be changed to use any LU in the remap list—see cwremap). If this field is FALSE, the application should not allow the user to remap sessions.
cwmaxses
The maximum number of active sessions permitted to this user. If the number of sessions configured (see cwnumrec) is greater than this, the user must not be allowed to activate more sessions at a time than this field specifies.
cwnumrec
The total number of sessions configured for this user. The user record always contains 10 LU/session records (see cwsesdat), but only this number of the records will be used—the remainder will be filled with zeros.
cwsesdat
Ten LU/session records. Some of these records can be filled with zeros, indicating that they are unused (cwnumrec gives the number of sessions that are used). The application should list, and allow the user to use, only the sessions that have valid session records here.
cwmodisf
TRUE if the user is permitted to modify the initial 3270 customization. If this field is FALSE, the application should use the customization defined by cwstylef (if specified); the user should not be allowed to make changes to this style, or to override it by loading a different style file.
cwstatus
Indicates whether the user name in this record is to a LAN Manager user name or group name. The least significant bit of this byte is CERTGRUP (1) for a group, and zero for a user. Other bits are not used.
cwpad
Pad byte—not used by the application.
cwnumrmp
The number of LU/session records in the remap list (see cwremap).
cwremap
The list of LU/session records, which indicates the LUs to which the user can remap sessions (if any). If the user is not permitted to remap sessions (see cwchghan), this list is not used and should not be checked by the application.