Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX SNAplus2 NOF Programmers Guide: HP-UX 11i > Chapter 3 NOF API Verbs (ACTIVATE_SESSION to OPEN_FILE)

DEFINE_3270_DIAG

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

DEFINE_3270_DIAG specifies the 3270 diagnostics parameters for SNAplus2: the parameters used to record and display response-time data, and the 3270 user alerts that users can send to the host NetView program. It can be used to define 3270 diagnostics parameters for the first time, or to modify an existing definition.

This verb must be issued to the domain configuration file.

VCB Structure

The DEFINE_3270_DIAG verb contains a variable number of alert_3270_data structures, each of which defines a 3270 user alert. The structures are included at the end of the diag_3270_data structure; the number of these structures is specified by the num_alerts parameter.

typedef struct define_3270_diag
{
AP_UINT16 opcode; /* verb operation code */
unsigned char reserv2; /* reserved */
unsigned char format; /* reserved */
AP_UINT16 primary_rc; /* primary return code */
AP_UINT32 secondary_rc; /* secondary return code */
DIAG_3270_DATA def_data;
} DEFINE_3270_DIAG;
typedef struct diag_3270_data
{
unsigned char rtm_overflow; /* Send RTM data at counter */
/* overflow */
unsigned char rtm_unbind; /* Send RTM data at UNBIND */
unsigned char rtm_timer_option; /* RTM timers option */
unsigned char reserv1; /* reserved */
AP_UINT16 rtm_thresh1; /* RTM threshold #1 */
AP_UINT16 rtm_thresh2; /* RTM threshold #2 */
AP_UINT16 rtm_thresh3; /* RTM threshold #3 */
AP_UINT16 rtm_thresh4; /* RTM threshold #4 */
AP_UINT16 num_alerts; /* Number of user alerts */
} DIAG_3270_DATA;
typedef struct alert_3270_data
{
AP_UINT16 overlay_size; /* reserved */
unsigned char description[53]; /* description */
unsigned char parameter1[33]; /* parameter 1 */
unsigned char parameter2[33]; /* parameter 2 */
unsigned char parameter3[33]; /* parameter 3 */
} ALERT_3270_DATA;

Supplied Parameters

The application supplies the following parameters:

opcode

AP_DEFINE_3270_DIAG

overlay_size

For compatability with future releases of SNAplus2, your application must use this field to determine the exact length of the overlay structure returned, and should not rely on the use of the sizeof() function.

def_data.rtm_overflow

Specifies whether to send RTM data to the host every time one of the RTM counters overflows (reaches its maximum value). There is a counter for each of the intervals defined by the rtm_thresh values below. Possible values are:

AP_YES

Send RTM data to the host each time a counter overflows.

AP_NO

Do not send RTM data to the host at counter overflow. RTM data may be lost when a counter overflows.

def_data.rtm_unbind

Specifies whether to send RTM data to the host every time a 3270 session is unbound (ends). Possible values are:

AP_YES

Send RTM data to the host each time a session ends.

AP_NO

Do not send RTM data to the host at session end. RTM data may be lost when the session ends.

def_data.rtm_timer_option

Specifies how the host response time is measured. The response time is defined as the interval between the user pressing ENTER or an AID key to send data to the host, and one of the following events:

AP_RTM_SCREEN

The first data from the host reaches the user's screen.

AP_RTM_UNLOCK

The host unlocks the user's keyboard.

AP_RTM_DIRECTION

The host gives the 3270 emulation program direction, so that the user can send more data.

def_data.rtm_thresh1 through def_data.rtm_thresh4

Specify the threshold values used to classify response times. These values divide the range of possible response times into five intervals (below rtm_thresh1, between rtm_thresh1 and rtm_thresh2, between rtm_thresh2 and rtm_thresh3, between rtm_thresh3 and rtm_thresh4, and above rtm_thresh4). SNAplus2 maintains a counter for each of these intervals; each time a host response is received, SNAplus2 determines which of these intervals it falls into, and increments the appropriate counter.

For each threshold, specify a number representing tenths of seconds; for example, the value 25 indicates 2.5 seconds. The values must be in the range 1-1000 (0.1 second-100 seconds), and must be in ascending order (rtm_thresh2 must be higher than rtm_thresh1, rtm_thresh3 must be higher than rtm_thresh2, and so on).

def_data.num_alerts

The number of 3270 user alerts defined for the SNAplus2 system; the range is 0-20.

The host NetView program identifies each alert by a number in the range 1-20; check with the NetView administrator at the host to determine which alert numbers are used and the meaning of each alert. The alert_3270_data structures supplied to this verb are assigned to these numbers in sequence (the first structure is assigned to alert number 1, the second structure to alert number 2, and so on). If the host does not use all the alert numbers in the range, include a blank alert structure (with all parameters set to null strings) for each unused number. For example, if the host uses only alert numbers 10 and 11, set num_alerts to 11 and include 9 blank alert structures followed by the structures for alerts 10 and 11.

For each alert, up to the number specified in num_alerts, an alert_3270_data structure is required with the following information:

alert_3270_data.description

A text description of the alert. This is an ASCII string of 1-52 characters, followed by a null character.

This description is displayed in the 3270 user interface, to identify the alert to the user. It is not sent to NetView; the NetView operator identifies the alert by its number.

alert_3270_data.parameter1 through alert_3270_data.parameter3

Text strings describing any parameters that the user should enter for the alert. Each one is an ASCII string of 1-32 characters, followed by a null character.

Check with the NetView administrator at the host to determine the parameters required for each alert. An alert may not require all three parameters; if so, specify a null string for any parameters that are not required. The user will only be prompted for a parameter if you specify a description for it.

Returned Parameters: Successful Execution

If the verb executes successfully, SNAplus2 returns the following parameters:

primary_rc

AP_OK

Returned Parameters: Other Conditions

Appendix A “Common Return Codes” lists further combinations of primary and secondary return codes that are common to all NOF verbs.

Returned Parameters: Parameter Check

If the verb does not execute because of a parameter error, SNAplus2 returns the following parameters:

primary_rc

AP_PARAMETER_CHECK

secondary_rc

Possible values are:

AP_INVALID_RTM_THRESHOLD

One or more of the supplied RTM threshold values was not in the permitted range, or the values were not in ascending order.

AP_INVALID_RTM_TIMER_OPTION

The rtm_timer_option parameter was not set to a valid value.

Appendix A “Common Return Codes” lists further secondary return codes associated with AP_PARAMETER_CHECK, which are common to all NOF verbs.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.