[ Previous | Next | Contents | Search ]
3270 Host Connection Program 2.1 and 1.3.3 for AIX: Guide and Reference

mkhcons Command

Purpose

Creates an HCON session profile.

Syntax

To Create a Display Session Profile

mkhcons -n SessionName [-p DeviceName | -w 'SNAProfile' | -I HostName ] [ -u 'SessionUse] [ -m ModelNumber ] [ -l Language ] [ -k KeyboardTable ] [ -c ColorTable ] [ -r ReplaceFileName ] [ -s SaveFileName ] [ -H HostType ] [ -x HostLoginName ] [ -f 'FxferProgram] [ -d FxferDirection ] [ -q FxferWait ] [ -R FxferRecoverTime ] [ -b MaxBufferSize ] [ -T EnableAutologTrace ] [ -W AutologTimeOut ] [ -a AutologNodeID ] [ -N LoginName ] [ -t SessionType ] [-P LocalPrinterName ]

To Create a Printer Session Profile

mkhcons -n SessionName-u 'SessionUse] [ -l Language ] [ -k KeyboardTable ] [ -c ColorTable ] [ -C PortAddress ] [ -N LoginName ] [ -t SessionType ] [ -P LocalPrinterName -v PrintFile ] [ -p DeviceName | -w 'SNAProfile' ]

Not all flags are valid for all session types. Valid flags for each session type are listed in "Valid Profile Fields and Associated Command Flags for Each HCON Session Type".

Description

The mkhcons command creates an Host Connection Program (HCON) session profile. The session profile is associated with the user identified by the -N LoginName flag. If the -N flag is not used, the mkhcons command creates a session profile associated with the user who is currently logged in. The user must have been previously defined to HCON using the smit hcon command or the mkhconu command.

The session type is determined by the -t SessionType flag when a session profile is created. If the -t flag is not specified, HCON attempts to create a DFT display session profile.

You can use the System Management Interface Tool (SMIT) to run this command. To use SMIT, enter:

smit mkhcons

The mkhcons command can also be issued from the command line.

Note: HCON users can issue the mkhcons command to create their own session profiles. A user with root user authority can issue the command to create session profiles for any HCON user.

Flags

-a AutologNodeID Specifies the AUTOLOG script to be used by the AUTOLOG facility. An AUTOLOG script must be created using the genprof or hconutil command before an automatic logon using AUTOLOG is attempted by the file transfer process, an API program, or the HCON utility. The AutologNodeID cannot be longer than 18 characters. The default is blank.

The -a flag is valid only for display session profiles.

-b MaxBufferSize Specifies the maximum size of the I/O buffer used during file transfer, API/API, and API/API_T operations. The valid range for the buffer size is 2048 to 32,767 bytes. The default size is 2048 bytes. An I/O buffer size of 3456 bytes is the largest value that can be used when running a file transfer, API/API, or API/API_T operation through the pvm or passthru facility on the host system.

The -b flag is valid only for display session profiles.

-C PortAddress Specifies the two hexadecimal-character controller port address where the coaxial cable from the 3270 Connection Adapter is attached to one of the following:
  • 3174 or 3274 Control Unit
  • An integrated controller, which can be either:
    • 4361 Workstation Adapter
    • 9370 Workstation Subsystem Controller

The session address from the host configuration must match the controller port address in hexadecimal notation. The range of 3X74 port assignment addresses is 0x00 to 0x1F. The port assignment address is available from the System/390 access method definition from the 3X74 customization. The 3270 Connection Adapter printer address must also be configured accordingly to match this address with the same port assignment address. The adapter can be configured using the smit 3270con fast path.

The -C flag is valid only for non-SNA printer session profiles.

-c ColorTable Specifies the file containing the color definition table to be used for the session. The default is the /usr/lib/hcon/e789_ctbl file.
-d FxferDirection Specifies the default direction for file transfers. The value of the FxferDirection variable can be up or down. If you do not specify a direction, the FxferDirection variable defaults to down.
up During a file transfer, the default is to transfer files from the local system to the host (upload).
down During a file transfer, the default is to transfer files from the host to the local system (download).

The default direction can be overridden when executing a file transfer.

The -d flag is valid only for display session profiles.

-f 'FxferProgram'
                          Specifies the host file transfer program name. The default depends on the setting of the LANG environment variable, as described in "HCON Session Profile Characteristics". The program name must be enclosed in single quotation marks and cannot be longer than 8 characters.

The -f flag is valid only for display session profiles.

-H HostType Specifies the host environment. This value is used by the file transfer program and the Application Programming Interface (API). The valid values for the HostType variable are:
TSO MVS/TSO host system (default)
CMS VM/CMS host system
CICS CICS/VS (for MVS and VSE) host system
VSE VSE/SP or VSE/ESA host system

The -H flag is valid only for display session profiles.

-I HostName Specifies the host name to be used for the TCP/IP display session. The host name, which can be up to 255 characters in length, can be either the name of the host or a dotted-decimal Internet address. For example, if the host name, mikevm , has Internet address 123.45.678 , then either mikevm or 123.45.678 can be used as the HostName value. A fully qualified host name such as mikevm.ibm.com is also valid. There is no default for the HostName variable.

The -I flag is valid only for TCP/IP sessions.

-k KeyboardTable Specifies the file containing the keyboard definition table to be used for the session. The default is the /usr/lib/hcon/e789_ktbl file.
-l Language Specifies the code page for ASCII-EBCDIC translation. The following abbreviations are valid:
BEL Belgian
CAN Canadian-French
CHT Traditional Chinese
DEN Danish
FIN Finnish
FRA French
GER Austrian-German
GRE Greek
ICE Icelandic
ITA Italian
JPE Japanese-English
JPK Japanese Katakana
KOR Korean
NOR Norwegian
POR Portuguese
SPA Spanish
SWE Swedish
SWF Swiss-French
SWG Swiss-German
TUR Turkish
UK English (U.K.)
USA English (U.S.A.)

The default for the Language variable is determined by the value of the LANG environment variable, as described in "HCON Session Profile Characteristics".

-m ModelNumber Specifies the 3270 display model to be emulated. The following values are valid for the ModelNumber variable:
2 3278/79 model 2: screen size is 24 rows by 80 columns (default).
3 3278/79 model 3: screen size is 32 rows by 80 columns.
4 3278/79 model 4: screen size is 43 rows by 80 columns.
5 3278/79 model 5: screen size is 27 rows by 132 columns.
Notes:
  1. The -m flag is valid only for DFT, HIA, and TCP/IP display sessions.
  2. For SNA DFT display sessions, the exact model size is determined from the host definition; the model number indicated here is the maximum model size the display can support.
  3. The -m flag is not valid for non-SNA DFT printer sessions and SNA standalone sessions.
-N LoginName Specifies a valid HCON user name. If the -N flag is not used, the mkhcons command uses the current login name.
Note: Either the name specified by the LoginName variable or the current login name must have been previously registered with HCON. Use the smit hcon command or the mkhconu command to do this.
-n SessionName Specifies the name of the session profile to be created. The session profile name is a single character in the range of a through z. Capital letters are interpreted as lowercase letters. The name specified by the SessionName variable must not be the name of a previously defined session profile for the user.

The -n flag is required for all session types.

-P LocalPrinterName Specifies the name of the local printer used by the emulator to service either print requests from the host or print-screen requests via the emulator PRINT key. The LocalPrinterName variable can be up to thirty-two characters and specifies the queue name of the printer. The default is lp0.

For printer sessions, the -P flag cannot be used with the -v flag.

-p DeviceName Specifies the communication device name. The DeviceName variable consists of up to 10 characters giving the device name. For DFT display and non-SNA DFT printer session profiles, the device name is the 3270 Connection Adapter device name (3270cX, where X is a numeral in the range of 0 to 7). The default for a DFT session is 3270c0. For HIA display session profiles, the device name is always hia0.

The -p flag is not valid for SNA standalone display, printer sessions, or TCP/IP sessions.

-q FxferWait Specifies the amount of time the file transfer process (dfxfer) waits for more file transfer requests before terminating. If the dfxfer process is running in implicit mode, the associated session also remains logged onto the host during the wait period. The dfxfer process terminates after the wait period is over and no requests have been received.

The FxferWait variable must be a number of minutes up to 999. The default delay is 0 (zero).

A value of 0 (zero) indicates that the file transfer process should log off the host and exit immediately after completing the last file transfer.

A value of 999 indicates that the file transfer process should never terminate. For implicit file transfers, a value of 999 causes the associated session to remain logged onto the host indefinitely.

The -q flag is valid only with display session profiles.

-R FxferRecoverTime Specifies the length of time in minutes that the file transfer process should attempt recovery during file transfer. The FxferRecoverTime variable must be a number of minutes up to 999. The recovery time is only in effect when the file transfer is performed implicitly. A value of 0 (zero) is the default and indicates that no recovery should be performed.

The -R flag is valid only with display session profiles.

-r ReplaceFileName Specifies the file to be used by the emulator REPLS (file replace) key. The default is the $HOME/e789_repls file. Each time the REPLS key is pressed, the current screen is saved in the file identified by this 1022-character field. The image overlays any data in the file, including previous screen images.

The actual file name is the value of this field concatenated with a period and the session name. For example, if /home/rps/replace is specified as the file name and the name of the session is a , the current screen image is saved in the /home/rps/replace.a  file.

The -r flag is valid only with display session profiles.

-s SaveFileName Specifies the file to be used by the emulator SAVES (file save) key. The default is the $HOME/e789_saves file. Each time the SAVES key is pressed, the current screen is appended to the file identified by this 1022-character field.

The actual file name is the value of this field concatenated with a period and the session name. For example, if /home/rps/save is specified as the file name and the name of the session is a , the current screen image is appended to the /home/rps/save.a file.

The -s flag is valid only with display session profiles.

-T EnableAutologTrace Specifies whether a trace should be sent to standard output during an automatic host login using the AUTOLOG facility. The trace contains a listing of the AUTOLOG script followed by the status of each step executed during the login process. The EnableAutologTrace variable must be either yes or no. The default is no.

The -T flag is valid only for display session profiles.

-t SessionType Specifies the session type. The session types are:
dt DFT display session (default).
dp non-SNA DFT printer session.
ht HIA display session.
st SNA standalone display session.
sp SNA standalone printer session.
tt TCP/IP display session.

If the -t flag is not used, the mkhcons command attempts to create a profile for a DFT display session.

-u 'SessionUse' Describes the session profile. The SessionUse variable must be a text string of up to 20 ASCII characters. The string must be enclosed in single quotation marks. The default is a blank string.

The SessionUse text is shown in the Operator Information Area (OIA) during emulation sessions. The text is also shown in the list of session profiles displayed by the lshconp command.

Note: For SNA standalone sessions, to see both the SNA Logical Connection Profile name and the Session Use characteristic in the Session Use field in the OIA, use only 10 characters for the Session Use characteristic and 5 characters for the SNA Logical Connection Profile or Prefix name.
-v PrintFile Specifies the name of the file in which to store printer output instead of spooling it to a physical printer. The default is blank.

The -v flag is valid only for printer session profiles and cannot be used with the -P flag.

-W AutologTimeOut Specifies the amount of time, in seconds, that an AUTOLOG procedure should wait for the specified prompt to be sent from the host system. The valid range for the AutologTimeout variable is 0 to 99.

If the specified prompt is received before the timeout period is complete, the AUTOLOG facility immediately sends the specified input to the host and proceeds to the next event. If the timeout period is reached without receiving the prompt, the AUTOLOG facility proceeds to the next unsuccessful event number.

A default delay of 0 seconds is used if the -W flag is omitted. A value of 0 (zero) indicates that the next step should be performed immediately.

The -W flag is valid only for display session profiles.

-w 'SNAProfile' Specifies the SNA Services logical connection profile to be used by SNA Services when establishing host communication. If LU pooling is desired, specify the logical connection prefix followed by an * (asterisk) instead of the actual logical connection profile name. For more information about pooling see "HCON Display Session Pooling". The logical connection profile must be of type LU1 or LU3 for SNA standalone printer sessions, or type LU2 for SNA standalone display sessions. The profile does not have to be previously configured; however, it must be configured before the emulator is invoked. The string must be enclosed in single quotation marks. There is no default for the SNAProfile variable.
Notes:
  1. The -w flag is valid only for SNA standalone session profiles.
  2. For LU pooling, see examples 4 and 5 to create display and printer session profiles.
-x HostLoginName Specifies the default host login name, to be used by the file transfer program and API for automatic logins. The HostLoginName variable can be up to eight characters. The default is a blank string.

The -x flag is valid only for display session profiles.

Error Codes

0 Successful.
14 ODM Fatal Error: The database may be damaged. Use local problem reporting procedures.
15 The user specified by the LoginName variable is not a valid user.
19 The database is either damaged or deleted. Use local problem reporting procedures.
21 The user who issued the command does not have access to the session profiles for the user specified by the LoginName variable (or the current user if the -N flag was not used).
22 Either the user specified by the LoginName variable or the current user is not defined to HCON.
28 The session type specified with the -t flag is not valid (mkhcons command only).
30 The command cannot obtain the current user name. This message can occur only when the -N flag is not specified.
31 The session name specified with the -n flag is not defined for the user in question (chhcons command only).
34 The -n flag was not specified or was specified without a SessionName variable.
36 Do not specify a session type when modifying a session profile (chhcons command only).
37 One of the flags specified is not valid with this session type.
38 The specified value of the HostType variable is not valid.
42 The specified value of the FxferDirection variable is not valid.
44 The specified value of the Language variable is not valid.
46 The specified value of the ModelNumber variable is not valid.
50 Cannot initiate an ODM connection.
52 The session name designated with the -n flag is not valid.
53 The session profile specified with the -n flag already exists.
54 Specified value of the FxferWait variable is not valid.
55 Specified value of the FxferRecoveryTime variable is not valid.
56 Specified value of the PortAddress variable is not valid (printer sessions only).
59 Specified value of the MaxBufferSize variable is not valid.
60 You cannot use both the -P flag and the -v flag (printer sessions only).
61 You did not specify a parameter for one of the flags.
63 The maximum length of the SessionUse variable is 20 characters.
64 The maximum length of the DeviceName variable is 11 characters.
65 The maximum length of the KeyboardTable variable is 1024 characters.
66 The maximum length of the ColorTable variable is 1024 characters.
67 The maximum length of the SaveFileName variable is 1022 characters.
68 The maximum length of the ReplaceFileName variable is 1022 characters.
69 The maximum length of the LoginName variable is 8 characters.
70 The maximum length of the FxferProgram variable is 8 characters.
71 The maximum length of the LocalPrinterName variable is 32 characters.
72 The maximum length of the PrintFile variable is 1024 characters.
73 The specified DeviceName value is not valid.
74 The specified KeyboardTable value is not valid.
75 The specified ColorTable value is not valid.
76 The specified SaveFileName value is not valid.
77 The specified ReplaceFileName value is not valid.
78 The specified FxferProgram value is not valid.
80 The maximum length of the AutologNodeID variable is 18 characters.
81 The specified AutologTimeOut value is not valid.
82 The specified EnableAutologTrace value is not valid.
85 You must specify either the -P flag or the -v flag for a printer session profile.
87 The maximum length of the SNAProfile variable is 14 characters.
92 The specified HostName value is not valid.
93 The maximum length of the HostName variable is 255 characters.

Examples

  1. To add a DFT display session profile for user bob , with individualized color and keyboard support, connecting to a VM/CMS host, enter:
    mkhcons -n -u 'VM in California'
    -p 3270c0 -m -l USA -k /home/bob/keyboardCA
    -c /home/bob/colorVM -H CMS -x bob 
    -f 'IND$FILE' -d down -t dt
    This creates session profile a for the current user, with the following parameters. The mkhcons command creates the session profile with the default values for all other parameters. Notes:
    1. You currently must be logged in with a valid HCON user name to use the mkhcons command without the -N flag.
    2. If the text you enter for the mkhcons command extends beyond the limit of the screen, the text wraps automatically to the next line. Pressing the Enter key to wrap the text may cause an error.
  2. To add an HIA display session profile for user tom , connecting to a TSO host, enter:
    mkhcons -n -u 'HIA display'
    -p hia0 -H TSO -N tom -t ht
    This creates session profile b for user tom , with the default values for most parameters. The values of the following parameters are changed from the defaults by the flags used with the mkhcons command:
  3. To add a non-SNA DFT printer session, enter:
    mkhcons -n -u 'Printer' -p 3270c0
    -l USA -P lp0 -C 00 -t dp
    This creates session profile g for the current user, with the following values for the session parameters:
  4. To add an SNA standalone display session profile, enter:
    mkhcons -n c -w 'SNALU*' -t st
    This creates session profile c for the current user, with the following values for the session parameters:
  5. To add an SNA standalone printer session profile, enter:
    mkhcons -n e -w 'SNALU3' -t sp
    -v sna_prt_file
    This creates session profile e for the current user, with these session parameter values:
  6. To add a TCP/IP display session profile, enter:
    mkhcons -n a -I MIKEVM -u 'TCP/IP Display' -t tt
    This creates session profile a for the current user, with the following session parameter values:

Files

/usr/bin/mkhcons Contains the mkhcons command.
/usr/lib/hcon
                          Contains HCON files.
/usr/lib/hcon/e789_ctbl
                          Default binary color definition table.
/usr/lib/hcon/e789_ktbl
                          Default binary keyboard definition table.
$HOME/usrprofs Contains the user's session profiles.
$HOME/usrprofs.vc Contains the user's session profiles.
$HOME/usrdflts Contains the defaults for the user's session profiles.
$HOME/usrdflts.vc Contains the defaults for the user's session profiles.
$HOME/e789_saves.SessionName Default file for emulator SAVES function.
$HOME/e789_repls.SessionName Default file for emulator REPLS function.

Related Information

To start SMIT for use with HCON, use the smit hcon command.

To create an HCON user, use SMIT or the mkhconu command.

To list HCON users, use SMIT or the lshconu command.

To modify an existing session profile, use SMIT or the chhcons command.

To list a user's existing HCON session profiles, use SMIT or the lshconp command.

To list the parameters of an existing session profile, use SMIT or the lshcons command.

To find out the session type of an existing profile, use the clhcons command.

To remove an HCON session profile, use SMIT or the rmhcons command.

The e789 command starts an HCON session. The fxfer command transfers files.

HCON Sessions and Session Profiles.

System Management Interface Tool (SMIT): Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.


[ Previous | Next | Contents | Search ]