Ios 3270
Ios 3270
Ios 3270
This edition applies to Release 1, Modification Level 0, of Display Input/Output Facility Version 3, Program
Number 5785-HAX, and to all subsequent releases and modifications until otherwise indicated in new editions or
Technical Newsletters.
Changes are made periodically to the information herein; before using this publication in connection with the
operation of IBM systems, consult the latest IBM System/370, 30xx, 4300, and 9370 Processors: Bibliography of
Industry Systems and Application Programs, GC20-0370, for the editions that are applicable and current.
References in this publication to IBM products, programs, or services do not imply that IBM intends to make these
available in all countries in which IBM operates. Any reference to an IBM program in this publication is not
intended to state or imply that only IBM’s program may be used. Any functionally equivalent program may be
used instead.
Publications are not stocked at the address given below. Requests for IBM publications should be made to your
IBM representative or to the IBM branch office serving your locality.
A form for reader’s comments is provided at the back of this publication. If the form has been removed, comments
may be addressed to:
IBM may use or distribute whatever information you supply in any way it believes appropriate without incurring
any obligation to you.
K Copyright International Business Machines Corporation 1989. All rights reserved.. All rights reserved.
Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is
subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.
Preface
The IBM Display Input/Output Facility Version 3 (5785-HAX), referred to in this manual
as DIOF-3, enables users to benefit from the functions of IBM 3270 Display Stations
without the need to program them. Potential users are:
End users writing simple, full-screen EXECs
Application or system programmers writing full-screen front-ends to application
programs or online Help facilities.
This manual describes DIOF-3, explains how to run it, and guides the reader through the
installation phase. Please note that this manual refers to the main module of DIOF-3 as
IOS3270.
Preface iii
iv Display Input/Output Facility Version 3 PDOM
Contents
Chapter 1. Introduction 1
Chapter 3. Installation 4
3.1 Installation Prerequisites 4
Machine Requirements 4
Programming Requirements 4
3.2 Dependencies 4
3.3 Machine-readable 5
File 1 5
File 2 5
3.4 Modifying DIOF-3 6
Contents v
Appendix C. The IOSLIB Program 52
Index 70
Figures
1. In-core Interface Method 1, Basic 36
2. In-core Interface Method 1, Return of &IOSx 37
3. In-core Interface Method 2 39
4. In-core Interface Method 2, Dynamic Attributes 41
5. DYNFAMAP DSECT 42
6. Sample HNDEXT/HNDINT Assemble Code 44
7. Combining IOS3270 and EXEC Files 46
8. Combining IOS3270 and EXEC 2 Files 47
9. Combining IOS3270 and REXX Files 48
10. Prototype Entry in DMKSNT for GOODIES 54
11. IOSDYNAT EXEC 57
12. IOSIVP6 EXEC 61
Potential users are end users writing simple full-screen EXECs and applications or system
programmers writing more complicated application programs and online Help facilities.1
Input may be static, for example, a Conversational Monitor System (CMS) file, or created
dynamically in virtual storage (either directly by, for example, an Assemble program or
indirectly in the form of REXX symbols). Most users will be able to find a way to
utilize the capabilities of DIOF-3 to suit their needs.
It is important that new users do not attempt to learn all the functions available until the
need arises. Becoming aware of the various functions provided and referring to the
manual later for specific functions as they are needed is an effective way to familiarize
yourself with the program.
DIOF-3 is primarily written to display data entry panels, also referred to as (selection)
menus. A panel can be used to give explanations or to ask the operator to specify
required parameters to perform a function. Normally, it will be a combination of the two.
With DIOF-3, you can set up a panel and, using the screen, ask questions and provide
information at the same time. You can inform operators about input errors by inserting
an error message in the panel and positioning the cursor in the field in error. Asking
questions and providing information in this way is usually clearer and thus easier to do,
and results in fewer input errors than with a line-by-line mechanism.
1 Where the scope of DIOF Version 1 ranged from simple user EXECs to complex system applications, today it seems
appropriate to redirect complex (high-end), long-term applications requiring full compliance to IBM SAA to more suitable
programs such as IBM’s ISPF and/or GDDM/REXX. For Help-type applications (displaying Help panels), the CMS native
HELP function would be the correct choice.
Where these programs provide significantly more function (such as dialog management in the case of ISPF), they also require
more effort to implement. When applications do not need to fully comply to IBM’s SAA, such as small, short-term (user)
applications and special applications, users will find it beneficial to use DIOF. The short learning curve will quickly allow
users to write small full-screen applications, where adding a full-screen interface would otherwise not have been considered.
Chapter 1. Introduction 1
Chapter 2. Understanding DIOF-3
The following steps form the basic flow of DIOF-3:
1. Read caller’s input
2. Process and format the input according to the caller’s specifications
3. Display the result and wait for an interrupt, normally an operator action
4. Process operator input and pass it to the caller according to his/her specifications
5. If there is more than one panel of caller’s input, return to step 1.2 If there is no input
left, return to the caller.
All types of CMS files can be used as input for DIOF-3. However, it never reads more
than the first 160 characters of a record. These characters are then formatted and as
many as can fit on a screen row (line) are displayed. Because the first position on a row
is used by DIOF-3, this will be the screen width minus one character. If the length of a
formatted line exceeds the screen width, the output line is truncated. This may lead to
incomplete fields, for example, input fields defined with the cursor skip attribute which
do not skip. It is the user’s responsibility to prevent such an occurrence.
Sometimes it is necessary to read more characters than can fit on a screen row. An
example is an input line containing variable names that are longer than their values. The
input line may be 100 characters, but after substitution of the variables, there may only be
60 left.
2 Since DIOF-3 is primarily designed as a panel manager and not as a dialog manager, it is not advised to use this mode of
operation for data entry panels. For data output panels, there are some primitive scrolling capabilities.
Records with a semicolon (;) or a period (.) in column 1, are normally not displayed on
the screen.
All rows of a supported IBM 3270 Information Display System screen can be used. The
row length is either one or two characters less than the screen width, depending on the
type of the field that is displayed in the next to the last column in a row.
No default input area is created, and pressing the ENTER key is the signal to continue
processing.
Output from DIOF-3 from data entered on panel input fields may be returned as:
Variables
User’s virtual storage
A CMS program stack
A CMS file.
or a combination of these.
Machine Requirements
This program is designed to operate on an IBM System/370, 30XX, or 438X host
processor. Display terminals supported are all terminals compatible with 3270 data
stream display. The APL/TEXT character sets are not supported.
Programming Requirements
Display Input/Output Facility Version 3 is written for assembly by Assembler-H Version
2 (5668-962) and is designed to operate with VM/SP CMS (5664-167) Release 4 or 5 or
VM/XA SP (5664-308) Release 2 with CMS Release 5.5 (Bimodel CMS). Later versions
or releases could affect the functioning of the program. This program, as distributed,
does not require compilation.
Note: Since its creation for VM/370 Release 3, IOS3270 has run on all versions of
VM/CMS, including VM/XA-MA/SF and VM/PC. Installation on earlier versions of
releases is still possible, but may require minor source code modifications. Specifically,
the reference of CMS control blocks added in later versions will have to be handled.
Only installation on the above-mentioned programs is supported.
3.2 Dependencies
The IOS3270 program has the following dependencies:
1. The data returned from the DIAGNOSE 24 instruction to determine the terminal type
and model. This data has changed twice since the introduction of VM/370 Release 5,
to introduce new codes for the IBM 3278/79 type screens. The last change was
introduced with VM/370 Release 5, PLC 7.
2. The layout of the EXEC interpreter’s (DMSEXT) work area. As there is no external
interface to this area, the DSECT reflecting it must be corrected every time it
changes. Since DIOF-3 was written, it has changed with the introduction of
VM/370, Release 3, PLC 20, and with the introduction of BSEPP 2.1 (VM/370,
Release 6, PLC 1).
3. The EXECCOMM interface introduced with VM/SP Release 2. It has changed with
the introduction of VM/SP Release 3 to add support for REXX symbolic names.
4. The data returned from the DIAGNOSE X'8C' instruction to determine the terminal
characteristics and features. Introduced with VM/SP Release 3.
File 1
IOS3270 MODULE A2
IOS3270 XMOD A2
IOS3270 IOS3270 A2
IOSPAGE IOS3270 A2
IOSLIB MODULE A2
IOSLIB IOS3270 A2
IOSDYNAT EXEC A2
File 2
IOS3270 ASSEMBLE A1
IOS3270 AUXIOSPL A1
IOS3270 AUXIOSLO A1
IOS3270 TEXT A1
IOSLIB ASSEMBLE A1
IOSLIB TEXT A1
GDCSS ASSEMBLE A1
GDCSS TEXT A1
GOODEND ASSEMBLE A1
GOODEND TEXT A1
GOODIES ASSEMBLE A1
GOODIES TEXT A1
INSTGOOD EXEC A1
IOSEXEC EXEC A1
IOSEXEC2 EXEC A1
IOSREXX EXEC A1
IOSIVP1 EXEC A1
IOSIVP2 EXEC A1
IOSIVP3 EXEC A1
IOSIVP4 EXEC A1
IOSIVP5 EXEC A1
IOSIVP6 EXEC A1
IOS CNTRL A1
The files from File 1 should be placed on a disk that is available for those persons
authorized to use DIOF-3, for example, the system extensions disk, the Y-disk. The files
from File 2 are not needed to run DIOF-3 and may be placed elsewhere for reference
and/or maintenance.
Successful installation can be tested by entering IOS3270 ?, which displays a short online
user’s guide.
Chapter 3. Installation 5
The file IOS3270 IOS3270 contains this guide and may be used as an example of an
input file. This will test the functional parts of DIOF-3 without using the variable
interface.
If you wish to run IOS3270 from a discontiguous shared segment (DCSS) (called saved
segment on VM/XA), refer to Appendix D, “The GOODIES/GDCSS Package” on
page 53 for installation. To improve performance, DCSS installation is highly
recommended.
Notes:
1. A number of EXEC files are available to further test the functioning of the program.
They can also be used as examples of how the various functions can be used. These
files were used during the development of the functions which they address and do
not necessarily comprise complete working programs. None of them need to be
executed to complete the installation process.
IOSEXEC EXEC Tests the EXEC variable interface.
IOSEXEC2 EXEC Tests the EXECCOMM variable interface with EXEC 2.
IOSREXX EXEC Tests the EXECCOMM variable interface with REXX.
IOSIVP1 EXEC Demonstrates the possibilities of the dynamic attribute
functions.
IOSIVP2 EXEC Demonstrates the possibilities of attribute type Alignment.
IOSIVP3 EXEC Demonstrates the possibilities of attribute type Etmode.
IOSIVP4 EXEC Demonstrates the possibilities of the STEM, FROM and FOR
options.
IOSIVP5 EXEC Is a variation of IOSIVP4.
IOSIVP6 EXEC Is a variation of IOSIVP4.
2. The PF key settings for the online user’s guide are defined in file IOSPAGE
IOS3270. If required, this file can be updated to provide those PF key settings that
are generally used on your system.
The IOS3270 source is distributed as an Assemble file and optional update files. The
update files have a file type of FxxxxHAX, where xxxx refers to a unique IOS3270
update number. The update files can be merged with the Assemble file by using the
CMS UPDATE command as described below. For further details on the UPDATE
command, refer to the IBM VM/SP CMS Command and Macro Reference Manual,
SC19-6209, or the IBM VM/XA SP CMS Command Reference Manual, SC23-0354.
To regenerate the IOS3270 MODULE, the following CMS command sequence can be
used:
The DMSSP55 MACLIB is the (renamed) DMSSP MACLIB as distributed with VM/XA
SP Release 2. In order to allow the creation of an execution module that runs on all
supported releases, it is necessary to access the VM/XA SP DMSSP MACLIB as
indicated (renamed to DMSSP55 MACLIB) and perform compilation on a VM/SP
Release 5 system. Compilation cannot be performed without the VM/XA SP macros.
The IOSLIB MODULE can be regenerated by issuing the following CMS commands:
GLOBAL MACLIB DMSSP CMSLIB DMSSP55 OSMACRO
HASM IOSLIB
LOAD IOSLIB (CLEAR
GENMOD IOSLIB MODULE A2
Chapter 3. Installation 7
Chapter 4. Running the IOS3270 Program
This chapter describes how to invoke the IOS3270 program and gives a step-by-step
explanation of all function characters used to control program operation. At the end of
this chapter, some performance considerations are mentioned.
Where:
fn Is the file name of the file to be displayed.
ft Is the file type of the file to be displayed. The default file type is IOS3270.
fm Is the file mode of the file to be displayed. It defaults to *, which results in
the first file found with specified file name and file type in the standard CMS
search order.
sl1 Is the first start label where processing must begin.
el1 Is the first end label where processing must stop.
eln Is the nth end label.
When processing a CMS file, start and end labels may be specified. A start label
defines the point from which input records have to be processed. An end label defines
the point where processing must be stopped.
Labels may be specified in upper- or lowercase, must start with a semicolon (;), and are
limited to a length of eight (8) characters, including the semicolon. If a start label is
specified, but no end label, the first label found after the start label is treated as if it were
the end label.
You may use the same name for start and end labels if they occur several times in the
file. To find a label, IOS3270 simply scans the input from the current line towards the
end of the file. For this reason, a start label that is located in front of the previous end
label will not be found.
If no file name is specified when the IOS3270 program is called, it assumes the input is
in the CMS program stack.
Note: If the input file is EXECLOADed, IOS3270 will automatically process the file
from storage if the file mode is either not specified or specified as “*”. If a file mode is
specified, the file will be read from disk.
Preferred Group
ALARM Sounds the audible alarm once on display of the first panel.
BIND n Shifts the output n columns to the right. In combination with the
UPDATE option, this allows for pop-up windows leaving data
displayed in columns 1 through n.
FOR numvar Is the number of variables to be processed. To be used in
combination with the STEM option. The default is to process the
number of variables indicated by the variable stem0.
FROM varno Is the number of the first variable to be processed. To be used in
combination with the STEM option. The default is to start
processing variable stem1.
GRAF [c]cuu Specifies that device ccuu is to be used to display the output. The
specified device designates an ATTACHed or DIALed terminal.
The default is to use the console. If specified, the address should
not be the address of the console.
LIB ln Specifies that the input file name refers to a member in an IOSLIB.
Where ln is the file name of the IOSLIB. The file type is always
IOSLIB in this case and does not have to be specified. The
member to be selected is specified by fn in the parameter list. An
IOSLIB can be built and maintained with the IOSLIB program,
discussed in Appendix C.
NOCLEAR Does not clear the screen on entry. If called without the
NOCLEAR option, IOS3270 will first clear (erase the contents of)
the screen and then write the new panel. If already in full-screen
mode (from a previous call to IOS3270 or another full-screen
program), there is no need to clear the screen first. Clearing leads
to unnecessary and irritating blinking because VM always wants to
write its RUNNING status after clearing the screen.
Note: When running in full-screen mode, it is upsetting to be
thrown out of full-screen mode when an ATTN key is pressed and
CP wants to deliver some messages. Also, once in full-screen
mode, the operator does not know there is a message waiting until
he/she presses a key. This is not only an IOS3270 problem, but is
also true for any full-screen function, for example, XEDIT. Both
problems can be prevented by using the CP TERM BREAKIN
GUESTCTL command.
NOSCREEN Specifies that IOS3270 should not check the existence (and
features) of a physical device. Instead, a default screen size of 24
rows of 80 columns is assumed. All features used in a panel
definition are assumed to be present.
Compatibility Group
HNDEXT Specifies that the user wants to handle external interrupts.
This option can only be used in combination with the in-storage
interface. For a detailed description, refer to Section 4.14, “Using
The IOS3270 Options HNDEXT and HNDINT” on page 42.
Due to the restructuring of external interrupt handling on Bimodal
CMS systems (CMS 5.5), this option may not work under certain
conditions. Only those interrupts will be handled for which no
specific external interrupt handlers were specified.
See also the TIME option.
HNDINT Specifies that the user wants to handle I/O interrupts other than
from the console.
This option can only be used in combination with the in-storage
interface. For a detailed description, refer to Section 4.14, “Using
The IOS3270 Options HNDEXT and HNDINT” on page 42.
Because the full-screen I/O logic uses the CMS console manager
(when running on VM/SP Release 5 or later), IOS3270 no longer
handles I/O interrupts. Therefore, the HNDINT option is no longer
supported when running on CMS Release 5 or later.
KEEPFILE (fn [ft [fm]])
Specifies a file ID to be used by the keep function.
The default file ID is $IOS3270 $KEEP$ A1.
Note: This option does not force the .K function or override the
NOKEEP option.
LIFO Stacks input fields LIFO (default is FIFO).
This option only applies to those input fields that are specified to be
returned in the CMS program stack.
NOKEEP Does not use saved input fields.
It may seem unnecessary to carefully save input fields and not use
them, but sometimes it is not; for example, for users who wish to
start a dialog with an empty panel but also wish to re-display the
input if an error is made. If input fields are specified as variable
names, this is done automatically. If not, this option can be used
selectively.
NOWAIT Does not wait for operator action; exits immediately after writing to
the screen.
This option may be used to display a panel for a certain period and
continue processing without the need for operator intervention.
Function characters with an undefined number of parameters, (for example, .D, .F, .I, .J
and .V) must be specified as the last function character on a line.
In most cases, parameters for function characters can be specified as variables. However,
substitution of these variables is restricted to one token only. If, for example, the variable
&FILE has the value TEST FILE A1, only the word TEST is substituted. Exceptions to
this are the functions .V and .&vname.
Like options, function characters are divided in two groups, a preferred group and a
compatibility group. The latter is not recommended to be used when writing new
applications. The primary use of the functions in the compatibility group was to
overcome the limitations of EXEC. With the power of REXX, they do not appear to be
required anymore.
Preferred Group
Alarm sounding
.A
Bottom title
.B
The next input line is used as a bottom title and is displayed on the last line of this and
every following panel.
To insure that a line is displayed on the last row of the screen, you may also use .L-1.
Ctlchar activation
.C
Indicates the start of data to be scanned for field definition or control characters
(Ctlchars). A Ctlchar marks the start of a field.
The characters shown above are the default characters used. They can be reset or
redefined with the .JX and .J functions. In addition, the .JX function allows you to define
field definition characters with attributes not provided by the default characters.
A field is delimited by an end delimiter. The default end delimiter is a blank ( ). The .E
function may be used to change the ending delimiter.
A dash (-) in a field is translated to a null (X'00'). This allows you to chain fields and
allows the 3270 insert mode function to be used in input fields. Also, see the description
of the .E function below.
The next function record (a line starting with a period) resets the .C function. It doesn’t
matter whether anything else is on the line after the period or not.
Note: Substitution of variables in function records is carried out regardless of a .C
setting.
.Ex
x is the character defining the end of a field. If the delimiter is not a blank ( ), dashes
(-) are not translated to nulls. Using this function allows you to have blanks and dashes
in a field, which is particularly useful in input fields.
If an input field is in the user’s virtual storage (using the in-storage interface to
IOS3270), if the input is to be returned to the user’s virtual storage, and if the ending
delimiter is not a blank ( ), then leading blanks are not deleted. No check is made for
any special characters or strings, like > or quit. In addition, the special character " is not
recognized. This effectively means that input fields are returned to the caller exactly as
they are typed in by the operator.
To make sure that the operator cannot influence the length of an input field, a
hexadecimal value that cannot be entered by the operator should be used as the delimiter
character. A useful value normally is in the range X'FA' to X'FE'.
func1, func2, ... funcn are assigned to PF keys 1-n, respectively. Functions are limited to
eight characters. All function fields may be specified as variable names. All PF key
functions must first be cleared, then set. The first field is set into PF key 1, the second
field is set into PF key 2, and so on.
To leave a particular PF key unassigned, use the percent (%) character. For example, the
input stream:
.f funca % % funcb
would only set PF key 1 and PF key 4 and clear all other PF keys.
To set PF keys 13 to 24, specify .F2. The two groups of PF keys (1-12 and 13-24) are
cleared and set independently.
If IOS3270 is not called from an EXEC, the string is put in the program stack as a
separate line. An exception to this is described in 4.12, “Invoking IOS3270 with
In-storage Data” on page 36.
n specifies the number of lines to be displayed (with a higher intensity, (brighter)). If not
specified, only one line is displayed intensified. Substitution of fields is done depending
on the .C setting.
On color screens, intensified lines (or fields) are displayed in white, or with the attributes
(color, highlighting, and programmable symbol set) specified in the last .JX Set
High-intensity function. This allows you to define panels that look good on both color
and monochrome screens. For example, the input lines below display the error message
(&msg) in red on a color screen and intensified on a monochrome screen.
.jx Set Norm col=yel, High col=red PS=Bold
Please complete this questionnaire
.ch
&msg
In addition, on screens equipped with programmable symbol sets, the character set with
an LCID of B is used, if loaded. Data with normal intensity is displayed in yellow on a
color screen.
Imbed
.I [IOS3270 parameter list]
A typical use of this function is to imbed PF key functions and titles that are to be the
same on many panels. If they must be changed, this need only be done once, in the
Extended define
Option1:
OFF
Alignment=
Color=
Etmode=
Highlight=
PSid=
,
Option2:
Dynamic
Scope=
Type=
,
Option3:
n
Reuse
,
Extended define.
The .JX function is designed to use the extended attribute support provided by most
newer model display stations. It is also used as a replacement for the .J function to
define field definition characters (Ctlchars) with attribute combinations not provided by
the .J function.
Operands
Set Normal-intensity
Defines the default attribute values to be used for data displayed with
normal intensity.
Options
To aid reading, an equal sign (=) may be used to connect attribute type and value, for
example, col=red or typ=(unp inv ski).
Notes:
1. The .j and the .jx Set Ctlchar functions can be used in combination. Use of either
form resets previously defined attributes for the same character.
2. For input fields, the FILL character is omitted when:
A FILL character '_' has been specified
Extended highlighting is supported
The field has been specified with a highlight value of underscore.
This reduces the amount of data sent to the screen and produces a clearer indication
on terminals supporting extended highlighting.
Automatic insertion of a FILL character _ for devices not supporting extended
highlighting, while underscore was requested, is deliberately not done to reduce the
amount of data sent to the screen.
3. Currently, only the first character of each token is inspected (except for NUMeric).
Thus, each of the following has the same effect:
.jx Set Norm col=red high=rev PSid=i, Ctl OFF
or
This function allows for a certain amount of space to be reserved on the panel for
optionally imbedded parts that occupy a different number of rows. For example, the
following call and file could be used:
If &L1 and &L2 are not set, this call results in displaying the top and bottom parts of the
file. If &L1 and &L2 are set to ;MSG1 and ;MSGEND respectively, this inserts the
message part in the right place. The last line is always on row 15.
This function instructs IOS3270 to use the maximum number of rows and columns that
are available on a particular model display station. The default panel (page) size is 24
rows of 80 columns for all models.
Note: The .M function takes effect from the point where it is processed. IOS3270 uses
this information to calculate relative screen coordinates. Therefore, the .M function
should be specified as one of the first functions to prevent misalignment on display
stations which have a different number of columns.
No edit
.N
Skips editing data from input fields which are defined as variable names. Normally,
leading and trailing blanks are removed and uppercase translation is done. Note that
EXEC variable values cannot start with a blank and can only contain one token. This
function is primarily meant for programs using the EXECCOMM interface introduced
with CMS for VM/SP Release 2.
Note: The .N function also affects variable values set by the .V function.
Page eject
.P
Displays everything processed up to this function character. If there are more function
characters after the .P, these will be processed after the operator has caused IOS3270 to
continue processing. This is only done if a page eject is explicitly specified by .P. If a
page eject is implicitly done while processing a function line, the part of the line
following the page eject will not be processed.
Qualified Read/Reserve
.Q
This function is equivalent to the .R function below, but it also allows input and selector
light pen fields to be generated.
The reason for this extra function is that additional input from the screen is likely to
influence the logic of the calling program. If this is not wanted, it can be prevented by
using the .R function instead.
Includes data from the program stack or from a file other than the input file without
losing control over the panel layout.
This means you can reserve some space on a panel where the operator may include
his/her own comments by putting them in a file on one of his/her own disks.
Some space for memos can also be reserved as a kind of log message or “hot news”.
(Use the .D function to specify a file to be used.)
Under control of .C, the input is checked for fields other than input and selector light pen.
You can allow for input and selector light pen fields by using the .Q function. For every
.R, one record is read. If there are no more records, a blank line is inserted for every .R.
Note that function records (.xxxx) and labels (;xxxx) are treated as data when read by the
.R or .Q functions.
Space
.S
Top title
.T
Variable setting
.V &n1 v1 [&n2 v2 ... [&nn vn]]
Off
v1 is assigned to &n1, v2 to &n2, and so on. Values may be specified as variable names.
Values not specified as variable names are translated to uppercase. If a lowercase value
is needed, specify the value as the name of a variable containing the lowercase value, or
use the .N function.
Specifying .V Off suppresses variable substitution in the remainder of the input data.
Note that this should be used with care as it also prevents the setting of the &IOSx group
of variables.
.Y
Normally only the function defined for a PF key is processed. Inserting a .Y instructs
IOS3270 to process input fields as well.
.&vname
The input line is replaced by the value of specified variable and treated as if it were the
original input line. If the variable does not exist or has a null value, the input line is
simply ignored. This allows you to make dynamic changes to the input file. The
variable value can be data, an IOS3270 label, an IOS3270 function record, or even
another .& statement. (IOS3270 goes into a loop if the value of a variable is set to its
own name, preceded by a period.)
With some functions it is possible to have parameters specified as variable names. This
function is practically equivalent to having that possibility with every function.
With the introduction of EXEC 2, it is now possible to have more than eight characters
assigned to a variable value, including blanks. This allows you to put a complete
function record in a variable.
Compatibility Group
Define I/O
.D fn [ft [fm]] [(recno [)]]
Specifies an input or output file to be used with the .Q, .R or .W function, where:
fn Is the file name. If *, it resets a previously specified .D function.
ft Is the file type. Defaults to IOS3270.
fm Is the file mode. Defaults to * if used with .R and to A1 if used with .W.
recno Is the record number where reading or writing has to start. Defaults to record
1 for read and to the next available record for write.
The .D function may start anywhere on a function line but must be the last one on that
line.
If both input and output files are to be specified, insert the definition for output after the
last .R or .Q, using the input definition.
Several files may be specified to be used as input files with .R, but only the last one is
used for the .W function.
.J [..........]
Field definition characters are used to define the start of fields, as explained in the
description of the .C function. The .J function allows you to reset or redefine these
characters.
The string of characters following the first blank after the .J is positional. Every position
represents a field type. If a position is a blank (X'40') or not specified, the Ctlchar
remains unchanged. The ampersand (&) may be used to reset a Ctlchar.
The numbers refer to the relative position in the string; the character between parentheses
is the default Ctlchar used to define the field.
Examples:
If the Ctlchar to identify an intensified field must be changed to ), the statement .j )
will do that. All other Ctlchars remain unchanged.
If : is to be used to define input fields, and no other Ctlchars are wanted, the
statement .j &:&&&&&& will accomplish this.
Position nine (9) can be used to define a FILL character. This character will replace
trailing blank characters in input fields. It is not returned to the caller.
Input : .j _|
: #---- |---- |aa---- ¬a_b----
Displayed on screen : ____ ____ aa____ a_b____
Modified by operator: ____ x___ __a___ a_b c__
Returned to caller : x __a a_b c
See the note about FILL characters in the description of the .JX function.
Keep input
.K[(&index)]
Saves (keeps) input field values and displays them the next time this panel is displayed.
This function saves data entered in input fields. The data is saved in the file, $IOS3270
$KEEP$. The file mode number is 1. The file mode letter may differ. The KEEPFILE
option may be used to specify a different file ID. IOS3270 searches all disks in the
standard CMS search order to find a keep file. The first one found will be scanned for a
matching entry. When IOS3270 wants to write the input fields back to the keep file, it
first tries to write it on the disk where the file was found. If that disk is accessed in
read-only (R/O) mode, and this disk is not the A-disk, an attempt is made to create a new
file on the A-disk.
Kept input on the bottom two lines may be erased with the .Z function. (See also the
NOKEEP option.)
Fields 1 to 3 are the identifiers of the primary input file. Field 4, the user index, is
optional and can be used if the same file is used by different EXECs to identify which
keep entry should be used. In this example, &index could be specified as &0 to relate
the keep entry directly to the calling EXEC’s name.
Notes:
1. The Keep function originates from the time when REXX was not available. Input
fields longer than eight characters and input fields with imbedded blanks were
difficult to process. Keep, at that time, provided a reasonably general way to
remember things. Today it seems more effective to have the function handled by the
calling program, using GLOBALV. GLOBALV will usually be faster, automatically
handles file maintenance, and allows you to use the same input data on different
panels.
2. The Keep function cannot be used if the input results in a display of more than one
(1) panel.
3. If the layout of a panel is changed, input fields may occur where they are least
expected to. In this case, press the ERASE INPUT and ENTER keys to update the
keep file to the new panel layout.
4. Keep should only be used when it is needed. As keep data is appended to the keep
file, the size of this file increases when new functions are added. This may lead to
unexpected performance degradation. To avoid this, the KEEPFILE option may be
used to spread the data over different files. From time to time, you may also want to
erase large keep files which contain data from functions no longer used.
Omission character
.O x
Specifies a character (x) to be inserted in the program stack or assigned to a variable for
input fields in which no data is entered by the operator. The function character and the
specified omission character should be separated by one (1) blank.
This function is used to make it easier to check input fields returned in the program stack.
For example, there are four input fields:
1=#----- 2=#---- 3=#----- 4=¬----
If the operator inserts values A and B in fields 2 and 4, the following appears in the
program stack:
A B
This is fine if it is of no importance in which field data is entered, but useless
information if a relation between the input field and the data entered is needed.
Now assume that .O * function is inserted. The program stack will now contain:
A B
giving the relation between entered data and input fields.
Writes all input from the panel up to this line to a file defined with .D.
The file must be fixed, LRECL 80. If a starting record number was specified with .D,
the file is (over)written starting at that record number. If a starting record number was
not specified, the file will be created (if it does not exist) or appended to (if it does.)
Insert a .W for every record to be written. See also the .X function.
Notes:
1. As IOS3270 stops reading input as soon as the panel is full, it is not possible to use
the .W function for input fields defined in the last line on the screen.
2. As discussed with the Keep function, this function also originates from pre-REXX
time. Today, using REXX variables and EXECIO seems to provide a more flexible
method.
When processing input data from the panel, IOS3270 moves all input data that must go
into the program stack (or must be written into a file) into a 132 byte buffer. If this
buffer is full, it is put in the program stack and IOS3270 continues processing. Input that
could not be put in the buffer is lost.
If you have many input fields on a panel, 132 bytes may be not enough to contain all the
entered data. Inserting .X forces IOS3270 to stack all data processed so far and start with
an empty buffer again. There will be one line in the program stack for every .X.
Note: As discussed with the Keep function, this function also originates from pre-REXX
time. Today, using REXX variables seems to provide a more flexible method.
If the Keep function is used or an input field is defined as a variable, the input fields
entered previously are made available. If an input field defines a special function to be
The selection field is defined by a question mark (?) designator character, for example
!?select. When the selector light pen detects on a selection field, the designator character
is automatically changed to a greater-than (>) sign to provide a visible indication to the
operator that the detection was successful. If a mistake was made and the operator again
detects on that same field, the > changes to a ? and thus resets the erroneous selection.
Selected fields are handled as input fields and are returned through the CMS program
stack. The fields are stacked left to right, top to bottom.
The attention field is defined by a space ( ) designator character, for example ! attn. A
detection on an attention field normally results in a return to the caller. The value of the
detected field is put in &IOSD if called from an EXEC, or in the program stack if not
called from an EXEC. Input entered by the operator will not be processed. See the next
section if this is required.
A second type of attention field is defined by the ampersand (&) designator character. A
selector light pen detection on a field containing an ampersand designator character has
exactly the same result as pressing the ENTER key. Note that it is not possible to
differentiate between multiple attention fields. Only selected fields and keyboard input is
returned to the caller. Selected fields are handled as input fields and are returned through
the CMS program stack.
The 3270 hardware puts restrictions on the number of selector light pen fields with an
attention designator character that may be defined on one screen. For example, a
maximum of 12 detectable fields may precede the last detectable field on any given line.
When mixing detectable and non-detectable fields, a maximum of 14 mixed fields may
precede the last detectable field on any given line.
The 3270 hardware requires a selector light pen field to have three blank or null
characters before and after the field to guarantee good selection. Fields longer than three
characters (or fields intended to be used for cursor select only) can do without these
requirements. Short fields, for panel selection, for example, must use the IOS3270 null
character (-) to make selection possible, for example, ! -1-.
Trailing omitted input fields are normally not reflected to the caller.
If you do not want the field to be displayed on the screen, use the non-display Ctlchar
(¢).
IOS3270 handles both types of variables that are used within CMS. The first type,
referred to as EXEC variables, are used by the CMS EXEC interpreter. The length of the
names and values of these variables is restricted to eight (8) characters. A value always
consists of a single token.
The second type of variable is used by the EXEC 2 interpreter, introduced with VM/SP
Release 1, and the System Product Interpreter (REXX), introduced with VM/SP Release
3. VM/SP Release 2 introduces an interface for this type of variable, referred to as the
shared variable interface, accessible through the subcommand EXECCOMM. IOS3270
cannot handle variables whose names or values exceed 160 characters. Names that are
longer are simply not found, and values are truncated.
Variables are substituted under control of the .C function, except when they are found as
parameters for function characters. In this case, substitution is always performed.
However, substitution of these variables is restricted to one token only. If, for example,
the variable &FILE has the value TEST FILE A1, only the value TEST is substituted.
Exceptions to this are the functions .V and .&vname. For EXEC, all user variables and
the internal EXEC variables &0-&30 may be referenced but not &INDEX, &RETCODE,
&EXEC, &GLOBALn, and so on. Compound substitution is not performed; for example,
if &A=X, &X=1 and &A1=B, &A&X will be displayed as X1 and not as B, as the
EXEC interpreter would do.
A variable that has no value or has a null value does not take a place on the screen,
except when it ends with a period (.). Dashes (-) in chained fields are replaced by blanks
( ), unless the field is defined with attribute type Dynamic.
Method 1
The following Assembler code is an example of the first method:
. .
DISPLAY DS H
LA R1,IOSPLIST
SVC 22
DC AL4(ERROR)
B .
ERROR . .
IOSPLIST DS D
DC CL8'IOS327',AL4(),AL4(IOSDATA)
DC CL8'other parameters and/or options'
DC 8X'FF'
. .
IOSDATA DC AL1(L'LINE1)
LINE1 DC C'.cf help % quit'
DC AL1(L'LINE2)
LINE2 DC C'Specify input%==> ¬_________'
. .
DC AL1(L'LINEn)
LINEn DC C'PF1=! HELP PF3=! QUIT'
DC AL1()
. .
. .
If byte 1 of the first parameter is X'00', bytes 4 to 8 are assumed to contain a pointer to a
block of virtual storage containing the input lines. Every logical record should start with
a byte defining the length of the text to follow. If a length byte of zero (X'00') is
found, this is treated as an end-of-file indicator.
Calling IOS3270 as described above allows for the easy modification of existing panels,
but input fields are returned in the CMS program stack (if .D and .W are not used).
Returning input fields to virtual storage is not only faster and easier than reading the
. .
. .
IOSPLIST DS D
DC CL8'IOS327'
DC AL1(),AL3(IOSXLIST)
DC AL4(IOSDATA)
. .
IOSXLIST DS C
IOSK DC CL8' '
IOSC DC CL8' '
IOSD DC CL8' '
. .
. .
Method 2
The second in-storage interface is based on the method used by the System Product
Interpreter and the EXECLOAD command, introduced with VM/SP Release 4, called File
Block (FBLOCK) support. A description can be found in the System Product Interpreter
Reference, SC24-5239, under “System Interfaces”.
The bits of the high order byte of the descriptor list length fields can be used as follows:
“xxxxxx00” Reserved, must be set to 0.
“000000x0” When on, indicates that the address points to another descriptor list. The
length field specifies the length (in bytes) of the descriptor list. Acts as an
imbed. Indirect addressing in combination with the skip bit can be used as
a paging mechanism.
To indicate that operator input is to be returned to storage, the IOSXLIST pointer must be
set. The IOSDATA pointer must be set to zeros.
Note: If the input file is EXECLOADed, IOS3270 will automatically process the file
from storage if the file mode is either not specified or specified as “*”. If a file mode is
specified, the file will be read from disk.
Character attributes are those assigned to a character when written into the display buffer.
They are not associated with the character position. When a character is altered or
deleted, the attributes associated with that character are destroyed. When a character is
altered (even if overtyped with the same character) the attributes assigned to the replacing
character are inherited from the field attributes.
IOS3270 allows you to assign character attributes to non-variable and variable data.
Non-variable Data
To assign character attributes to this type of data you have 2 options.
1. External from the data, providing full WYSIWYG, using .jx Set Mask as follows:
.cjx Set Mask, Ctl @ Color=Yellow
@@@@
The word following the arrow is yellow ===> word
The line following the .jx Set Mask is used as a mask to parse the data line
following the mask. A mask consists of Ctlchars and blanks. A blank causes field
attributes to be assigned to the associated data character. A Ctlchar causes the
character attributes associated with that Ctlchar to be assigned to the corresponding
data character.
2. In-line with the data using .jx Set Ctl ... Scope=Character to define a pseudo field as
follows:
.cjx Set Ctl @ Color=Yellow Scope=Character
The word following the arrow is yellow ===> @word
Data between the Ctlchar and the delimiter will have the character attributes
specified, the Ctlchar and the delimiter are removed from the input stream, thus
causing a 2 position left shift.
Variable Data
.jx Set Mask cannot be used for variables as there is no input/output relation to the
variable value. If a mask is specified for a variable, it is ignored. If character attributes
are to be assigned to the value of a variable, the variable has to be defined as a (pseudo)
field. Scope=char can be used to suppress leading and trailing blanks. The mask to be
used for variable data is specified in another variable. The Dynamic attribute (.jx Set Ctl
... Dynamic) is used to indicate that a reference has to be made to such a variable,
specifying
A Ctlchar defining alternate (dynamic) field attributes
An indication as to where the cursor has to be placed
(A) Ctlchar(s) defining character attributes (a mask).
A reference variable is defined as an array variable with the following format (REXX
notation):
As a help to the user (and to allow changing the format when required), the IOSDYNAT
EXEC is supplied to build and set the reference variable containing the dynamic
attributes. For the calling syntax, refer to Appendix E, “The IOSDYNAT EXEC” on
page 57.
It is recommended to call the IOSDYNAT EXEC to build the reference variable, even
though this will degrade performance.
The variable is used to dynamically build the mask described above. The descriptors are
processed left to right, each storing a sub-string of Ctlchars into the mask. Note that
overlapping sub-strings containing attribute values that are not specified will inherit their
value from the preceding character.
Example:
The dynamic attribute support can be used from the in-storage interface (FBLOCK only)
as follows. IOSDATA points to an FBLOCK-like extension area (REFBLOCK):
REFBLOCK DC AL4(INPLIST,INPLISTE-INPLIST)
INPLIST DS A
DC AL4(DYNA1,FIELD1)
DC AL4(DYNA2,FIELD2)
INPLISTE EQU
DYNA1 DS XL(DYNFALNG+L'FIELD1)
DYNA2 DS XL(DYNFALNG+L'FIELD2)
As usual, the skip bit in the second word of the descriptor list can be used to activate or
deactivate an entry.
This DSECTs describe the format of the Refer variable as used
for dynamic attribute support.
DYNFAMAP DSECT Dynamic field attributes
DYNFACTL DS CL1 The Ctlchar to be used for this
field or ''x for no change.
DYNFACUR DS AL1 The absolute position in the field
where the cursor should be placed.
If , the cursor is not positioned.
DYNFACH EQU Start of character attribute
descriptor list (DYNCAMAPs)
DYNMASK EQU Start of mask for FBLOCK support
DYNFALNG EQU -DYNFAMAP Size in bytes
Notes:
1. The easiest format for the reference variable would have been “Ctlchar.name”.
a. It allows an exact description of the Ctlchar/name combination.
b. It allows a reset of all reference variables relating to one Ctlchar using the stem
only.
2. The alternative was derived because REXX does not allow
a. Setting stem.name when name is a variable. One would need to use another
variable, set to “name”.
b. characters usually used as Ctlchars in variable names.
c. variables to start with a number.
The IOS3270 options, HNDEXT and HNDINT, allow you to handle the above situations.
The logic behind it is as follows: Together with the option, you provide the address of a
routine that should receive control when an interrupt occurs. This routine inspects the
interrupt and signals through register 15 (R15) whether IOS3270 should read the data on
the screen and return control to you. If you decide to handle the interrupt, you may start
working on it once you regain control from IOS3270. In the interrupt-handling routine,
you should not perform any action causing the screen contents to change. Preferably, you
should not do anything at all except remember that you must do something on return
from IOS3270. In the Assemble example below, the only action performed is the setting
of a flag.
The following rules apply when the user interrupt routine gets control:
R15 entry point address.
R14 return address.
R13 72 bytes save area (18 FWs).
Storage protection is NUCLEUS key.
The user is responsible for saving and restoring R0-R13. The save area pointed to
by R13 may be used for this purpose.
If, on return to IOS3270, R15 is 0, the screen is processed and control is returned to
the caller.
The following piece of Assemble code is an example of how the options can be used:
Note: Due to the restructuring of CMS interrupt handing in CMS 5.5 (Bimodal CMS),
the HNDEXT and HNDINT options can no longer be fully supported on this level of
CMS. Refer also to the descriptions of the options.
Without any additional programming, the 3279 Color Display Station displays data in
four different colors. The color of a field is dependent on the attributes of the field
according to the following matrix:
This mode of operation is called base color mode enabled. The 3279 has a two-position
switch, called the base color switch. The (oooo) position of this switch enables base
color mode with the effect described above. Switching to the (oo) position disables base
color mode; now there are only two colors:
Whenever a color other than the base color is displayed anywhere on a panel, the position
of the base color switch is ignored. However, the screen behaves as if the base color
switch is placed in the (oo) position!
What does this mean in practice? Suppose you have a panel with normal and intensified
fields, both input and output. This shows up nicely in four colors. However, if you
decide to bring some more color into this panel and, for example, change the color of one
field into yellow, the colors blue and red will change to green and white.
It is important to understand that this is done by the screen and not by IOS3270. No
attempt is made to simulate base color mode for those fields that will change color,
because the position of the base color switch cannot be retrieved. Simulating base color
mode enabled would have an opposite effect for those users that normally have the switch
in the disabled position (oo).
The preferred method of operation for DIOF-3 is with REXX. If performance is not
acceptable, you may want to consider using the in-storage interface, but only as a last
resort as the investment required to produce the same function will be much higher than
with using REXX. Changes will require comparably higher investments.
If run from an EXEC, there is no need to have a separate file for the panel. It can be put
at the end of the normal EXEC logic preceded by a label as shown in the next example:
&TRACE
&IF &N EQ &GOTO -explain
&IN = &1
-check_input
&UPPER VAR &IN
&IF /&IN EQ /TEST &EXIT
&ALARM = ALARM
&MSG = &STRING OF You should enter 'TEST', not &IN .
-explain
IOS327 & EXEC ;EXPLAIN (&NOCLEAR &ALARM
&NOCLEAR = NOCLEAR
&ALARM =
&IF &IOSK NE ENTER &EXIT
&GOTO -check_input
;EXPLAIN
.ch2
&.------------------ Explanation --------------------- HELP
===> &msg
.ssc
Enter%TEST ,- press%PF1 or light pen select to exit.
%===> ¬4&in
.l24cf test
PF: 1=! test 3=! quit
If the EXEC is large, and the panel is likely to be displayed often, there is a possibility of
considerable I/O overhead caused by IOS3270 searching for the start label. You may
reduce this overhead by putting the panel in front of the file and by optimizing the EXEC
logic by using line number references rather than labels. XEDIT’s VMFOPT macro may
be used to accomplish this as shown in the next example.
&TRACE
%OPTIMIZED AT 14:13:21 ON 82/5/26
% N O T I C E:
% THIS STATEMENT IS NECESSARY FOR THE OPTIMIZATION PROGRAM - VMFOPT
% DE-OPTIMIZE THIS MACRO BEFORE MAKING ANY CHANGES USING - VMFDEOPT
&GOTO 17 -exec
;EXPLAIN
.ch2
&.------------------ Explanation --------------------- HELP
===> &msg
.ssc
Enter%TEST ,- press%PF1 or light pen select to exit.
%===> ¬4&in
.l24cf test
PF: 1=! test 3=! quit
;EXEC
-exec
&IF &N EQ &GOTO 25 -explain
&IN = &1
-check_input
&UPPER VAR &IN
&IF /&IN EQ /TEST &EXIT
&ALARM = ALARM
&MSG = &STRING OF You should enter 'TEST', not &IN .
-explain
IOS327 & EXEC ;EXPLAIN (&NOCLEAR &ALARM
&NOCLEAR = NOCLEAR
&ALARM =
&IF &IOSK NE ENTER &EXIT
&GOTO 2 -check_input
Note that the panel is at the start of the EXEC, enclosed by REXX comment delimiters.
If the EXEC is EXECLOADed, IOS3270 will automatically process the in-storage
version.
Note: Disk I/O can be avoided completely by using the STEM option. The IOSIVP4,
IOSIVP5, or IOSIVP6 EXECs can be used as a base for this technique. For
details, refer to Appendix F, “The IOSIVP6 EXEC” on page 61.
Using the STEM option is also recommended when IOS3270 is called from
EXECs compiled with the VM REXX Compiler for CMS (5664-390).
Another way is to put them (either grouped by function or not) into one large file and use
the IOS3270 start/end label facility to selectively retrieve a panel. Working this way
creates a lot of I/O overhead if the file becomes large. The CMS system has a solution
in the form of the MACLIB and TXTLIB facilities. To take advantage of the IOS3270
label processing, a modified version of the CMS MACLIB program, called IOSLIB, is
distributed with the IOS3270 package. It is discussed in Appendix C.
As from Version 3, IOSLIBs are created with variable records (RECFM=V). This will in
most cases reduce the amount of disk space required to store the library. However, it
requires IOSLIBs to be stored on CMS minidisks not formatted with BLKSIZE=800 to
reach an acceptable level of performance.
It is difficult to define when to use separate files or a large file with label indexes or an
IOSLIB. By experimenting and keeping in mind the points discussed above, the user will
soon discover what suits his or her needs best.
A suggested procedure for creating IOSLIBs is to have all members in one large file
containing *COPY statements in front of each member. If a member is to be updated,
edit the file and update it. Then use the IOSLIB GEN function to create a new library.
This seems to be a most effective way to keep libraries up-to-date and as small as
possible.
GOODIES refers to the DCSS containing tools, often called “goodies”. GDCSS stands
for Generalized DCSS interface.
GOODIES ASSEMBLE contains the names of all functions to be part of the DCSS and,
the DCSS bootstrap. GDCSS ASSEMBLE contains the code which forms the function
bootstrap and is what is first executed when the desired function is called. GOODEND
ASSEMBLE is just a stub to show the end of the DCSS in the LOADMAP.
The interface between CMS and a function is provided by the program GDCSS. GDCSS
only exists as a TEXT deck and is executed to create a DCSS bootstrap and an eXecution
MODule (XMOD). The INSTGOOD EXEC does all module generation and builds the
DCSS if requested to do so. The interface bootstrap ensures that the target program
receives the proper control for correct operation, be it as a DCSS, a nucleus extension, or
DMSFREE storage. When necessary, the bootstrap interface automatically loads the
relocatable (ADCON free) program into DMSFREE storage. At program termination, the
bootstrap does all necessary clean-up before returning to the caller. The target program
need never concern itself with which mode of operation is being used.
DMSFREE Storage
Just place the IOS3270 MODULE and XMOD file, generated by the INSTGOOD EXEC,
on the support disk. Specify no DCSS name and N to the questions asked. The
interface module will not find the DCSS and loads the XMOD into DMSFREE storage,
permitting IOS3270 to run.
Options 1 and 2 are impractical due to the large amount of wasted storage. Option 3
would require a change in the GDCSS interface to dual path the code, depending on
whether it is running on VM/SP or VM/XA, including the necessary options in
INSTGOOD to specify which mode of operation is wanted (option 3 or 4). So, for
practical reasons only option 4 can be used. If no other programs are to be included in
GOODIES, a member size of 24K (six 4K pages) is sufficient.
Create a GOODIES member in segment space space1 by using the DEFSEG command,
for example:
DEFSEG GOODIES 66-666 SR SPACE space1
On VM/SP and VM/XA systems: Ensure that your virtual storage is large enough to
hold the DCSS before running INSTGOOD. When running INSTGOOD, specify the
name of this DCSS and respond Y to the question asking if a DCSS should be generated.
Copy the created MODULE and XMOD to your support disk. The interface module uses
the DCSS unless virtual storage is too large, in which case the XMOD is loaded into
DMSFREE storage and executed.
To run the bootstrap as a nucleus extension, the user must issue the command
NUCXLOAD IOS3270 (SYSTEM. This is independent of whether the DCSS or XMOD
is eventually used. If the DCSS cannot be used, the bootstrap loads the XMOD into
DMSFREE TYPE=NUCLEUS storage and replaces itself by the XMOD, thus making it
the nucleus extension for this function.
To include other modules in the DCSS, modify GOODIES ASSEMBLE and run
INSTGOOD to include them. Functions included must be relocatable (ADCON free) and
not larger than 64K. This limit is assumed by both the INSTGOOD EXEC and the
GDCSS bootstrap interface. INSTGOOD simply copies the second record from the
GENMODed function and calls it function XMOD. GDCSS reads only one record into
DMSFREE storage. This technique was devised for programs which had outgrown the
8K CMS transient area. Since XMODs are placed into DMSFREE storage, a free storage
problem could easily result if the function programs were permitted to be any size.
Consequently, a 64K limit was chosen. It is relatively simple to change INSTGOOD and
GDCSS to increase these limits, if desired.
The following information is provided for those who wish to write programs to take
advantage of the GDCSS interface or to better understand how this interface operates.
GDCSS permits any program which is reentrant and ADCON free to run in DMSFREE
storage, in a DCSS, or as a nucleus extension. All programs are run with a nucleus
protect key.
As long as the program observes the restrictions for the environment in which it is to run,
it need not do anything to interface with GDCSS.
GDCSS itself runs either from the CMS transient area or as a nucleus extension and is
always GENMODed with the SYSTEM option.
A function consists of a bootstrap and an ADCON free XMOD. The bootstrap is called
function MODULE (for example, function = IOS3270). This module contains the
function name and, if specified during creation, the DCSS name. Calling the function
gives control to the bootstrap which transfers control to the bootstrap in the DCSS, which
in turn transfers control to the correct function. Return is made to the function bootstrap,
if clean-up is needed, or directly to the caller, following normal CMS conventions.
If the DCSS cannot be attached, or if it was not specified during creation, the bootstrap
loads the XMOD into DMSFREE storage and transfers control thereto.
When the DCSS or XMOD terminates, control initially comes back to the bootstrap,
which ensures that proper clean-up is done before returning control to the caller. For a
DCSS, the bootstrap will do a PURGESYS only for those invocations where it had to do
a LOADSYS and if that has been specified during creation of the bootstrap. For an
XMOD, the bootstrap will DMSFRET the storage into which the XMOD was loaded. In
either case, the bootstrap also releases any dynamic storage needed for its own use before
returning to the caller.
When used as a nucleus extension, the bootstrap is all that is really loaded into
nucleus-free storage. If the bootstrap determines that the DCSS cannot be utilized, it
replaces itself with the XMOD and is no longer used. The current implementation
requires that the end user issues the NUCXLOAD command to load these functions as
nucleus extensions. One possible way of doing this is to NUCXLOAD these functions
with an EXEC that is executed by all users during CMS initialization, such as the
SYSPROF EXEC, introduced with VM/SP Release 5. To prevent storage fragmentation
at a later stage, it may be a good idea to include a call to IOS3270 here in case the
XMOD needs to be loaded. A way to load IOS3270 without generating error messages
or have the screen cleared is by using a simple IOS3270 (VERSION call.
DCSS
This interface is independent of how GDCSS was loaded. GDCSS checks for the
existence of the specified DCSS, and if necessary, loads it. Control is transferred to the
interface module at the start of the DCSS (GOODIES), which then finds the specified
routine and transfers control to it. If the DCSS was not loaded, return is made directly to
the caller. If the DCSS could not be used for any reason, GDCSS checks to see if it is
transient or a nucleus extension and continues appropriately. If the DCSS had to be
loaded, GDCSS sets up a tail-end processing routine to PURGESYS the DCSS on
completion, if specified during creation. On systems with many users, it will usually be
cheaper to keep the DCSS attached. This mode of operation is the default.
The following register content is required for programs to run as nucleus extensions:
R0 As set by caller, points to new form PLIST
R1 As set by caller, points to old form PLIST
R2 A(NXBLOCK)
R12 Entry address
R13 A(general register save area)
R14 Return address
R15 Entry address
R3-R11 Are UNPREDICTABLE
DMSFREE execution
If GDCSS cannot use a DCSS and is not itself a nucleus extension, then it loads the
relocatable XMOD into DMSFREE storage. It also places a small “tail” of its own code
into DMSFREE storage and provides this as the return address. When return is made, the
tail section of GDCSS does appropriate clean-up, including the release of the DMSFREE
storage.
The actual address of the function in the DCSS is contained in the DCSS bootstrap
(GOODIES ASSEMBLE). This means that a change in one of the programs does not
affect any other program as long as the DCSS is re-saved. The INSTGOOD EXEC
creates the function bootstraps each time, but these only have to be replaced on the
system disk if GDCSS has been changed. You can change the function code and, if you
have not changed GDCSS, the old interface bootstrap module still works perfectly.
Similarly, if you change only GDCSS, you just have to replace the interface bootstrap
module on the system disk. The XMOD does not have to be replaced, nor does the
DCSS have to be saved. An option has been added to INSTGOOD to permit creation of
the interface bootstrap without requiring the creation of the corresponding XMOD.
/ eupdate: Do not modify this file. It was built by the EUPDATE procedure.
eupdate: The source file was: IOSDYNAT EXEC A1
eupdate: Built by Theo W.H. Alkema - 1188 at UITHONE
eupdate: Date: 5/19/87 - Time: 16:55:42 - DST /
/ Set dynamic field and/or character attributes and position cursor /
/ Calling format:
Interpret iosdynat(Arg1; <Arg2>; <Arg3>; <Arg4 <... ;Argn>>
/ Process arg1 /
Parse Value arg1 With ctl ',' name
/ Check the Ctlchar /
If Length(ctl)¬=1 Then Signal invctl
stem='A'C2x(ctl)'.'
If name¬='' Then suffix='$'name
/ Process arg2 /
ctl=arg2
/ Check for functions /
If Length(ctl)>1 Then Do
Upper ctl
Select
When ctl='RESET' Then Return stem||suffix"=''"
When ctl='DROP' Then Return "Drop" stem||suffix
Otherwise Signal invfunc
End
End
If ctl='' Then ctl=''x
val=ctl
/ Process arg3 /
d=''x
If arg3¬='' Then Call cknum arg3
val=val||d
cknum:
Arg d
If Datatype(d)¬='NUM' Then Signal notnum
If d<1 Then Signal toosmall
If d>maxl Then Signal toomuch
d=D2c(d)
Return
- General notes:
1.This code handles the dynamic model where only the first panel
is dynamically build before presenting it. Higher levels are
dynamically build when selected. Once build, they are retained.
Panel nesting is done on row (line) basis.
A static model (where all information is pre-generated and
available in an IOSLIB for example, typically HELP menus)
is not yet available. The main differences with the dynamic
model are:
a.the data has to be put into variables first (EXECIO (STEM)??
b.come to think of it, why shouldn&csq.t you use standard HELP????
- Application notes:
1.Keep it SIMPLE by creating logical arrays which you
imbed selectively, using FROM and FOR options where needed.
2.This procedure handles &q.&$CONT
floating” pages. A page can start
on any line (by using the cursor point function '/').
It also automatically adjusts the page size to the number
of rows available on the used screen.
It also keeps track of “lines” versus “records”, meaning
it recognizes whether a logical record results in a physically
displayed line on a panel.
The logic could be considerably simplified by using fixed
pages but then it would, of course, not be general. All in
all, the method used here does not appear to be very costly
and handles all situations.
A possible problem arises scrolling the screen to a point
where attributes have been changed from the default (as
defined in the header section) when the control records that
set the new attributes are not included in the body part.
This code does not contain logic to keep track of that
situation. For now we expect the user to point at the start
of a logical section on a panel.
Address COMMAND
Call init / initialize /
Call bld_pnl / build main panel lines /
Call bld_hdr / build header lines /
Call bld_body / build body lines /
Call bld_bot / build bottom lines /
Call display / get it displayed /
Return / all done /
lvl_next:
If Verify(Substr(d.stem.t,1,1),'|','M') Then Do/ if more levels/
h2.lvl=hdr.2 / save header /
Parse Value Substr(d.stem.t,2) With hdr.2 ' more' ./ new ... /
hdr.2='From' hdr.2 / ... header /
lvl=lvl+1 / bump level count /
stem.lvl=stem'.'t / set new stem /
stem=stem'.'t / set new stem /
start.lvl=1 / set new start /
iosc.lvl='' / set cursor /
If Symbol('d.stem.')='LIT' Then Call create_lines
/ create next level info /
End
Else Call emsg 'No further details available'
Return
emsg:
msg=Arg(1)
alarm='ALARM'
Return
create_lines:
n=
Do r=1 To lines By lvl
n=n+1
If (lvl<lvls & n//(lvls-lvl+1)=)
Then d.stem.r='| Info level 'lvl 'record' r 'line' n ' more ...'
Else d.stem.r=' Info level 'lvl 'record' r 'line' n
End r
d.stem.=r-lvl
Return
Special Characters D
&vname function 27 D function 28
DCSS installation 6
defining
A character attributes 22
A function 14 Ctlchars 19
ALARM option 9 DBCS input fields 21
aligning output 20 dynamic attributes 21
APL character set 4 Etmode 21
field attributes 22
field definition characters 19
B mask 19
B function 15
output alignment 20
BIND option 9
dynamic attributes 40
blanks in input fields 16
dynamic cursor positioning 40
blinking of the screen 9
C E
E function 16
C function 15
editing of input 34
character attributes 40
error messages 3
character sets 21
escape character 22
CMS files
EXEC 2 33
$IOS3270 $KEEP$ 12, 29
EXECCOMM 4, 6, 25, 33
GDCSS ASSEMBLE 53
EXECLOAD 8, 38
GOODEND ASSEMBLE 53
extended attributes
GOODIES ASSEMBLE 53
color 20
INSTGOOD EXEC 7, 53
highlight 21
IOS3270 IOS3270 6, 18
symbol set 21
IOSEXEC EXEC 6
IOSEXEC2 EXEC 6
IOSIVP1 EXEC 6 F
IOSIVP2 EXEC 6 F function 16
IOSIVP3 EXEC 6 FBLOCK 37
IOSIVP4 EXEC 6 field definition characters 15
IOSIVP5 EXEC 6 File Block 37
IOSIVP6 EXEC 6 files, CMS
IOSPAGE IOS3270 6, 18 See CMS files
IOSREXX EXEC 6 FOR option 9
CMS SUBSET 10 FROM option 9
color 20, 45 function characters
combining IOS3270 and EXEC files 46 .A 14
compound substitution 33 .B 15
console, querying 13 .C 15
Ctlchars 15 .D 28
cursor position .E 16
&I2@CURSPOS. .F 16
default 11 .H 17
dynamic 40 .I 17
cursor select 22, 32 .J 28
.JX 18
.K 29
H O
H function 17
O function 30
highlight, extended 21
options
highlighting 22
compatibility 12
HNDEXT option 12
HNDEXT 12
HNDINT option 12
HNDINT 12
KEEPFILE 12
I LIFO 12
NOKEEP 12
I function 17
imbedding files 17 NOWAIT 12
input editing 34 QUERY 13
intensity 22 usage 42
IOS3270 variables preferred 9
&I2@VARIOS. ALARM 9
&IOSK 10, 11 BIND 9
&IOSC 35, 37 FOR 9
&IOSD 17, 32, 35, 37 FROM 9
&IOSK 16, 17, 35, 37 GRAF 9
IUCV 42 LIB 9
NOCLEAR 9
NOQUIT 10
J NOSCREEN 9
J function 28 PA1 10
JX function 18 PA2 10
rrccc 11
SCRIOSD 10
K STEM 10
K function 29 TIME 11
KEEPFILE option 12 UPDATE 11
VERSION 11
output alignment 20
Index 71
VERSION option 11
P VMCF 42
P function 25
PA1 key action 10
PA1 option 10 W
PA2 key action 10 W function 31
PA2 option 10
panels within EXECs 46
period, display in column 1 22, 26 X
periods in variable names 34 X function 31
Programmable Symbol Sets 21
PSS 21
Y
Y function 27
Q
Q function 26
QUERY option 13
Z
Z function 31
query the console 13
R
R function 26
rrccc option 11
S
S function 26
screen blinking 9
SCRIOSD option 10
semicolon, display in column 1 22, 26
SO/SI 21
special characters in input fields 16
STEM option 10
SUBSET, CMS 10
symbol sets 21
T
T function 26
TEXT character set 4
TIME option 11
TIMER, CP SET command 11
U
UPDATE option 11
V
V function 27
variable processing
general 33
in input fields 34
special variables 35
variables, set by IOS3270
See IOS3270 variables
Printed in Denmark