ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/QsnCrtSsn.htm

1319 lines
40 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>Create a Session (QsnCrtSsn) API</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- DSMMST1 SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 29 Jan 1999 at 16:05:09 -->
<!--File Edited November 2001 -->
<!-- Change history: -->
<!-- 030718 KYLEG :Document new scroller width limit -->
<!-- for DSM D99394 and remove other -->
<!-- DBCS restrictions. -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>Create a Session (QsnCrtSsn) API</h2>
<div class="box" style="width: 75%;">
<br>
&nbsp;&nbsp;Required Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Session description</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Length of session description</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Omissible Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">3</td>
<td align="left" valign="top" width="50%">User extension information</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Length of user extension information</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Start session flag</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(1)</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Window description</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">7</td>
<td align="left" valign="top">Length of window description</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="left" valign="top">Low-level environment description</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">9</td>
<td align="left" valign="top">Length of low-level environment description</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">10</td>
<td align="left" valign="top">Session handle</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">11</td>
<td align="left" valign="top">Error code</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Returned Value:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%"></td>
<td align="left" valign="top" width="50%">Session handle</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Service Program: QSNAPI<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Create a Session (QsnCrtSsn) API creates a session and returns a handle
for the created session. The session must be deleted using the Delete Low-Level
Environment (QsnDltEnv) API.</p>
<br>
<h3>Authorities and Locks</h3>
<p>None.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Session description</strong></dt>
<dd>INPUT; CHAR(*)
<p>The defined attributes of the session to be created. It must be declared
aligned on a 16-byte boundary. The format of the session description is shown
in <a href="#HDRSSDESC">Format of the Session Description</a>.</p>
</dd>
<dt><strong>Length of session description</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the session description parameter.</p>
</dd>
</dl>
<br>
<h3>Omissible Parameter Group</h3>
<dl>
<dt><strong>User extension information</strong></dt>
<dd>INPUT; CHAR(*)
<p>Information that is used to associate data and exit routines with the
session. This parameter is required if the user extension information length
parameter is supplied. This essentially enables the object-oriented programming
concept of inheritance, allowing the session to be extended in a natural way.
The user extension data cannot be changed once the session has been created.
The format of this parameter is shown in the section <a href="#HDRSSEXT">Format
of the Session User Extension Data</a>.</p>
</dd>
<dt><strong>Length of user extension information</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the user extension information parameter.</p>
</dd>
<dt><strong>Start session flag</strong></dt>
<dd>INPUT; CHAR(1)
<p>Whether or not the session should be displayed on screen when it is created.
The possible values are:</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">Do not display the session on the screen when it is created.
If you specify this value, you must use the Start a Window (QsnStrWin) API to
display the session.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">Display the session on the screen when it is created. This is
the default.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Window description</strong></dt>
<dd>INPUT; CHAR(*)
<p>The defined attributes for the window containing the session. This parameter
is required if the window description length parameter is supplied. The format
of the window description is shown in <a href="QsnCrtWin.htm#HDRWNDESC">Format
of the Window Description</a>. If this parameter is omitted, a window will be
created with default values.</p>
</dd>
<dt><strong>Length of window description</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the window description parameter.</p>
</dd>
<dt><strong>Low-level environment description</strong></dt>
<dd>INPUT; CHAR(*)
<p>operating environment for low-level operations used to create and manipulate
the windows. This parameter is required if the low-level environment
description length parameter is supplied. The format of the low-level
environment description is shown in <a href="QsnCrtEnv.htm#HDRLLDESC">Format of
the Low-Level Environment Description</a>. If this parameter is omitted, a
low-level environment will be created with default values.</p>
</dd>
<dt><strong>Length of low-level environment description</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the low-level environment description parameter.</p>
</dd>
<dt><strong>Session handle</strong></dt>
<dd>OUTPUT; BIN(4)
<p>The variable containing a handle for the created session after the QsnCrtSsn
API has completed. This handle can be used across activation groups if the
activation group in which the handle was created is still active.</p>
</dd>
<dt><strong>Error code</strong></dt>
<dd>I/O; CHAR(*)
<p>The structure in which to return error information. For the format of the
structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>. If this
parameter is omitted, diagnostic and escape messages are issued to the
application.</p>
</dd>
</dl>
<br>
<h3>Returned Value</h3>
<dl>
<dt><strong>Session handle</strong></dt>
<dd>OUTPUT; BINARY(4)
<p>This API returns the value for the session handle parameter or -1 if an
error occurs during processing.</p>
</dd>
</dl>
<br>
<h3><a name="HDRSSDESC">Format of the Session Description</a></h3>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">PTR(PP) [24]</td>
<td align="left" valign="top" width="60%">Array of command key actions</td>
</tr>
<tr>
<td align="center" valign="top">384</td>
<td align="center" valign="top">180</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">top row of scroller</td>
</tr>
<tr>
<td align="center" valign="top">388</td>
<td align="center" valign="top">184</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">left column of scroller</td>
</tr>
<tr>
<td align="center" valign="top">392</td>
<td align="center" valign="top">188</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of rows in scroller</td>
</tr>
<tr>
<td align="center" valign="top">396</td>
<td align="center" valign="top">18C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of columns in scroller</td>
</tr>
<tr>
<td align="center" valign="top">400</td>
<td align="center" valign="top">190</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Default number of rows to roll scroller by</td>
</tr>
<tr>
<td align="center" valign="top">404</td>
<td align="center" valign="top">194</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Default number of columns to shift scroller
by</td>
</tr>
<tr>
<td align="center" valign="top">408</td>
<td align="center" valign="top">198</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Scroller buffer initial size</td>
</tr>
<tr>
<td align="center" valign="top">412</td>
<td align="center" valign="top">19C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Scroller buffer maximum size</td>
</tr>
<tr>
<td align="center" valign="top">416</td>
<td align="center" valign="top">1A0</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Scroller buffer increment</td>
</tr>
<tr>
<td align="center" valign="top">420</td>
<td align="center" valign="top">1A4</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of rows for input line</td>
</tr>
<tr>
<td align="center" valign="top">424</td>
<td align="center" valign="top">1A8</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Reserved</td>
</tr>
<tr>
<td align="center" valign="top">425</td>
<td align="center" valign="top">1A9</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Wrap indication</td>
</tr>
<tr>
<td align="center" valign="top">426</td>
<td align="center" valign="top">1AA</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Reserved</td>
</tr>
<tr>
<td align="center" valign="top">427</td>
<td align="center" valign="top">1AB</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Display control characters indication</td>
</tr>
<tr>
<td align="center" valign="top">428</td>
<td align="center" valign="top">1AC</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Echo session input</td>
</tr>
<tr>
<td align="center" valign="top">429</td>
<td align="center" valign="top">1AD</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Show scroller lines</td>
</tr>
<tr>
<td align="center" valign="top">430</td>
<td align="center" valign="top">1AE</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Show scroller characters</td>
</tr>
<tr>
<td align="center" valign="top">431</td>
<td align="center" valign="top">1AF</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Show command key descriptions</td>
</tr>
<tr>
<td align="center" valign="top">432</td>
<td align="center" valign="top">1B0</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Command key attribute for a monochrome
display</td>
</tr>
<tr>
<td align="center" valign="top">433</td>
<td align="center" valign="top">1B1</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Command key attribute for a color display</td>
</tr>
<tr>
<td align="center" valign="top">434</td>
<td align="center" valign="top">1B2</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Input line attribute for a monochrome
display</td>
</tr>
<tr>
<td align="center" valign="top">435</td>
<td align="center" valign="top">1B3</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Input line attribute for a color display</td>
</tr>
<tr>
<td align="center" valign="top">436</td>
<td align="center" valign="top">1B4</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to input line prompt</td>
</tr>
<tr>
<td align="center" valign="top">440</td>
<td align="center" valign="top">1B8</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of input line prompt</td>
</tr>
<tr>
<td align="center" valign="top">444</td>
<td align="center" valign="top">1BC</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to command key description line 1</td>
</tr>
<tr>
<td align="center" valign="top">448</td>
<td align="center" valign="top">1C0</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of command key description line 1</td>
</tr>
<tr>
<td align="center" valign="top">452</td>
<td align="center" valign="top">1C4</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to command key description line 2</td>
</tr>
<tr>
<td align="center" valign="top">456</td>
<td align="center" valign="top">1C8</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of command key description line 2</td>
</tr>
<tr>
<td align="center" valign="top">460</td>
<td align="center" valign="top">1CC</td>
<td align="left" valign="top">CHAR(20)</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">*</td>
<td align="center" valign="top">*</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Input line prompt</td>
</tr>
<tr>
<td align="center" valign="top">*</td>
<td align="center" valign="top">*</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Command key description line 1</td>
</tr>
<tr>
<td align="center" valign="top">*</td>
<td align="center" valign="top">*</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Command key description line 2</td>
</tr>
</table>
<br>
<br>
<h3>Field Descriptions</h3>
<p>In the following descriptions, the default value refers to the value set by
the Initialize Session Description (QsnInzSsnD) API.</p>
<p><strong>Array of command key actions.</strong> An array of 24 function
pointers, each corresponding to the action to be performed when the associated
command key is pressed. An element that is specified as a null pointer
indicates that the command key is invalid. An element can also be set to the
dummy routine QsnSameAction, in which case the current action routine for that
key is used. If a command key action is set to the dummy routine
QsnDefaultAction, then the default action for that key is used. The defaults
for command key actions and the parameters passed to the action routines are
described in <a href="dsm3c.htm#HDRCMDKEY">Command Key Action
Routines</a>. The procedures are exported as part of the service program that
contains the DSM session services.</p>
<p><strong>Command key attribute for a color display.</strong> The default
value is X'28' for red.</p>
<p><strong>Command key attribute for a monochrome display.</strong> The default
value is X'20' for normal attribute.</p>
<p><strong>Command key description line 1.</strong> The text string for the
first line of command key descriptions.</p>
<p><strong>Command key description line 2.</strong> The text string for the
second line of command key descriptions.</p>
<p><strong>Default number of columns to shift scroller by.</strong> The default
number of columns to shift scroller by for the Shift Scroller left (QsnShfSclL)
and Shift Scroller center (QsnShfSclR) APIs. This value must be a positive
integer value. If 0 is specified, the default is the number of columns in the
scroller less two (two scroller columns are reserved for the prefix area).</p>
<p><strong>Default number of rows to roll scroller by.</strong> The default
number of rows to roll scroller by for the Roll Scroller Up (QsnRollSclUp) and
Roll Scroller Down (QsnRollSclDown) APIs. This value must be a positive integer
value. If 0 is specified, the default is the number of rows in the
scroller.</p>
<p><strong>Display control characters indication.</strong> Specifies whether or
not scroller lines contain EBCDIC display control characters. If the data
contains such control characters and this is not indicated, unexpected results
can occur. (See <a href="dsm3c.htm#HDREBCDICC">EBCDIC Display Control
Characters</a> for details of the control characters supported and their
interpretation.) The possible values are:</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">Scroller lines do not contain EBCDIC display control
characters. This is the default when the display device or emulator does not support DBCS
data.
</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">Scroller lines contain EBCDIC display control characters. If 1
is specified, any data written to the session with a value below X'40' is
converted to blank. This is the default when the display device or emulator supports DBCS
data.</td>
</tr>
</table>
<p><strong>Echo session input.</strong> Specifies whether lines entered at the
session command line are to be echoed to the scroller. The possible values
are:</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">Do not echo session input lines to the scroller.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">Echo session input lines to the scroller. This is the
default.</td>
</tr>
</table>
<p><strong>Input line attribute for a color display.</strong> The default value
is X'24' for green underline attribute. If X'00' is specified, the default
value is used.</p>
<p><strong>Input line attribute for a monochrome display.</strong> The default
value is X'24' for underline attribute. If X'00' is specified, the default
value is used.</p>
<p><strong>Input line prompt.</strong> The text string for the input line
prompt.</p>
<p><strong>Left column of scroller.</strong> This position is relative to the
left of the window which is column 1. The default is 1.</p>
<p><strong>Length of command key description line 1.</strong> This value must
not exceed the maximum number of columns in the window. The default value is 0.
No space is used in the session for this line. If the description line cannot
be displayed completely within the window, it is truncated to fit.</p>
<p><strong>Length of command key description line 2.</strong> This value must
not exceed the maximum number of columns in the window. The default value is 0.
No space is used in the session for this line. If the description cannot be
displayed completely in the window, it is truncated to fit.</p>
<p><strong>Length of input line prompt.</strong> This value must not exceed the
maximum number of columns in the window. A value of 0 specifies that there is
no prompt. The default value is -1 and corresponds to the default input line
prompt ===.</p>
<p>If the input line cannot be displayed completely within the window, it is
truncated to fit. The input line will continue on the next window line.</p>
<p><strong>Number of columns in scroller.</strong> This value must be a
positive integer no greater than the number of columns in the session window.
If 0 is specified, the default is the number of columns remaining in the window
from the left column of the scroller. This value includes the 2 bytes used for
the prefix area to the left of the scroller input line.</p>
<p>If the low level environment supports DBCS, this value must be greater than or
equal to 6 to allow for the size of the prefix area, the shift control (SO/SI)
characters and one DBCS character.
</p>
<p>
If the display device or emulator supports CCSID-based I/O, this value must be
greater than or equal to 4 to allow for the size of the prefix area and one
UCS2 character.</p>
<p><strong>Number of rows for input line.</strong> The input line starts in the
row specified by the formula: last window row less the number of rows required
for input line less the number of rows required for the function key
descriptions. The input line will start one column past the end of the input
line prompt. If there is no input line prompt, then the input line starts one
byte to the center of the leftmost usable column of the window. If this value
is 0, then no input line is created. The default is 1.</p>
<p><strong>Number of rows in scroller.</strong> This value must be a positive
integer no greater than the number of rows in the session window. If 0 is
specified, the default is the number of rows remaining in the window from the
top row of the scroller.</p>
<p><strong>Offset to command key description line 1.</strong> The offset from
the beginning of the structure to the start of the command key description line
1. This field is ignored if the length of command key description line 1 field
specifies no command key description. The offset plus the length must be less
than the session description length.</p>
<p><strong>Offset to command key description line 2.</strong> The offset from
the beginning of the structure to the start of the command key description line
2. This field is ignored if the length of command key description line 2 field
specifies no command key description. The offset plus the length must be less
than the session description length.</p>
<p><strong>Offset to input line prompt.</strong> The offset from the beginning
of the structure to the start of the input line prompt. This field is ignored
if the length of input line prompt field specifies no prompt or the default
prompt. The offset plus the length must be less than the session description
length.</p>
<p><strong>Reserved.</strong> This field must be set to X'00'.</p>
<p><strong>Scroller buffer increment.</strong> Specifies, in bytes, the amount
to increment the scroller buffer size by when the buffer is full and the
buffer-full action is to increment the buffer size. The default value is 2000
bytes.</p>
<p>If the scroller buffer cannot be incremented because of insufficient
resources, data at the beginning of the scroller will be removed to create
space for the new data.</p>
<p><strong>Scroller buffer initial size.</strong> The initial buffer size, in
number of bytes, that will be allocated for storing the session scroller lines.
The default value is 2000 bytes.</p>
<p><strong>Scroller buffer maximum size.</strong> The maximum buffer size, in
bytes, that will be allocated for storing the session scroller lines. The
default value is 0, indicating no maximum size.</p>
<p><strong>Show command key descriptions.</strong> Whether or not the function
key description lines are to be shown. The possible values are:</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">Do not show function key descriptions.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">Show function key descriptions. This is the default.</td>
</tr>
</table>
<p><strong>Show scroller characters.</strong> Whether or not characters written
to the scroller in character mode are shown immediately on the screen. You can
use the scroller line and character display options together to specify that
groups of characters are not displayed immediately, but each complete line is.
The possible values are:</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">Do not show characters on the screen as they are written. Use
the Display Scroller bottom (QsnDspSclB) API to display the scroller data on
the screen. This is the default.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">Show scroller characters on the screen as they are
written.</td>
</tr>
</table>
<p><strong>Show scroller lines.</strong> Whether or not lines written to the
scroller are shown immediately on the screen. The possible values are:</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">Do not show scroller lines on the screen as they are written.
Use the Display Scroller bottom (QsnDspSclB) API to display the scroller lines
on the screen. This is the default.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">Show scroller lines on the screen as they are written.</td>
</tr>
</table>
<p><strong>Top row of scroller.</strong> This position is relative to the top
of the window, which is row 1. The default is 1.</p>
<p><strong>Wrap indication.</strong> How to handle lines that do not fit within
the session window. Possible values are:</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">Truncate lines that do not fit. The truncated portion of the
line may be viewed by scrolling to the center.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">Wrap lines to the next line. This is the default.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRSSEXT">Format of the Session User Extension Data</a></h3>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">PTR(SPP)</td>
<td align="left" valign="top" width="60%">User data associated with the
session</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">PTR(PP)</td>
<td align="left" valign="top">Exit routine to call when the session is
changed</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="left" valign="top">PTR(PP)</td>
<td align="left" valign="top">Exit routine to call when window is deleted</td>
</tr>
<tr>
<td align="center" valign="top">48</td>
<td align="center" valign="top">30</td>
<td align="left" valign="top">PTR(PP)</td>
<td align="left" valign="top">Exit routine to call when window coordinates are
changed</td>
</tr>
<tr>
<td align="center" valign="top">64</td>
<td align="center" valign="top">40</td>
<td align="left" valign="top">PTR(PP)</td>
<td align="left" valign="top">Exit routine to call when window is drawn</td>
</tr>
<tr>
<td align="center" valign="top">80</td>
<td align="center" valign="top">50</td>
<td align="left" valign="top">PTR(PP)</td>
<td align="left" valign="top">Exit routine to call when this window made
current</td>
</tr>
</table>
<br>
<br>
<h3>Field Descriptions</h3>
<p><strong>Exit routine to call when session changed.</strong> The exit routine
to call when a session is changed using the Change Session (QsnChgSsn) API.</p>
<p><strong>Exit routine to call when window coordinates changed.</strong> The
exit routine to call when the window coordinates are changed using the
QsnMovWin, Move Window by User (QsnMovWinUsr), Resize Window ( QsnRszWin), or
Resize Window by User (QsnRszWinUsr), APIs.</p>
<p><strong>Exit routine to call when window deleted.</strong> The exit routine
to call when a window is deleted using the Delete Low-Level Environment
(QsnDltEnv) API.</p>
<p><strong>Exit routine to call when window drawn.</strong> The exit routine to
call when a window is drawn using the Display Window (QsnDspWin) API.</p>
<p><strong>Exit routine to call when window made current.</strong> The exit
routine to call when this window is made current using the Set Current Window
(QsnSetCurWin) API.</p>
<p><strong>User data associated with the session.</strong> This is a pointer to
any data that the user wants to associate with this session.</p>
<br>
<h3>Session Exit Routines</h3>
<p>Exit routines are user-supplied functions with a defined interface. The
routines are called from certain APIs and allow the programmer to attach
additional function to those APIs. For instance, if fields have been set up in
a window, a Change Coordinates exit routine could be supplied to move the
fields if the window is moved.</p>
<br>
<h3>Change Session Exit Routine</h3>
<p>This exit routine, if specified on the user extension information, is called
when the session is changed. The following parameter is passed to the exit
routine:</p>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Parameter Passed to Exit Routine<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Session handle</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
</table>
<!-- iddvc RMBR -->
<br>
</div>
<br>
<br>
<h3>Change Session Exit Routine Parameter</h3>
<dl>
<dt><strong>Session handle</strong></dt>
<dd>INPUT; BINARY(4)
<p>The session that was changed.</p>
</dd>
</dl>
<br>
<h3>Delete Session Exit Routine</h3>
<p>This exit routine, if specified on the user extension information, is called
when the session is deleted. The following parameter is passed to the exit
routine:</p>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Parameter Passed to Exit Routine<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Session handle</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
</table>
<!-- iddvc RMBR -->
<br>
</div>
<br>
<br>
<h3>Delete Session Exit Routine Parameter</h3>
<dl>
<dt><strong>Session handle</strong></dt>
<dd>INPUT; BINARY(4)
<p>The session that was deleted.</p>
</dd>
</dl>
<br>
<h3>Change Session Coordinates Exit Routine</h3>
<p>This exit routine, if specified on the user extension information, is called
when the move or resize APIs are called. It is called after the session has
been successfully moved or resized, but before the session is drawn on the
screen. For this reason, you should not use this exit routine to draw anything
in the session. The draw exit routine will be called when the session is moved
or resized. The following parameters are passed to the exit routine:</p>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Parameters Passed to Exit Routine<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Session handle</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Top border offset</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Left border offset</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Bottom border offset</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Center border offset</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
</table>
<!-- iddvc RMBR -->
<br>
</div>
<br>
<br>
<h3>Change Session Coordinates Exit Routine Parameters</h3>
<dl>
<dt><strong>Session handle</strong></dt>
<dd>INPUT; BINARY(4)
<p>The Session for which the coordinates were changed.</p>
</dd>
<dt><strong>Top border offset</strong></dt>
<dd>INPUT; BINARY(4)
<p>The offset, in screen rows, from the previous top session border to the
current top session border (after the session coordinates have been changed).
It can be positive, negative, or zero, depending on how the top session border
was changed. For example, if the top border was moved down two rows, this value
would be 2; if it was moved up 4 rows, this value would be -4; if the top row
was not changed, this value would be 0.</p>
</dd>
<dt><strong>Left border offset</strong></dt>
<dd>INPUT; BINARY(4)
<p>The offset, in screen columns, from the previous left session border to the
current left session border (after the session coordinates have been changed).
It can be positive, negative, or zero, depending on how the left session border
was changed. For example, if the left border was moved two columns to the
center, this value would be 2; if it was moved 4 columns to the left, this
value would be -4, and if the left column was not changed, this value would be
0.</p>
</dd>
<dt><strong>Bottom border offset</strong></dt>
<dd>INPUT; BINARY(4)
<p>The offset, in screen rows, from the previous bottom session border to the
current bottom session border (after the session coordinates have been
changed). It can be positive, negative, or zero, depending on how the bottom
session border was changed. For example, if the border was moved down two rows,
this value would be 2; if it was moved up 4 rows, this value would be -4; if
the bottom row was not changed, this value would be 0.</p>
</dd>
<dt><strong>Center border offset</strong></dt>
<dd>INPUT; BINARY(4)
<p>The offset, in screen columns, from the previous center session border to
the current center session border (after the session coordinates have been
changed). It can be positive, negative, or zero, depending on how the center
session border was changed. For example, if the center border was moved two
columns to the center, this value would be 2; if it was moved 4 columns to the
left, this value would be -4; if the center column was not changed, this value
would be 0.</p>
</dd>
</dl>
<br>
<h3>Exit Routine Error Handling</h3>
<p>If an exception occurs during the processing of an exit routine, the
exception is ignored and processing continues. A CPFA318 will be issued as a
diagnostic message only. You can explicitly handle errors in an exit routine by
adding an exception handler to the routine.</p>
<br>
<h3>Draw Session Exit Routine</h3>
<p>This exit routine, if specified on the user extension information, is called
when the Display Window (QsnDspWin) API is called, before the session is drawn.
Because the exit routine is called before the session is drawn, you should only
write inside the session using the command buffer parameter. Direct operations
should not be used for the exit routine.</p>
<p>The following parameters are passed to the exit routine:</p>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Parameters Passed to Exit Routine<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Session handle</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Command buffer</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
</table>
<!-- iddvc RMBR -->
<br>
</div>
<br>
<br>
<h3>Draw Session Exit Routine Parameters</h3>
<dl>
<dt><strong>Session handle</strong></dt>
<dd>INPUT; BINARY(4)
<p>The session to be drawn.</p>
</dd>
<dt><strong>Command buffer</strong></dt>
<dd>INPUT; BINARY(4)
<p>The command buffer used to store the commands that re-create the window
contents. The contents of the command buffer are written to the screen along
with the window border. This allows the window and its contents to be redrawn
in a single I/O operation.</p>
</dd>
</dl>
<br>
<h3>Current Session Exit Routine</h3>
<p>This exit routine, if specified on the user extension information, is called
when the session is made current through the Set Current Window (QsnSetCurWin)
API. The following parameter is passed to the exit routine:</p>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Parameter Passed to Exit Routine<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Session handle</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
</table>
<!-- iddvc RMBR -->
<br>
</div>
<br>
<br>
<h3>Current Session Exit Routine Parameter</h3>
<dl>
<dt><strong>Session handle</strong></dt>
<dd>INPUT; BINARY(4)
<p>A handle for the session that is made current.</p>
</dd>
</dl>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="3">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td align="left" valign="top">CPF24B4 E</td>
<td valign="top">Severe error while addressing parameter list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C1D E</td>
<td valign="top">Length specified in parameter &amp;1 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF2 E</td>
<td valign="top">Error(s) occurred during running of &amp;1 API.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA314 E</td>
<td valign="top">Memory allocation error.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA318 E</td>
<td valign="top">Error calling exit routine.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA327 E</td>
<td valign="top">Low level environment description value incorrect.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA31E E</td>
<td valign="top">Required parameter &amp;1 omitted.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA343 E</td>
<td valign="top">Output operation not done.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA344 E</td>
<td valign="top">The file &amp;2 in library &amp;3 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA345 E</td>
<td valign="top">The invite active flag is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA3A1 E</td>
<td valign="top">Window description value is incorrect.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA3AB E</td>
<td valign="top">The value for &amp;1 must be '0' or '1'.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA3D1 E</td>
<td valign="top">Session description value is incorrect.</td>
</tr>
</table>
<p>Additional errors may be generated by this API. They are listed under the
applicable API as follows:</p>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top">Error Category (API)</th>
<th align="left" valign="top">Page Reference</th>
</tr>
<tr>
<td align="left" valign="top">Environment description (QsnCrtEnv)</td>
<td valign="top"><a href="QsnCrtEnv.htm#HDREDERR">Error Messages</a></td>
</tr>
<tr>
<td align="left" valign="top">Window description (QsnCrtWin)</td>
<td valign="top"><a href="QsnCrtWin.htm#HDRWDERR">Error Messages</a></td>
</tr>
</table>
<p>For examples of Create Session APIs, see <a href="dsm3d.htm#HDRSSEX">
Create Session and Read Data--Example</a>.</p>
<hr>
API introduced: V2R3
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"dsm.htm">Dynamic Screen Manager APIs</a> | <a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</center>
</body>
</html>