Programming PLI and C
Programming PLI and C
Programming PLI and C
IBM
SC27-2860-03
IBM Tivoli NetView for z/OS
Version 6 Release 2 Modification 1
IBM
SC27-2860-03
Note
Before using this information and the product it supports, read the information in “Notices” on page 287.
This edition applies to version 6, release 2, modification 1 of IBM Tivoli NetView for z/OS (product number
5697-NV6 ) and to all subsequent versions, releases, and modifications until otherwise indicated in new editions.
This edition replaces SC27-2860-02.
© Copyright IBM Corporation 1997, 2015.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Part 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Contents v
Command authorization checking sample code . . . . . . . . . . . . . . . . . . . . . . 77
Altering data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Storage access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Data set access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Communicating with devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Performing I/O on a VSAM file (Keyed File Access). . . . . . . . . . . . . . . . . . . . . . 83
Coding a DST installation exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Coding an installation exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Coding the WAIT FOR DATA function . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Requesting data (PL/I) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Sending data (PL/I) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Automating MSUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Translating code points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Registering applications with MS transport and operations management . . . . . . . . . . . . . . . 92
Registering applications with the high-performance transport . . . . . . . . . . . . . . . . . . 94
Sending an alert over the MS transport . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Sending an alert over the high-performance transport . . . . . . . . . . . . . . . . . . . . . 96
Sending an MDB to NetView for processing . . . . . . . . . . . . . . . . . . . . . . . . 97
Contents vii
CNMMEMC (CNMCLOSMEM): Close NetView Partitioned Data Set . . . . . . . . . . . . . . . 231
CNMMEMO (CNMOPENMEM): Open NetView Partitioned Data Set . . . . . . . . . . . . . . 232
CNMMEMR (CNMREADMEM): Read NetView Partitioned Data Set . . . . . . . . . . . . . . . 233
CNMNAMS (CNMNAMESTR): Named Storage . . . . . . . . . . . . . . . . . . . . . . 234
CNMPMDB (CNMPRSMDB): Process Message Data Block . . . . . . . . . . . . . . . . . . 236
CNMPOOL (CNMSTRPOOL): Storage Pool . . . . . . . . . . . . . . . . . . . . . . . 237
CNMQAPI (CNMOPREP): Resource Object Data Manager . . . . . . . . . . . . . . . . . . 239
CNMRGS (CNMREGIST): Application Registration . . . . . . . . . . . . . . . . . . . . . 241
CNMSCAN (CNMSSCAN): Parse or Convert Character String–PL/I Only . . . . . . . . . . . . . 246
CNMSCOP (CNMSCOPECK): Command, Keyword, and Value Authorization Checking . . . . . . . . 249
CNMSMSG (CNMSENDMSG): Send Message or Command . . . . . . . . . . . . . . . . . . 251
CNMSMU (CNMSENDMU): Send Message Unit . . . . . . . . . . . . . . . . . . . . . 254
CNMSUBS (CNMSUBSYM): Substitute System Symbolics . . . . . . . . . . . . . . . . . . 261
CNMVARS (CNMVARPOOL): Set or Retrieve Variables . . . . . . . . . . . . . . . . . . . 263
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Programming Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Privacy policy considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Contents ix
x Programming: PL/I and C
Figures
1. Example of Link-Editing a PL/I Program . . . . . . . . . . . . . . . . . . . . . . . 44
2. Sample panel definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3. Syntax for PWATDAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4. Flow of the WAIT FOR DATA Function (PL/I) . . . . . . . . . . . . . . . . . . . . . . 88
5. Sample Full-Screen View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
6. Flow of the WAIT FOR DATA Function . . . . . . . . . . . . . . . . . . . . . . . . 154
7. System response to RID invocation . . . . . . . . . . . . . . . . . . . . . . . . . 169
8. PL/I Entry Screen for YOURPGM . . . . . . . . . . . . . . . . . . . . . . . . . 170
9. Entry Screen for CNMSMSG . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
10. Exit Screen for CNMSMSG . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
11. PL/I Exit Screen for YOURPGM . . . . . . . . . . . . . . . . . . . . . . . . . . 172
12. Example of command procedure cancellation (1) . . . . . . . . . . . . . . . . . . . . . 180
13. Example of command procedure cancellation (2) . . . . . . . . . . . . . . . . . . . . . 180
14. Example of command procedure cancellation (3) . . . . . . . . . . . . . . . . . . . . . 181
15. Example of command procedure cancellation (4) . . . . . . . . . . . . . . . . . . . . . 181
Intended audience
This publication is for system programmers who are knowledgeable about PL/I
and C and familiar with the functions provided by the NetView program. This
publication is also useful for network operators.
Publications
This section lists publications in the IBM Tivoli NetView for z/OS library and
related documents. It also describes how to access Tivoli publications online and
how to order Tivoli publications.
Related publications
You can find additional product information on the NetView for z/OS web site at
http://www.ibm.com/software/tivoli/products/netview-zos/.
For information about the NetView Bridge function, see Tivoli NetView for OS/390
Bridge Implementation, SC31-8238-03 (available only in the V1R4 library).
For NetView for z/OS terms and definitions, see the IBM Terminology web site.
The following terms are used in this library:
NetView
For the following products:
v Tivoli NetView for z/OS version 6 release 2 modification 1
v Tivoli NetView for z/OS version 6 release 2
v Tivoli NetView for z/OS version 6 release 1
v Tivoli NetView for z/OS version 5 release 4
v Tivoli NetView for z/OS version 5 release 3
v Tivoli NetView for OS/390® version 1 release 4
v NetView releases that are no longer supported
CNMCMD
For the CNMCMD member and the members that are included in it using
the %INCLUDE statement
CNMSTYLE
For the CNMSTYLE member and the members that are included in it using
the %INCLUDE statement
DSIOPF
For the DSIOPF member and the members that are included in it using the
%INCLUDE statement
PARMLIB
For SYS1.PARMLIB and other data sets in the concatenation sequence
MVS™ For z/OS operating systems
MVS element
For the base control program (BCP) element of the z/OS operating system
VTAM®
For Communications Server - SNA Services
IBM Tivoli Network Manager
For either of these products:
v IBM Tivoli Network Manager
v IBM Tivoli OMNIbus and Network Manager
IBM Tivoli Netcool®/OMNIbus
For either of these products:
Unless otherwise indicated, topics to programs indicate the latest version and
release of the programs. If only a version is indicated, the topic is to all releases
within that version.
Note: If you print PDF documents on other than letter-sized paper, set the option
in the File > Print window that enables Adobe Reader to print letter-sized pages
on your local paper.
Ordering publications
You can order many Tivoli publications online at http://www.ibm.com/e-
business/linkweb/publications/servlet/pbi.wss
Accessibility
Accessibility features help users with a physical disability, such as restricted
mobility or limited vision, to use software products successfully. Standard shortcut
and accelerator keys are used by the product and are documented by the operating
system. Refer to the documentation provided by your operating system for more
information.
For additional information, see the Accessibility appendix in the User's Guide:
NetView.
Downloads
Clients and agents, and several free NetView applications can be downloaded from
the NetView for z/OS support web site:
http://www.ibm.com/software/sysmgmt/products/support/
IBMTivoliNetViewforzOS.html
Support information
If you have a problem with your IBM software, you want to resolve it quickly. IBM
provides the following ways for you to obtain the support you need:
Online
Access the Tivoli Software Support site at http://www.ibm.com/software/
sysmgmt/products/support/index.html?ibmprd=tivman. Access the IBM
Software Support site at http://www.ibm.com/software/support/
probsub.html.
IBM Support Assistant
The IBM Support Assistant is a free local software serviceability workbench
that helps you resolve questions and problems with IBM software
products. The Support Assistant provides quick access to support-related
information and serviceability tools for problem determination. To install
the Support Assistant software, go to http://www.ibm.com/software/
support/isa/.
Troubleshooting information
For more information about resolving problems with the NetView for z/OS
product, see the IBM Tivoli NetView for z/OS Troubleshooting Guide.
Additional support for the NetView for z/OS product is available through
the NetView user group on Yahoo at http://groups.yahoo.com/group/
NetView/. This support is for NetView for z/OS customers only, and
registration is required. This forum is monitored by NetView developers
who answer questions and provide guidance. When a problem with the
code is found, you are asked to open an official problem management
record (PMR) to obtain resolution.
Typeface conventions
This publication uses the following typeface conventions:
Bold
v Lowercase commands and mixed case commands that are otherwise
difficult to distinguish from surrounding text
v Interface controls (check boxes, push buttons, radio buttons, spin
buttons, fields, folders, icons, list boxes, items inside list boxes,
multicolumn lists, containers, menu choices, menu names, tabs, property
sheets), labels (such as Tip:, and Operating system considerations:)
v Keywords and parameters in text
Italic
v Citations (examples: titles of publications, diskettes, and CDs
v Words defined in text (example: a nonswitched line is called a
point-to-point line)
v Emphasis of words and letters (words as words example: “Use the word
that to introduce a restrictive clause.”; letters as letters example: “The
LUN address must start with the letter L.”)
v New terms in text (except in a definition list): a view is a frame in a
workspace that contains data.
v Variables and values you must provide: ... where myname represents...
Monospace
v Examples and code examples
v File names, programming keywords, and other elements that are difficult
to distinguish from surrounding text
v Message text and prompts addressed to the user
v Text that the user must type
v Values for arguments or command options
When using the Windows command line, replace $variable with %variable% for
environment variables and replace each forward slash (/) with a backslash (\) in
directory paths. The names of environment variables are not always the same in
the Windows and UNIX environments. For example, %TEMP% in Windows
environments is equivalent to $TMPDIR in UNIX environments.
Note: If you are using the bash shell on a Windows system, you can use the UNIX
conventions.
Symbols
The following symbols are used in syntax diagrams:
►► Marks the beginning of the command syntax.
► Indicates that the command syntax is continued.
| Marks the beginning and end of a fragment or part of the command
syntax.
►◄ Marks the end of the command syntax.
Parameters
The following types of parameters are used in syntax diagrams:
Required
Required parameters are shown on the main path.
Optional
Optional parameters are shown below the main path.
Default
Default parameters are shown above the main path. In parameter
descriptions, default parameters are underlined.
When you issue a command, spaces are required between the parameters unless a
different separator, such as a comma, is specified in the syntax.
In the following example, the USER command is a keyword, the user_id parameter
is a required variable, and the password parameter is an optional variable.
►► USER user_id ►◄
password
When examples of commands are shown, commas are also used to indicate the
absence of a positional operand. For example, the second comma indicates that an
optional operand is not being used:
COMMAND_NAME opt_variable_1,,opt_variable_3
You do not need to specify the trailing positional commas. Trailing positional and
non-positional commas either are ignored or cause a command to be rejected.
Restrictions for each command state whether trailing commas cause the command
to be rejected.
Abbreviations
Command and keyword abbreviations are listed in synonym tables after each
command description.
Syntax examples
The following examples show the different uses of syntax elements:
v “Required syntax elements”
v “Optional syntax elements”
v “Default keywords and values” on page xxii
v “Multiple operands or values” on page xxii
v “Syntax that is longer than one line” on page xxii
v “Syntax fragments” on page xxii
►► REQUIRED_KEYWORD required_variable ►◄
A required choice (two or more items) is shown in a vertical stack on the main
path. The items are shown in alphanumeric order.
►► REQUIRED_OPERAND_OR_VALUE_1 ►◄
REQUIRED_OPERAND_OR_VALUE_2
►► ►◄
OPTIONAL_OPERAND
A required choice (two or more items) is shown in a vertical stack below the main
path. The items are shown in alphanumeric order.
KEYWORD1 OPTION=*
►► COMMAND_NAME ►◄
KEYWORD1 OPTION= *
KEYWORD2 VALUE1
KEYWORD3 VALUE2
►► KEYWORD= ( ▼ value_n ) ►◄
,
▼ REPEATABLE_OPERAND_OR_VALUE_1
REPEATABLE_OPERAND_OR_VALUE_2
REPEATABLE_OPERAND_OR_VALUE_3
► OPERAND8 ►◄
Syntax fragments:
Some syntax diagrams contain syntax fragments, which are used for lengthy,
complex, or repeated sections of syntax. Syntax fragments follow the main
diagram. Each syntax fragment name is mixed case and is shown in the main
diagram and in the heading of the fragment. The following syntax example shows
a syntax diagram with two fragments that are identified as Fragment1 and
Fragment2.
Fragment1
Fragment2
Note: Before reading this chapter, review the information in the IBM Tivoli NetView
for z/OS Customization Guide. You must have experience with the NetView program
and programming experience in PL/I or C for the tasks described in this book.
The command must be executable in the calling environment. For example, data
services commands can be called only from a data services command processor.
Operator interaction
The following sections describe operator interaction in line mode and full-screen
mode.
Full-screen input/output
HLL command processors can call the NetView VIEW command to provide
full-screen interaction with an operator. This function is similar to the use of the
VIEW command from a command list. You can also roll among NetView
applications, including HLL command processors. HLL command processors are
treated like command lists when determining roll groups. NetView also provides
the capability to asynchronously update a panel while it is being displayed.
Data access
The following sections describe data access techniques available to HLL command
processors or installation exit routines.
Message trapping
Frequently, command procedures must intercept or trap and process messages that
usually go to an operator. The NetView HLL application programming interface
(API) provides this function for single and multiline messages.
command processors from the automation table upon receipt of MSUs. NetView
also provides the command processor with access to the command and the MSU
that called the command.
VSAM files
HLL data services command processors can read, write, update, and delete records
in VSAM files associated with the task under which the command processor is
running. Other command processors are allowed to run while the input/output
(I/O) requests are running.
The pipeline facility supports the use of the CNMCMD service to call DSIVSAM
and DSIVSMX to access VSAM files. Refer to the IBM Tivoli NetView for z/OS
Command Reference or the NetView online help for information about DSIVSAM
and DSIVSMX.
Although both transports provide the same functions and mask the LU 6.2
complexities, each transport offers its own advantages.
MS Transport
v Uses LU 6.2 conversation protocols that generate more network traffic than the
high performance transport protocols to transport each piece of data.
v Guarantees delivery of data or specific error notification about the data.
Refer to the IBM Tivoli NetView for z/OS Application Programmer's Guide for a more
detailed description of the LU 6.2 transports.
When allocated, these files can be accessed using the file I/O facilities present in
the language being used.
Storage copying
HLL command processors and installation exit routines can make a copy of any
area of virtual storage in the NetView address space in which the HLL command
processor or installation exit routine is running. A request to copy an area outside
of this space results in a return code instead of an 0C4 ABEND. This feature is
useful for debugging because it enables you to intercept and act upon a return
code instead of failing with a hard abend.
Note: Ensure that the storage area to which the copy is made belongs to your
program.
Named storage
HLL command processors or installation exit routines can allocate and free an area
of virtual storage and associate a name with it so that other HLL command
processors and installation exit routines running under the same task can access
this area of storage. Transaction-oriented applications can use this function to save
data across transactions.
NetView Bridge
The NetView Bridge option allows data to be transported between a NetView
system running in a z/OS environment and a non-NetView database. This option
is useful when you must access a non-NetView database to create and update
problem records, or to access and retrieve configuration data. The NetView Bridge
is also an effective means of connecting an active NetView installation to other
databases by using user-written command procedures.
For additional information about the NetView Bridge option, refer to the
Information Management for z/OS Guide to Integrating with Tivoli Applications.
Debugging support
The NetView HLL API provides two debugging tools for users: an interactive
debugger that displays the operands and results of all HLL API service routine
invocations, and a continuous first failure data capture trace for ABEND
debugging.
In addition, you can use the NetView internal trace. For more information, see the
IBM Tivoli NetView for z/OS Troubleshooting Guide.
RID operates at the subtask level, so using RID to stop an HLL command
processor or installation exit routine running under one subtask does not affect
other subtasks in the same NetView address space.
You can write installation exit routines to view, delete, or replace data flowing to,
from, or through the NetView program. For example, your code can examine the
messages passing through the NetView program, record relevant data, and initiate
work requests based on the data. In addition, your code can delete any
unnecessary messages from further processing or substitute a modified message in
place of the original message. Thus, installation exit routines can handle a specific
event with nonstandard processing and automate processes based on message
information.
Note: Changes do not take effect until you recycle the NetView program.
Each installation exit handles a particular event, such as the reception of data from
the system console. When that event occurs, control is passed to the appropriate
installation exit routine for processing. After processing, the installation exit routine
returns control and passes a return code to the NetView program. Optionally, up to
10 DST installation exit routines can be concatenated. If the first exit did not
indicate USERDROP, the NetView program then calls the next one in the sequence.
This process continues until the last DST exit has returned control to the program.
For more information about input to the installation exit routines, see Chapter 6,
“Coding HLL command processors and installation exits,” on page 49 and
Chapter 8, “Coding your C program interfaces and restrictions,” on page 103.
Coding restrictions
The following HLL service routines cannot be called from any installation exit:
v CNMCMD
v CNMCNMI
v CNMKIO
Performance considerations
Preinitialized environments can significantly improve the performance of
installation exits written in PL/I and C. Instead of repeatedly allocating and
deallocating environments for each invocation of an installation exit routine, the
NetView program manages global pools of preinitialized environments. Exit
routines can then run in these environments, without initializing them, each time
an exit program is run.
Note: Programs compiled with Enterprise PL/I for z/OS cannot use NetView's
preinitialized language environments.
Avoid coding installation exits for frequently called functions, such as VSAM
input/output (I/O), because performance can be degraded significantly.
Deleting messages
To delete a message entirely, use return code USERDROP.
Replacing messages
To replace a message, use return code USERSWAP and set the input CMDBUF
(Cmdbuf) contents to the desired data. For installation exits written in PL/I, the
replacement data must be less than or equal in length to the original CMDBUF
(Cmdbuf) data; otherwise it is truncated to the original length of the CMDBUF
(Cmdbuf) data.
For installation exits written in C, the replacement data must be less than or equal
in length to the original CMDBUF (Cmdbuf) data. If the replacement data is longer
than the original data, storage overlay can occur which causes abends and other
unpredictable results.
You can concatenate DST installation exit routines when replacing messages. In this
case, the buffer containing the replacement message becomes the input for the
subsequent DST installation exit routine. Refer to IBM Tivoli NetView for z/OS
Programming: Assembler for message flows.
Table 1 lists all HLL installation exits and the task environments under which they
can be called.
Table 1. Installation Exit Environments
Exit Description Applicable Tasks Associated Samples
BNJPALEX Not supported in HLL
DSIEX01 Not supported in HLL
DSIEX02A NNT, OST, PPT NNT, OST, CNMS4213, CNMS4243
Message output this domain CNMCSSIR
or
Message output cross-domain
DSIEX03 NNT, OST, PPT CNMS4210, CNMS4211,
Input before command processing (1) CNMS4212, CNMS4240,
CNMS4241, CNMS4242
DSIEX04 Log output for buffers not processed by Main task or any subtask
DSIEX02A
DSIEX05 Before VTAM command invocation (2) NNT, OST, PPT
DSIEX06 Solicited VTAM messages (2) NNT, OST, PPT
DSIEX07 Cross-domain command send NNT, OST
DSIEX09 Output to the system console Main task or any subtask
DSIEX10 Input from the system console DSIWTOMT
DSIEX11 Unsolicited VTAM messages (2) PPT
DSIEX12 Logon validation NNT, OST
DSIEX13 OST/NNT message receiver NNT, OST, PPT
DSIEX14 Before logging off NNT, OST
DSIEX16 Not supported in HLL
DSIEX16B Not supported in HLL
DSIEX17 Not supported in HLL
DSIEX18 Not supported in HLL
DSIEX19 Service point application authorization NNT, OST, PPT
checking during RUNCMD processing
DSIEX20 Not supported in HLL
DSIEX21 Encryption key for DSITCPRF CNMTAMEL DSIEX21
XITBN BSAM empty file DST
Installation exits
The NetView program provides a number of installation exits that are described in
the following sections. For a description of message flows and interception points
in OSTs, NNTs, and PPTs, refer to IBM Tivoli NetView for z/OS Programming:
Assembler.
Example of Use: Because the message has been formatted but not yet displayed or
logged, you can use DSIEX02A to delete or replace the message before it is
automated, logged, or displayed. Messages are reformatted by removing, changing,
and adding new buffers to the original message. DSIEX02A prevents OVERRIDE
command options from taking effect for messages.
Changes to the English message text are not reflected in the translated messages.
CNMSMSG can be issued from DSIEX02A, but only with the destination type of
TASK. The message resulting from the CNMSMSG call does not re-drive
DSIEX02A.
Return Codes: The DSIEX02A user exit sets register 15 to 0 when it returns control
to the NetView program.
Note:
1. Do not use the USERSWAP return code to swap messages. Use the CNMALTD
service. See “CNMALTD (CNMALTDATA): alter data on a queue” on page 183
2. Messages issued by DSIPSS with TYPE=FLASH are not exposed.
Example of Use: If your conditions are more complex than those provided by the
authority table for NetView commands, you can use DSIEX03 to restrict the use of
particular regular commands.
Example of Use: Use DSIEX04 to edit information sent to the network log, the MVS
system log, or the hardcopy log. You can use DSIEX04 to send certain messages to
a specific log or to no log at all.
Coding Considerations: DSIEX04 can run under any subtask that initiates message
logging. Ensure that any HLL services you request are supported by the subtask
under which the routine is running. To determine the subtask under which your
routine is running, see the TASK option under icname in “CNMINFC
(CNMINFOC): Query NetView Character Information” on page 218.
Example of Use: You can use DSIEX05 to verify that an operator is authorized to
issue a particular command.
Commands passed to DSIEX05 have already been processed under DSIEX03 (and
possibly DSIEX01).
Example of Use: You can use DSIEX06 to change the message number or text of a
VTAM message or to process VTAM messages.
NetView automation is called after this installation exit routine has been called.
Therefore, any changes made to messages in this installation exit can affect
NetView automation. NetView automation is not called for a message that has
been deleted by this installation exit routine.
Example of Use: You can use DSIEX07 to monitor cross-domain traffic through the
network.
Example of Use: You can use DSIEX09 to edit messages sent to the system console.
Example of Use: You can use DSIEX10 so the system console operator can enter
command abbreviations and synonyms. These can then be expanded in the
installation exit routine.
Coding Considerations: DSIEX10 can be called only from the DSIWTOMT task, not
from a subtask.
DSIEX10 is not called for commands entered by an operator using an MVS OST.
DSIEX03 is called instead of DSIEX10.
Example of Use: DSIEX11 can issue CNMSMSG to send a copy of the message
buffer prior to processing by the NetView program.
Non-Takeover and Takeover Operator Task Processing: When DSIEX12 gets control
for a non-takeover or a takeover operator task, the input to DSIEX12 includes the
takeover operator ID name field.
For a non-takeover logon, the operator ID is listed in the Operator ID name field
and the Takeover Operator ID field is blank.
For a takeover logon, the value "takeover" is listed in the Operator ID field and
the Takeover Operator ID name field contains the operator ID that is taken over.
For a takeover operator task, DSIEX12 is called mainly to validate the operator ID
and password. Therefore, first check the Operator ID field to determine if this exit
was called for a takeover operator task.
Coding Considerations: If the installation exit routine issues a return code of 0, the
logon proceeds. If specified, your hardcopy log starts and the initial command
runs. If the issued return code is nonzero, the operator is logged off.
This exit is called under all OSTs and NNTs, including unattended operator and
MVS console operator tasks.
The accompanying structure maps the header information in the CMDBUF buffer
(Cmdbuf) that is passed to the DSIEX12 exit. OFFSET and LENGTH values are
given in bytes.
Table 2. DSIEX12 Command buffer parameter field descriptions
Offset Length Function
0 8 Operator ID name or "takeover"
8 8 Operator LU name
16 8 Password
24 8 Hardcopy device name
32 8 Profile name
40 8 New password
48 8 Takeover Operator ID. The operator ID that is taken
over when operator ID is "takeover".
Example of Use: You can use DSIEX13 with IFRCODCR to initiate a user function
with a buffer. Code DSIEX13 to perform the user function specified by IFRCODCR.
The IFRCODCR message buffer can be sent (using the DSIMQS macro) to another
task or queued to the task that you are running. Refer to IBM Tivoli NetView for
z/OS Programming: Assembler for more information about internal function requests.
You can also use DSIEX13 to monitor DSI039I messages received by OSTs or NNTs.
The exit cannot communicate with the operator’s terminal. However, you can write
to the system console and write entries to the log.
Example of Use: You can use DSIEX14 to save accounting information, update
tables, or free storage.
For a takeover operator task, the NetView program calls DSIEX12 as mentioned
above. For this type of task, DSIEX12 is called mainly to validate the operator ID
and password. When the takeover processing completes, the task for the session
that is being taken over is the task used for the session, and the takeover operator
task is cleaned up. For the takeover task processing, the NetView program does
not call DSIEX14.
Return Codes: The NetView program ignores any return code received from this
installation exit routine.
Example of Use: You can use DSIEX19 to provide security checking at the service
point command level. This security checking can be done by calling CNMSCOP or
by using your own technique. To use CNMSCOP for security checking, you can
define a CMDDEF statement in CNMCMD specifying DSISPCMD. You can then
define command, keyword, and value authorization checking based on the
CMDDEF statement. For example, to define the service point command ADP to
enable checking with CNMSCOP, define:
CMDDEF.ADP.MOD=DSISPCMD
Example of Use: You can use XITBN to place a record in the empty data set. Code
this installation exit only if you want to write a BSAM subtask using the DST as a
base.
Coding Considerations: XITBN can use only the service facilities available to the
DST.
Return Codes: To initialize the BSAM data set or file, return the USERSWAP return
code and set the command buffer to the record to be used. A return code other
than USERSWAP causes the DST to end.
Example of Use: You can use XITBO to modify the record before it is sent to the
BSAM data set or file.
Coding Considerations: XITBO can use only the service facilities available to the
DST.
Avoid coding installation exits for frequently called functions, such as BSAM I/O,
because performance can be degraded significantly.
Example of Use: You can use XITCI to modify CNM input data for the hardware
monitor.
Coding Considerations: XITCI can use only the service facilities available to the
DST.
If you specify USERSWAP (8), the substitute buffer must contain a valid network
services request unit (RU) of the same type as the input RU. Refer to the SNA
library for a description of RU formats.
Control point management services units (CP-MSUs) and MDS-MUs are not routed
through DSICRTR and are only accessible under the BNJDSERV subtask.
XITCI called under a DST other than DSICRTR can access CNM data routed to
that particular subtask.
For the various receiving subtasks listed, Table 5 shows the major vector keys that
can be found in the specific RU.
Table 5. Routing of RUs by Major Vector Key
Major Vector Key Description Receiving Subtask
X'0000' Alert BNJDSERV
X'0001' Link event BNJDSERV
X'0002' Resolution BNJDSERV
X'000F' CMIP statistics BNJDSERV
X'0010' Trace AAUTSKLP
X'0025' PD statistics BNJDSERV
X'006F' Send message to operator DSIGDS
X'0080' RTM AAUTSKLP
X'132E' RECFMS envelope BNJDSERV
X'1332' Link configuration data BNJDSERV
X'13FF' Reserved BNJDSERV
X'154D' Routing and targeting instruction BNJDSERV
The fields in the focal point transfer RU header are listed in Table 6.
Table 6. Focal Point transfer RU header
Offset Name Length Description
0 HDR LEN 2 bytes, binary Length of the total RU (includes RU header
and NMVT)
2 HDR ID 2 bytes Always X'1040'
4 Reserved 11 bytes For NetView use only
15 DOMID LEN 1 byte, binary Originator's domain ID length
16 DOMAIN ID 8 bytes, char Originator's domain ID, padded with blanks
24 Reserved 20 bytes For NetView use only
44 Name Variable NMVT data
The first 2 bytes of the focal point transfer RU contain the length of the entire
buffer (FPT RU + NMVT). The next 2 bytes contain the header ID, which is always
X'1040'. The 16th byte contains the length of the originating domain ID. When
returning a substitute buffer, do not modify the focal point transfer RU (the first 44
bytes); replace only the NMVT portion of the buffer with a valid NMVT.
For more information about the format of a specific RU, refer to the SNA library
and NCP and EP Reference Summary and Data Areas.
Return Codes: XITCI can use two other return codes in addition to USERASIS,
USERDROP, and USERSWAP.
USEREXLG (252)
The hardware monitor, running under the BNJDSERV task, records the
message only to system management facilities (SMF) and then discards it.
No data is logged to the database. This processing is the same for all alerts
including forwarded alerts. This occurs when you designate NPDA
REPORTS ON. Refer to the NetView online help for more information
about the REPORTS command.
USEREVNT (253)
The hardware monitor, running under task BNJDSERV, records the
message as an event or statistic on its database, but not as an alert. The
hardware monitor recording filters are not applied to the message as they
would be normally. Instead, the ESREC filter is set to PASS and all other
recording filters are set to BLOCK.
For SNA-MDS forwarded alerts from non-NetView entry points, only event
data is recorded to the database; this processing is the same as for local
alerts that are not forwarded. For NV-UNIQ/LUC alert forwarding
protocol forwarded alerts and SNA-MDS forwarded alerts from an entry
point NetView, no data is recorded to the database.
Refer to the description for the SRFILTER command in the NetView online
help for an explanation of the recording filters.
Note: Alerts for which the XITCI installation exit was not driven are still logged in
hardware monitor as alerts.
Messages that are blocked as a result of a filter from the rate function might not be
automated. You can use the AUTORATE statement to control this.
Refer to the RATE and AUTORATE statements in the IBM Tivoli NetView for z/OS
Administration Reference for information about these statements.
Example of Use: You can use XITCO to modify the request for CNM data (forward
RU).
Coding Considerations: XITCO can use only the service facilities available to the
DST. If a substitute buffer is returned, the data must be a valid SNA RU.
Example of Use: You can add XITDI to the DST initialization deck to provide user
initialization values to DST initialization.
Coding Considerations: Do not replace the DST XITDI exits that are provided with
the NetView program.
XITDI can use only the service facilities available to the DST subtask.
Return Codes: XITDI can prevent the DST from processing a definition statement
by passing return code USERDROP.
When XITDI is called for an end-of-file situation, a nonzero return code indicates
that the DST must be stopped.
Example of Use: You can use XITVI to modify the record after it has been retrieved
from a VSAM data set or file.
Coding Considerations: XITVI can use only the service facilities available to the
DST.
Avoid coding installation exits for frequently called functions, such as VSAM I/O,
because performance can be degraded significantly.
Example of Use: You can use XITVN to place a record in the empty data set. The
NetView program provides its own XITVN for VSAM logs generated under DST.
Code this installation exit only if you want to write your own VSAM subtask using
DST as a base.
Coding Considerations: XITVN can use only the service facilities available to the
DST.
Note:
1. Only VSAM key-sequenced data sets are supported.
2. Do not replace the XITVN exits that are provided with the NetView program
for the DSILOG and DSITRACE subtasks.
Return Codes: To initialize the VSAM data set or file, return the USERSWAP return
code and set the command buffer to the record to be used. A return code other
than USERSWAP causes the DST to end.
Example of Use: You can use XITVO to modify the record before it is sent to the
VSAM data set or file.
Coding Considerations: XITVO can use only the service facilities available to the
DST. The text portion is mapped by DSILOGDS when using this exit for the
DSILOG task.
Avoid coding installation exits for frequently called functions, such as VSAM I/O,
because performance can be degraded significantly.
Example of Use: You can use XITXL to write user-defined data to a user-defined
log.
Coding Considerations: XITXL can use only the service facilities available to the
DST.
You can use the following offsets (in byte values) to access the CMDBUF (Cmdbuf):
Table 7. XITXL Buffer Parameters
Offset Length Name Function
0 2 ELBLENG Unsigned length of header
2 2 ELBRLENG Unsigned length of record
4 1 ELBTYPE Log type
5 3 ELBLOG EBCDIC log type
8 4 Reserved by NetView
12 Start of record
A DST is a set of NetView interfaces built on top of the NetView optional task
base. The NetView optional task is described in IBM Tivoli NetView for z/OS
Programming: Assembler. A DST provides a subtask processing module (DSIZDST)
together with the following interfaces:
v An initialization exit
v A data services command processor (DSCP) that provides support for VSAM
(through CNMKIO) and CNMI (through CNMCNMI)
v Various installation exits. See Table 1 on page 13.
For more information about the TASK and DSTINIT statements referenced in this
chapter, refer to IBM Tivoli NetView for z/OS Administration Reference.
When the DST is started, the initialization data set specified by the MEM keyword
on the TASK statement is read, and the DSTINIT statements are processed.
USERDROP (4)
The statement is not processed by DSIZDST. Use this return code if your
installation exit is going to process the statement. (You can define your
own initialization statements).
USERSWAP (8)
The swapped buffer is processed by DSIZDST. If the swapped buffer
does not contain a valid DSTINIT statement, it is rejected by DSIZDST
and processing continues.
When returning from the last call (for end of file), any nonzero return code ends
the DST. Termination occurs only if the initialization process fails.
When a DST is defined with CNM services, an access method control block (ACB)
is opened with an ACB name (the application name) equivalent to the task name
as defined by the TSKID operand in the DST TASK definition statement. (The one
exception is the hardware monitor, whose CNMI DST task name is BNJDSERV, but
the application name is BNJHWMON.) If the DST task name is entered as the
application name in the VTAM routing table, the unsolicited data RU is passed to
the unsolicited data services command processor for that DST.
The following DSTINIT keywords are related to the unsolicited CNM data
interface:
v UNSOL - Specifies the command verb name of the module that is to serve as the
unsolicited DSCP for this DST. The unsolicited DSCP must not issue the
CNMCNMI macro, but can issue the CNMKIO macro.
v DSRBU - Specifies the number of unsolicited data services request blocks
(DSRBs) that are to be allocated to this DST. If unsolicited CNM data will not be
processed by this DST, set this value to 0; otherwise set it to 1.
When the unsolicited HLL DSCP receives control, CNMDBUF (Cmdbuf) contains
the unsolicited data RU.
The DSTINIT keyword DSRBO specifies the number of solicited DSRBs that are
required by this task and limits the number of concurrent CNMCNMI or CNMKIO
requests, or both. This value must be at least 1 and no greater than 862. (A DSCP is
not called until a solicited DSRB is available.)
VSAM services
A DSCP can call the CNMKIO service routine to perform input or output for a
specified VSAM data set. The following DSTINIT keywords are related to
CNMKIO service routine:
v DSRBO - Specifies the number of solicited DSRBs that are required by this task,
and limits the number of concurrent CNMCNMI or CNMKIO service routines,
or both. This value must be at least 1 and no greater than 862. (A DSCP is not
called until a solicited DSRB is available.)
v PDDNM - Specifies the ddname of the primary data set to be used by VSAM
services.
v PPASS - Specifies the VSAM password to be used when the primary data set
ACB is opened.
v SDDNM - Specifies the ddname of the secondary data set to be used by VSAM
services. Use the NetView SWITCH command to control which data set is the
active data set.
v SPASS - Specifies the VSAM password to be used when the secondary data set
ACB is opened.
v MACRF - Specifies local resource sharing.
v XITVI - Specifies an installation exit to receive control upon input from the
VSAM data set before the input record is passed to the requesting DSCP.
v XITVN - Specifies an installation exit to receive control when an empty VSAM
data set has been opened for processing. This exit enables you to put an
initialization record into the data set.
v XITVO - Specifies an installation exit to receive control before output of a record
to the VSAM data set.
User-defined services
HLL command processors defined as TYPE=D or TYPE=RD can be called under
the DST to perform user-defined functions in addition to CNMKIO or CNMCNMI
functions.
Languages supported
The following language environments are supported:
v z/OS C and C++
v IBM PL/I for MVS and VM V1R1M1 and Enterprise PL/I for z/OS
The minimum version of Enterprise PL/I for z/OS is V3R9M0.
Note: Programs compiled with Enterprise PL/I for z/OS cannot use NetView's
preinitialized language environments.
Note: Language and storage restrictions are required so that different programs
can reuse the same environment. For more information about restrictions resulting
from shared use of preinitialized environments, refer to the IBM PL/I for MVS and
VM V1R1M1 library, the Enterprise PL/I for z/OS library, or the z/OS Language
Environment library.
Non-preinitialized environments
The following steps create and run a program in a non-preinitialized environment:
1. Write the command processor or installation exit code using PL/I or C.
2. Add the appropriate HLLOPTS that specifies whether your program:
v Accepts queued input.
v Ends on CANCEL/RESET
3. Compile your program.
4. Link edit your program with DSIHSTUB and the interface module appropriate
to your language environment. See Table 8 on page 36.
5. Run your program.
Preinitialized environments
The following steps create and run a program in a preinitialized environment.
1. Use the following steps to design and implement the preinitialized
environments for your system:
Restriction: A NetView program compiled with IBM Enterprise PL/I for z/OS
cannot use the preinitialized environment that the NetView program creates.
2. Code your command processor or installation exit using PL/I or C.
3. Add the appropriate HLLOPTS that specifies whether your program:
v Accepts queued input
v Ends on CANCEL/RESET
v Overrides the HLLENV DEFAULT=PREINIT or HLLENV
DEFAULT=NOTPREINIT setting for your system
v Is critical to run in a preinitialized environment
4. Compile your program.
For preinitialization-enabled PL/I programs, ensure that your program is
compiled with the SYSTEM(MVS) compile option. You can do this in one of the
following ways:
v Compile on MVS and allow the compiler to default to SYSTEM(MVS).
v Explicitly specify SYSTEM(MVS) with the PROCESS statement in your PL/I
source. For example, include:
*PROCESS SYSTEM(MVS);
v Specify SYSTEM(MVS) in the EXEC statement of the compiler JCL.
For preinitialization-enabled C programs, ensure that your program is compiled
with the TARGET(MVS) compile option. You can do this in one of the
following ways:
v Compile on MVS and allow the compiler to default to TARGET(MVS).
v Explicitly specify TARGET(MVS) with the #pragma options preprocessor
directive in your C source. For example, include:
#pragma options (TARGET(MVS))
v Specify TARGET(MVS) in the EXEC statement of the compiler JCL.
5. Link edit your program with the DSIHSTUB module and the interface module
appropriate to your language environment. See Table 8 on page 36. Programs
linked with the DSIHSTUB module and either the DSIEXAPP module or the
DSIEXAPC module are considered preinitialization-enabled.
6. Run your program. Whether your program runs in a preinitialized mode
depends on your system settings for HLLENV DEFAULT, the HLLOPTS
defined in the program, and the available preinitialized environments.
v Interface Modules
v HLLENV
v HLLOPTS
Interface modules
To identify your program to the NetView program as a command processor or
installation exit, link edit your program load-module with DSIHSTUB. DSIHSTUB
must be the entry point.
Also, link edit your program with the interface module appropriate to your
program type.
Note:
1. You can link your modules with preinitialization-enabled interface modules and
then use HLLOPTS and HLLENV to control whether the modules run
preinitialized or non-preinitialized. You can also explicitly link your modules
with a non-preinitialized interface module if you want the module to always
run non-preinitialized.
2. For non-preinitialized environments, to ensure that multiple environments
under a single task are supported, include an ORDER statement for the
interface module immediately after the DSIHSTUB module.
Table 8 lists supported environments and their associated interface modules.
Table 8. Language, interface modules, and HLLENV Type values cross-reference
Compiler and Interface
Program Type Library Module HLLENV TYPE
PL/I z/OS Language DSIEXANP
Non-preinitialized Environment
PL/I z/OS Language DSIEXAPP IBMADPLI
Preinitialization-enabled Environment
Language Environment z/OS Language DSIEXANC
Non-preinitialized Environment
Language Environment z/OS Language DSIEXAPC IBMADC
Preinitialization-enabled Environment
Enterprise for z/OS Language DSIEXENP
PL/I for z/OS Environment
(Non-preinitialized)
HLLENV command
Preinitialized environments are defined and managed by the NetView HLLENV
command. This command creates global pools of preinitialized environments that
can be used and then returned when programs that use them end.
For more information about the HLLENV command, refer to the NetView online
help.
For each language, you can define preinitialized environments using the HLLENV
command. The HLLENV TYPE keyword specifies definitions for the following
languages:
IBMADPLI
HLLENV specifications are for PL/I programs.
IBMADC
HLLENV specifications are for C programs.
Storage Keywords
HLLENV keywords enable you to customize the amount of initial storage allocated
for preinitialized environments.
For PL/I and C, the HLLENV PSTACK and PHEAP keywords are used to specify
the STACK and HEAP storage to be allocated for preinitialized environments. The
HLLENV PSTACK and PHEAP values override STACK or HEAP values declared
in the program.
See Chapter 6, “Coding HLL command processors and installation exits,” on page
49 and Chapter 8, “Coding your C program interfaces and restrictions,” on page
103 for more information about STACK, PHEAP, and HEAP and how they apply to
the PL/I and C environments.
The following sections describe how preinitialized environments created with the
REGENVS and CRITENVS keyword are distributed.
For critical preinitialized programs: The program first tries to use one of the
preinitialized environments from the global pool allocated with the HLLENV
Note: Even when a program is defined as critical, there is no guarantee that it can
run in a preinitialized environment. For example, if the number of preinitialized
environments in use equals the total number of environments defined for both the
REGENVS and CRITENVS keywords of HLLENV, your critical program will not
run in a preinitialized environment.
For example, to override the default HLL runtime options in an HLL program and
make the program non-cancelable, include:
PL/I Program
C Program
#pragma variable(HLLOPTS,NORENT)
extern unsigned int HLLOPTS = 0X40000000;
For C, the #pragma variable preprocessor directive indicates that the variable named
HLLOPTS is to be used in a non-reentrant fashion. This directive does not affect
the reentrance of the HLL program.
The following combinations of settings for HLLOPTS bits 2, 3, and 4, are important
to highlight:
v If you want a preinitialization-enabled program to run in a preinitialized
environment, regardless of the DEFAULT value on the HLLENV command, set
bits 2, 3, and 4 - 010. For example, include:
PL/I Program
C Program
#pragma variable(HLLOPTS,NORENT)
extern unsigned int HLLOPTS = 0X10000000;
v If you want a preinitialization-enabled program to run as a critical preinitialized
program regardless of the DEFAULT value on the HLLENV command, set bits 2,
3, and 4 - 011. For example, include:
PL/I Program
C Program
#pragma variable(HLLOPTS,NORENT)
extern unsigned int HLLOPTS = 0X18000000;
C Program
#pragma variable(HLLOPTS,NORENT)
extern unsigned int HLLOPTS = 0X20000000;
Examples
The following sections include various examples of setting up programs to run in
non-preinitialized and preinitialized environments.
Non-preinitialized example
In this example, you have a command processor written in PL/I language. Because
no other programs in your environment require a preinitialized environment, do
not set up one for this program. The following steps complete the example:
1. Write the command processor or installation exit code.
Include in your PL/I code the following HLLOPTS external declaration,
specifying that your command processor accepts queued input:
DCL HLLOPTS BIT(32) STATIC EXTERNAL
INIT(’10000000000000000000000000000000’B);
2. Compile the program.
3. Link edit the program with DSIHSTUB and choose between the following
items:
v If you are using PL/I for MVS and VM, link edit the program with
DSIEXANP.
v If you are using Enterprise PL/I for z/OS, link edit the program with
DSIEXENP.
See Table 8 on page 36 for additional detail on the interface modules.
4. Run your program.
Preinitialized example
In the next example, all command processors run in preinitialized environments to
improve performance. Most of your programs require 8192 bytes of STACK and
HEAP storage. You estimate that 5 preinitialized environments and 3 additional
environments for critical programs are required.
The first command processor you write is in PL/I. You want this command
processor to accept all defaults for HLLOPTS. Although you prefer that the
program run in a preinitialized environment, you do not consider it to be critical.
The following steps complete this example:
1. Define the preinitialized environments for PL/I using the HLLENV command:
HLLENV CHANGE,REGENVS=5,CRITENVS=3,PSTACK=131072,PHEAP=131072,
DEFAULT=PREINIT,TYPE=IBMADPLI
2. Code the command processor or installation exit.
3. Compile the program with the SYSTEM(MVS) compile option.
4. Link edit the program with DSIHSTUB and DSIEXAPP. The program cannot be
compiled with Enterprise PL/I for z/OS.
5. Run the program.
In the next example, the PL/I command processor requires different STACK and
HEAP storage from that defined using the PSTACK and PHEAP keywords on the
HLLENV command. The new command processor cannot run in a preinitialized
environment because it requires more initial storage than is defined for
preinitialized programs. The following steps complete the example:
1. Compile the program with the SYSTEM(MVS) compile option.
2. Link edit the program with DSIHSTUB and DSIEXAPP.
3. Run the program.
In another example, you decide to start writing command processors using the
Language Environment. For the Language Environment-based C preinitialized
environment, you estimate 3 preinitialized environments and 2 additional
preinitialized environments for critical programs are required. For Language
Environment programs, you decide to set the default to run all programs in a
non-preinitialized environment. However, your first command processor written in
the Language Environment is performance-sensitive and you feel that it is critical
that it runs in a preinitialized environment. Take the following steps:
1. Define the preinitialized environments for the Language Environment using the
HLLENV command:
HLLENV CHANGE,REGENVS=3,CRITENVS=2,DEFAULT=NOTPREINIT,TYPE=IBMADC
2. Write the command processor or installation exit code.
a. Include in your C code the following HLLOPTS external declaration
specifying that it is critical that your command processor run preinitialized.
The following HLLOPTS specification overrides your HLLENV
DEFAULT=NOTPREINIT command and specifies that your program is
critical.
#pragma variable(HLLOPTS,NORENT)
extern unsigned int HLLOPTS = 0X18000000;
b. Define the runtime options required for your program.
3. Compile the program with the TARGET(MVS) compile option.
4. Link edit the program with DSIHSTUB and DSIEXAPC.
5. Run the program.
Use the examples provided in this chapter to modify the compile and link-edit JCL
samples that you received with your compiler.
Note: You must have completed the installation steps for HLL before attempting to
start programs in the NetView environment.
Compiling
To compile programs using NetView services, modify the compile step in the JCL
to reference the NetView macro libraries and include a SYSLIB statement for
SYS1.MACLIB. An example of modifications to the compile step JCL for PL/I
follows:
//COMPILE EXEC PGM=IEL1AA,REGION=1000K,
// PARM=’OBJECT,MACRO,LIST,RENT’
.
.
.
//SYSLIB DD DSN=NETVIEW.V6R2M1.SCNMMAC1,DISP=SHR
// DD DSN=SYS1.MACLIB,DISP=SHR
.
.
.
The following example shows how to modify the compile step JCL for C:
//COMPILE EXEC PGM=CCNDRVR,PARM=(’RENT’),REGION=&CREGSIZ
.
.
.
//SYSLIB DD DSN=NETVIEW.V6R2M1.SCNMMAC1,DISP=SHR
// DD DSN=SYS1.MACLIB,DISP=SHR
.
.
.
Note:
1. When you compile PL/I programs, you can ignore the IEL0548I message.
2. When you compile with Enterprise PL/I for z/OS, message IBM1195I can be
ignored. Under some circumstances, message IBM2619I occurs; it can also be
ignored.
Link-editing
Consider the following when you link-edit modules:
v All load modules must be reentrant.
v Load modules can reside in 24- or 31-bit storage and can be entered in either
addressing mode.
v You must link edit all load modules with DSIHSTUB and the appropriate
interface module; DSIHSTUB must be the entry point.
To link edit a module to run with the NetView program, modify the link-edit step
in the JCL to reference the appropriate NetView libraries. This enables you to
include DSIHSTUB and the appropriate interface module when link-editing.
Link-edit library data sets and interface modules are listed in Table 11 on page 45.
If you want to run your existing non-preinitialized load modules with z/OS
Language Environment, first relink them with the z/OS Language Environment
runtime libraries.
Running
To start a command processor or installation exit in the NetView environment, you
must modify your NetView startup procedure to reference the appropriate runtime
libraries.
The runtime libraries appropriate for your command processor type are shown in
Table 12 on page 46. You must ensure that the required library is available at
runtime. One way to do so is to specify the required runtime library in the
STEPLIB of your NetView startup procedure.
PL/I command processors and installation exits are supported for IBM PL/I for
MVS and VM V1.1.1 and Enterprise PL/I for z/OS.
Initial parameters
The following initial parameters are passed to an HLL program upon invocation:
v CMDBUF
v HLBPTR
v ORIGBLCK
Chapter 7, “PL/I high-level language services,” on page 59 contains a sample
template for coding the main procedure statement and the initial parameter
declarations in PL/I.
CMDBUF
A varying length character field that contains the command or message that
drives this program.
If this program is driven as an installation exit (other than DSIEX02A), this
field contains the message that drives this exit. If driven as DSIEX02A,
CMDBUF does not contain any useful information, and you must retrieve the
message from the initial data queue (IDATAQ).
HLBPTR
A 4-byte pointer field containing the address of the HLB control block
(DSIPHLB). The HLB control block is the HLL API interface control block used
to communicate between the HLL service routines and HLL programs in the
NetView environment. This pointer is required on all HLL service routine
invocations. The HLB control block is unique for each invocation of an HLL
program. NetView automatically inserts HLBPTR for the PL/I macro format.
See Appendix A, “PL/I Control Blocks and Include Files,” on page 269 for
more information.
ORIGBLCK
A 40-byte structure that describes the origin of the request that called this
program. ORIGBLCK is mapped by DSIPORIG.
See Appendix A, “PL/I Control Blocks and Include Files,” on page 269 for
more information.
Runtime options
The method you use to specify PL/I runtime options depends on the type of PL/I
support you use for your programs. The way you specify PL/I runtime options,
therefore, depends on the following:
v Compiler
v Library (z/OS Language Environment)
v Preinitialization Support (Enabled or Disabled)
Use Table 13 as a starting point to familiarize yourself with the specific methods of
specifying the runtime options for your program. The table indicates the methods
to use based on the interface module that is being link-edited with a program.
Following the table, each method for specifying runtime options is described in
more detail.
v HEAP(pheap,128K,ANY,FREE,8,0)
v LIBSTACK(8,0,FREE)
v THREADHEAP(8,0,ANY,FREE)
v STORAGE(,,,0)
v ALL31(ON)
v TRAP(OFF)
v INTERRUPT(OFF)
v NOTEST(ALL,*,*)
v MSGQ(1)
v PLITASKCOUNT(1)
Refer to the z/OS Language Environment library for more information about these
options.
The following example shows how to override the initial values for PSTACK and
PHEAP for a PL/I program that requests to run in a preinitialized environment:
HLLENV CHANGE,PSTACK=262144,PHEAP=524288,TYPE=IBMADPLI
When you define LEOPTS in your program, the runtime options specified are used
instead of those described in “z/OS Language Environment preinitialization
defaults” on page 50 and “PSTACK and PHEAP.”
For example, you can override the default z/OS Language Environment
preinitialization, PSTACK, and PHEAP runtime options in a PL/I program as
shown in the following LEOPTS declaration.
DCL LEOPTS CHAR(255) STATIC EXTERNAL INIT((
’STACK(256K,256K,ANY,FREE) HEAP(256K,512K,ANY,FREE,8,0) TRAP(OFF) MSGQ(1)’ ||
’ BELOWHEAP(8,0,FREE) LIBSTACK(8,0,FREE) THREADHEAP(8,0,ANY,FREE)’ ||
’ INTERRUPT(OFF) NOTEST(ALL,*,* ) STORAGE(,,,0) ALL31(ON)’ ||
’ PLITASKCOUNT(1)’));
A discussion of each parameter type follows. The sections describe how you can
declare, initialize, and pass each parameter type to the HLL service routines. This
chapter provides examples for writing HLL programs in PL/I.
Note: These examples are not complete. They are included to emphasize how you
might declare, initialize, and pass the HLL service routine parameters. For
complete examples of user-written HLL programs, refer to the HLL samples
shipped with the NetView program, or see Appendix B, “PL/I samples,” on page
271.
Pointer variables
A pointer variable is a 4-byte pointer field containing an address. All HLL service
routines require at least one argument called HLBPTR. The NetView program
calculates the value of HLBPTR and passes it to a PL/I HLL command processor
or installation exit. Therefore, HLBPTR must be declared only in PL/I. Do not
assign a value to the HLBPTR variable. This is the only parameter of this type that
you do not have to assign.
Note: You do not need to specify the HLBPTR parameter when coding the HLL
service routine invocation in the PL/I macro format. HLBPTR is inserted for you
before the HLL service routine is started.
If an HLL service routine expects an address in a pointer field, you are responsible
for assigning a value to that pointer field before starting the HLL service routine.
In PL/I, you can use the ADDR function when passing pointer variables to HLL
service routines rather than creating a separate pointer variable for this purpose.
This ensures that the pointer variable has been assigned a value before starting the
HLL service routine.
“Using Pointer Variables in PL/I” shows how to use pointer variables in PL/I.
More information for the numbered steps follows the figure.
The descriptions for the steps shown in “Using Pointer Variables in PL/I” are:
▌1▐ HLBPTR is declared as a pointer (PTR) variable to be used in the
CNMCPYS invocation. You must not assign a value to HLBPTR. HLBPTR
is specified for this invocation because you started CNMCPYS using the
PL/I call format, rather than the PL/I macro format. Chapter 11, “Service
Note: If you use the ADDR built-in function to represent a pointer to a varying
length character string and the program is compiled with IBM PL/I for MVS and
VM V1R1M1, then the IEL0872I message might be generated by the compiler.
Integer variables
Several of the HLL service routines require you to pass a 4-byte integer value to be
used as a length, count, queue number, and so on. “Using Integer Variables in
PL/I” illustrates the use of integer variables in the PL/I environment.
(Descriptions for other statements in this figure are described in “Fixed-length
character strings” on page 54 and “Varying length character strings” on page 54.)
The descriptions for the steps shown in “Using Integer Variables in PL/I” are:
▌1▐ SPTOKEN is declared as a 4-byte integer (FIXED BIN(31,0)).
▌2▐ SPLENG is declared as a 4-byte integer (FIXED BIN(31,0))
▌3▐ SPTOKEN is initialized to zero (0). A value is returned in SPTOKEN upon
successful completion of the CNMPOOL invocation.
▌4▐ SPLENG is assigned a value of 256 to be used in the call to CNMPOOL.
▌5▐ SPTOKEN and SPLENG are passed to CNMPOOL. The value of SPTOKEN
is returned to you upon successful completion of the call to CNMPOOL.
Note: Tailoring files can lead to better system performance in many cases. This is
especially helpful in performance-sensitive environments such as installation exits.
Appendix A, “PL/I Control Blocks and Include Files,” on page 269 contains these
include files:
DSIPLI
(Required) Must be included by all HLL programs written in PL/I. DSIPLI
contains INCLUDE statements for all of the external HLL control blocks
and include files needed to compile and run PL/I programs in the
NetView environment. See the PL/I coding template in Chapter 7, “PL/I
high-level language services,” on page 59 for usage.
DSIPCONS
(Optional) Declares constants that are helpful when coding HLL programs
in PL/I.
DSIPHLB
(Required) Specifies PL/I mapping of the NetView HLB control block.
DSIPORIG
(Required) Specifies PL/I mapping of the origin block of the request that
caused the execution of the program currently running.
DSIPHLLS
(Required) Specifies PL/I definitions for HLL service routines.
DSIPCNM
(Optional) Declares HLL return code constants for PL/I.
DSIPPRM
(Required) Specifies PL/I mapping of the NetView Bridge parameter
control block.
Each file referenced from your PL/I program correlates to a physical data set in
auxiliary storage. Before opening a file for I/O, you must ensure that the
appropriate data set has been allocated. You can perform allocation under the
time-sharing option (TSO) or by using the NetView ALLOCATE command
described in the NetView online help. NetView also provides a FREE command to
deallocate a data set.
If the data set is allocated from TSO, you must also add a corresponding data
definition (DD) statement to the NetView startup procedure. The data definition
name (ddname) must match the name of the PL/I file. The DD statement specifies a
physical data set name (dsname) and gives its characteristics, as follows:
//OUTFILE DD DSN=MYPROG.OUTFILE, ...
A DD statement is not necessary if the data set is allocated using the NetView
ALLOCATE command.
The following example illustrates the use of file I/O in an HLL program written in
PL/I. Note the use of the ON UNDEFINEDFILE statement to protect against an
OPEN failure. Check for this condition before opening a file for I/O.
DCL OUTFILE FILE STREAM; /* Declare output file */
.
.
.
/********************************************************************/
/* Check for error before opening file for I/O. If UNDEFINEDFILE */
/* condition is raised, issue an error message and exit program. */
/********************************************************************/
ON UNDEFINEDFILE(OUTFILE)
BEGIN;
CALL CNMSMSG(HLBPTR,’OUTPUT FILE IS UNDEFINED’,’MSG’,’OPER’,’’);
HLBRC = CNM_GOOD;
STOP;
END;
If you want to write to a common output file from two or more PL/I programs,
the programs must coordinate access to the common file. You can accomplish this
using the HLL CNMLK service routine. If access is not coordinated, you might
experience a system ABEND 213.
Note: PL/I and C cannot share an open file. However, a C program can read a file
created by PL/I.
If you choose to code a GET or PUT statement without the FILE option, the
compiler inserts the file names SYSIN and SYSPRINT. By default, SYSIN and
SYSPRINT are directed to the terminal. These defaults are not valid, and cause
undetermined results if used in the NetView environment. Terminal I/O can be
done using WAIT FOR OPINPUT and CNMSMSG as described in Chapter 11,
“Service reference,” on page 173. For more information about files and PL/I I/O,
refer to the PL/I library.
I/O services provided by the HLL service routines are not affected by
preinitialized environments.
Return codes
When an HLL service routine is done, its completion code is stored in the return
code field (HLBRC) of the HLB control block. Check this field after each HLL
service routine invocation. Also, use this field when passing return codes between
HLL programs.
For a complete list of HLL API return codes, see DSIPCNM in Appendix A, “PL/I
Control Blocks and Include Files,” on page 269. Chapter 11, “Service reference,” on
page 173 describes the return codes that apply to each HLL service routine.
Do not use PLIRETV and PLIRETC when passing return codes between HLL
programs written in PL/I. Both of these routines can yield unpredictable results in
the NetView environment. To end a PL/I program normally, assign a value to
HLBRC and issue a RETURN statement as illustrated below:
HLBRC = CNM_GOOD; /* Successful completion */
RETURN; /* Return to caller */
The previous restrictions are needed so that different programs can reuse the same
environment. For more information about restrictions resulting from shared use of
preinitialized environments, refer to the z/OS Language Environment library.
Note: When you are compiling PL/I programs for the NetView program, you
receive the IEL0548I message. When you are compiling programs for the Enterprise
PL/I for z/OS program, you receive the IBM1195I message. You can ignore these
messages.
The examples in the following sections show how the preceding queues are used
with HLL command procedures.
Sending messages
“Sending messages (PL/I)” is an example of sending messages:
/********************************************************************/
CALL CNMSMSG(HLBPTR,’Hello Sysop ’,’MSG’,’SYSOP’,’’);
/********************************************************************/
/* SEND A MESSAGE TO THE AUTHORIZED RECEIVER */
/********************************************************************/
CALL CNMSMSG(HLBPTR,’Hello Authrcvr ’,’MSG’,’AUTHRCV’,’’);
/********************************************************************/
/* SEND A MESSAGE TO THE NETWORK LOG */
/********************************************************************/
CALL CNMSMSG(HLBPTR,’This should only be in log’,’MSG’,’NETVLOG’,’’);
/********************************************************************/
/* SHOW THAT YOU CAN SEND TO SEQLOG */
/********************************************************************/
CALL CNMSMSG(HLBPTR,’test msg’,’MSG’,’SEQLOG’,’SQLOGTSK’);
/********************************************************************/
/* SHOW THAT YOU CAN SEND TO A GROUP */
/********************************************************************/
CALL CNMSMSG(HLBPTR,’hello group’,’MSG’,’OPCLASS’,’+GROUP1’);
/********************************************************************/
DCL CNT FIXED BINARY(31,0); /* Number of strings parsed */
DCL INPUT_STR CHAR(256) VARYING; /* Sscan input string */
DCL FORMAT CHAR(256) VARYING; /* Sscan format string */
DCL MSGBUF CHAR(256) VARYING; /* Message buffer */
DCL (CH1,CH2,CH3,CH4,CH5,CH6)
CHAR(8) VARYING; /* Char vars */
DCL (FX1,FX2,FX3)
FIXED BINARY (31,0); /* Fixed vars */
/********************************************************************/
/* */
/* Execution */
/* */
/********************************************************************/
/********************************************************************/
/* Parse out a string */
/********************************************************************/
INPUT_STR=’parm1 ’|| /* Set input string up */
’parm2 ’||
’parm3 ’||
’10000 ’||
’200 ’||
’FFFFF ’||
’01XYZ2’||
’ parm4’;
FORMAT= /* The format string says to:
’%S’ || /* (1) Find a character string */
’%4S’ || /* (2) Find a 4-byte character
string */
’%S’ || /* (3) Find a character string */
’%*S’ || /* (4) Skip over a character
string */
’%D’ || /* (5) Find a decimal string */
’%2D’ || /* (6) Find a 2-byte decimal
string */
’%*S’ || /* (7) Skip over a character
string */
’%X’ || /* (8) Find a hex string */
’%{ Q10}’|| /* (9) Find a string that contains
one of the bracketed
characters, stop scanning
when a non-bracketed
character is found */
’%{2ZYX}’|| /*(10) Find a string that contains
one of the bracketed
characters, stop scanning
when a non-bracketed
character is found */
’%{¬4}’; /*(11) Find a string that
does NOT contain a 4, stop
scanning when a 4 is found */
CALL CNMSCAN(HLBPTR, /* Scan the input string... */
INPUT_STR, /* ...input is in here */
FORMAT, /* ...format string */
CNT, /* ...number of string parsed */
CH1, /* ...character string */
CH2, /* ...character string */
CH3, /* ...character string */
FX1, /* ...decimal string */
FX2, /* ...decimal string */
FX3, /* ...hex string */
CH4, /* ...character string */
CH5, /* ...character string */
CH6, /* ...character string */
’’ ); /* ...not used */
/********************************************************************/
Sending commands
“Sending a command to run another task (PL/I)” is an example of sending a
command to run under another task. The command to be run under the other task
can be another HLL command, a command list, a VTAM command, or a NetView
command.
Use this process to run commands under DSTs, other OSTs, or the PPT.
HLBRC=CNM_GOOD; /* Clear RC */
PACTLU
►► PACTLU luname ►◄
Where:
luname
Is the name of the LU to be activated.
Waiting and trapping using the TRAP and WAIT commands (PL/I)
/********************************************************************/
/* */
/* Other Declarations */
/* */
/********************************************************************/
DCL GETBLOCK CHAR(40); /* Area for the Orig Block */
DCL GETPTR PTR; /* Pointer to the Orig Block */
DCL INBUF CHAR(256) VAR; /* Buffer area for messages */
DCL NODENAME CHAR(8) VAR; /* Nodename to be activated */
DCL STATUS CHAR(8) VAR; /* Status of the resource */
DCL CNT FIXED BIN(31,0); /* Number of elements parsed */
/********************************************************************/
/* */
/* Execution */
/* */
/********************************************************************/
GETPTR=ADDR(GETBLOCK); /* Address the Orig Block */
/********************************************************************/
/* Scan the input for the lu name to activate */
/********************************************************************/
CALL CNMSCAN(HLBPTR, /* Parse the input ... */
PACTPIP
►► PACTPIP luname ►◄
Where:
luname
Is the name of the LU to be activated.
/* ...text of message */
’MSG’, /* ...single line message */
’OPER’, /* ...to the operator */
’’); /* ...not needed */
ELSE /* IST093I not found, must be
...an error */
CALL CNMSMSG(HLBPTR, /* Inform user activation failed */
’ERROR - ACTIVATION UNSUCCESSFUL’,
/* ...text of message */
’MSG’, /* ...single line message */
’OPER’, /* ...to the operator */
’’); /* ...not needed */
END;
ELSE /* Nodename not specified */
CALL CNMSMSG(HLBPTR, /* Inform user need more args */
’ERROR - NODENAME NOT SPECIFIED’,
/* ...text of message */
’MSG’, /* ...single line message */
’OPER’, /* ...to the operator */
’’); /* ...not needed */
For more information about the PIPE command, refer to IBM Tivoli NetView for
z/OS Programming: Pipes.
Retrieving information
“Retrieving Information (PL/I)” is an example of how an HLL command processor
or installation exit routine can retrieve information from the NetView program.
/********************************************************************/
/* */
/* Execution */
/* */
/********************************************************************/
CALL CNMINFC(HLBPTR, /* Retrieve the date & time... */
’DATETIME’, /* ...specify the variable */
CDATA, /* ...result goes here */
18); /* ...at most 18 bytes */
CALL CNMINFI(HLBPTR, /* Retrieve the number of colors */
/* ...that the terminal supports */
’COLORS’, /* ...specify the variable */
IDATA); /* ...result goes here */
“Accessing stem variables using the PIPE command (PL/I)” shows how to retrieve
values from a stem variable after issuing a PIPE command with the STEM stage
command.
/*********************************************************************/
/* Local variable PIPELINE0 contains the character representation of */
/* the total number of PIPELINEx stem variables. */
/*********************************************************************/
VARNAME = ’PIPELINE0’;
/*********************************************************************/
/* Get number of stem variables and store value in NUMVARS. */
/*********************************************************************/
CNMVARPOOL FUNC(’GET’)
NAME(VARNAME)
POOL(’LOCAL’)
DATA(NUMVARS)
LENG(4);
/*********************************************************************/
/* Local variable PIPELINE1 contains the first non-comment line in */
/* MYINFILE. */
/*********************************************************************/
VARNAME = ’PIPELINE1’;
/*********************************************************************/
/* Get first non-comment line and store value in STEMLINE. */
/*********************************************************************/
CNMVARPOOL FUNC(’GET’)
NAME(VARNAME)
POOL(’LOCAL’)
DATA(STEMLINE)
LENG(80);
For more information about the PIPE command, refer to IBM Tivoli NetView for
z/OS Programming: Pipes.
Using locks
“Accessing common global variables (PL/I)” on page 70 shows how you can
update common global variables. However, the example does not provide for
protecting the updating of the variable named GVARIABLE by using a lock. Assess
the need for protecting the updating GVARIABLE on a case-by-case basis.
“Using locks (PL/I)” on page 72 shows how to modify “Accessing common global
variables (PL/I)” on page 70 to obtain a lock before attempting the update. The
lock name can be the same as the global variable, or it can be different.
Operator input
“Operator input (PL/I)” shows how to code an HLL command processor to accept
operator input in single-line mode. The interface is similar to the &PAUSE function
of the NetView command list language. Input is requested by the application using
the WAIT FOR OPINPUT command, and retrieved by the application using the
CNMGETD service routine. The operator can respond by using the GO command.
See “GO command” on page 177 for more information.
/********************************************************************/
/* */
/* Execution */
/* */
/********************************************************************/
CNMVARPOOL FUNC(’DCL’) /* Declare to local pool... */
/* ...prior to invoking VIEW */
NAME(’PARM1’) /* ...name is Parm1 */
POOL(’LOCAL’); /* ...the pool is local */
Figure 2 shows the panel definition that is started by “View Command processor
(PL/I)” on page 73.
Message processing
“Message processing (PL/I)” lists the message attributes of a message. The
invocation must be a result of an entry in the NetView automation table. This
example applies to both single-line and multiline messages. Refer to IBM Tivoli
NetView for z/OS Automation Guide for more information.
END;
CALL CNMSMSG(HLBPTR,’LINETYPE = ’||GETPTR->ORIG_BLOCK.ORIG_LINE_TYPE,
’MSG’,’OPER’,’’);
CALL CNMSMSG(HLBPTR,’HDRMTYPE = ’||GETPTR->ORIG_BLOCK.ORIG_MSG_TYPE,
’MSG’,’OPER’,’’);
CALL CNMSMSG(HLBPTR,’MSGID = ’||GETPTR->ORIG_BLOCK.ORIG_PROCESS,
’MSG’,’OPER’,’’);
CALL CNMSMSG(HLBPTR,’MSGSTR = ’||INBUF,
’MSG’,’OPER’,’’);
CALL CNMGETD(HLBPTR, /* Get next line of message... */
’GETLINE’, /* ...function is get next line */
INBUF, /* ...result goes here */
255, /* ...max input length */
GETBLOCK, /* ...must provide a work area */
IDATAQ, /* ...message is from automation */
1); /* ...get the next line */
END; /* Of DO WHILE */
HLBRC=CNM_GOOD; /* Clear RC */
The command gives the return code that the command authorization checking
service routine returned to the operator.
PSPCCKO
Where:
PARMx
Specifies the keyword variable used to perform the authorization check.
VALx
Indicates the value variable used to perform the authorization check.
In DSIPARM(CMDTABLE)
Restrict access to the command, keywords, and values as well as the operators and
classes that can access them.
In RACF
Restrict access to the command, keywords, and values as well as the operators and
classes that can access them.
’MSG’,’OPER’,’’);
OTHERWISE
CALL CNMSMSG(HLBPTR,’ RC not recognized...’||HLBRC,
’MSG’,’OPER’,’’);
END;
HLBRC=CNM_GOOD; /* Clear RC */
Altering data
The DSIEX02A installation exit routine changes the echoed command message
(MSGTYPE=*) to be more informative by giving the time that the command was
entered.
Storage access
“Storage Access (PL/I)” shows how to display the character representation of the
contents of the storage that the NetView program can access. For example, after
locating the address of the main vector table using DISPMOD DSIMNTEX, you can
display the first 4 bytes of the DSIMVT control block.
“CNMCNMI service routine (PL/I)” uses the CNMCNMI service routine to send a
request for product set ID data to a specified PU. Any data returned is sent as a
message to the operator.
PNMVTPU
OWN
►► PNMVTPU puname ►◄
ALL
Where:
ALL
Specifies that vital product data is to be retrieved for the PU and its attached
ports.
OWN
Specifies that vital product data is to be retrieved for the PU only. This
keyword is the default.
puname
Is the name of the PU from which vital product data is received. This
parameter is required.
/* */
/* Vital Product Data RU definitions */
/* */
/* From the VTAM Programming Manual, a forward RU is defined below */
/* */
/* Byte Value Description */
/* 0 81 Network services, logical services */
/* 1 08 Management services */
/* 2 10 Request code */
/* 3 00 Format 0 */
/* 4 00 Ignore target names, */
/* Solicit a reply, and */
/* No CNM header contained */
/* 5 00 Reserved */
/* 6-7 000E Length of NS RU */
/* 8-15 NS RU -- NMVT -- documented in SNA Ref Sum */
/* 8-A 41038D NS Header for NMVT */
/* B-C 0000 Retired */
/* D-E 0111 PRID */
/* F 00 unsolicited NMVT, */
/* only NMVT for this PRID */
/* 10-16 One MS major vector */
/* 10-11 0006 Length field of PSID (Product Set ID) vector */
/* 12-13 8090 Code point for PSID */
/* 14-15 Length of subvector */
/* 14 02 Length of subvector */
/* 15 81 Request information on control unit only */
/* 15 83 Request information on control unit and its */
/* attached devices */
/* 16 F1 From VTAM programming, PU */
/* 17 08 Length of PU name */
/* 18 PUNAME Eight byte PUNAME, left justified */
/* 20 00 End of RU */
/********************************************************************/
DCL FORWARD_RU CHAR(100) VAR INIT(
’810810000000000E41038D00000111000006809002’X);
DCL OWN CHAR(1) VAR INIT(’81’X);
DCL ALL CHAR(1) VAR INIT(’83’X);
DCL PUNAME_HDR CHAR(2) VAR INIT(’F108’X);
DCL ENDOFRU CHAR(1) VAR INIT(’00’X);
/********************************************************************/
/* */
/* Execution */
/* */
/********************************************************************/
RCODE=0; /* Initialize return code */
GETPTR=ADDR(GETBLOCK); /* Address the work Orig Block */
SELECT;
WHEN(COUNT=1) /* Own or All not specified */
FORWARD_RU=FORWARD_RU||OWN||PUNAME_HDR||PUNAME||ENDOFRU;
/* Default is OWN */
WHEN(OWNORALL=’OWN’) /* Own or All not specified */
FORWARD_RU=FORWARD_RU||OWN||PUNAME_HDR||PUNAME||ENDOFRU;
/* Process OWN */
WHEN(OWNORALL=’ALL’) /* Own or All not specified */
FORWARD_RU=FORWARD_RU||ALL||PUNAME_HDR||PUNAME||ENDOFRU;
OTHERWISE /* Invalid parm... tell user */
DO;
The command processor must run on a DST. Use either the CNMSMSG service
routine (with a type of COMMAND) or the EXCMD command.
“Keyed File Access (PL/I)” creates a database with five records and the following
keys and data:
Key Data
01 A
02 B
03 C
04 D
05 E
/********************************************************************/
/* */
/* Operand Declarations */
/* */
/********************************************************************/
DCL HLBPTR PTR; /* Pointer to the HLB */
%INCLUDE DSIPLI; /* Include the HLL macros */
DCL CMDBUF CHAR(*) VARYING; /* Buffer for the command */
DCL ORIGBLCK CHAR(40); /* Area for the Orig Block */
DCL ORIGIN PTR; /* Pointer to the Orig Block */
DCL ADDR BUILTIN; /* Built-in function */
ORIGIN=ADDR(ORIGBLCK); /* Address the Orig Block */
/********************************************************************/
/* */
/* Other Declarations */
/* */
/********************************************************************/
DCL KEY CHAR(2) VAR; /* 2-byte key of the record */
/********************************************************************/
/* */
/* Execution - */
/* */
/* Create the record to initialize the VSAM database. The */
/* record will have a key of 0000 and a value of "Low rec". */
/* Setting the HLBRC to USERSWAP (8) will cause the contents */
/* of CMDBUF to be swapped into the database, thereby giving */
/* it an initial value, and enabling the subsequent VSAM I/O. */
/* */
/********************************************************************/
KEY=’0000’X; /* Set key to low values */
CMDBUF=KEY||’Low rec’; /* Build the data record */
HLBRC=USERSWAP; /* Set USERSWAP rc */
END PPRMVDB;
PWATDAT
►► PWATDAT taskname ►◄
Where:
taskname
Specifies the task global variable set by the installation exit and retrieved by
the PSNDDAT command.
Figure 4 on page 88 shows the flow of the WAIT FOR DATA function.
PWATDAT uses
CNMSMSG to
send the request
to the target OST.
CNMSMSG is invoked to
send the value
retrieved. The type
used in the CNMSMSG
is DATA.
This indefinite value is retrieved by the PSNDDAT command that is started on the
target task. See “Sending data (PL/I)” on page 89.
/********************************************************************/
DCL TIME CHAR(256) VAR; /* Time the last command was
...entered */
DCL MYOPID CHAR(8) VAR; /* Operator ID that we are running
...under */
/********************************************************************/
/* */
/* Execution */
/* */
/********************************************************************/
Automating MSUs
“Automating MSUs (PL/I)” shows a routine to send an MSU directly to the
automation table for evaluation.
/********************************************************************/
/* Initialization */
/********************************************************************/
ORIGIN=ADDR(ORIGBLCK); /* Address of the Origin Block */
NMVT = ’008E41038D0000000010’X||
’00860000’X||
’1A00D5C5E3E5C9C5E640’X||
’C1E4E3D6D4C1E3C5E240’X||
’C1D3C5D9E3E2’X||
’0893000110213111’X||
’0B92800001B0048CD5AA63’X||
’180516100807C940D3D6E5C5FF00’X||
’08D5C5E3E5C9C5E6FF11’X||
’1E96060122E233D30384DD0382AA’X||
’0382BB0382CC0382DD048144A3038333’X||
’219808010000000431820382AA’X||
’0382BB0382CC08010000000237450382DD0382EE’X;
/********************************************************************/
/* Drive the Automation Table with the MSU. */
/********************************************************************/
CALL CNMAUTO(HLBPTR,NMVT);
MSGTOOP = ’THE RC FROM THE PL/I CNMAUTO CALL = ’ || HLBRC;
/********************************************************************/
/* Respond to the operator with the return code from CNMAUTO */
/********************************************************************/
CNMSENDMSG
DATA(MSGTOOP)
MSGTYPE(’MSG’)
DESTTYPE(’OPER ’);
/************************************************************/
/* Scan the input for the Code Point to translate */
/************************************************************/
/************************************************************/
/* Invoke Code Point Translation */
/************************************************************/
CALL CNMC2T(HLBPTR,
CPDATA,
DATLEN,
’SNAALERT’,
CODE);
/******************************************************************/
/* Misc. declares - BUILT-IN functions, labels, etc. */
/******************************************************************/
DCL CHAR BUILTIN; /* Binary to char. function */
DCL LENGTH BUILTIN;
DCL SUBSTR BUILTIN;
/******************************************************************/
/* Initialization */
/******************************************************************/
APPLNAME = ’ ’;
CMDNAME = ’ ’;
FPCATVAL = ’ ’;
REPLACE = ’ ’;
REGTYPE = ’BOTH ’;
FOCPT = ’NO ’;
/******************************************************************/
/* Scan input command buffer and get all parameters. */
/******************************************************************/
CNMSSCAN DATA(CMDBUF)
FORMAT(’%*S’ ||
’%S’ ||
’%S’ ||
’%S’ ||
’%S’ ||
’%S’ ||
’%S’ ||
’%S’)
COUNT(TOKENS)
P1 (ANAME) /* Parse out the appl name */
P2 (CNAME) /* Parse out the command name */
P3 (FPCATE) /* Parse out the FP category */
/******************************************************************/
/* Save parsed value and invoke CNMREGIST service */
/******************************************************************/
ELSE
DO;
APPLNAME = ANAME; /* save appl name */
CMDNAME = CNAME; /* save command name */
IF LENGTH(FPCATE) > 0 & SUBSTR(FPCATE, 1, 1) ¬= ’.’ THEN
FPCATVAL = FPCATE; /* save FP category if entered */
IF LENGTH(FP) > 0 & SUBSTR(1, 1) ¬= ’.’ THEN
FOCPT = FP; /* save focal pt value if enter */
IF LENGTH(REPL) > 0 & SUBSTR(REPL,1, 1) ¬= ’.’ THEN
REPLACE = REPL; /* save replace value if entered*/
IF LENGTH(NOTIFY) > 0 & SUBSTR(NOTIFY, 1, 1) ¬= ’.’ THEN
NOTI_VAL = NOTIFY; /* save notify value if entered */
IF LENGTH(RTYPE) > 0 & SUBSTR(RTYPE, 1, 1) ¬= ’.’ THEN
REGTYPE = RTYPE; /* save reg type if entered */
/******************************************************************/
/* Need to register MS appl */
/******************************************************************/
IF (REGTYPE = ’BOTH ’) | (REGTYPE = ’MSAPPL ’) THEN
DO;
CNMREGIST TYPE (REGMSAPPL)
APPL (APPLNAME )
COMMAND (CMDNAME)
FPCATEGORY(FPCATVAL)
FOCALPOINT(FOCPT)
REPLACE (REPLACE)
NOTIFY (NOTI_VAL);
CMD_RETCODE = HLBRC;
MSGTOOP = APPLNAME ||
’ IS REGISTERED AS MS APPL, RETURN CODE IS ’ ||
CHAR(CMD_RETCODE);
CNMSENDMSG DATA (MSGTOOP)
MSGTYPE (’MSG ’)
DESTTYPE(’OPER ’);
END;
/******************************************************************/
/* Need to register Ops. Mgmt. served appl */
/******************************************************************/
IF (REGTYPE = ’BOTH ’) | (REGTYPE = ’OMAPPL ’) THEN
DO;
CNMREGIST TYPE (REGOMSERVD)
APPL (APPLNAME )
COMMAND (CMDNAME)
FOCALPOINT(FOCPT)
FPCATEGORY(FPCATVAL)
REPLACE (REPLACE)
NOTIFY (NOTI_VAL);
CMD_RETCODE = HLBRC;
/******************************************************************/
IF TOKENS < 2 THEN
DO;
MSGTOOP = ’APPLICATION NAME AND COMMAND NAME ARE REQUIRED’;
CNMSENDMSG DATA (MSGTOOP)
MSGTYPE (’MSG ’)
DESTTYPE(’OPER ’);
HLBRC = CNM_BAD_INVOCATION; /* registration not done */
END;
/******************************************************************/
/* Save parsed value and invoke CNMHRGS service */
/******************************************************************/
ELSE
DO;
APPLNAME = ANAME; /* save appl name */
CMDNAME = CNAME; /* save command name */
IF (LENGTH(LNAME) > 0 &
SUBSTR(LNAME, 1, 1) ¬= ’.’) THEN
LOGMOD = LNAME; /* save Logmode if entered */
IF (LENGTH(REPL) > 0 &
SUBSTR(REPL,1, 1) ¬= ’.’) THEN
REPLACE = REPL; /* save replace value if entered*/
IF (LENGTH(RTYPE) > 0 &
SUBSTR(RTYPE, 1, 1) ¬= ’.’) THEN
REGTYPE = RTYPE; /* save reg type if entered */
/******************************************************************/
/* Need to register an appl */
/******************************************************************/
IF (REGTYPE = ’REGAPPL ’) THEN
DO;
CNMHRGS TYPE (REGAPPL)
APPL (APPLNAME )
COMMAND (CMDNAME)
LOGMODE (LOGMOD)
REPLACE (REPLACE)
CMD_RETCODE = HLBRC;
MSGTOOP = APPLNAME ||
’ IS REGISTERED AS AN APPL, RETURN CODE IS ’ ||
CHAR(CMD_RETCODE);
CNMSENDMSG DATA (MSGTOOP)
MSGTYPE (’MSG ’)
DESTTYPE(’OPER ’);
END;
HLBRC = CNM_GOOD; /* Successful completion */
END;
/******************************************************************/
/* Misc. declares - BUILT-IN functions, labels, etc. */
/******************************************************************/
DCL CHAR BUILTIN; /* Binary to char. function */
DCL LENGTH BUILTIN;
DCL SUBSTR BUILTIN;
/******************************************************************/
/* Initialization */
/******************************************************************/
ALERT_MSU = ’0046121200420000’X ||
’0B92000001210100000001’X ||
’1010000D110E0A0040F1F2F3F4F54040’X ||
’1103030109D5C1D4C5F1404040E3E8D7F1’X ||
’069310011023’X ||
’0C9606011022102304813110’X;
OAPPL = ’USERAPPL’;
DNET = ’NETA ’;
DLU = ’CNM01 ’;
ALERT_NETOP = ’23F0F3F140404040’X;
/******************************************************************/
/* Declare variables for the program. */
/******************************************************************/
ALERT_MSU = ’0046121200420000’X ||
’0B92000001210100000001’X ||
’1010000D110E0A0040F1F2F3F4F54040’X ||
’1103030109D5C1D4C5F1404040E3E8D7F1’X ||
’069310011023’X ||
’0C9606011022102304813110’X;
OAPPL = ’USERAPPL’;
DNET = ’NETA ’;
DLU = ’CNM01 ’;
RMT_CMD = ’30F0F5F540404040’X;
CNMHSMU DATATYPE (NONMDSMU)
DATA (ALERT_MSU)
CORRELAREA (CORR_AREA)
ORIGAPPL (OAPPL)
DESTNET (DNET)
DESTLU (DLU)
DESTAPPL (RMT_CMD)
MUTYPE (REQUEST_WITHOUT_REPLY);
CMD_RETCODE = HLBRC;
MSGTOOP = ’RETURN CODE FROM CNMHSMU IS’ ||
CHAR(CMD_RETCODE);
CNMSENDMSG DATA (MSGTOOP)
MSGTYPE (’MSG ’)
DESTTYPE(’OPER ’);
HLBRC = CNM_GOOD; /* Successful completion */
END PHSNDMU;
/********************************************************************/
/* Other declarations */
/********************************************************************/
DCL MDBPTR PTR;
DCL SOPTR PTR;
DCL MYCORR CHAR(16);
DCL MYMDB CHAR(300);
DCL MYSRC CHAR(50);
/********************************************************************/
/* Create the Source Object */
/********************************************************************/
MYSRC = ’000B’X|| /* Source object length */
’0005’X|| /* Source object type */
’07D5D4E8E2E8E2’X; /* Nickname "MYSYS" */
/********************************************************************/
/* Initialize the Correlator value */
/********************************************************************/
MYCORR = ’00000000000000000000000000000000’X;
/********************************************************************/
/* Set up pointers to MDB and Source Object */
/********************************************************************/
MDBPTR = ADDR(MYMDB);
SOPTR = ADDR(MYSRC);
/********************************************************************/
/* Call CNMPMDB service to process the MDB */
/********************************************************************/
CALL CNMPMDB(HLBPTR,MDBPTR,SOPTR,MYCORR);
/********************************************************************/
/* Send message to issuer with return code from CNMPMDB */
/********************************************************************/
INFOMSG = ’RETURN CODE FROM CNMPMDB: ’ || HLBPTR->HLBRC;
CALL CNMSMSG(HLBPTR,INFOMSG,’MSG’,’OPER’,’’);
END PPRSMDB;
Initial parameters
Every HLL program written in C must have exactly one function (main) that
declares the argc and argv parameters. The first parameter, argc, is an integer value
that indicates the number of pointers in the argv array. NetView does not use the
argc parameter. The argv parameter is an array of pointers. In the regular C
environment, each element in argv points to an argument in the command line. In
the NetView environment, elements 1-3 point to the EBCDIC representation of the
initial parameters (Hlbptr, Cmdbuf and Origblck) passed to the main function from
the NetView program. The initial parameters must be converted to hexadecimal
using sscanf. The original command line is passed to the user’s program in Cmdbuf.
Chapter 9, “C high-level language services,” on page 117 contains a sample
template for coding the main function and defining and converting the initial
parameters. The following are descriptions of the initial parameters:
Cmdbuf
A varying length character field that contains the command or message that
drives this program.
If this program is driven as an installation exit (other than DSIEX02A), this
field contains the message that drives this exit. If driven as DSIEX02A, this
field contains no useful information, and you must retrieve the message from
the initial data queue (IDATAQ).
Hlbptr
A 4-byte pointer field containing the address of the HLB control block
(DSICHLB). The HLB control block is the HLL API interface block that is used
to communicate between the HLL service routines and HLL programs in the
NetView environment. This pointer is required on all HLL service routine
invocations. The HLB control block is unique for each invocation of an HLL
program. NetView automatically inserts HLBPTR for the C invocation format.
Origblck
A 40-byte structure that describes the origin of the request that caused the
execution of this program. Origblck is mapped by DSICORIG.
C runtime options
The method you use to specify z/OS XL C/C++ runtime options depends on the
type of z/OS XL C/C++ support you use for your programs. The way you specify
C runtime options, therefore, depends on the following:
v Compiler (z/OS C/C++)
v Libraries (language environment)
v Preinitialization Support (Enabled or Disabled)
v Type of runtime option, whether the option is for a general option or a storage
option.
Use Table 16 as a starting point to familiarize yourself with the specific methods of
specifying the runtime options for your program. The table indicates the methods
to use based on the interface module that is being link-edited with a program.
Following the table, each method for specifying runtime options is described in
more detail.
#pragma runopts
Runtime options can be specified with #pragma runopts preprocessor directive for
z/OS XL C/C++ compilers.
The runtime options for executing z/OS XL C/C++ programs in the NetView
environment are illustrated in the C language coding template in Chapter 9, “C
high-level language services,” on page 117.
The z/OS XL C/C++ programs must run with the TRAP(OFF) option. Running
with the TRAP(ON) option causes unpredictable results if error recovery is
necessary.
Refer to the runtime storage section in the z/OS library for more information.
v LIBSTACK(8,0,FREE)
v THREADHEAP(8,0,ANY,FREE)
v STORAGE(,,,0)
v ALL31(ON)
v TRAP(OFF)
v INTERRUPT(OFF)
v NOTEST(ALL,*,*)
v MSGQ(1)
Refer to the z/OS Language Environment library for more information about these
options.
Example of Overriding PSTACK and PHEAP Values: The following example shows
how to override the initial values for PSTACK and PHEAP for a program that
requests to run in a preinitialized environment:
HLLENV CHANGE,PSTACK=262144,PHEAP=524288,TYPE=IBMADC
When you define LEOPTS in your program, the runtime options specified are used
instead of the defaults described in “z/OS Language Environment preinitialization
defaults” on page 104 and “PSTACK and PHEAP.”
Example of Specifying LEOPTS Values: You can override the default z/OS
Language Environment preinitialization, PSTACK, and PHEAP runtime options in
a z/OS XL C/C++ program as shown in the following LEOPTS declaration.
#pragma variable(LEOPTS,NORENT)
extern char LEOPTS??(255??) =
"STACK(256K,256K,ANY,FREE) HEAP(256K,256K,ANY,FREE,8,0) TRAP(OFF) MSGQ(1)"
" BELOWHEAP(8,0,FREE) LIBSTACK(8,0,FREE) THREADHEAP(8,0,ANY,FREE)"
" INTERRUPT(OFF) NOTEST(ALL,*,* ) STORAGE(,,,0) ALL31(ON)"
" PLITASKCOUNT(1)";
A description of each of these parameter types follows. The sections describe how
you can declare, initialize, and pass each of these parameter types to the HLL
service routines. This chapter also provides examples for writing HLL programs in
C. These examples are not complete, they are included to emphasize how you
might declare, initialize, and pass service routine parameters. For complete
examples of user-written HLL programs, refer to the HLL samples shipped with
NetView, or see Appendix D, “C samples,” on page 281.
Pointer variables
A pointer variable is a 4-byte pointer field containing an address. All HLL service
routines require one pointer variable called Hlbptr. NetView calculates the value of
Hlbptr and passes it to the HLL command processor or installation exit. When
Hlbptr is received as an initial parameter, do not assign a value to Hlbptr. This is
the only parameter of this type that you do not have to assign.
Note: You do not need to specify the Hlbptr parameter when coding HLL service
routine invocations in C. Hlbptr is inserted for you before the HLL service routine
is started.
dstlen = 255;
The descriptions for the steps shown in “Using Pointer Variables in C” are:
▌2▐ Hlbptr is defined as a pointer variable. You must not assign a value to
Hlbptror include it in the Cnmcpys invocation. NetView inserts Hlbptr in the
parameter list for you during the compilation's preprocessor phase.
▌3▐ srcptr is defined as a pointer to a structure of type Dsivarch (varying length
character string).
▌4▐ srcptr is assigned the address of the source buffer (srcbuf) to be used as a
operand to Cnmcpys
▌5▐ srcptr is passed as a parameter to Cnmcpys.
Using the & (address) operator in C eliminates the need to define pointer
variables. Note the use of a string constant instead of the VARTOVAR
constant in this example:
Cnmcpys(&srcbuf,&dstbuf,dstlen,"VARTOVAR"); /* Copy buffer */
Integer variables
Several of the HLL service routines require the user to pass a 4-byte integer value
to be used as a length, count, queue number, and so on. “Using Integer variables
in C” illustrates the use of integer variables in the HLL environment. Some of the
steps are explained in more detail following the figure.
▌7▐Cnmpool(spfunc,&sptoken,&spname,spleng,sppricnt,spseccnt,
spclass); /* Allocate Subpool */
The descriptions for the steps shown in “Using Integer variables in C” are:
▌2▐ sptoken is defined as a 4-byte integer (int).
▌3▐ spleng is defined as a 4-byte integer (int).
▌5▐ sptoken is initialized to 0. A value is returned in sptoken upon successful
completion of the Cnmpool invocation.
▌6▐ spleng is assigned a value of 256 to be used in the call to Cnmpool
▌7▐ Cnmpool is started using &sptoken and spleng as operands. The value of
sptoken is returned to the user upon successful completion of the Cnmpool
service.
Note: All of the integer variables are specified by name except for sptoken.
sptoken is specified using the & (address) operator. In C, all operand fields
that return values to the user’s program must specify a pointer to that
operand field when starting an HLL service routine. Otherwise, you do not
see the changes made to that variable upon successful completion of the
HLL service routine. Using the & (address) operator ensures that the value
is returned to the calling program.
The & (address) operator is also used for spname. This is explained in detail
in “Varying length character strings” on page 108.
C string constants for most of the fixed-length character strings are provided in
DSICCONS. DSICCONS is optional and can be tailored to your specific needs. The
following steps correlate to “Using Integer variables in C” on page 107.
▌1▐ spfunc is defined as a 9-byte character array (8 bytes + \0 null character).
▌4▐ spfunc is assigned a value of "ALLOC " to be used in the Cnmpool
invocation.
▌7▐ Cnmpool is started using the spfunc parameter. spfunc can be assigned a
value, defined with a preprocessor define statement (see VARTOVAR in
“Using Pointer Variables in C” on page 106 step ▌1▐), or passed as a string
constant as shown in the next example:
Cnmpool("ALLOC ",&sptoken,&spname,spleng,sppricnt,spseccnt,
spclass); /* Allocate Subpool */
C does not pad character strings with blanks. You must pad the fixed-length
character strings with blanks, if necessary.
Also, all character strings must be delimited by the null character (\0) which is the
end-of-string character in C. Enclosing text in double quotation marks ensures that
the null character is appended to the last byte of the character string. As a result,
when using a character array to represent a fixed-length character string, you must
define the character array’s length to be one character greater than the length
expected by the HLL service routine. Avoid using character arrays to represent
fixed-length character strings whenever possible. You can use any of the alternative
methods mentioned previously to ensure that the fixed-length character string is
padded with blanks and delimited by the null character (\0). For further
explanation, refer to the C documentation.
HLL service routines use two types of origin blocks. The first type of origin block
(Origblck) is a 40-byte structure that you must declare. This is a required initial
parameter that was previously described in “Initial parameters” on page 103. Do
not alter this structure. See the C coding template in Chapter 9, “C high-level
language services,” on page 117 for an example of how to define Origblck
The user specifies the second type of origin block (adorigin, gdorigin). The adorigin
and gdorigin origin blocks must be at least 38 bytes long and must map to the first
38 bytes of the origin block structure (DSICORIG). You must define these origin
blocks separately from the origin block that is required as an initial operand.
TEXT
►► LL TEXT ►◄
Where:
LL Is the 2-byte integer field containing the length of TEXT.
TEXT
Is the character string.
Note: The end-of-string character (\0) is not included in this size but
delimits the character array.
buffer A 255-byte null-terminated character array, delimited by the end-of-string
character (\0). A 256-byte field contains a 255-byte buffer plus a 1-byte
end-of-string character.
You are responsible for creating structures like Dsivarch to represent varying length
character strings passed to HLL service routines. You can use the size portion of
the buffer to manipulate buffers that contain hexadecimal data. The presence of the
null character at the end of the buffer enables you to use the buffer portion of the
structure in other C functions that require the end-of-string character as a delimiter.
You are responsible for ensuring that the end-of-string character delimits the buffer
portion of the structure when necessary.
Note: HLL service routines that return data in varying length character strings do
not delimit the data with the end-of-string character.
The NetView program provides two functions that let you manipulate varying
length character strings in the C environment. Cnmvlc and Cnmnvlc calculate the
value of the 2-byte size field and ensure that the buffer portion of the varying
length character string is delimited by the end-of-string character (\0). Use these
functions when initializing or altering the buffer portion of a varying length
character string. If you alter the contents of a varying length character string
without using Cnmvlc or Cnmnvlc, update the size field and ensure that the buffer
is null-terminated.
“Using Varying Length Character Strings in C” shows how to use varying length
character strings in C. Some steps are explained in more detail following the
figure.
▌3▐Cnmpool(spfunc,&sptoken,&spname,spleng,sppricnt,spseccnt,
spclass); /* Allocate Subpool */
The descriptions for the steps shown in “Using Varying Length Character Strings
in C” on page 109 are:
▌1▐ spname is defined as a varying length character string.
▌2▐ spname is assigned the value POOLNAME using the Cnmvlc function
▌3▐ Cnmpool is started with the operand &spname. When passing a structure as
a operand, pass a pointer to the structure rather than the structure itself. In
this example, the & (address) operator is used when passing spname to
Cnmpool.
If you defined a pointer variable, assigned the address of the structure to
that pointer variable, and passed the pointer variable to Cnmpool, verify
that you assigned the pointer variable before passing it to the HLL service
routine.
CNMVLC calculates the length of the converted string (not including the null
terminator) and stores it in the 2-byte size field of the varying length character
string structure. The null terminator is actually copied into the buffer portion of
the structure even though it is not included in the size calculation. This ensures
that the structure's buffer portion is null-terminated so that it can be used by other
C library routines.
Where:
convert
Is a 2-byte integer field containing the value 0 or 1, indicating whether the
Note:
1. If you specify conversion to hexadecimal, all of the characters in the input
string must represent valid hexadecimal data. Cnmvlc returns a void pointer if
it encounters a character that cannot be converted to hexadecimal.
2. A null pointer is also returned if you do not specify a valid value for convert or
if the format specifications cannot be resolved.
3. Some of the HLL services routines (such as Cnmcnmi and Cnmkio) require you
to move hexadecimal data into varying length character strings. This can often
create a problem for the C programmer because of the probability that the null
terminator (represented as hexadecimal zeros) is interspersed throughout the
hexadecimal data stream. In this situation, use CNMNVLC.
4. If istring contains a format string, you must provide a vstring that can contain
the entire resolved format string, irrespective of hexadecimal conversion.
When the copy function is complete, CNMNVLC stores the value of the length
operand in the structure. The null terminator is copied into the buffer portion of
the structure even though it is not included in the size calculation.
Where:
convert
Is a 2-byte integer field containing the value 0 or 1, indicating whether to
convert the input string to hexadecimal. Constants NOHEXCNV and
CNVTOHEX are defined in DSICCONS as follows:
0 (NOHEXCNV)
Do not convert input string to hexadecimal.
1 (CNVTOHEX)
Convert input string to hexadecimal.
istring
Is an input string. If hexadecimal conversion is required, all of the characters in
the input string must represent valid hexadecimal data.
length
Is a 4-byte integer field specifying the number of bytes to copy from the input
string. If hexadecimal conversion is required, length is the length of the input
string before it is converted. length must be greater than zero.
vstring
Is a varying length character string to receive the converted string. See
“Varying length character strings” on page 108 for more details.
Note:
1. Cnmnvlc returns a void pointer if it encounters a character that cannot be
converted to hexadecimal.
2. A null pointer is also returned if you do not specify a valid value for convert or
length.
Note: Tailoring files can lead to better performance in many cases. This is helpful
in performance-sensitive environments such as installation exits.
The following include files are listed in Appendix C, “C language control blocks
and include files,” on page 279:
DSIC (Required) Must be included for all HLL programs written in C. DSIC
includes all of the external HLL control blocks and include files needed to
compile and run C programs in the NetView environment. See the C
coding template in Chapter 9, “C high-level language services,” on page
117 for usage.
DSICCONS
(Optional) Defines constants that are helpful when coding HLL programs
in C.
DSICVARC
(Required) Specifies C mapping of a varying length character string.
DSICHLB
(Required) Specifies C mapping of the NetView HLB control block.
DSICORIG
(Required) Specifies C mapping of the origin block of the request that
caused the execution of the program currently running.
DSICPRM
(Required) Specifies C mapping of the NetView Bridge parameter control
block.
DSICCALL
(Required) Specifies C definitions for HLL service routines.
DSICCNM
(Optional) Defines HLL return code constants for C.
C input/output considerations
C provides several input and output routines that allow you to transmit data
between main storage and auxiliary storage of a computer. C programs using such
file input/output capabilities can run in the NetView environment. However, there
are some important things to consider when doing file I/O in C.
Each file referenced from your C program correlates to a physical data set in
auxiliary storage. You can specify the file name or a data definition name (ddname)
when opening a file using fopen. If you specify a ddname, you must ensure that the
appropriate data set is allocated before attempting to open the file. You can allocate
under TSO or by using the NetView ALLOCATE command described in the
NetView online help. NetView also provides a FREE command to deallocate a data
set.
If the data set is allocated from TSO, you must also add a corresponding DD
statement to the NetView startup procedure. The data definition name (ddname) in
the DD statement must match the ddname specified in the call to the fopen library
routine. The DD statement specifies a physical data set name (dsname) and gives its
characteristics as shown in this example:
//OUTFILE DD DSN=MYPROG.OUTFILE, ...
A DD statement is not necessary if the data set is allocated using the NetView
ALLOCATE command.
This example shows the use of file I/O in an HLL program written in C. The check
for a null pointer is added to protect against a failure in fopen. This check is
suggested when opening a file for I/O.
/* Check for error opening file for I/O. If fopen error occurs, */
/* issue an error message and exit program. */
/********************************************************************/
if ((Outfd = fopen("dd:OUTFILE","w")) == NULL)
{
Cnmvlc(&msgbuf,NOHEXCNV,"ERROR OPENING DATA FILE.");
Cnmsmsg(&msgbuf,MSG,SYSOP,NULLCHAR);
Hlbptr->Hlbrc = CNM_GOOD;
exit();
}
.
.
.
fprintf(Outfd, ... /* Write to output file */
fclose(Outfd); /* Close output file */
If you choose to write to a common output file from two or more C programs, the
programs must coordinate access to the common file. You can do this by using
NetView’s CNMLK service routine, if desired. If access is not coordinated, you can
get a system ABEND 213.
Take care when attempting to share open files between two or more HLL
programs. Sharing of open files must be coordinated between the sharing
programs.
Note: PL/I and C cannot share an open file. However, a C program can read a file
created by PL/I.
Certain C routines (such as getchar and putchar) are designed to perform functions
on stdin and stdout. By default, stdin and stdout are directed to the terminal. These
defaults are not valid and cause undetermined results if used in the NetView
environment. You can perform terminal I/O using WAIT FOR OPINPUT and
CNMSMSG as described in Chapter 11, “Service reference,” on page 173.
Refer to the z/OS C/C++ library and the z/OS Language Environment library for
more information about files and C language I/O.
C runtime considerations
Most runtime errors detected in the C environment are handled by passing a
return code or a null pointer back to the caller. Runtime errors that are detected by
the operating system generate an interrupt signal that normally can be handled by
coding a signal function in your program. However, because C language programs
must run with the NOSTAE and NOSPIE or TRAP(OFF) options in a production
NetView environment, the operating system is unable to generate such interrupts.
Refer to the z/OS C/C++ library and the z/OS Language Environment library for
more information about files and C language I/O.
The CMDDEF statement is described in the IBM Tivoli NetView for z/OS
Administration Reference.
Return codes
Upon completion of an HLL service routine, the completion code from that service
routine is stored in the return code field (Hlbrc) of the HLB control block. Check
this field after each HLL service routine invocation. Also, use this field when
passing return codes between HLL programs.
A return type of void is specified for each of the HLL service routines defined in
DSICCALL. This indicates that the HLL service routines do not return values to
you. You can check the completion code only by evaluating the return code field
(Hlbrc) in the HLB.
For a complete list of HLL API return codes, see DSICCNM in Appendix C. See
Chapter 11, “Service reference,” on page 173 for a list of return codes that apply to
each HLL service routine.
In C, you can achieve normal termination by assigning a value to Hlbrc and issuing
a return() statement as follows:
Hlbptr->Hlbrc = CNM_GOOD; /* Successful completion */
return(); /* Return to caller */
You cannot use the following functions without redirecting stdin, stdout, and stderr
as follows:
getchar Cnmgetd - suggested HLL alternative
getenv Cnminfi, Cnminfc, Origblck, Cnmvars - suggested HLL alternatives
gets Cnmgetd - suggested HLL alternative
printf Cnmsmsg - suggested HLL alternative
putchar
Cnmsmsg - suggested HLL alternative
puts Cnmsmsg - suggested HLL alternative
scanf Use Cnmgetd to fetch data and sscanf to parse data
perror Check return code and use Cnmsmsg
Special Considerations:
1. The C signal function does not work for errors detected by the operating
system.
2. You cannot use Cnmsmsg to display wide character strings. If you want to
process wide character strings, redirect stdout and use the printf function.
C sample template
You can use the following coding template sample when you are coding HLL
programs in C. You can use this template, with your enhancements, to use
NetView functions and commands. Use the additional examples in this section
with this template. You can find fully functional samples of NetView command
procedures written in C in Appendix D, “C samples,” on page 281.
/* Output: */
/* (Describe any output from this module.) */
/* */
/* Return Codes: returned in Hlbrc */
/* For Command Processors: */
/* 0 = normal exit */
/* -5 = cancelled */
/* (List any other return codes meaningful to this module.) */
/* For User Exits: */
/* 0 = USERASIS (Leave the contents of the message buffer */
/* unchanged) */
/* 4 = USERDROP (Drop the message buffer) */
/* 8 = USERSWAP (Change the contents of the message buffer) */
/* */
/* External Module References: */
/* (List modules that are called by this module.) */
/* */
/* Change Activity: */
/* date,author: description of changes */
/* (Keep a log of the changes made to this module for) */
/* (future reference. ) */
/********************************************************************/
#pragma runopts( STACK(128K,128K,ANY,FREE) HEAP(128K,128K,ANY,FREE,8,0) )
#pragma runopts( BELOWHEAP(8,0,FREE) LIBSTACK(8,0,FREE) )
#pragma runopts( INTERRUPT(OFF) NOTEST(ALL,*,* ) STORAGE(,,,0) )
#pragma runopts( TRAP(OFF) MSGQ(1) ALL31(ON) )
/********************************************************************/
/* Standard include files
/********************************************************************/
#include <stdio.h> /* Standard I/O header */
#include <string.h> /* String functions */
#include <stdefs.h> /* Standard definitions */
#include <stdlib.h> /* Standard library */
#include <stdarg.h> /* Standard args */
/********************************************************************/
/* NetView High-Level Language include files */
/********************************************************************/
#include "dsic.h" /* Include HLL macros */
/********************************************************************/
/* External data definitions */
/********************************************************************/
Dsihlb *Hlbptr; /* Pointer to the HLB */
Dsivarch *Cmdbuf; /* Pointer to command buffer */
Dsiorig *Origblck; /* Pointer to Origin block */
/******************************************************************/
/* Convert parameter pointers from character to hex addresses */
/******************************************************************/
sscanf(argv??(1??),"%x",&Hlbptr);
sscanf(argv??(2??),"%x",&Cmdbuf);
sscanf(argv??(3??),"%x",&Origblck);
/******************************************************************/
/* Initialization */
/******************************************************************/
/******************************************************************/
/* Execution */
/******************************************************************/
Hlbptr->Hlbrc = CNM_GOOD; /* Successful completion */
}
In several of the samples and examples in this document, varying length character
strings are defined as type Dsivarch, a pointer to a structure defining a 256-byte
varying length character string. This is only for convenience. It is more efficient to
use a varying length character string with a buffer size closer to that of your data.
The following examples show how to use Cnmvlc and Cnmnvlc, and how to define
varying length character strings with different buffer sizes.
CNMVLC
CNMVLC is used to copy a C character string into a varying length character
string.
This example copies the text “Hello World” into a varying length character string
for use with CNMSMSG. &msg is defined as a varying length character string.
/* put message in varying length */
/* character string... */
Cnmvlc(&msg, /* ...varying len char strng */
NOHEXCNV, /* ...do not convert to hex */
"Hello World"); /* ...message */
/* display message... */
Cnmsmsg(&msg, /* ...message text */
MSG, /* ...type is message */
OPER, /* ...send message to oper */
NULLCHAR); /* ...not used */
CNMVLC returns a pointer to the varying length character string into which data
is being copied. Therefore, it can be embedded directly into calls to HLL service
routines. Here is an example of a call to CNMVLC embedded in a call to the
CNMSMSG service routine:
Cnmsmsg(Cnmvlc(&msg,NOHEXCNV,"Hello World"),MSG,OPER,NULLCHAR);
The next example copies an RU into a varying length character string and converts
it to hexadecimal. ru is defined as a varying length character string and puname is
a C character string containing the name of the PU where the RU is to be sent.
/* put RU in varying length */
/* character string... */
Cnmvlc(&ru, /* ...varying length char strng */
CNVTOHEX, /* ...convert to hex */
"810810000000000E41038D0000011100000680900281F108D7E4D5C1D4C500");
/* ...the RU */
Here is an example of using a format string with CNMVLC. It shows the text “Day
1 of five” copied into a varying length character string. num is defined as an
integer with a value of 1 and string is defined as a character string with a value of
“five”.
/* put message in varying length */
/* character string... */
Cnmvlc(&msg, /* ...varying len char strng */
NOHEXCNV, /* ...do not convert to hex */
"Day %d of %s", /* ...format string */
num, /*...substitute for %d */
string); /* ...substitute for %s */
/* display message... */
Cnmsmsg(&msg, /* ...message text */
MSG, /* ...type is message */
OPER, /* ...send message to oper */
NULLCHAR); /* ...not used */
CNMNVLC
CNMNVLC is used to copy C character strings containing null data into varying
length character strings.
Here an RU returned by the CNMI is copied into another varying length character
string. data is defined as a varying length character string. getblock is defined as a
structure of type ORIGBLCK, and msg is defined as a varying length character
string.
CNMNVLC copies for the length specified regardless of the presence of nulls.
/* Read in the first RU returned */
Cnmgetd(GETLINE, /* ...a single RU */
&data, /* ...inti here */
1024, /* ...truncate after 1024 bytes */
&getblock, /* ...provide a new origin block */
CNMIQ, /* ...on the CNMI queue (5) */
1); /* ...the first RU */
/* copy varying length character */
/* string to another varying */
/* length character string... */
Cnmnvlc(&msg, /* ...dest varying len char strng*/
NOHEXCNV, /* ...do not convert to hex */
data.size, /* ...numbers of chars to move */
data.buffer); /* ...RU to copy */
main()
{
myvlc msg; /* msg is a varying length */
/* character string of type myvlc*/
Sometimes you must pass a command buffer larger than 256 characters to a C
program. In these cases, must change the declaration for Cmdbuf provided in the C
template. The next example accepts a command buffer larger than 256 characters
and sends it to the authorized receiver.
typedef struct /* create your own varying length*/
{ /* character string... */
short size; /* ...2 byte size field */
char buffer??(300??); /* ...300 byte buffer */
} myvlc; /* ...data type */
Queue
Queue Name Number Function
TRAPQ 1 Message queue. Contains trapped messages. See “TRAP
command” on page 182.
OPERQ 2 Operator input queue. See “GO command” on page 177 and
“QUEUE command” on page 178.
DATAQ 3 Data queue. Contains data sent from another HLL command
processor or installation exit routine. See “CNMSMSG
(CNMSENDMSG): Send Message or Command” on page
251.
IDATAQ 4 Initial data queue. Contains the full message or MSU that
starts the HLL command processor through NetView
automation. It also contains messages that drive DSIEX02A
and DSIEX17. This is also the queue where an application
command processor receives an MDS-MU from the NetView
high-performance transport, the MS transport, or operations
management for an unsolicited request or asynchronous
reply. For invocations from pipes, the IDATAQ contains the
data flowing into the HLL command processor.
CNMIQ 5 CNMI solicited data queue. Contains RUs solicited through
the CNMI service routine. Chained RUs are treated like
multiline messages. See “CNMCNMI (CNMI): CNMI access
under a DST” on page 189.
MDSMUQ 6 MDS-MU data queue. Contains MUs received as
synchronous replies. The MDS-MUs are received from
operations management, the MS transport, and the
high-performance transport. Refer to IBM Tivoli NetView for
z/OS Application Programmer's Guide for more information.
The examples in the following sections show how the preceding queues are used
with HLL command procedures.
Sending messages
“Sending messages (C)” shows how to send messages.
/*********************************************************************/
/* Send a multiline message to user. */
/*********************************************************************/
Cnmvlc(&msgbuf,0,"LINE 1 OF 3");
Cnmsmsg(&msgbuf,MSG_C,OPER,NULLCHAR);
Cnmvlc(&msgbuf,0,"Line 2 of 3");
Cnmsmsg(&msgbuf,MSG_D,OPER,NULLCHAR);
Cnmvlc(&msgbuf,0,"Line 3 of 3");
Cnmsmsg(&msgbuf,MSG_F,OPER,NULLCHAR);
/*********************************************************************/
/* Send a multiline message to a task. */
/*********************************************************************/
Cnmvlc(&msgbuf,0,"Line 1 of 3");
Cnmsmsg(&msgbuf,MSG_C,TASK,"OPER1 ");
Cnmvlc(&msgbuf,0,"Line 2 of 3");
Cnmsmsg(&msgbuf,MSG_D,TASK,"OPER1 ");
Cnmvlc(&msgbuf,0,"LINE 3 OF 3");
Cnmsmsg(&msgbuf,MSG_F,TASK,"OPER1 ");
/*********************************************************************/
/* Send a message to the system console (only 1-liners). */
/*********************************************************************/
Cnmvlc(&msgbuf,0,"HELLO SYSOP");
Cnmsmsg(&msgbuf,MSG,SYSOP,NULLCHAR);
/*********************************************************************/
/* Send a message to the authorized receiver. */
/*********************************************************************/
Cnmvlc(&msgbuf,0,"HELLO AUTHRCV");
Cnmsmsg(&msgbuf,MSG,AUTHRCV,NULLCHAR);
/*********************************************************************/
/* Send a message to the log. */
/*********************************************************************/
Cnmvlc(&msgbuf,0,"This should only be in the log");
Cnmsmsg(&msgbuf,MSG,NETVLOG,NULLCHAR);
/*********************************************************************/
/* Send to the sequential log */
/*********************************************************************/
Cnmvlc(&msgbuf,0,"Test message");
Cnmsmsg(&msgbuf,MSG,SEQLOG,"SQLOGTSK");
/*********************************************************************/
/* Send to a group */
/*********************************************************************/
Cnmvlc(&msgbuf,0,"Hello group");
Cnmsmsg(&msgbuf,MSG,OPCLASS,"+GROUP1 ");
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
Cnmcmd(&command);
if (Hlbptr->Hlbrc != CNM_GOOD) /* always check rc from Cnmcmd */
{ /* if bad return code from Cnmcmd */
/* place message in varying length */
Cnmvlc(&message, /* character string... */
0, /* ...do not convert to hex */
"Command not scheduled successfully"); /* ...message */
/* issue message... */
Cnmsmsg(&message, /* ...message text */
MSG, /* ...type is message */
OPER, /* ...send to invoking operator */
NULLCHAR); /* ...not used */
}
Sending commands
The following example shows a command being sent to run on another task. The
command to be run on the other task can be another HLL command, a command
list, a VTAM command, or a NetView command.
You can use this process to start commands under DSTs, other OSTs, or the PPT.
/******************************************************************/
/* Internal data definitions */
/******************************************************************/
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
/* copy command into varying */
/* length character string... */
Cnmvlc(&logoff, /* ...varying length string */
0, /* ...do not convert to hex */
"LOGOFF"); /* ...command to be copied */
/* issue message... */
Cnmsmsg(&msgbuf, /* ...text of message */
MSG, /* ...this is a message */
OPER, /* ...to the operator */
NULLCHAR); /* ...not used */
}
else
{ /* inform user task not active */
if (Hlbptr->Hlbrc == CNM_TASK_INACTIVE)
{
/* copy message into varying */
/* length character string... */
Cnmvlc(&msgbuf, /* ...varying length string */
0, /* ...do not convert to hex */
"OPER1 Not Active");/* ...message */
/* issue message... */
Cnmsmsg(&msgbuf, /* ...text of message */
MSG, /* ...this is a message */
OPER, /* ...to the operator */
NULLCHAR); /* ...not used */
}
else
{ /* inform user bad rc */
/* copy message into varying */
/* length character string... */
Cnmvlc(&msgbuf, /* ...varying length string */
0, /* ...do not convert to hex */
"Unexpected rc from Cnmsmsg"); /* ...message */
CACTLU
►► CACTLU luname ►◄
Where:
luname
Is the name of the LU to be activated.
Waiting and trapping using the TRAP and WAIT command (C)
/******************************************************************/
/* Internal data definitions */
/******************************************************************/
Dsiorig origptr; /* work block for Cnmgetd */
char *token, /* used to parse command buffer */
nodename??(9??); /* LU to activate */
Dsivarch command, /* varying len char strng for cmds */
msgbuf; /* varying len char strng for msgs */
/******************************************************************/
/* retrieve node name from command buffer */
/******************************************************************/
CACTPIP
►► CACTPIP luname ►◄
Where:
luname
Is the name of the LU to be activated.
0, /* ...not needed */
&varnm, /* ...specifies variable name */
LOCAL); /* ...local variable pool */
/****************************************************************/
/* Build the PIPE command. */
/* The VTAM stage issues the VARY command. */
/* The CORRWAIT stage waits 10 seconds for each message to */
/* return to the pipeline. */
/* The TOSTRING stage selects messages to remain in the */
/* pipeline up to and including one having ’IST093I’ */
/* in columns 1-7. */
/* The TAKE stage selects the last message in the pipeline, */
/* discarding all others. */
/* The VAR stage writes the message to the variable specified. */
/****************************************************************/
/* Copy command into varying */
Cnmvlc(&command, /* length string */
0, /* ...do not convert to hex */
"PIPE VTAM V NET,ACT,ID=%s%s",nodename,
" | CORRWAIT 10"
" | TOSTRING FIRST 1.7 /IST093I/"
" | TAKE LAST 1"
" | VAR VNETRESULT");
Cnmcmd(&command); /* Issue PIPE command */
result = strstr(msgbuf.buffer,"IST093I");
if (result != NULL) /* Did we find IST093I? */
{ /* Inform user activation worked */
/**************************************************************/
/* Build message to inform user activation worked */
/**************************************************************/
/* Issue message... */
Cnmsmsg(&msgbuf, /* ...message to issue */
MSG, /* ...type is message */
OPER, /* ...issue to operator */
NULLCHAR); /* ...unused */
}
else
{ /* IST093I not found, must be error*/
/* Copy message into varying length*/
/* character string... */
Cnmvlc(&msgbuf, /* ...varying length string */
0, /* ...do not convert to hex */
"ERROR - ACTIVATION UNSUCCESSFUL"); /* ...message text */
/* Issue message... */
Cnmsmsg(&msgbuf, /* ...message to issue */
MSG, /* ...type is message */
OPER, /* ...issue to operator */
NULLCHAR); /* ...unused */
}
}
For more information about the PIPE command, refer to IBM Tivoli NetView for
z/OS Programming: Pipes.
Retrieving information
“Retrieving information (C)” shows how an HLL command processor or
installation exit routine can retrieve information from the NetView program. HLL
command processors and installation exit routines can access this information.
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
/* retrieve date and time... */
Cnminfc("DATETIME", /* ...specify the variable */
&cdata, /* ...result goes here */
18); /* ...at most eight bytes */
/* display results... */
Cnmsmsg(&msgbuf, /* ...text of message */
MSG, /* ...is a massage */
OPER, /* ...to invoking operator */
NULLCHAR); /* ...not used */
/* display results... */
Cnmsmsg(&msgbuf, /* ...message text */
MSG, /* ...is a message */
OPER, /* ...to the invoking operator */
NULLCHAR); /* ...not used */
“Command list variable access (C)” on page 131 shows how to retrieve values
from a stem variable after issuing a PIPE command with the STEM stage
command.
/******************************************************************/
/* verify variable has been changed */
/******************************************************************/
/* read the global variable ... */
Cnmvars(GET, /* ...function is read */
&datain, /* ...data goes here */
length, /* ...truncate after 24 bytes */
&variable, /* ...variable name */
CGLOBAL); /* ...variable pool is CGLOBAL */
/* show value to operator ... */
Cnmsmsg(&datain, /* ...data to be displayed */
MSG, /* ...type is message */
OPER, /* ...send message to operator */
NULLCHAR); /* ...not used */
};
/*********************************************************************/
/* Execution */
/*********************************************************************/
/*********************************************************************/
/* Build a PIPE command. */
/* The < (From Disk) stage reads data into the pipeline from */
/* MYINFILE, a member of a dataset associated with the ddname */
/* DSIPARM. The records are treated as single-line messages. */
/* The NLOCATE stage discards comments lines which begin with */
/* either ’*’ or ’/*’. */
/* The STEM stage writes the remaining messages from the pipeline */
/* to stemmed variables named PIPELINEx. */
/*********************************************************************/
Cnmvlc (&pipecmd,0,
"PIPE < MYINFILE"
" | NLOCATE 1.1 &*& 1.2 &/*&"
" | STEM PIPELINE"); /* Build PIPE command */
Cnmcmd(&pipecmd); /* Issue PIPE command */
/*********************************************************************/
/* Local variable PIPELINE0 contains the character representation of */
/* the total number of PIPELINEx stem variables. */
/*********************************************************************/
Cnmvlc (&varname,
0,
"PIPELINE0");
/*********************************************************************/
/* Get number of stem variables and store value in NUMVARS. */
/*********************************************************************/
Cnmvars(GET,
&numvars,
4,
&varname,
LOCAL);
/*********************************************************************/
/* Local variable PIPELINE1 contains the first non-comment line in */
/* MYINFILE. */
/*********************************************************************/
Cnmvlc (&varname,
0,
"PIPELINE1");
/*********************************************************************/
/* Get first non-comment line and store value in STEMLINE. */
/*********************************************************************/
Cnmvars(GET,
&stemline,
80,
&varname,
LOCAL);
For more information about the PIPE command, refer to IBM Tivoli NetView for
z/OS Programming: Pipes.
Using locks
“Command list variable access (C)” on page 130 shows the updating of common
global variables, but it does not show you how to protect the updating of the
GVARIABLE variable by using a lock. The need for protecting the updating must
be assessed on a case-by-case basis. “Example of using locks (C)” is a modified
version of how to obtain a lock before attempting the update.
The lock name can be the same as the global variable, or it can be different.
if (Hlbptr->Hlbrc == CNM_GOOD)
{
Cnmsmsg(Cnmvlc(&msg,0,"got lock"),MSG,OPER,NULLCHAR);
/******************************************************************/
/* Find out the value of the variable */
/******************************************************************/
/* read the global variable... */
Cnmvars(GET, /* ...function is read */
&datain, /* ...data goes here */
length, /* ...truncate after 24 bytes */
&variable, /* ...variable name */
CGLOBAL); /* ...variable pool is cglobal */
/* show operator value... */
Cnmsmsg(&datain, /* ...data obtained from varpool */
MSG, /* ...type is message */
OPER, /* ...send message to operator */
NULLCHAR); /* ...not used */
/******************************************************************/
/* set the global variable */
/******************************************************************/
/* update the global variable... */
Cnmvars(PUT, /* ...function is write */
&datain, /* ...data is here */
length, /* ...datalen is not used */
&variable, /* ...variable name */
CGLOBAL); /* ...variable pool is CGLOBAL */
/******************************************************************/
/* verify variable has been changed */
/******************************************************************/
/* read the global variable ... */
Cnmvars(GET, /* ...function is read */
&datain, /* ...data goes here */
length, /* ...truncate after 24 bytes */
&variable, /* ...variable name */
CGLOBAL); /* ...variable pool is CGLOBAL */
/* show value to operator ... */
Cnmsmsg(&datain, /* ...data to be displayed */
MSG, /* ...type is message */
OPER, /* ...send message to operator */
NULLCHAR); /* ...not used */
/******************************************************************/
/* Release the lock to let other tasks update GVARIABLE */
/******************************************************************/
Cnmlk(UNLOCK, /* obtain the lock... */
&variable, /* ...function is obtain lock */
" ", /* ...not used */
" "); /* ...not used */
if (Hlbptr->Hlbrc == 0)
}
else
{
Cnmsmsg(Cnmvlc(&msg,0,"lock not gotten"),MSG,OPER,NULLCHAR);
}
Operator input
“Operator input (C)” on page 135 shows how to code an HLL command processor
to accept operator input in single-line mode. The interface is similar to the
&PAUSE function of the NetView command list language. Input is requested by
the application using the WAIT FOR OPINPUT command, and retrieved by the
application using the CNMGETD service routine. The operator can respond using
the GO command. See “GO command” on page 177 for more information.
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
/* copy message into varying */
Cnmvlc(&msgbuf, /* length message string... */
0, /* ... do not convert to hex */
"Enter operator input data"); /* ... message */
/* send a message... */
Cnmsmsg(&msgbuf, /* ...text of message */
MSG, /* ...single line message */
OPER, /* ...to the invoking oper */
NULLCHAR); /* ...not used */
/* copy command to varying */
Cnmvlc(&command, /* length character string...*/
0, /* ...do not convert to hex */
"WAIT 30 SECONDS FOR OPINPUT"); /* ...command */
/* issue command to wait for */
Cnmcmd(&command); /* 30 seconds... */
/* get first trapped msg... */
if (Hlbptr->Hlbrc == CNM_OPINPUT_ON_WAIT)
{ /* Operator input supplied...*/
Cnmgetd(GETMSG, /* ...function is get message*/
&inbuf, /* ...result goes here */
255, /* ...max input length */
Origblck, /* ...must provide work area */
2, /* ...msg is on OPINPUT queue*/
1); /* ...get the first one */
inbuf.buffer??(inbuf.size??) = ’\0’;
/* copy opinput into varying */
Cnmvlc(&msgbuf, /* length character string...*/
0, /* ...do not convert to hex */
"OPERATOR INPUT IS: %s",inbuf.buffer); /* ...message */
/* send a message... */
Cnmsmsg(&msgbuf, /* ...text of message */
MSG, /* ...single line message */
OPER, /* ...to the invoking oper */
NULLCHAR); /* ...not used */
}
else
{ /* No operator input supplied*/
/* copy message into varying */
Cnmvlc(&msgbuf, /* length character string...*/
0, /* ...do not convert to hex */
"NO OPERATOR INPUT SUPPLIED"); /* ... message */
/* send a message... */
Cnmsmsg(&msgbuf, /* ...text of message */
MSG, /* ...single line message */
OPER, /* ...to the invoking oper */
NULLCHAR); /* ...not used */
}
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
/* copy variable name into variable */
Cnmvlc(&variable, /* length character string... */
0, /* ...do not convert to hex */
"PARM1"); /* ...variable name */
/******************************************************************/
/* Issue the view command. Give the task name as a unique name */
/* to go on the View stack. */
/******************************************************************/
/* copy command to varying length */
Cnmvlc(&command, /* character string... */
0, /* ...do not convert to hex */
"VIEW %.8s TESTHLL INPUT",Origblck->Orig_task); /* cmd*/
Figure 5 on page 137 shows the panel definition that is started by this example:
Message processing
“Message processing (C)” lists the message attributes of a message. The invocation
must be a result of an entry in the NetView automation table. This example
functions for both single-line and multiline messages. Refer to the IBM Tivoli
NetView for z/OS Automation Guide for more information.
Cnmvlc(&message,0,"MSGSTR = %s",inbuf.buffer);
Cnmsmsg(&message,MSG,OPER,NULLCHAR);
The command gives the return code that the command authorization checking
service routine returned to the operator.
CSCOPCK
Where:
PARMx
Specifies the keyword variable used to perform authorization checking.
VALx
Indicates the value variable used to perform authorization checking.
Before using the example in “Command Authorization Checking (C)” on page 140,
perform up the following NetView set-up, depending upon the method chosen for
command authorization checking:
In DSIPARM(CMDTABLE)
Restrict access to the command, keywords, and values as well as the operators and
classes that can access them.
The command CSCOPCK can be run by operators in GRP1 and GRP2. Operators
in GRP1 can issue any keyword or keyword value, but operators in GRP2 cannot
use the value of VAL1 with keyword PARM2 and cannot issue PARM3 at all.
PROTECT NETA.CNM01.CSCOPCK
PROTECT NETA.CNM01.CSCOPCK.PARM2
PROTECT NETA.CNM01.CSCOPCK.PARM2.VAL1
PROTECT NETA.CNM01.CSCOPCK.PARM3
PROTECT NETA.CNM01.CSCOPCK.PARM3.VAL1
GROUP GRP1 OPER1,OPER2,FRANK,BILL,JENNY
GROUP GRP2 OPER3,OPER4,FRED,LISA,BETH
GROUP GRP3 JOE
PERMIT GRP1 NETA.CNM01.CSCOPCK
PERMIT GRP1 NETA.CNM01.CSCOPCK.PARM2
PERMIT GRP1 NETA.CNM01.CSCOPCK.PARM2.VAL1
PERMIT GRP1 NETA.CNM01.CSCOPCK.PARM3
PERMIT GRP1 NETA.CNM01.CSCOPCK.PARM3.VAL1
PERMIT GRP2 NETA.CNM01.CSCOPCK
PERMIT GRP2 NETA.CNM01.CSCOPCK.PARM2
In RACF
Restrict access to the command, keywords, and values as well as the operators and
classes that can access them.
The command CSCOPCK can be run by operators in GRP1 and GRP2. Operators
in GRP1 can issue any keyword or keyword value, but operators in GRP2 cannot
use the value of VAL1 with keyword PARM2 and cannot issue PARM3.
Altering data
The DSIEX02A installation exit routine, shown in “Altering data (C)” on page 142,
changes the echoed command message (MSGTYPE=*) to be more informative by
giving the time that the command was entered.
Without the installation exit, if you enter the WHO command, the output is in the
following format:
WHO
/********************************************************************/
/* NetView high level language include files */
/********************************************************************/
#include "dsic.h" /* Include HLL macros */
/********************************************************************/
/* External data definitions */
/********************************************************************/
Dsihlb *Hlbptr; /* Pointer to the HLB */
Dsivarch *Cmdbuf; /* Pointer to command buffer */
Dsiorig *Origblck; /* Pointer to Origin block */
main(int argc, char *argv??(??))
{
/******************************************************************/
/* Internal data definitions */
/******************************************************************/
Dsiorig getblock; /* Area for the Origin Block */
Dsivarch datain; /* Old command text */
Dsivarch time; /* Area for time */
Dsivarch msgbuf; /* message buffer */
/******************************************************************/
/* Convert operand pointers from character to hex addresses */
/******************************************************************/
sscanf(argv??(1??),"%x",&Hlbptr);
sscanf(argv??(2??),"%x",&Cmdbuf);
sscanf(argv??(3??),"%x",&Origblck);
/******************************************************************/
/* Initialization */
/******************************************************************/
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
/* Retrieve the time... */
Cnminfc ("TIME ", /* ...variable is time of day */
&time, /* ...the result goes here */
255); /* ...max length of 255 */
/* Peek the msg before altering */
Cnmgetd(PEEKLINE, /* ...subfunction is peek */
&datain, /* ...result goes here */
255, /* ...max length is 255 */
&getblock, /* ...use new Origin block */
IDATAQ, /* ...initial data queue (4) */
1); /* ...check the first line */
datain.buffer??(datain.size??) = ’\0’; /* put null at end of data*/
/* Echo’ed message? */
if (getblock.Orig_msg_type == ’*’) {
Storage access
“Displaying contents of storage (C)” shows how to display the character
representation of the contents of the storage that the NetView program can access.
For example, after locating the address of the main vector table using DISPMOD
DSIMNTEX, you can display the first 4 bytes of the DSIMVT control block.
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
inbufr_p = inputbfr;
numbytes = 0;
numparms = sscanf((char *) &(Cmdbuf->buffer), /* parse cmd buffer */
"%*s%x%x", /* Format string */
&xaddr, /* The address to display */
&numbytes); /* For this number of bytes */
if (numparms != 2) /* Address and length given ? */
{
Cnmvlc(&msgbuf,0,"Invalid number of operands");
Cnmsmsg(&msgbuf, /* No, display error message... */
MSG, /* ...message */
OPER, /* ...to the operator */
NULLCHAR); /* ...not used */
Hlbptr->Hlbrc = 1; /* set return code */
return; /* Terminate processing */
}
if (numbytes <= 0) /* A valid length given? */
{
Cnmvlc(&msgbuf,0,"Invalid length given");
Cnmsmsg(&msgbuf, /* No, display error message... */
MSG, /* ...message */
OPER, /* ...to the operator */
NULLCHAR); /* ...not used */
Hlbptr->Hlbrc = 1; /* set return code */
return; /* Terminate processing */
}
if (numbytes >= 4096) /* A valid length given? */
{
Cnmvlc(&msgbuf,0,"Invalid length given, must be less than FFF");
Cnmsmsg(&msgbuf, /* No, display error message... */
MSG, /* ...message */
OPER, /* ...to the operator */
NULLCHAR); /* ...not used */
Hlbptr->Hlbrc = 1; /* set return code */
return; /* Terminate processing */
}
if (xaddr != NULL) /* If valid address then... */
{ /* Copy storage... */
Cnmcpys(&xaddr, /* ...from the address given */
&inbufr_p, /* ...to the internal buffer */
numbytes, /* ...for up to FFF bytes */
FIXTOFIX); /* ...data is fixed length type */
/******************************************************************/
/* Open the member */
/******************************************************************/
/* Open the data set member... */
“CNMCNMI (C)” on page 146 uses the Cnmcnmi service routine to send a product
set ID data request to a specified PU. Any data returned is sent as a message to the
operator.
CCNMI
OWN
►► CCNMI puname ►◄
ALL
Where:
ALL
Specifies that vital product data is to be retrieved for the PU and its attached
ports.
OWN
Specifies that vital product data is to be retrieved for the PU only. This
keyword is the default.
puname
Is the name of the PU from which the vital product data is retrieved. This
parameter is required.
CNMCNMI (C)
/********************************************************************/
/* External data definitions */
/********************************************************************/
typedef struct
{
short size;
char buffer??(1025??);
} Bigvlc;
main(int argc, char *argv??(??))
{
/******************************************************************/
/* Internal data definitions */
/******************************************************************/
int rcode; /* Return code */
int count; /* Count of scanned args */
Dsivarch puname; /* puname varying length */
Dsivarch msgbuf; /* Message buffer */
Dsiorig getblock; /* Area for the work orig block */
Bigvlc datain; /* Buffer for the RU */
char ownorall??(4??); /* Own or all placeholder */
Dsivarch fwdru; /* Forward RU */
Dsivarch ru; /* RU data */
Dsivarch own; /* 81 if own specified */
Dsivarch all; /* 83 if all specified */
Dsivarch puhdr; /* puname header */
Dsivarch endofru; /* end of RU */
char *ptr; /* ptr used to build fwdru */
/********************************************************************/
/* */
/* Vital Product Data RU definitions */
/* */
/* From the VTAM Programming Manual, a forward RU is defined below */
/* */
/* Byte Value Description */
/* 0 81 Network services, logical services */
/* 1 08 Management services */
/* 2 10 Request code */
/* 3 00 Format 0 */
/* 4 00 Ignore target names, */
/* Solicit a reply, and */
/* No CNM header contained */
/* 5 00 Reserved */
/******************************************************************/
/* Initialization */
/******************************************************************/
Cnmvlc(&ru,1,"810810000000000E41038D00000111000006809002");
Cnmvlc(&own,1,"81");
Cnmvlc(&all,1,"83");
Cnmvlc(&puhdr,1,"F108");
Cnmvlc(&endofru,1,"00");
rcode = 0;
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
ptr = (char *) &fwdru.buffer;
count = sscanf((char *) &(Cmdbuf->buffer),"%*s%s%s",
puname.buffer,ownorall);
puname.size = strlen(puname.buffer);
if (puname.size < 8) /* Pad with blanks if needed */
strncat(puname.buffer," ",8 - puname.size);
if ((count == 1) ¦¦ (strncmp(ownorall,"OWN",3) == 0))
{
memmove(ptr,ru.buffer,ru.size);
ptr=ptr+ru.size;
memmove(ptr,own.buffer,own.size);
ptr=ptr+own.size;
memmove(ptr,puhdr.buffer,puhdr.size);
ptr=ptr+puhdr.size;
memmove(ptr,puname.buffer,puname.size);
ptr=ptr+puname.size;
memmove(ptr,endofru.buffer,endofru.size);
fwdru.size = ru.size+own.size+puhdr.size+puname.size+endofru.size;
}
else
if (strncmp(ownorall,"ALL",3) == 0) /* ALL specified */
{
memmove(ptr,ru.buffer,ru.size);
ptr=ptr+ru.size;
memmove(ptr,all.buffer,all.size);
ptr=ptr+all.size;
memmove(ptr,puhdr.buffer,puhdr.size);
ptr=ptr+puhdr.size;
memmove(ptr,puname.buffer,puname.size);
ptr=ptr+puname.size;
memmove(ptr,endofru.buffer,endofru.size);
fwdru.size = ru.size+all.size+puhdr.size+puname.size+endofru.size;
}
else /* Else invalid parm inform user */
{
Cnmvlc(&msgbuf,0,"Invalid command syntax");
Cnmsmsg(&msgbuf,MSG,TASK,Origblck->Orig_task);
rcode = 8;
}
if (rcode == 0) { /* Good so far? */
/* Send RU over the CNMI... */
Cnmcnmi(SENDRPLY, /* ...expect a reply */
&fwdru, /* ...RU built above */
puname.buffer, /* ...to the PU name specified */
180); /* ...timeout after 3 minutes */
if (Hlbptr->Hlbrc == CNM_GOOD)/* Everything ok? */
{ /* Yes, continue */
/* Read in the first RU returned */
Cnmgetd(GETLINE, /* ...a single RU */
&datain, /* ...inti here */
1024, /* ...truncate after 1024 bytes */
&getblock, /* ...provide a new origin block */
CNMIQ, /* ...on the CNMI queue (5) */
1); /* ...the first RU */
while (Hlbptr->Hlbrc == 0) /* End of queue reached? */
{
/* Send info to the operator... */
Cnmsmsg(&datain, /* ...from here */
MSG, /* ...issue message */
TASK, /* ...to the task */
Origblck->Orig_task); /* ...that originated request */
/* Read in the next RU returned */
Cnmgetd(GETLINE, /* ...a single RU */
&datain, /* ...inti here */
1024, /* ...truncate after 1024 bytes */
&getblock, /* ...provide a new origin block */
CNMIQ, /* ...on the CNMI queue (5) */
1); /* ...the first RU */
}
}
else /* CNMI error */
{
/* Not invoked under a DST */
if (Hlbptr->Hlbrc == CNM_BAD_INVOCATION)
Cnmvlc(&msgbuf, /* Buffer for message text */
0, /* Do not convert to hex */
"Must run under a DST"); /* Error message */
else
/* PU never answered request */
if (Hlbptr->Hlbrc == CNM_TIME_OUT)
Cnmvlc(&msgbuf, /* Buffer for message text */
0, /* Do not convert to hex */
"PU never answered"); /* Error message */
else
/* PU gave a negative response */
if (Hlbptr->Hlbrc == CNM_NEG_RESPONSE)
Cnmvlc(&msgbuf, /* Buffer for message text */
0, /* Do not convert to hex */
"PU gave negative response");
else
/* Cnmi failure */
Cnmvlc(&msgbuf, /* Buffer for message text */
0, /* Do not convert to hex */
"CNMI request failed rc = %d",
Hlbptr->Hlbrc); /* Rc from CNMI routine */
The command processor must run on a DST. Use either the Cnmsmsg service
routine (with a type of COMMAND), or the EXCMD command.
“VSAM Keyed File Access (C)” creates a database with five records and these keys
and data:
Key Data
01 A
02 B
03 C
04 D
05 E
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
/******************************************************************/
/* WRITE OUT 5 RECORDS... */
/* */
/* PUT DIRECT must be used for new records, and PUT UPDATE */
/* must be used for old records. Therefore, we will use GET */
/* EQual to determine if the record is new or not. If new, */
/* then a PUT DIRECT will follow...if not, then a put update */
/* follows. */
/* */
/******************************************************************/
keyptr = keydata;
outptr = outdata;
for (i = 0; i <= 4; i++) /* For 5 records */
{
memmove(key.buffer,keyptr,2);/* Set key portion of record */
key.size = 2; /* Set size of key buffer */
/* Call KEYIO... */
Cnmkio(GET_EQ, /* ...requesting a get */
&inrec, /* ...data goes in here */
10, /* ...10 bytes max input */
&key, /* ...key is in key */
UPDATE); /* ...this is an update */
if (Hlbptr->Hlbrc == CNM_NOT_FOUND)
/* Call KEYIO... */
Cnmkio(PUT, /* ...requesting a put */
&rec, /* ...data goes in here */
0, /* ...not used */
&key, /* ...key is in key */
DIRECT); /* ...this is an update */
else
/* Call KEYIO... */
Cnmkio(PUT, /* ...requesting a put */
&rec, /* ...data goes in here */
0, /* ...not used */
&key, /* ...key is in key */
UPDATE); /* ...this is an update */
if (Hlbptr->Hlbrc != CNM_GOOD)
{ /* if put failed */
/* put message in varying length */
Cnmvlc(&msg, /* character string... */
0, /* do not convert to hex */
"Cnmkeyio PUT request failed with RC: %d",Hlbptr->Hlbrc);
/* put out error message... */
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
Cnmvlc(Cmdbuf, /* Set key... */
1, /* ...convert to hex */
"0000"); /* ...hex zeroes */
/******************************************************************/
/* Initialization */
/******************************************************************/
/******************************************************************/
/* */
/* Execution */
/* */
/******************************************************************/
/* Command other than CSNDDAT? */
if (strstr(Cmdbuf->buffer,"CSNDDAT") == NULL)
{ /* Yes... */
Cnminfc("TIME ", /* ...what time is it? */
&time, /* ...answer goes here */
255); /* ...length of time */
CWATDAT
►► CWATDAT taskname ►◄
Where:
taskname
Specifies the task global variable set by the installation exit and retrieved by
the CSNDDAT command.
The flow of the WAIT for data function is shown in Figure 6 on page 154.
CWATDAT uses
CNMSMSG to
send the request
to the target OST.
CNMSMSG is invoked to
send the value
retrieved. The type
used in the CNMSMSG
is DATA.
Requesting data
“Requesting Data (C)” describes the initiating command processor that sends a
message containing a request, waits on the response, and parses the results.
It also shows how to find the last time that a command was entered on the given
OST. A task global variable, LAST_COMMAND_TIME, is set by DSIEX03 (see
“Coding an installation exit” on page 152), and this value is retrieved by the
CSNDDAT command that is started on the target task (see “Sending data” on page
156).
strcpy(targtask,token);
len = strlen(targtask);
strncat(targtask," ",8 - len);
if (token != NULL) /* Was target task entered? */
{ /* Syntax ok... */
if (strncmp(targtask,(char *) &(Origblck->Orig_task),
strlen(targtask)) == 0)
{ /* is operator who issued CWATDAT being queried?*/
/* put error message in a varying */
Cnmvlc(&msgbuf, /* length character string... */
0, /* ...do not convert to hex */
"Target task cannot be task invoking CWATDAT");
/*******************************************************************/
/* Remove process and task ID from the buffer !!!! */
/* First 8 bytes and the last 8 bytes */
/*******************************************************************/
strncpy(msgbuf.buffer,time.buffer+8,time.size-8);
msgbuf.size = time.size - 8;
Cnmsmsg(&msgbuf, /* Inform user... */
MSG, /* ...type is message */
OPER, /* ...to the operator */
NULLCHAR); /* ...not used */
}
}
}
else /* Target task not entered */
{
Cnmvlc(&msgbuf, /* Put error message in msgbuf */
0, /* ...do not convert to hex */
"Invalid Target Task");
Sending data
“Sending data (C)” is to find the last time that a command was entered on the
given task. A task global variable, LAST_COMMAND_TIME, is set by DSIEX03
(see “Coding an installation exit” on page 152). This value is retrieved by the
CSNDDAT command that is started by the CWATDAT command (see “Coding the
WAIT FOR DATA function” on page 153) on the target task. This command
processor is run when the CSNDDAT command is started.
"C1E4E3D6D4C1E3C5E240"
"C1D3C5D9E3E2"
"0893000110213111"
"0B92800001B0048CD5AA63"
"180516100807C940D3D6E5C5FF00"
"08D5C5E3E5C9C5E6FF11"
"1E96060122E233D30384DD0382AA"
"0382BB0382CC0382DD048144A3038333"
"219808010000000431820382AA"
"0382BB0382CC08010000000237450382DD0382EE");
/****************************************************************/
/* Drive the Automation Table with the MSU. */
/****************************************************************/
Cnmauto(&ru);
/****************************************************************/
/* Respond to the operator with the return code from CNMAUTO */
/****************************************************************/
Cnmvlc(&msgbuf,0,"THE RC FROM THE C CNMAUTO INVOC = %d",
Hlbptr->Hlbrc);
Cnmsmsg(&msgbuf,MSG,OPER,0);
rcode = 0;
Hlbptr->Hlbrc = rcode; /* Successful completion */
Cnmc2t(&trdata,256,"SNAALERT",code);
Hlbptr->Hlbrc = CNM_GOOD;
sscanf(argv??(1??),"%x",&Hlbptr);
sscanf(argv??(2??),"%x",&Cmdbuf);
sscanf(argv??(3??),"%x",&Origblck);
Cnmrgs(REGMSAPPL, /* Registering an MS application */
"MSAPPL1 ", /* whose name is MSAPPL1 */
"RECVCMD ", /* the registered command proc. */
"OPS_MGMT", /* interested in fpcat OPS_MGMT */
"NO ", /* not a focal point application */
"YES ", /* replace MSAPPL1 if it exists */
"NONE ", /* don’t send session outage info*/
"PRI_LOW "); /* priority for incoming request */
Cnmvlc(&msgbuf,0,"Return code from Cnmrgs = %i",Hlbptr->Hlbrc);
Cnmsmsg(&msgbuf,MSG,OPER,NULLCHAR);
sscanf(argv??(1??),"%x",&Hlbptr);
sscanf(argv??(2??),"%x",&Cmdbuf);
sscanf(argv??(3??),"%x",&Origblck);
Cnmhrgs(REGAPPL, /* Registering an HP application */
"HPAPPL1 ", /* whose name is HPAPPL1 */
"RECVCMD ", /* the registered command proc. */
"#INTER ", /* #INTER logmode used for sends */
"YES ", /* replace HPAPPL1 if it exists */
"NONE ", /* don’t send session outage info*/
"PRI_LOW "); /* priority for incoming request */
Cnmvlc(&msgbuf,0,"Return code from Cnmhrgs = %i",Hlbptr->Hlbrc);
Cnmsmsg(&msgbuf,MSG,OPER,NULLCHAR);
if (Hlbptr->Hlbrc==CNM_GOOD) {
if (Hlbptr->Hlbrc != CNM_GOOD) {
Cnmvlc(&msgbuf,NOHEXCNV,"Cnmsmu failure, rc = %i",
Hlbptr->Hlbrc);
Cnmsmsg(&msgbuf,MSG,OPER,NULLCHAR);
}
/* if the conversion fails, send a message to the operator */
} else {
Cnmvlc(&msgbuf,NOHEXCNV,"Cnmvlc failure, rc = %i",
Hlbptr->Hlbrc);
Cnmsmsg(&msgbuf,MSG,OPER,NULLCHAR);
}
Hlbptr->Hlbrc = CNM_GOOD; /* set a good rc and exit */
}
if (Hlbptr->Hlbrc==CNM_GOOD) {
Hlbptr->Hlbrc);
Cnmsmsg(&msgbuf,MSG,OPER,NULLCHAR);
}
/********************************************************************/
/* Header/Standard Include Files */
/********************************************************************/
#include <stdio.h> /* Standard I/O header */
#include <string.h> /* String functions */
#include <stdefs.h> /* Standard Definitions */
#include <stdlib.h> /* Standard Library */
#include <stdarg.h> /* Standard Args */
/********************************************************************/
/* Include the High-Level Language include files */
/********************************************************************/
#include "dsic.h" /* Include HLL macros */
/********************************************************************/
/* Parameters */
/********************************************************************/
Dsihlb *Hlbptr; /* Pointer to the HLB */
Dsivarch *Cmdbuf; /* Pointer to command buffer */
Dsiorig *Origblck; /* Area for the Origin Block */
/******************************************************************/
/* Internal data structures */
/******************************************************************/
typedef struct { /* Character varying type */
short int size; /* Length of buffer */
char buffer??(300??); /* Varying length buffer */
} Myvarch;
/******************************************************************/
/* Internal data definitions */
/******************************************************************/
Dsivarch msgbuf,
so,
*soptr;
Myvarch mdb,
*mdbptr;
char mycorr??(16??);
main(int argc, char *argv??(??))
{
/****************************************************************/
/* Convert parameter pointers from character to hex addresses */
/****************************************************************/
sscanf(argv??(1??),"%x",&Hlbptr);
sscanf(argv??(2??),"%x",&Cmdbuf);
sscanf(argv??(3??),"%x",&Origblck);
/****************************************************************/
/* Create the MDB */
/* */
"E2C5D9E5C9C3C5" /* "SERVICE" */
"0000"); /* 2 extra bytes so that length */
/* calculated includes length */
/* of the length field */
/****************************************************************/
/* Create the Source Object */
/****************************************************************/
Cnmvlc(&so,CNVTOHEX,"0005" /* Source object type */
"07D5D4E8E2E8E2" /* Nickname "MYSYS" */
"0000"); /* 2 extra bytes so that length */
/* calculated includes length */
/* of the length field */
/****************************************************************/
/* Initialize the correlator */
/****************************************************************/
*mycorr = *mycorr ??’ *mycorr; /* Exclusive OR */
/****************************************************************/
/* Set up pointers to MDB and Source Object */
/****************************************************************/
mdbptr = &mdb;
soptr = &so;
/****************************************************************/
/* Call CNMPMDB */
/****************************************************************/
Cnmpmdb(&mdbptr,&soptr,mycorr);
/****************************************************************/
/* Respond to the operator with the return code from CNMPMDB */
/****************************************************************/
Cnmvlc(&msgbuf,0,"RETURN CODE FROM CNMPMDB: %i",Hlbptr->Hlbrc);
Cnmsmsg(&msgbuf,MSG,OPER,NULLCHAR);
This chapter describes the NetView remote interactive debugger (RID) and how
you can use it to do the following tasks:
v Debug HLL programs
v Validate entry and exit parameters to HLL service routines
v Display storage at various predetermined debug points in the code.
RID begins to monitor the target task immediately after the RID command is
issued from the monitoring task. If RID is started in STEP mode, the monitoring
task controls the HLL module running under the target task. The monitoring task
continues to control the HLL modules running under the target task until RID is
started with the RUN or END option.
The most common use of the debugger is the default option, which displays
operands upon entry to (HAPIENTR) and exit from (HAPIEXIT) HLL service
routines.
RID command
This syntax shows the RID command as it is issued from the monitoring or
debugging task.
RID
Where:
CONTINUE
The CONTINUE option is used to resume running of a task that was stopped
by the STEP option of RID. You can specify new debug point match criteria
with the CONTINUE option. The CONTINUE keyword is provided for
readability only. You can resume the task by reissuing the RID command with
its original operands.
END
The END option causes debugging of a task to cease and allows other
operators to start RID for the target task. If the target task is stopped and RID
is started with the END option, the HLL program running under the target
task is resumed.
MODNAME
Is the name of the module being monitored by RID. If you specify *, RID
monitors all HLL programs running under the target task. * is the default.
OPTION
Specifies the type of debug point.
* All debug points are displayed.
HAPIENTR
Entry to an HLL API service routine.
HAPIEXIT
Exit from an HLL API service routine.
RUN
The RUN option is similar to the STEP option, except that the target task
continues to run after issuing the messages at the debug points. The RUN
option causes a task stopped in the STEP mode to resume.
STEP
Specifies that the target task is stopped whenever control is given to a debug
point that matches the criteria indicated by the MODNAME or OPTION
operand. Messages providing data captured at the debug point are displayed
at the operator station that started RID to monitor the target task. STEP is the
default.
TASK
Is the name of the task being monitored by RID. The target task can be an
OST, PPT, NNT, or DST. PPT can be used as a synonym for the PPT task
(xxxxxPPT) where xxxxx is the domain ID in the local NetView program.
Usage:
1. Only one NetView operator at a time can monitor a NetView task using RID.
2. Running RID against the PPT suspends the PPT, which can cause undesirable
results, particularly for timed commands that are scheduled to run on the PPT
(such as commands scheduled to run on the PPT via the AT, EVERY, or AFTER
command).
3. The default value (*) for MODNAME and OPTION is used until you specify a
value. When you specify a value for MODNAME, that value is used on all
successive RID invocations unless explicitly overridden. MODNAME and
OPTION are reset to the default values when RID is started with the END
option.
Return Codes
Values for Y
Value Description
4 Incorrect syntax.
Refer to the IBM Tivoli NetView for z/OS Programming: Assembler manual for more
information.
RID scenario
This section describes how to use RID to monitor or debug an HLL module. For
this example, the HLL program has already been compiled and link-edited. The
process for debugging HLL modules is similar for programs written in PL/I and C.
However, there are some differences in the RID messages that are displayed. For
this example, YOURPGM is the name of the HLL command processor that is
monitored while running under target task OPER1. OPER2 is the monitoring or
debugging task.
Figure 7 shows the system response. RID defaults to STEP mode operation. The
YOURPGM program is stopped at each debug point.
OPER2
- CNM01 CNM986I RID FUNCTION ’STEP’ COMPLETED FOR TASK OPER1
???
Figure 8 on page 170 shows the panel displayed on the console of OPER2. This is
the entry panel (HAPIENTR) for your PL/I program (ID=PLIENTRY). The ID for
OPER2
’ CNM01
▌1▐ CNM987I TASK OPER1 MOD YOURPGM TYPE HAPIENTR ID PLIENTRY SEQ 1
▌2▐ CNM988I MVT 00007D88 TVB 00027BF0 TIB 00067338 TRB 0258B9D0 R13 0265EBB8
HLBPTR H 4 0258BA48 0258BA92
BUFFER S 7 0258BDF6 YOURPGM
ORIGBLCK C 42 0258BA60 * CNM01 OPER1 *
ISASIZ U 4 0258B9EC 4000
HEAPSIZ U 4 0258BA00 512
PLIOPTS H 4 0258BA38 55680000
---------------------------------------------------------------------------
▌3▐ ▌4▐ ▌5▐ ▌6▐ ▌7▐
???
▌5▐ Lengths of the variables in ▌3▐ that are expected by the HLL service
routines.
▌6▐ Addresses in storage where the values for the variables in ▌3▐ are stored.
▌7▐ Values associated with each of the variables in ▌3▐.
Continue to the next debugging point by entering the following command from
OPER2:
RID TASK=OPER1,CONTINUE
Because you did not specify OPTION, RID displays panels upon entrance to
(HAPIENTR) and exit from (HAPIEXIT) all HLL service routines started from the
HLL program being debugged. In Figure 9, RID is displaying the parameters on
entry to (HAPIENTR) the CNMSMSG service routine. The parameters for each
HLL service routines are explained in Chapter 11, “Service reference,” on page 173.
OPER2
???
Continue to the next debugging point by entering the following command from
OPER2:
RID TASK=OPER1
You do not need to issue the RID command with the CONTINUE option when
you want a task to resume. CONTINUE is used for readability. Figure 10 displays
the parameters on exit from the CNMSMSG service routine. RETCODE is added
and is the value of HLBRC (Hlbrc for C programs) on exit from an HLL service
routine.
OPER2
Continue to the next debugging point by entering the following command from
OPER2:
RID TASK=OPER1
The final RID panel displayed in Figure 11 is a PL/I exit panel that corresponds to
the PLIENTRY panel in Figure 9 on page 171. Notice that TYPE= HAPIEXIT and
ID=PLIEXIT. For a C program, the ID is CEXIT. the RETCODE is added, but
ISASIZ, HEAPSIZ, and PLIOPTS are no longer displayed.
OPER2
???
The return code section at the end of each HLL command and service routine
provides a chart of the following:
v The return code represented in terms of constants and unknown values (if
applicable)
v The return code represented in terms of resolved constants and unknown values
(if applicable)
v A description of why the return code was issued
Several of the descriptions refer you to a NetView macro. Each of these macros is
referenced in the IBM Tivoli NetView for z/OS Programming: Assembler book.
Example 1
The unknown value X is equal to 4. The CNMNAMS return code indicates that the
return code was generated by the DSIPUSH macro. The DSIPUSH macro, detailed
in the IBM Tivoli NetView for z/OS Programming: Assembler book, indicates that the
return code is caused by insufficient storage.
Example 2
The unknown value of X is equal to -108. The CNMCMD return code indicates
that the return code was generated by the DSICES macro. Refer to the description
of this macro in IBM Tivoli NetView for z/OS Programming: Assembler.
The value of -108 in the previous example implies that X = SWBEXCNF - Y. The
known values are resolved as follows:
-108 = SWBEXCNF - Y
-108 = -100 - Y
-108 + 100 = -Y
-(-108+100) = Y
8 = Y
The unknown value Y is equal to 8. This DSICES return code designates that an
immediate command was located and that the address is returned.
Example 3
The unknown values X and Y are equal to 16 and 0 respectively. The CNMCNMI
return code indicates that the return code was generated by the DSIZCSMS macro.
The DSIZCSMS macro in IBM Tivoli NetView for z/OS Programming: Assembler
indicates that the return code is present because the call to CNMCNMI was not
sent from a DST.
These return codes can also be seen in the initial return code value, 21600:
16 00 => 16 = MAJOR_RC
00 = MINOR_RC
Example 4
These return codes can also be seen in the initial return code value, 20408:
4 08 => 4 = MAJOR_RC
8 = MINOR_RC
The unknown values X and Y are equal to 4 and 8 respectively. The CNMCNMI
return code indicates that the return code was actually generated by the
DSIZCSMS macro. The DSIZCSMS macro return code (refer to IBM Tivoli NetView
for z/OS Programming: Assembler) indicates that the function cannot be performed
because the DSRB control block is not valid.
Example 5
The return code section of CNMKIO indicates that the return code was actually
generated by the DSIZVSMS macro. This code indicates that the VSAM function
was not complete because the request was not valid or because an I/O scheduling
error occurred. Refer to IBM Tivoli NetView for z/OS Programming: Assembler for
more information.
Command reference
The commands described in the next sections are useful when executing HLL
command processors. The GO, QUEUE, and RESET commands are operator
commands. You can issue them from the operator console or from an HLL
command processor through CNMCMD. The GLOBALV, TRAP, and WAIT
commands must be issued from within an HLL command processor using
CNMCMD.
Note: Refer to the IBM Tivoli NetView for z/OS Command Reference or the NetView
online help for more information about these commands.
GLOBALV command
The GLOBALV command lets you define and manipulate task global and common
global variables. In addition, you can save these variables to a VSAM database,
restore them from the database, or purge them from the database. Task global
variables are accessible only to the NetView task under which they were created.
Common global variables are accessible to any NetView task.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler or the z/OS VSAM
library for more information.
Values for Z
Refer to the IBM Tivoli NetView for z/OS Command Reference or the NetView online
help for more information about the GLOBALV command.
GO command
Use the GO command to resume running a command procedure in a pause or wait
state. You can also use the GO command to pass values to a command procedure
in a pause state.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
Refer to the IBM Tivoli NetView for z/OS Command Reference or the NetView online
help for more information about the GO command.
PIPE command
The PIPE command is a powerful and flexible command that lets you issue
commands and manipulate messages in a pipeline. Many of the functions available
in the HLL environment as commands and service routines are also available
through the PIPE stage commands.
The PIPE command creates a message processing environment that lets you issue a
command and wait for that command's response messages (either synchronous or
asynchronous). PIPE ensures that only messages correlated to the command are
received and processed in the pipeline. You can use the PIPE command to process
commands that generate correlated responses instead of using the WAIT and TRAP
commands. The command and message correlation provided through the PIPE
command is a major advantage over the WAIT command. See “Waiting and
trapping using the PIPE command (PL/I)” on page 68 and “Waiting and trapping
Using the PIPE command (C)” on page 127 for examples of using PIPE in an HLL
program.
For a description of the advantages of using the PIPE command instead of the
WAIT command, refer to IBM Tivoli NetView for z/OS Programming: Pipes.
The PIPE command also provides support for stem variables in the NetView HLL
environment. See “Accessing stem variables using the PIPE command (PL/I)” on
page 70 and “Command list variable access (C)” on page 131 for an example of
how to access local variables that have been stored in stem variables by the PIPE
command.
The PIPE stage command, < (From Disk), provides similar function to the HLL
service routines CNMMEMO, CNMMEMR and CNMMEMC. The PIPE stage
commands, CONSOLE and LOGTO, provide function that is available through the
CNMSMSG service routine. The PIPE command with these stages can be used in
place of the associated HLL service routine in these cases. However, RID support is
available only when the HLL service routine is used.
Note:
1. The PIPE command cannot be issued from an HLL installation exit routine or
from an HLL command procedure running under a DST. Refer to IBM Tivoli
NetView for z/OS Programming: Pipes for a complete description of the PIPE
command.
2. To obtain information about the PIPE command and stage commands, use the
online HELP facility:
v To display information about the PIPE command, enter:
HELP PIPE
v To display information about a specific stage command, enter:
HELP PIPE stage_command
QUEUE command
The QUEUE command adds a text message to the operator input queue (OPERQ)
of an HLL command processor or installation exit routine running with the
HLL_QUEUED_INPUT bit of HLLOPTS turned on.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
Refer to the IBM Tivoli NetView for z/OS Command Reference or the NetView online
help for more information about the QUEUE command.
RESET command
High-level language support gives you the option of specifying whether a
command procedure is cancelable. The reset flag is set on only when RESET,
LOGOFF, or CLOSE IMMED are being issued. See “HLL runtime options” on page
38 for more information.
Whenever RESET is issued, NetView turns on a reset flag that remains on until the
command procedure returns control to NetView or uses the CNMINFI service
routine to check RESETREQ.
Checking the reset flag sets the flag off. As a result, the command procedure that
checks the flag must reset the flag. You cannot pass on this responsibility to a
higher level through the use of the reset flag. (You can set a user-defined flag for
this purpose, but doing so is not recommended.)
Examples
Keep in mind that the HLL command procedures must invoke the CNMINFI
service routines for the reset bit to be checked. Y and X continue executing if they
do not invoke any more HLL service routines.
Procedure Procedure
X Y
(cannot (cannot
be cancelled) be cancelled)
(not reset)
Procedure
Z
(can be
(RC=-5) cancelled)
Note:
1. In the example referred to by Figure 14, command procedure X can check the
reset flag using the HLL service routine CNMINFI. In this case, the reset flag is
turned off and Z is not reset.
2. Create command procedures that can be cancelled when possible. The HLL
support option that cannot be cancelled is provided so that you can code
command procedures to perform cleanup (such as free storage) before the
procedure is cancelled.
3. When an HLL command procedure is cancelled, the cleanup that is done is
equivalent to that which is done by the STOP statement in PL/I and the EXIT
statement in C.
Procedure Procedure
X Y
(cannot be (can be
cancelled) (RC=-5) cancelled)
TRAP command
Use the TRAP command to specify message trapping criteria for HLL and REXX
command procedures. When the TRAP command is issued, all subsequent
messages that match the conditions that are defined by the trapping criteria are
added to the message queue (TRAPQ).
Return Codes:
Values for X
Refer to the IBM Tivoli NetView for z/OS Command Reference or the NetView online
help for more information about the TRAP command.
WAIT command
When issued from a command procedure, the WAIT command temporarily
suspends processing of that command procedure until a specified event occurs. For
an HLL command procedure, the event can be one or more messages, operator
input, data, a certain period of time, or any combination of these four. The first
occurrence of one of these events satisfies the wait and processing is resumed.
Return Codes:
Refer to the IBM Tivoli NetView for z/OS Command Reference or the NetView online
help for more information about the WAIT command.
When writing a command processor or installation exit routine in PL/I, you can
invoke an HLL service routine using the call or macro format. The PL/I macro
format is provided for those users who want to code only the required parameters
for a particular HLL service routine invocation. Code all of the parameters when
using the PL/I call format or C invocation.
C INVOCATION:
void Cnmaltd(char *adfunc, void *adbuf, void *adorigin, int adqueue, int adindex)
Where:
adbuf
A varying length character field containing the buffer to be inserted. This field
is required with INSLINE and REPLINE, but not used with DELLINE.
adfunc
An 8-byte character field that specifies the function to be performed. This field
is required for all CNMALTD calls. The possible values follow:
DELLINE
Deletes a line of the current message in the specified queue. The line
specified by adindex (the index value) is physically removed from the
queue. You can delete all lines of a message. If the line that was last
returned from GETLINE or GETMSG is deleted, the message pointer is
moved back to the line preceding the deleted line. (See “CNMGETD
(CNMGETDATA): Data queue manipulation” on page 204 for
information.) adqueue and adindex are required operands for DELLINE.
adbuf and adorigin are not required operands for this function.
INSLINE
Inserts a new line in the message in the specified queue. adindex
specifies the line number that the new line will have after it is inserted.
The index value can be one greater than the number of lines currently
in the message to add a line on the end. All parameters are required
for this function.
REPLINE
Replaces a line of the current message in the specified queue (if it
exists). All parameters are required for this function.
adindex
A 4-byte integer field containing the line number of the message at the head of
the queue to be manipulated. This field is required for all functions.
adorigin
A character field of fixed length n (where n ≥ 38) to contain an origin block.
Define an origin block (adorigin) to be passed as a parameter to CNMALTD.
This must be a separate structure from the origin block (ORIGBLCK) that was
passed to the HLL command processor or installation exit routine as an initial
parameter. ORIG_BLOCK_LENGTH cannot be less than 38. See DSIPORIG in
Appendix A, “PL/I Control Blocks and Include Files,” on page 269 or
DSICORIG in Appendix C, “C language control blocks and include files,” on
page 279 for the PL/I and C mappings of an origin block. You are responsible
for updating the origin block (adorigin) to reflect changes made by CNMALTD.
This field is required for INSLINE and REPLINE, but not for DELLINE.
adqueue
A 4-byte integer field containing the number (index) of the queue on which the
operation is to be performed. The only queue allowed for CNMALTD is the
initial data queue (IDATAQ). The full message that started the HLL command
processor through NetView automation or the message that drives DSIEX02A
is on the initial data queue. This field is required for all functions.
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
Usage Notes:
1. CNMALTD is primarily designed for use in DSIEX02A, where you can alter
messages before they are automated or displayed.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmauto(void *atdata)
Where:
atdata
A varying length character field containing the data item to be automated. The
data item must be in one of these forms:
v A MDS-MU
v A CP-MSU
v A NMVT
The CNMAUTO routine determines which form of data item has been passed
in atdata and takes appropriate action to calculate the length of the data item.
Refer to the SNA library for more information.
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmcell(char *pcfunc, int pctoken, void *pcstrptr)
Where:
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
pcfunc
An 8-byte character field that specifies the function to be performed:
ALLOC
Allocate cell
FREE Free cell
pcstrptr
A 4-byte pointer field to contain the address of the cell. This field is returned
to the caller for ALLOC and provided by the caller for FREE.
pctoken
A 4-byte integer field containing the token identifying the storage pool. The
caller provides this field for all functions (the token is returned from
CNMPOOL).
Usage Note: A storage cell within a pool is associated with the NetView subtask
under which it was allocated. The storage cell cannot be referenced from a task
other than the one with which it is associated.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmcmd(void *cmdstr)
Where:
cmdstr
A varying length character field containing the NetView command (including
its parameters) to be run.
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
Usage Notes:
1. Commands are started with a HDRMTYPE of HDRTYPEC. This type is
consistent with the NetView command list language and REXX.
2. The return code from HLL command processors and NetView long-running
commands is returned properly to HLL command processors through the
CNMCMD interface. If you wish to call a long-running command and have it
be separately rollable, you can prefix the command with CMD HIGH. For
example, CNMCOMMAND DATA ('CMD HIGH BROWSE NETLOGA') enables
the BROWSE panel to roll independently from the calling HLL command
processor. Refer to the NetView online help for more information about the
CMD command.
3. CNMCMD does not process immediate commands (type=I in DSIPARM
member CNMCMD).
4. A negative return code generated from CNMCMD indicates a failure in the
CNMCMD service routine, whereas a positive return code generated from
CNMCMD indicates a failure in the NetView command that was to be run by
CNMCMD. A -5 return code generated from CNMCMD indicates that the
NetView command this is running was cancelled. In this case, the command
processor does any necessary cleanup and sets the exit HLBRC to -5 to pass the
RESET information to its caller.
5. A -1 return code generated from CNMCMD indicates an unexpected error in
the called command procedure.
6. You cannot invoke CNMCMD from an HLL installation exit routine or from an
HLL command processor while holding a lock.
7. The NetView service point command service (SPCS) commands are not
supported under the HLL API and must not be started by CNMCMD. Refer to
the NetView online help for a list of SPCS commands.
Return Codes:
Values for X
Return Code
Value for X Description
-4 Nonzero return code, 4 (drop), from installation exit.
-100-Y Nonzero return code, Y, from DSICES macro.
-200-Y Nonzero return code, Y, from DSILCS (CWB) macro.
-300-Y Nonzero return code, Y, from DSIGET macro.
-400-Y Nonzero return code, Y, from DSIPRS macro.
-500-Y Nonzero return code, Y, from either DSIGET or DSILCS indicates storage
failure.
-600-Y Nonzero return code, Y, from DSILCS (SWB) macro.
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmcnmi(char *cnfunc, void *cndata, char *cndest, int cntimout)
Where:
cndata
A varying length character field containing the RU to be sent (beginning with
an RH header). This field is required for all functions. The RU length must be
at least 3 bytes and no longer than 32729 characters.
cndest
An 8-byte character field that specifies the name of the PU to which the RU is
sent. This field is required for all functions.
cnfunc
An 8-byte character field that specifies the function to be performed. This field
is required for all CNMCNMI calls.
SENDRESP
Sends RUs and expects only a positive or negative response.
SENDRPLY
Sends RUs and expects a reply RU or a negative response.
cntimout
A 4-byte integer field specifying the number of seconds to wait for a reply or
response. This is an optional field. If you do not specify cntimout, the default is
0. If you specify a timeout, the RH header must indicate that the embedded
network services (NS) RU solicits a reply. This causes NetView to generate a
procedure-related identifier (PRID). Refer to the z/OS Communications Server
library for more information. For requests that generate multiple RU (chained)
replies, cntimout applies only to the first RU in the chain.
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
Usage Notes:
1. You cannot invoke CNMCNMI from an HLL command processor while holding
a lock. HLL command processors enter a wait state when sending requests over
the CNMI. The wait ends when a response or reply is received or when the
specified timeout expires.
2. You cannot issue CNMCNMI from an HLL installation exit routine.
3. Responses to CNMI solicited data requests are placed on the CNMI solicited
data queue (CNMIQ).
4. The XITCI installation exit routine is started for both solicited and unsolicited
data. See Chapter 2, “HLL installation exit routines,” on page 11 for more
information about this exit. Also see Chapter 3, “HLL Data Services command
processors,” on page 27 for a discussion on “Unsolicited HLL Data Services
Command Processors (DSCP).” When the unsolicited HLL DSCP receives
control, the command buffer (CMDBUF) contains the unsolicited data RU. For
more information about installing a DST, see Chapter 3, “HLL Data Services
command processors,” on page 27.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler or the MVS/ESA
VSAM library for more information.
C INVOCATION:
void Cnmcpys(void *csfrom, void *csto, int cslen, char *cstype)
Where:
csfrom
A 4-byte pointer field containing the address of the source data.
cslen
A 4-byte integer field containing the number of bytes of storage (0 to 16777215)
to be copied.
If the value specified by cslen is greater than the actual length of the specified
csto buffer, a storage overlay can occur. Take special care when deciding the
value of cslen.
csto
A 4-byte pointer field containing the address of the destination.
cstype
Is the type of copy to perform. Valid types are:
FIXTOFIX
Copy cslen bytes of storage from a fixed-length buffer to another
fixed-length buffer.
FIXTOVAR
Copy cslen bytes of storage from a fixed-length buffer to a varying
length buffer.
VARTOFIX
Copy cslen bytes of storage from a varying length buffer to a
fixed-length buffer.
VARTOVAR
Copy cslen bytes of storage from a varying length buffer to another
varying length buffer.
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
Usage Notes:
1. The length field of varying length buffers is not set or altered by CNMCPYS.
2. When using CNMCPYS with C and when copying FIXTOFIX, FIXTOVAR, or
VARTOFIX, pass CNMCPYS a pointer to a pointer to your fixed-length buffer.
You can do this by designating a variable as a pointer to a string, and then
passing the address of that pointer to CNMCPYS.
Return Codes:
The CNMC2T service routine provides translation for various types of code points
to multicultural text.
C INVOCATION:
void Cnmc2t(void *trdata, int trdatlen, char *trtable, int trcode)
Where:
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
trcode
A 4-byte integer field containing the code point to be translated.
trdata
A varying length character field to which the code point text is to be returned.
trdatlen
A 4-byte integer field containing the length of trdata. This is the maximum
length of the area provided to receive the returned text.
If the value specified by trdatlen is less than the length of the text to be
returned, the truncated text is returned in trdata and a return code of
CNM_DATA_TRUNC is generated. The full length of the text that was
truncated is stored in HLBLENG (Hlbleng).
If the value specified by trdatlen is equal to or greater than the length of the
text to be returned, and HLBRC (Hlbrc) = CNM_GOOD, the length of the
returned text is stored in HLBLENG (Hlbleng).
If the value specified by trdatlen is greater than the length of the receiving data
buffer (trdata), a storage overlay can occur. Take special care when deciding the
value of trdatlen.
trtable
An 8-byte character field that specifies the table to be used in translating the
code point. Valid table names are:
SNAALERT
SNA alert description code point
SNACAUSE
SNA probable cause
SNADDATA
SNA detailed data
SNADDAT5
SNA detailed data code point, subfield X'85'
SNADDAT6
SNA detailed data code point, subfield X'86'
SNAFCAUS
SNA failure cause
SNAICAUS
SNA install cause
SNAREACT
SNA recovery actions
SNAUCAUS
SNA user cause
Return Codes:
C INVOCATION:
void Cnmgeta(char *ganame, void *gadata, int gadatlen, int gaqueue)
Where:
gadata
A varying length character field containing the resulting value for the specified
attribute.
Note: If an attribute does not apply to the particular message or MSU type
data, the gadata field is set to a null value for character data. Bit fields are
returned as all character zeros.
gadatlen
A 4-byte integer field containing the length of gadata. This is the maximum
length of the area provided to receive the returned data. You provide the value
for gadatlen.
If the value specified by gadatlen is less than the length of the data to be
returned, the truncated data is returned in gadata and a return code of
CNM_DATA_TRUNC is generated. The full length of the data that was
truncated is stored in HLBLENG (Hlbleng).
If the value specified by gadatlen is equal to or greater than the length of the
data to be returned, and HLBRC (Hlbrc) = CNM_GOOD, the length of the
returned data is stored in HLBLENG (Hlbleng).
If the value specified by gadatlen is greater than the length of the receiving data
buffer (gadata), a storage overlay can occur. Take special care when deciding
the value of gadatlen.
ganame
An 8-byte character field that specifies the attribute. The following are the
valid attributes:
ACTIONDL
An EBCDIC string that indicates why the NetView action message was
deleted. The following are the values:
(null) The message is not a DOM (delete operator message).
LOCAL
The message was deleted by operator overstrike or by the
CONSOLE DELETE stage.
NETVIEW
The message was deleted by the NetView DOM command,
using the NVELID option, or internally by NetView.
SMSGID
The message was deleted by an MVS DOM-by-SMSGID. A
single message was deleted by its specific ID. This is the most
frequent type of MVS DOM.
TOKEN
The message was deleted by an MVS DOM-by-token.
TCB The message was deleted because the task ended that issued
the message. In some cases MVS converts these messages into
DOM-by-SMSGID.
ASID The message was deleted because the address space that issued
the message ended. In some cases MVS converts these
messages into DOM-by-SMSGID.
INVALID
The DOM contained an unrecognizable combination of bit
settings. This can indicate a user exit problem or a data area
overlay problem.
ACTIONMG
An action message with of value of 1 or 0. For a value of 1, NetView
Note: CART only has a value if the messages were originally a MDB.
DESC Are the MVS descriptor codes as a series of 16, 1 (on) and 0 (off)
EBCDIC characters representing the bits in order. Refer to the
MVS/ESA library for more information about code values.
IFRAUGMT
Is the Greenwich Mean Time when the automated internal function
request (AIFR) was created. This value is returned as an 8-byte
hexadecimal value.
IFRAUIND
Returns 2-byte of indicator bits as a series of 16, 1 (on) and 0 (off)
EBCDIC characters represent the bits in order. This data is mapped in
DSIIFR. The bit positions are:
(1) MVS system information attached (WQE data).
(5) Message from NetView PPT.
(6) Message received cross-domain.
(11) Message was PRI routed by ASSIGN command.
(12) Message was SEC routed by ASSIGN command.
(13) Message was COPY routed by ASSIGN command.
(14) Message was routed to authorized receiver.
(15) Message was from down-level domain (no AIFR received).
(16) Message was unsolicited.
Note:
1. Other bits can be tested, but have no suggested use. All the bits are
defined in the DSIIFR mapping control blocks; refer to IBM Tivoli
NetView for z/OS Programming: Assembler.
2. Messages with the unsolicited flag on are eligible for ASSIGN PRI
and SEC routing.
3. This attribute indicates the AIFR indicator fields IFRAUIND and
IFRAUIN2.
Note: IFRAUSRB and IFRAUSB2 refer to the same user field in the
message, but return the value in different formats.
IFRAUSC2
A 16-byte user field from the message which is returned as a series of
128, 1 (on) and 0 (off) characters representing the bits in order. See also
IFRAUSRC.
Note: IFRAUSRC and IFRAUSC2 refer to the same user field in the
message, but return the value in different formats.
IFRAUSDR
Is the 1- to 8-character name of the originating NetView task.
IFRAUSRB
A 2-byte user field from the message which is returned as a series of
16, 1 (on) and 0 (off) characters representing the bits in order. See also
IFRAUSB2.
Note: IFRAUSRB and IFRAUSB2 refer to the same user field in the
message, but return the value in different formats.
IFRAUSRC
A 16-byte user field from the message which is returned as 16
characters. See also IFRAUSC2.
Note: IFRAUSRC and IFRAUSC2 refer to the same user field in the
message, but return the value in different formats.
IFRAUTA1
Returns 6-byte of indicator bits as a series of 48, 1 (on) and 0 (off)
Note:
1. Other bits can be tested, but have no suggested use.
2. See the DSIIFR fields IFRAUTA1 thru IFRAUTA6 for more
information.
3. For a description of all bits, refer to IBM Tivoli NetView for z/OS
Programming: Assembler.
IFRAUWF1
Is 4-bytes of MVS-specific WTO information returned as a series of 32,
1 (on) and 0 (off) characters representing the bits in order. Bit positions
are:
(6) Message is a WTOR
(7) Message is suppressed
(8) Broadcast to all
(9) Display JOBNAMES
(10) Display STATUS
(14) Display SESSION
Other bits can be tested, but have no suggested use.
JOBNAME
A 1- to 8-character MVS job name identifier. Because the JOBNAME is
the name of the job that originated the message, it might not be the
same as the name of the job to which the message is referring. For
example, the job names might be different when MVS issues a message
about the NetView job. Also, JOBNAME can contain the name of an
initiator (instead of the job name) when a job is started or ended. If the
message is issued during startup or termination, extract the job name
from the message text rather than using the JOBNAME function.
KEY An 8-character retrieval key associated with the message. KEY might
contain non-displayable values.
Note:
1. Make sure you provide an 8-byte area to contain the returned key.
Otherwise, the key might be truncated.
2. To use the MVS D R,KEY command, specify only EBCDIC characters
for KEY.
MCSFLAG
Returns the system message flags as a series of 8, 1 (on) and 0 (off)
EBCDIC characters representing the bits in order. The bit positions are:
(1) - Send message conditionally to console SYSCONID
(2) - Send message unconditionally to console SYSCONID
(3) - RESP
(4) - REPLY
(5) - BRDCST
(6) - HDRCPY only
(7) - NOTIME
(8) - NOCPY
Note: This function does not return the same mapping of multiple
console support flags as the automation table compare item.
MSGASID
An MVS system address space identifier from which the message was
issued. The value of MSGASID is a 1- to 5-digit decimal number.
Note: This value is null for messages that do not come from an MVS
address space.
MSGAUTH
A 2-character value indicating whether the messages was issued from
an authorized program. Bit positions and their meanings are:
00 - WTO message is not from MVS
10 - WTO is from an unauthorized program
11 - WTO is from an authorized program
MSGCATTR
Is 2-bytes of MVS message attribute flags returned as a series of 16, 1
(on) and 0 (off) EBCDIC characters representing the bits in order. Bit
positions and their meaning are:
(1) - Message is suppressed.
(2) - Message is the command response.
(3) - Message issued by authorized program.
(4) - Message is to be retained by Automation Message Retention
Facility (AMRF).
Usage note: Other bits can be tested but have no suggested use.
MSGCMISC
Is 1 byte of MVS miscellaneous routing flags returned as a series of 8,
1 (on) and 0 (off) EBCDIC characters representing the bits in order. Bit
positions and their meaning are:
Note:
1. This function has a value only if the message currently being
processed was originally an MDB.
2. Other bits can be tested but have no suggested use.
MSGCMLVL
Is 2-bytes of MVS message level flags returned as a series of 16 on (1)
and off (0) EBCDIC characters representing the bits in order. Bit
positions and their meaning are:
(1) - WTOR
(2) - Immediate action
(3) - Critical eventual action
(4) - Eventual action
(5) - Informational
(6) - Broadcast
Usage note: Other bits can be tested, but have no suggested use.
MSGCMSGT
Is 2 bytes of MVS message type flags returned as a series of 16 on (1)
and off (0) EBCDIC characters representing the bits in order. Bit
positions and their meaning are:
(1) Display job names
(2) Display status
(3) Monitor active
(6) Monitor SESS
Note:
1. This function has a value only if the message currently being
processed was originally an MDB.
2. Other bits can be tested, but have no suggested use.
MSGCOJBN
A 1- to 8-character returned originating job name.
Note: This function has a value only if the message currently being
processed was originally an MDB.
MSGCSPLX
Is the 1- to 8-character name of the MVS SYSPLEX where the received
message originated.
Note: This function has a value only if the message currently being
processed was received from an MVS SYSPLEX or from an MVS
system that specified a sysplex name in a couple data set and was
originally a MDB.
MSGCSYID
A 1- to 3-digit decimal number system identification for DOM. The
value of MSGCSYID can be to 255.
Note: This function has a value only if the message currently being
processed was originally an MDB.
MSGDOMFL
Is 1 byte of MVS DOM flags returned as a series of 8, 1 (on) and 0 (off)
EBCDIC characters representing the bits in order. Bit positions and
their meaning are:
(1) DOM by message ID
(2) DOM by system ID
(3) DOM by ASID
(4) DOM by job step TCB
(5) DOM by token
Note:
1. This function has a value only if the message currently being
processed was originally an MDB.
2. NetView EMCS consoles are set up by default as DOM(NORMAL)
receivers. As a result, the DOMs that are received from MVS by
these consoles are usually DOM by MSGID, and the TOKEN,
SYSID, ASID, and TCB flags are usually not set on when the DOM
is received from MVS.
MSGGBGPA
Is 4 bytes of hexadecimal background presentation attributes. Bytes
and their descriptions are:
Byte 1 - Background control field
Byte 2 - Background color field
Byte 3 - Background highlighting field
Byte 4 - Background intensity field
Note: This function has a value only if the message currently being
processed was originally an MDB.
MSGGDATE
Is the message date in a seven-character format yyyyddd, where yyyy is
the year and ddd indicates a calendar day.
Usage note: This is not necessarily the current date. It can be the date
that MVS associates with the issuing of the message.
MSGGFGPA
Is 4 bytes of hexadecimal foreground presentation attributes. Bytes and
their meaning are:
Byte 1 - Foreground control field
Byte 2 - Foreground color field
Byte 3 - Foreground highlighting field
Byte 4 - Foreground intensity field
Note: This function has a value only if the message currently being
processed was originally an MDB.
MSGGMFLG
Is 2 bytes of MVS general message flags returned as a series of 16, 1
(on) and 0 (off) EBCDIC characters representing the bits in order. Bit
positions and their meaning are:
v Delete operator message (DOM)
Note: This function has a value only if the message currently being
processed was originally an MDB.
MSGGMID
A 4-character MVS message identifier. The value of MSGGMID is a
composite of MSGGSEQ and MSGGSYID. MSGGMID might contain
non-displayable characters. This field contains the same information as
SMSGID, except that SMSGID is returned as a decimal number and
MSGGMID is returned as hexadecimal value.
MSGGSEQ
A sequence number associated with the message. This value is a 1- to
8-digit decimal number, and is generated from the last 3 bytes of
MSGGMID.
MSGGSYID
An ID of the system from which the message was issued. This value is
a 1- to 3-digit decimal number that is generated from the first byte of
MSGGMID.
MSGGTIME
A time that MVS associates with the message. An 11-character time in
the form hh:mm:ss:th, where hh is the hours, mm is the minutes, ss is the
seconds, and th is tenths and hundredths of seconds.
MSGSRCNM
A 1- to 17-character source name. This source name is an identifier
from the source object that was provided by either the DSIMMDBS or
CNMPMDB API invocation. For more information about DSIMMDBS,
refer to IBM Tivoli NetView for z/OS Programming: Assembler. For more
information about CNMPMDB see “CNMPMDB (CNMPRSMDB):
Process Message Data Block” on page 236.
The source name is selected from the source object by the following
rules:
v The first nickname, if any
v The first network identifier concatenated to a network addressable
unit (NAU) name, with a period (.) between, if both exist in
sequence
v The first NAU name, if it exists
v The string “N/A” if none of the other names in this list are specified
in the source object
v Null, if there is no source object
For more information about how the source object is defined, refer to
the DSIAIFRO mapping in IBM Tivoli NetView for z/OS Programming:
Assembler.
Note: This function has a value only if the message currently being
processed was originally an MDB with an associated source object.
MSGSRCOB
The entire source object which was provided on the DSIMMDBS or
CNMPMDB application programming interface (API) invocation.
This value can contain non-displayable characters. The maximum
length that is returned is 1100 bytes. For more information about
DSIMMDBS refer to IBM Tivoli NetView for z/OS Programming:
Assembler. For more information about CNMPMDB, see “CNMPMDB
(CNMPRSMDB): Process Message Data Block” on page 236.
MSGTOKEN
A 1- to 10-digit decimal number that indicates the token associated
with the message.
Usage note: You can use a TOKEN value to group WTOs by setting
MSGTOKEN prior to issuing the WTO command. Subsequently, these
messages can be deleted using a single DOM command by specifying
the token value in MSGTOKEN. Refer to IBM Tivoli NetView for z/OS
Programming: REXX and the NetView Command List Language for
information about DOM token.
MSGTSTMP
A message time-stamp. The value of this field is the time when the
NetView message buffer was created. The field is a 6-character string
in the form hhmmss:
v hh is hours
v mm is minutes
v ss is seconds
MSGTYP
The system message types flags returned as a series of 3, 1 (on) and 0
(off) EBCDIC characters.
The value of the characters are as follows:
1 SESS (corresponds to IFRAUWF1(14))
2 JOBNAMES (corresponds to IFRAUWF1(9))
3 STATUS (corresponds to IFRAUWF1(10))
MVSRTAIN
In NetView HLL procedures, a 3-bit field describing MVS Retain
characteristics of the message.
Note: This function has a value only if the message currently being
processing was originally an MDB.
REPLYID
A reply identifier for WTORs. This field has a maximum length of 8
characters.
For messages from VSE systems, the REPLYID is the last 3 characters
of the 6-character message prefix. The 3 returned characters are the
message reply ID only if the sending system uses those characters to
designate a reply ID for a message.
ROUTCDE
Are the MVS routing codes assigned to the message. The value
returned is a series of 1 (on) and 0 (off) EBCDIC characters
representing the bytes in order. The maximum number of ROUTCDEs
assigned to a message is 128.
SESSID
A 1- to 8-character ID of the terminal access facility (TAF) session that
sent the message.
Note: If the TAF session is started with a SESSID that is the same as
the domain ID, the SESSID is set unpredictably and can give
unpredictable results.
SMSGID
A 1- to 10-character decimal number that identifies a particular
instance of a message. This function can be used by the DOM
command to identify action messages to be removed from the display.
This field contains the same information as MSGGMID, except that
SMSGID is returned as a decimal number and MSGGMID is returned
as a hexadecimal value.
SYSCONID
An MVS system console name associated with the message. System
console names are 2 to 8 characters in length.
SYSID
A 1- to 8-character identifier of the MVS system that sent the message.
SYSID can be used in a sysplex to route commands to the appropriate
system.
gaqueue
A 4-byte integer field containing the number of the queue holding the message.
Only attributes for the initial data queue (IDATAQ) can be obtained.
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
Usage Notes:
1. Other information, which exists in the ORIG_BLOCK, is available when you
call the CNMGETD service routine. See “CNMGETD (CNMGETDATA): Data
queue manipulation” for more information.
2. Refer to IBM Tivoli NetView for z/OS Programming: REXX and the NetView
Command List Language for more information.
3. Some attributes apply to all types of messages, while others apply only to
certain types of messages. For example, JOBNAME is meaningful only for
messages received from MVS.
Return Codes:
C INVOCATION
void Cnmgetd(char *gdfunc, void *gdbuf, int gdbuflen, void *gdorigin,
int gdqueue, int gdindex)
Where:
gdbuf
A varying length character field containing the data buffer to be returned.
This field is required for GETFIRST (GETMSG), GETNEXT (GETLINE), and
PEEKBFR (PEEKLINE). It is not required for FLUSHBFR (FLUSHLIN),
FLUSHGRP (FLUSHMSG), or FLUSHQ.
gdbuflen
A 4-byte integer field containing the length of gdbuf. This is the maximum
length of the area provided to receive the returned data buffer. You provide the
value for gdbuflen.
This field is required for GETFIRST (GETMSG), GETNEXT (GETLINE), and
PEEKBFR (PEEKLINE).
If the value specified by gdbuflen is less than the length of the data buffer to be
returned, the truncated data is returned in gdbuf and a return code of
CNM_DATA_TRUNC is generated. The full length of the data buffer that is
truncated is stored in HLBLENG (Hlbleng).
FLUSHNXT (FLUSHLIN)
Skips over the next data buffer of the specified queue. This function
crosses logical group boundaries until the queue is empty.
FLUSHQ
Discards all logical groups in the specified queue.
Queue Queue
Name Number Function
TRAPQ 1 Message queue. Contains trapped messages. See “TRAP
command” on page 182.
Queue Queue
Name Number Function
OPERQ 2 Operator input queue. See “GO command” on page 177 and
“QUEUE command” on page 178.
DATAQ 3 Data queue. Contains data sent from another HLL command
processor or installation exit routine. See “CNMSMSG
(CNMSENDMSG): Send Message or Command” on page 251.
IDATAQ 4 Initial data queue. Contains the full message or MSU that invokes
the HLL command processor through NetView automation. It also
contains messages that drive DSIEX02A. This is also the queue
where an application command processor receives an MDS-MU
from the NetView high-performance transport, the MS transport,
or operations management for an unsolicited request or
asynchronous reply.
CNMIQ 5 CNMI solicited data queue. Contains RUs solicited through the
CNMI service routine. Chained RUs are treated like multiline
messages. See “CNMCNMI (CNMI): CNMI access under a DST”
on page 189.
MDSMUQ 6 MDS-MU data queue. Contains message units (MUs) received as
synchronous replies. The MDS-MUs are received from operations
management, the MS transport, and the high-performance
transport.
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
Usage Notes:
1. The following items are available after issuing CNMGETD. The NetView
command list language equivalents are listed in the descriptions.
ORIG_MSG_TYPE
Provides the 1-character NetView buffer type of the received message
or MSU, and is equivalent to &HDRMTYPE. This control variable
returns a X'10' when an MSU buffer string is being handled.
ORIG_LINE_TYPE
Provides the MLWTO line type and is equivalent to &LINETYPE. This
control variable returns the character M for the MSU buffer and an H
for the HIER buffer.
ORIG_PROCESS
Is the message identifier of the message currently being processed by
NetView and is equivalent to &MSGID. This control variable returns a
null value when an MSU buffer string is being handled.
ORIG_DOMAIN
Is the domain where the message most recently received by NetView
originated and is equivalent to &MSGORIGIN.
2. See Appendix A, “PL/I Control Blocks and Include Files,” on page 269 and
Appendix C, “C language control blocks and include files,” on page 279 for
mapping of the origin block.
Return Codes:
C INVOCATION:
void Cnmhrgs(char *hrtype, char *hrappl, char *hrcmd,
char *hrlogmod, char *hrrepl char *hrnotify,
char *hrpri)
Where:
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
hrappl
An 8-byte character field that specifies the application to be registered or
de-registered.
The identifier name can be one of:
v An architecturally defined 4-byte value (padded with blanks to 8 bytes) for
high-performance application programs.
The following names are reserved by NetView and cannot be specified in a
CNMHRGS invocation:
ALERT
X'23F0F3F1'
EP_OPS
X'23F0F1F6'
EP_SPCS
X'23F0F1F4'
LINKSERV
X'23F0F3F5'
MDS_RECEIVE
X'23F0F0F1'
MDS_ROUTER
X'23F0F1F0'
MS_CAPS
X'23F0F1F1'
OPS_MGMT
X'23F0F1F7'
R_BRIDGE
X'30F0F5F9'
RTMCMD_O
X'30F0F7F2'
RMTCMD_R
X'30F0F5F5'
RTMCMD_S
X'30F0F7F0'
SPCS X'23F0F1F5'
No character equivalent
X'30F0F7F3'
v A 1–8 character installation-defined name (padded with blanks). Use the
EBCDIC characters 0–9 and A-Z (capitals only).
The name STATUS is reserved for the NetView status focal point and is not
allowed on a CNMHRGS invocation.
hrcmd
An 8-byte character field that specifies the command processor that is started
when unsolicited or asynchronous data is routed to the application. The
NetView program verifies that the task is authorized to issue the command
specified on hrcmd. This field is required for REGAPPL.
hrlogmod
An 8-byte character field that specifies the logmode that is used for sending
the application data. This name must be a logmode that is defined to the local
VTAM and the receiving LU or command processor (CP) with which this
application communicates.
hrnotify
An 8-byte character field that specifies whether the MS or operations
management served application receives session outage notification for LUs in
contact with the LU 6.2 sessions.
ALL Indicates that the application receives an MDS-MU containing an SNA
condition report with sense data every time the last SNASVCMG
session has been lost. This notification is received even if the session
outage is not related to an error.
ERROR
Indicates that the application receives an MDS-MU containing an SNA
condition report with sense data every time the last SNASVCMG
session has been lost because of session failure.
NONE
Indicates that the application does not receive session outage
notification. NONE is the default for the PL/I macro format.
If you do not specify the NOTIFY keyword when using the PL/I macro
format, the default value is used. Otherwise, this field is required.
hrpri
An 8-byte character field that specifies the MQS priority for incoming requests.
The MQS priority is used when the high-performance transport uses the MQS
for processing any unsolicited MDS-MUs.
HIGH Processing begins after any NORMAL requests currently in progress
completes, but before queued NORMAL or LOW requests.
LOW Processing is preempted by HIGH and NORMAL priority requests.
This is the default.
NORMAL
Processing preempts a queue of LOW priority requests.
TEST CNMHRGS queues the request based on the command priority of the
receiving task. The command priority can be set using the OVERRIDE
or DEFAULT commands. Refer to the IBM Tivoli NetView for z/OS
Command Reference for more information.
hrrepl
A 4-byte character field that specifies whether this registration is to supersede
any previous registration for this application.
NO Specifies that this registration does not replace the current registration
for this application.
YES Specifies that this registration replaces the current registration for this
application. YES is the default for the PL/I macro format.
This is a required field for REGAPPL. However, if you do not specify the
REPLACE keyword in the PL/I macro format, the default value is used.
hrtype
A 10-byte character field that specifies the type of request:
DEREGAPPL
Deregisters an application from the high-performance transport.
REGAPPL
Registers an application to the high-performance transport.
Usage Notes:
1. If you specify a logmode that is not defined in the logmode table, VTAM
defaults the logmode to the first entry in the logmode table.
2. The NetView task where an application receives an MDS-MU is determined as
follows:
v For an MDS reply, the receiving task is the task under which the requesting
application was running.
v For an MDS request, the receiving task is the task from which CNMHRGS is
started for the receiving application.
v For an MDS error message:
– If the agent unit of work correlator (AUOWC) matches an active AUOWC
in the active transaction list:
- For an outgoing request, the receiving task is the task under which the
requesting application was running.
- For an incoming request, the receiving task is the task under which the
receiving application was running.
– If the AUOWC does not match an active AUOWC, the receiving task is
the task from which CNMHRGS is started for the receiving application.
3. You can change the task under which CNMHRGS was started by registering
the application from the desired task and specifying YES for hrrepl.
Return Codes:
The CNMHSMU service routine builds the necessary NetView MQS buffer with
the specified data and queues it to the high-performance transport.
C INVOCATION:
void Cnmhsmu(char *hsdtype, void *hsdata, void *hssupcor,
void *hscorrar, int hstimout, char *hssynch,
char *hsrplcmd, char *hsoappl, char *hsdstnet,
char *hsdstlu, char *hsdstapl, int hsmutype,
char *hspri)
where:
hlbptr
A 4-byte pointer field containing the address of the HLB control block.
hscorrar
A 53-byte character field in which a new unit of work correlator (X'1549') GDS
variable is created and returned by the CNMHSMU service routine.
If you specify hscorrar for an MDSMU, NetView creates the unit of work
correlator in this area and inserts it into the specified MDS-MU while copying
it into the buffer for the high-performance transport. If you omit hscorrar, the
MDS-MU must be complete and ready to be transmitted as supplied.
hsdtype
An 8-byte character field indicating whether the data item specified with the
hsdata field is an MDS-MU or a non-MDS-MU.
MDSMU
Indicates that the hsdata is an MDS-MU. MDSMU is the default for the
PL/I macro format.
NONMDSMU
Indicates that the hsdata is not a complete MDS-MU because it does not
contain an MDS-MU header. The CNMHSMU service routine
envelopes this data in an MDS-MU header before sending it.
If you do not specify the DATATYPE keyword when using the PL/I macro
format, the default value is used.
hsmutype
A 4-byte integer field that specifies the index number that identifies the type of
MDS-MU to build. The type identifies whether the MDS-MU is a request, a
reply, or an error message, and whether additional messages are expected. The
following types are defined as constants:
1 REQUEST_WITH_REPLY
2 REQUEST_WITHOUT_REPLY
3 REPLY_ONLY
4 REPLY_NOTLAST
5 REPLY_LAST
6 ERROR_MESSAGE
This is a required keyword for NONMDSMU.
hsoappl
An 8-byte character field that specifies the origin high-performance application
name.
The application name can be one of the following values:
v An architecturally defined 4-byte value (padded with blanks to 8 bytes) for
high-performance application programs.
v A 1-8 character installation-defined name (padded with blanks). Use the
EBCDIC characters 0–9 and A-Z (capitals only).
This field is required for NONMDSMU.
hspri
An 8-byte character field that specifies the MQS priority for incoming solicited
requests or any MDS error messages resulting from any outgoing MDS-MUs.
The MQS priority is used when the high-performance transport uses the MQS
for processing any solicited MDS-MUs or any MDS error messages.
HIGH Processing begins after any NORMAL requests currently in progress
completes, but before queued NORMAL or LOW requests.
LOW Processing is preempted by HIGH and NORMAL priority requests.
This is the default for all requests other than synchronous requests.
NORMAL
Processing preempts a queue of LOW priority requests. This is the
default for synchronous requests.
Usage Notes:
1. For a synchronous REQUEST_WITH_REPLY, control is returned to the
invoking program after the last reply, or an error message is received and
placed on the MDSMUQ data queue. Otherwise, control is returned after
CNMHSMU successfully queues the request to the high-performance
transport.
2. When the invoking program is suspended because of a synchronous
REQUEST_WITH_REPLY, the NetView task where the program is running is
not suspended. The task still receives and processes messages and commands.
3. For a synchronous REQUEST_WITH_REPLY from a DST, a DSRB is marked
in-use and the DSRB is not available for other use until the suspended
program is started again.
4. For MDSMU, all fields within the MDS-MU header must be correct except for
origin NETID and LUNAME. The service routine can determine and set these
fields. If the correlator is not contained in the data, specify hscorrar.
5. For REPLY_ONLY, REPLY_NOTLAST, REPLY_LAST, and ERROR_MESSAGE,
specify hssupcor to return the correlator sent with the request.
6. The high-performance transport implements a timeout value for the
application receiving the data. If the invocation of CNMHSMU specifies a
timeout value greater than the timeout value set by the transport at the
receiving node, the sending application might time out in less than the
specified interval.
7. When VTAM is active, you can use CNMHSMU to send data to another
application in the same domain.
8. If hsdstnet is not the NETID determined by VTAM for the LU specified in
hsdstlu, the send fails.
9. A high-performance application cannot send data to itself within the same
NetView.
10. A return code 24 or 28 from DSIPUSH indicates that DSIOLGFP is not defined
correctly in DSIPARM member CNMCMD.
11. If CNM_BAD_CES is returned:
v Verify that DSI6SNDP is defined correctly in member CNMCMD.
v If you specify hrrepcmd, verify that it is defined correctly in member
CNMCMD.
v If you specify a synchronous REQUEST_WITH_REPLY, verify that
DSIOSRCP is defined correctly in member CNMCMD.
12. Refer to the IBM Tivoli NetView for z/OS Administration Reference for the correct
definitions of the command processors supplied by the NetView product.
13. For MDSMU, if you omit the NETID subfield of the destination subvector
from the MDS-MU header, VTAM determines the network name used, based
on the LU name in the NAU name subfield of the destination subvector.
14. If you do not specify the destination NETID, and the destination LU name
exists in more than one network, VTAM determines the destination NETID
based on the active configuration.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnminfc(char *icname, void *icdata, int icdatlen)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
icdata
Is a varying length character field containing the character data to be returned.
icdatlen
Is a 4-byte integer field containing the length of icdata. This is the maximum
length of the area provided to receive the returned data. You provide the value
of icdatlen. This field must be greater than 0 and less than 32729.
If the value specified by icdatlen is less than the length of the data to be
returned, the truncated data is returned in icdata and a return code of
CNM_DATA_TRUNC is generated. The full length of the data that was
truncated is stored in HLBLENG (Hlbleng).
If the value specified by icdatlen is equal to or greater than the length of the
data to be returned, and HLBRC (Hlbrc) = CNM_GOOD, the length of the
returned data is stored in HLBLENG (Hlbleng).
If the value specified by icdatlen is greater than the length of the receiving data
buffer (icdata), a storage overlay can occur.
icname
Is an 8-byte character field that specifies the name of a variable. Valid names
are:
APPLID
Is the NetView domain ID appended with a 3-character alphanumeric
value assigned by the NetView program.
AUTCONID
Is the MVS console identifier associated with this autotask. This
association was made using the AUTOTASK command with the
console keyword. This value of AUTCONID is the console name of the
MVS console where NetView commands can be entered to run under
this autotask.
CLOCK
Is the current value returned by STCK instruction (not displayable).
CURCONID
Is the MVS console obtained by a NetView task. This console was
obtained with the GETCONID command or by issuing an MVS
command. The value of CURCONID is the console name of the MVS
console that this task uses to enter MVS commands.
CURSYS
Is a 1- to 8-character name of the current operating system.
DATE Is the current date in the form of mm/dd/yy, where mm is the month, dd
is the day, and yy is the year.
DATETIME
Equivalent to &DATE followed by &TIME.
DATETIM2
Is the date and time in the YYYYMMDD HH:MM:SS format.
DOMAIN
Is the 1- to 5-character name of the current NetView domain.
ECVTPSEQ
Is the z/OS product sequence number found in the MVS IHAECVT
data area.
HCOPY
Is the name of the device defined as the hardcopy log printer started
by the operator. If there is no device defined as the hardcopy printer
for this operator, HCOPY is null.
IPV6 Indicates the IPv6Env setting in the CNMSTYLE member:
4 Indicates that the IPv6Env statement is set to NONE.
6 Indicates that the IPv6Env statement is set to ONLY.
M Indicates that the IPv6Env statement is set to MIXED.
LU Is the logical unit name for the operator terminal.
MVSLEVEL
Is the currently running version of MVS.
NETID
Is the VTAM network identifier. This field has a maximum length of 8
characters.
Note: If VTAM has never been active while NetView is active, the
value is assigned from the NETID statement in the CNMSTYLE
member.
NVVER
Is the version and release of the currently running NetView program.
The value of NVVER is a 4-character string in the form of NVvr,
where:
NV Indicates NetView.
v Indicates the version number of NetView.
r Indicates the release number of NetView.
OPID Is the operator or task ID that issued the call to CNMINFC. OPID is a
1- to 8-character identifier.
OPSYSTEM
Is the operating system for which NetView was compiled, and the HLL
command processor or installation exit routine is running. OPSYSTEM
must be MVS/ESA.
OWNER
Is the operator ID of the task that owns the VOST. Note that data is
only returned for VOST tasks.
PID The process ID for this HLL command processor or installation exit
routine. Used for CNMSMSG with smmsgtyp=DATA (not displayable).
STARTIME
The NetView start time (not displayable).
SUPPCHAR
Is the 1-character NetView suppression character.
SYSPLEX
Is the 1- to 8-character name of the MVS SYSPLEX where the
command list is executing.
Note: This function has a value only if the command list is executing
on an MVS SYSPLEX or on an MVS system that specified a sysplex
name in a couple data set.
TASK Is a character string indicating the type of task under which the
command processor or installation exit routine is running. Possible
values follow:
DST Data Services Task
HCT Hardcopy Task
MNT Main Task
NNT NetView-to-NetView Task
OPT Optional Task
OST Operator Station Task
PPT Primary POI Task
UNKNOWN
None of the above.
TASKNAME
The name of the task under which the HLL command processor or
installation exit routine is running.
TIME Is the CPU time in the form of hh:mm, where hh is the hour and mm is
the minutes. The time is based on a 24-hour clock, so 3:00 P.M. is
shown as 15:00.
VTAM
Is the version and release of VTAM is a 4-character string in the form
of either VTvr or Vvrm, where:
VT Indicates that the access method is the VTAM program.
v Indicates the version number
r Indicates the release number
m Indicates the modification number
Note: The value of the VTAM is null if the VTAM program is not
active.
VTCOMPID
Is a 14-character VTAM component identifier. The VTAM component
identification can be:
5695-11701-xxx
Usage Notes:
1. Refer to IBM Tivoli NetView for z/OS Programming: REXX and the NetView
Command List Language for a complete description of the NetView command list
language variables.
2. CLOCK, PID, and STARTIME are 8-character representations of the TOD-clock
(time-of-day) value returned by the STCK instruction.
Return Codes:
C INVOCATION:
void Cnminfi(char *iiname, int *iinumb)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
iiname
Is an 8-byte character field that specifies the name of the variable. Valid names
are:
ABENDRTN1
If processing as a long-running command ABEND routine, then return
true.
ASID Is the NetView's current address space identifier. The value of ASID is
a 1-to 5-digit decimal number.
ATTENDED1
Is a single character variable with a value of 1 or 0.
The values for ATTENDED are:
1 Indicates one of the following tasks:
v An OST with a display
v An NNT with a corresponding OST
v An autotask with an associated MVS console assigned using
the AUTOTASK command
v A distributed autotask
0 Indicates one of the following tasks:
v An autotask without an associated MVS console assigned
using the AUTOTASK command
v Another type of task, such as a DST or an OPT task
Note:
1. If the associated operator is an autotask, the presentation data is
not eligible for display unless the autotask is associated with an
active MVS console.
2. ATTENDED can be used in conjunction with DISTAUTO and
AUTOTASK variables to further define the characteristics of the
task. For example, if ATTENDED is 1, DISTAUTO is 0, and
AUTOTASK is 1, then the task is an autotask with an associated
MVS console.
AUTOTASK
The single character value of either 1 or 0 indicating whether or not a
task is an autotask. The values follow:
1 Indicates that the task is an autotask
0 Indicates that the task is not an asterisk
DISTAUTO
Denotes if task is a distributed autotask started with the RMTCMD
command. The values are as follows:
1 Indicates the task is a distributed autotask
0 Indicates the task is not a distributed autotask
1
LOGOFRTN
If processing as a long-running command routine, then return true.
MVTUFLD
Is the user field from the DSIMVT NetView control block (MVTUFLD).
OPER32701
If an OST with a 327x display terminal is attached, then return true.
RESETREQ1
If RESET or CANCEL was requested, then return true. the internal
RESET flag is turned off as a result of this query. See “RESET
command” on page 179 for further details.
SCRNSER
Is the return serial number of the screen update.
TIBUFLD
Is the user field from the DSITIB NetView control block (TIBUFLD).
TVBUFLD
Is the user field from the DSITVB NetView control block (TVBUFLD).
USEREXIT
If the integer value is 0, the environment is that of a command
processor.
If the integer value is 2–17, the environment is that of an installation
exit.
If the integer value is one of the following values, the environment is
that of an installation exit running under a DST:
233 USERDINT
DSM initialization exit
234 USERVINT
VSAM initialization exit
235 USERVINP
VSAM input exit
236 USERVOUT
VSAM output exit
237 USERCINP
CNMI input exit
238 USERCOUT
CNMI output exit
240 USERXLOG
External log exit
241 USERBINT
Sequential log initialization exit
242 USERBOUT
Sequential log output exit
Return Codes:
C INVOCATION:
void Cnmipxl(char *xltype,
void *xlinData,
int xlinLen,
void *xloutData,
int xloutLen)
Where:
hlbptr
A 4-byte pointer containing the address of the HLB control block.
xltype
An 8-byte string containing the type of IP address verification or translation to
be done. The valid strings follow:
PCHECK
Verify that the input data is an IP address in presentation form.
P2PV4 Convert an IP address in presentation form to standard presentation
form, in which IPv4, IPv4-mapped IPv6, and IPv4-compatible IPv6
addresses are presented in dotted decimal IPv4 address format. The
IPv6 addresses are presented in colon hex format. In a standard
presentation form, all segments of an address are present and leading
zeros are removed.
P2PV6 Convert an IP address in presentation form to an IPv6 presentation
form. The IPv4 and IPv4-mapped IPv6 addresses are presented as
IPv4-mapped IPv6 addresses. All IP addresses are returned in standard
presentation form.
P2PCOMP
Convert an IP address in presentation form to presentation form
compressed, in which one group of multiple, consecutive zero address
segments is replaced by a double-colon (::). The compression only
applies to IPv4-mapped IPv6, IPv4-compatible IPv6, and IPv6
addresses. The IPv4 addresses are returned in standard presentation
form.
P2NV4
Convert an IP address in presentation form to a 4-byte binary (network
byte order) representation of an IPv4 address. Only IPv4, IPv4-mapped
IPv6, and IPv4-compatible IPv6 addresses can be converted.
P2NV6
Convert an IP address in presentation form to a 16-byte binary
(network byte order) representation of an IP address. An IPv4 address
is converted to the binary representation of an IPv4-mapped IPv6
address.
N2PSTD
Convert an IP address in binary (network byte order) to a standard
presentation form. The IPv4, IPv4-mapped IPv6, and IPv4-compatible
IPv6 addresses are converted to the dotted decimal IPv4 address
format.
N2PSTDM4
Convert an IP address in binary to a standard presentation form. The
IPv4-mapped IPv6, IPv4-compatible IPv6, and IPv6 addresses are
returned in their standard presentation forms. An IPv4 address is
returned in IPv4-mapped IPv6 presentation form.
N2PSTDC4
Convert an IP address in binary to a standard presentation form. This
is similar to the N2PSTDM4 option, except that an IPv4 address is
returned in an IPv4-compatible IPv6 presentation form.
N2PV4
Convert an IP address in binary to the dotted decimal standard
Usage Notes:
1. Upon return to the caller, Hlbrc (C) or HLBRC (PL/I) contains the return code
from the IP address verification/translation service. When the call is for an IP
address translation request and the return code is CNM_GOOD, Hlbleng (C) or
HLBLENG (PL/I) contains the length of the translated IP address data placed
in the output data area.
2. When using CNMIPXL with C, xlinData and xloutData (if the requested type is
not PCHECK) must be passed as addresses of pointers to the respective IP
address data areas. As an example, assume that inData has been defined as an
area that holds IP address data to be converted and outData has been defined
as the area to contain the translated IP address. The following lines illustrate
how this information would then be passed to the CNMIPXL service:
/* Define the pointers to the IP address data areas. */
void *pInIPAddress;
void *pOutIPAddress;
/* Sets the input and output data pointers for the Cnmipxl call. */
Return Codes:
C INVOCATION:
void Cnmkio(char *vsfunc, void *vsdata, int vsdatlen, void *vskey,
char *vsoption)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
vsdata
Is a varying length character field containing the buffer to be returned or
written. You provide this field for PUT. This field is returned for GET and is
not required for ERASE or ENDREQ.
vsdatlen
Is a 4-byte integer field containing the length of vsdata. This is the maximum
length of the area provided to receive the returned data. You provide the value
of vsdatlen. This field is required only for GET.
If the value specified by vsdatlen is less than the length of the data to be
returned, the truncated data is returned in vsdata and a return code of
Usage Notes:
1. You cannot issue CNMKIO from an HLL installation exit routine or from an
HLL command processor while holding a lock.
2. For more information about installing a DST, see Chapter 3, “HLL Data Services
command processors,” on page 27.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler or the VSAM library
for more information.
C INVOCATION:
void Cnmlk(char *lkfunc, void *lkname, char *lkscope, char *lkoption)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
lkfunc
Is an 8-byte character field that specifies the function to be performed:
LOCK Obtains control of the lock name.
TEST Tests if the lock name is available.
UNLOCK
Releases control of the lock name.
lkname
Is a varying length character field to hold the user-defined name of the lock.
(Length is 1–12 characters.) This field is required for all functions.
lkoption
Is an 8-byte character field that specifies whether the HLL command processor
or installation exit routine waits for the lock to become available. This field is
required only for LOCK. Possible values follow:
NOWAIT
Do not wait if the lock is not available. An appropriate return code is
returned (CNM_LOCKED or CNM_LOCK_INUSE).
WAIT Wait until the lock is available. The task is suspended.
lkscope
Is an 8-byte character field reserved for future use. Provide a null or blank
value in this field for all functions.
Usage Notes:
1. Do not invoke CNMSMSG with smdestyp = OPER while holding a lock. The
operator task can be running with autowrap off, and the HLL command
processor or installation exit routine might hang waiting for the operator to
clear the screen, thus holding the lock for an indefinite period.
2. A hierarchical order on lock requests is used to prevent deadlock. The
alphabetical order of the lock names defines the hierarchy. Therefore, lock
requests for lock names alphabetically less than or equal to a presently held
lock name fail, and return code CNM_LOCKED is generated. For example,
assume the last lock request was for lkname = GVARIABLE. A new lock request
for lkname = TVARIABLE is successful because TVARIABLE is alphabetically
greater than GVARIABLE. However, a new lock request for lkname =
CVARIABLE is unsuccessful because CVARIABLE is alphabetically less than or
equal to GVARIABLE. Return code CNM_LOCKED is generated and the lock
request fails.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler or the MVS/XA library
for more information.
C INVOCATION:
void Cnmmemc(int mctoken)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
mctoken
Is a 4-byte integer field containing the token returned by CNMMEMO.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmmemo(int *motoken, char *moddname, char *momemnam)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
moddname
Is an 8-byte character field that specifies the DD name of the partitioned data
set. The NetView predefined DD names are:
BNJPNL1
BNJPNL2
CNMPNL1
DSICLD
DSILIST
DSIMSG
DSIOPEN
DSIPARM
DSIPRF
DSIVTAM
momemnam
Is an 8-byte character field that specifies the name of the member.
motoken
Is a 4-byte integer field containing the token to be used by subsequent
CNMMEMR and CNMMEMC requests.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmmemr(int mrtoken, void *mrdata, int mrdatlen, char *mrinclude)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
mrdata
Is a varying length character field to contain the received record.
mrdatlen
Is a 4-byte integer field containing the length of mrdata. This is the maximum
length of the area provided to receive the returned record. You provide the
value of mrdatlen.
If the value specified by mrdatlen is less than the length of the record to be
returned, the truncated record is returned in mrdata and a return code of
CNM_DATA_TRUNC is generated. The full length of the truncated record is
stored in HLBLENG (Hlbleng).
If the value specified by mrdatlen is equal to or greater than the length of the
record to be returned, and HLBRC (hlbrc) = CNM_GOOD, the length of the
returned record is stored in HLBLENG (Hlbleng).
If the value specified by mrdatlen is greater than the length of the receiving
data buffer (mrdata), a storage overlay can occur.
mrinclude
Is a 6-byte character field that specifies whether INCLUDE cards are to be
processed:
INCL Specifies to process INCLUDE cards.
NOINCL
Specifies that INCLUDE cards are not processed.
mrtoken
Is a 4-byte integer field containing the token returned by CNMMEMO.
Usage Note: If the return code indicates that there was a problem with an
INCLUDE card or the member specified by the include card
(CNM_SYNTAX_ERROR, CNM_INVAL_MEMBER, CNM_INVAL_NEST,
CNM_SYSTEM_ERROR), the record returned in mrdata is the INCLUDE card that
is not valid.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmnams(char *nsfunc, void *nsptr, void *nsname, int *nsleng,
int nsclass)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
nsclass
Is a 4-byte integer field containing the class of the named storage area, as
follows:
0= Residency of caller
1= 31-bit storage
2= 24-bit storage
This field is required by the caller for ALLOC and REALLOC. This field is not
required for FREE or LOCATE.
nsfunc
Is an 8-byte character field that specifies the function to be performed:
ALLOC
Allocates the named storage area.
FREE Frees or deallocates the named storage area.
LOCATE
Locates the existing named storage area.
REALLOC
Reallocates the named storage area. Old data is preserved.
nsleng
Is a 4-byte integer field containing the size of the named storage area. This
field is required by the caller for ALLOC and REALLOC and is returned to the
caller for LOCATE. This field is not required for FREE.
nsname
Is a varying length character field containing the name of the storage area. This
field is required for all functions and is provided by the caller.
nsptr
Is a 4-byte pointer field containing the address of the named storage. This field
is required by the caller for ALLOC, REALLOC, and LOCATE. This field is not
required for FREE.
Usage Notes:
1. The named storage areas provide a way of sharing data among different HLL
command processors and installation exit routines or among multiple
invocations of an HLL command processor or installation exit routine. When
allocated, a named storage area remains allocated until it is either explicitly
freed or the task under which it was allocated ends.
2. A named storage area is associated with the NetView subtask under which it
was allocated. Named storage areas can be manipulated (using LOCATE, FREE,
or REALLOCATE) only by HLL command processors and installation exit
routines running under the mainline of that task. You cannot reference a named
storage area from a task other than the one with which it is associated.
3. If ALLOC is requested for a name that has already been allocated, the address
of the existing area is returned along with a nonzero return code.
4. If a previously allocated named storage area is reallocated to be larger than the
original area, the content of the original area is preserved. If a previously
allocated named storage area is reallocated to be smaller than the original area,
the content of the original area is truncated at the length specified by the nsleng
operand.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmpmdb(void *mdmdb, void *mdsource, void *mdcorr)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
mdcorr
Is a 16-character correlator value used for chaining together multiple related
MDBs.
Pass this parameter as all binary zeros for CNMPMDB invocations for single
(non-chained) MDBs.
For multiple related MDBs, pass all binary zeros for the mdcorr parameter on
the first CNMPMDB invocation.
CNMPMDB returns a correlator value in mdcorr. On subsequent calls to
CNMPMDB for the multiple MDBs, pass the correlator value which was
returned in mdcorr on the first invocation of CNMPMDB.
When an MDB is sent with an end of text indicator, the mdcorr is returned with
a zero value.
mdmdb
Is a 4-byte pointer field containing the address of an MDB. The maximum
length of an MDB is 4 KB bytes. The maximum length of multiple related
MDBs is 63 KB.
mdsource
Is a 4-byte pointer field containing the address of the source object. This is an
optional field. If you do not want to specify a source object, pass zero in
mdsource.
Usage Notes:
1. The CNMPMDB service routine returns control to the invoking program after it
has scanned the automation table and done the synchronous portion of
message processing.
2. The service does not free the MDB or source object.
3. If you create DOM MDBs, keep in mind that not all forms of DOM can be
transported over OST-NNT sessions. If you are using any OST-NNT sessions,
only create DOM MDBs that indicate DOM by MSGID.
Return Codes:
C INVOCATION:
void Cnmpool(char *spfunc, int *sptoken, void *spname, int spleng,
int sppricnt, int spseccnt, int spclass)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
spclass
Is a 4-byte integer field containing the storage class of the pool:
0= Residency of caller
1= 31-bit addressable
2= 24-bit addressable
This field is required for ALLOC, but not for FREE or LOCATE.
spfunc
Is an 8-byte character field that specifies the function to be performed:
ALLOC
Allocates the pool
FREE Frees the pool
LOCATE
Locates the pool
spleng
Is a 4-byte integer field containing the size of each cell in the pool. This field is
required for ALLOC, but not for FREE or LOCATE.
spname
Is a varying length character field containing the name of the storage pool.
This field is required for all functions and provided by the caller.
sppricnt
Is a 4-byte integer field containing the number of cells in the primary block.
This field is required only for ALLOC.
spseccnt
Is a 4-byte integer field containing the number of cells in the secondary block.
This field is required only for ALLOC.
sptoken
Is a 4-byte integer field to contain the token identifying the storage pool. This
field is returned for ALLOC and LOCATE for use with CNMCELL service.
This field is not required for FREE.
Usage Notes:
1. A storage cell within a pool is associated with the NetView subtask under
which it was allocated. It cannot be referenced from a task other than the one
with which it is associated.
2. All storage pool names must be unique within a given task.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
Note: CNMQAPI applies only to those RODMs under the control of the DSIQTSK
task. Refer to the IBM Tivoli NetView for z/OS Automation Guide for an example of
managing your RODMs with DSIQTSK in a NetView automation scenario that
uses RODM.
C INVOCATION:
void Cnmqapi (char*qaacb, char*qatif,char*qaresp,
char*qafunc, char*qawaitf, int *qawaitt)
Where:
hlbptr
Is a 4-byte field containing the address of the HLB control block.
qaacb
Is a RODM access block following the format of the RODM API. For more
information about RODM, refer to the IBM Tivoli NetView for z/OS Resource
Object Data Manager and GMFHS Programmer's Guide.
The access block contains these fields:
orname
This field specifies the name of the RODM that the caller wants to
access. If this field is blank (X'40'), the current runtime RODM is used.
The current runtime RODM is defined in the DSIQTSKI initialization
member in DSIPARM with the AO parameter on the REP keyword.
Refer to the IBM Tivoli NetView for z/OS Administration Reference for a
description of the DSIQTSKI keywords. The name is left-justified and
must be padded with blanks (X'40') to 8 characters.
signon_token
Specifies the RODM signon token to be used within the call.
CNMQAPI ignores this field and fills it with the sign-on token
received by DSIQTSK when it initially connects to the RODM being
accessed. Refer to IBM Tivoli NetView for z/OS Administration Reference
for more information.
user_appl_id
This field specifies the application name of the caller.
CNMQAPI sets this field to the user application specified with the ID
parameter of the REP keyword (of DSIQTSKI) for the RODM being
accessed by this call. Refer to the IBM Tivoli NetView for z/OS
Administration Reference for a description of the DSIQTSKI keywords.
qafunc
Is a varying length function block, following the format of the RODM API
function block, that describes the function requested and all required
parameters. The actual function block format depends on the function being
requested. Refer to the IBM Tivoli NetView for z/OS Resource Object Data
Manager and GMFHS Programmer's Guide for a description of the function block
format.
qaresp
Is a response block following the format of the RODM API response block
control structure. Refer to IBM Tivoli NetView for z/OS Resource Object Data
Manager and GMFHS Programmer's Guide for information about the RODM
response block.
qatif
Is a transaction information block following the format of the RODM API
transaction information block. Refer to IBM Tivoli NetView for z/OS Resource
Object Data Manager and GMFHS Programmer's Guide for a description of the
RODM API transaction information block.
qawaitf
Specifies whether the request waits when a checkpoint is detected. If a
checkpoint is in progress for the specified RODM, the request is placed on a
queue until the checkpoint is complete. Upon checkpoint completion, the
request is processed. Valid values follow:
N Do not wait for checkpoint completion. N is the default.
Y Wait for checkpoint completion.
qawaitt
Is a 2-byte field that specifies the maximum time in seconds for which the call
is suspended if a checkpoint wait is to be started. The valid value range is
10—3600 seconds (1 hour). If you specify a time greater than 3600, 3600 is
used. If you do not specify this field, the default specified with the T keyword
of the DSIQTSKI initialization member for the DSIQTSK task is used.
Refer to IBM Tivoli NetView for z/OS Administration Reference for more information.
Usage Notes:
1. An application can connect to RODM with an option specifying that RODM
can truncate its responses if the application response block is smaller than the
RODM response.
If this option is used, RODM truncates the response, does not save the
overflow data, and informs the application of the condition. This information is
sent in the return code and reason code in the transaction information block.
DSIQTSK connects using this option, saving CNMQAPI from having to deal
with overflow cleanup.
2. CNMQAPI returns two sets of return codes.
The caller can use either of them. The first set is in the transaction information
block provided by the user upon invocation. These return codes are RODM
return codes and are documented for each possible function in the IBM Tivoli
NetView for z/OS Resource Object Data Manager and GMFHS Programmer's Guide.
3. The second set is in the HLB.
The HLBRC field of the HLB contains a return code upon return from
CNMQAPI.
4. APF-authorized command processors can access RODM without a password or
password phrase.
Provide a keyword for command processors that can be authority-checked to
control access to RODM.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmrgs(char *rgtype, char *rgappl, char *rgcmd, char *rgfpcat,
char *rgfocpt, char *rgrepl, char *rgnotify, char *rgpri)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
rgappl
Is an 8-byte character field that specifies the MS application or operations
management served application being registered or deregistered.
The application name can be one of the following:
v An architecturally defined 4-byte value (padded with blanks to 8 bytes) for
MS application programs.
The following names are reserved by NetView and cannot be specified in a
CNMRGS invocation:
Reserved Name
Hex Equivalent
ALERT
X'23F0F3F1'
EP_OPS
X'23F0F1F6'
EP_SPCS
X'23F0F1F4'
HMON_DST
X'30F0F8F5'
HMON_OST
X'30F0F8F4'
LINKSERV
X'23F0F3F5'
MS_CAPS
X'23F0F1F1'
MDS_ROUT
X'23F0F1F0'
OPS_MGMT
X'23F0F1F7'
RMTCMD_R
X'30F0F5F5'
RTMCMD_S
X'30F0F7F0'
RTMCMD_O
X'30F0F7F2'
R_BRIDGE
X'30F0F5F9'
SPCS X'23F0F1F5'
No character equivalent
X'23F0F0F1'
No character equivalent
X'30F0F7F3'
v A 1– to 8–character installation-defined name (padded with blanks). Use the
EBCDIC characters 0-9 and A-Z (capitals only).
The name STATUS is reserved for the NetView status focal point and is not
allowed on a CNMRGS invocation.
rgcmd
Is an 8-byte character field that specifies the command procedure to be started
when unsolicited or asynchronous solicited data is routed to the application.
The NetView program verifies that the task has the authority to issue the
command specified. This field is required for REGSMAPPL and
REGOMSERVD.
rgfocpt
Is an 8-byte character field that specifies whether the MS application is a focal
point application:
NO The MS application is not a focal point application. NO is the default
for the PL/I macro format.
YES The MS application is a focal point application.
If you do not specify the FOCALPOINT keyword when using the PL/I macro
format for REGMSAPPL, the default value is used. Otherwise, this field is
required for REGMSAPPL.
rgfpcat
Is an 8-byte character field that specifies the name of an application registered
as a focal point application. This is the focal point category from which you
want to receive information.
ERROR
Indicates that the application receives an MDS-MU containing an SNA
condition report with sense data every time the last SNASVCMG
session has been lost because of a session failure.
NONE
Indicates that the application does not receive session outage
notification. NONE is the default for the PL/I macro format.
If you do not specify the NOTIFY keyword when using the PL/I macro
format, the default value is used. Otherwise, this field is required.
rgpri
Is an 8-byte character field that specifies the MQS priority for incoming
requests. The MQS priority is used when the MS transport uses the MQS for
processing any unsolicited MDS-MUs.
HIGH Processing begins after any NORMAL requests currently in progress
completes, but before queued NORMAL or LOW requests.
LOW Processing is preempted by HIGH and NORMAL priority requests.
This is the default.
NORMAL
Processing preempts a queue of LOW priority requests.
TEST CNMRGS queues the request based on the command priority of the
receiving task. The command priority can be set using the OVERRIDE
or DEFAULT commands. Refer to the NetView online help.
rgrepl
Is an 8-byte character field that specifies whether this registration is to
supersede the previous registration for this application.
NO Specifies that this registration does not replace the current registration
for this application.
YES Specifies that this registration replaces the current registration for this
application. YES is the default for the PL/I macro format.
If you do not specify the REPLACE keyword when using the PL/I macro
format for REGMSAPPL or REGOMSERVD, the default value is used.
Otherwise, this field is required for REGMSAPPL and REGOMSERVD.
rgtype
Is a 12-byte character field that specifies the type of request, as follows:
DEREGMSAPPL
Deregisters an MS application from the NetView MS transport.
DEREGOMSERVD
Deregisters an operations management served application from
REGMSAPPL
Registers an MS application to the NetView MS transport.
REGOMSERVD
Registers a second-level application to operations management.
Usage Notes:
1. You can register an application as both an MS application and an operations
management served application.
2. When you specify that an MS application is a focal point, the focal point
category name is the application name specified in rgappl.
3. Any registered application that was once a focal point application continues to
receive focal point data from any application that did not attempt to send data
while it was deregistered. To recognize that an application is no longer a focal
point, the sending application must attempt to send data to a focal point
application that has been deregistered.
4. NetView determines the task where an application receives an MDS-MU as
follows:
v For an MDS reply, the receiving task is the task under which the requesting
application is running.
v For an MDS request, the receiving task is the task from which CNMRGS is
started for the receiving application.
v For an MDS error message:
– If the AUOWC matches an active AUOWC in the active transaction list:
- For an outgoing request, the receiving task is the task under which the
requesting application is running.
- For an incoming request, the receiving task is the task under which the
receiving application is running.
– If the AUOWC does not match an active AUOWC, the receiving task is
the task from which CNMRGS is started for the receiving application.
5. You can change the task under which CNMRGS was started by reregistering
the application from the desired task and specifying YES for rgrepl.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
When the first format specification is found, the value of the first input field is
converted according to the first format specification and stored in the first
receiving variable in the argument list. When the second format specification is
found, the value of the second input field is converted according to the second
format specification and stored in the second receiving variable in the argument
list. This process continues until all of the format specifications in the format string
are processed.
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
pafld1,.....,pafld10
Is a list of receiving variables. The last variable named in this list receives the
value of the last input field parsed and converted according to the last
specification in the format string. Declare each of the variables named in this
list to have the same data type as its corresponding type specifier in the format
string. You can specify up to 10 variables to receive parsed and converted data.
panumfld
Is a 4-byte integer field containing the number of fields successfully parsed
and converted. This field is returned to you.
pastring
Is a varying length character field containing the input string to be parsed and
converted.
pattern
Is a varying length character field containing the format specifications. The
format string (pattern) determines how the data elements in the input string
(pastring) are parsed and converted.
Usage Notes:
1. The format string consists of a series of format specifications that are defined as
follows:
v The character %, which designates the beginning of each format specification.
(Required for each format specification.)
v The character *, which indicates that the data in the corresponding input
field is skipped. No assignment is made to a receiving variable. (Optional)
v A numerical value that defines a maximum field width to scan in the input
string. (Optional)
v The character h (halfword) or l (long or fullword), which indicates the size of
the argument that the value of the parsed or converted input data is
assigned. (Optional)
v Any number of white-space characters, which can be interspersed within or
between format specifications for readability. However, do not insert blanks
between braces ({}). (Optional)
v The type specifier for the parsed or converted input data to be stored in the
receiving variable. (Required)
2. The type specifier directs the conversion of the input field. CNMSCAN places
the result in the receiving variable, unless you specify assignment suppression
with an *. An input field is a string of characters other than spaces, unless the
type specifier is a c or { }. The input field extends to the next character that
does not meet the criteria of the type specifier, or until the width of the field, if
specified, is reached.
3. The type specifier determines the interpretation of the next input field. If the
input field does not meet this expectation, CNMSCAN returns to its caller.
Valid specifiers are:
c Expect any character. Space characters that are ordinarily skipped are
read. Specify a field width to parse and convert more than one
character. For example, %3c retrieves the next 3 characters of the input
string. To skip over spaces before obtaining a character, use %1s. See
the description that follows on the type specifier s.
Note: The receiving variable to contain the character string result must
be declared as a fixed-length character string.
d Expect a decimal value. Input is an optionally signed sequence of
decimal digits. Any spaces in the input string preceding the decimal
digits are skipped. The decimal digits are delimited by the next
non-decimal character in the input string.
n A data element is not parsed and converted from the input string. The
value stored is the number of characters successfully read (including
blanks) from the input string up to that point in the call to CNMSCAN.
Note: If the end of the input string occurs before the %n is reached, the
value stored is 0.
s Expect a character string. Any spaces in the input string preceding the
character string are skipped. The character string is delimited by a
space. If you do not specify a field width, the field width defaults to
the length of the string.
Note: The receiving variable to contain the character string result must
be declared as a varying length character string.
u Expect an unsigned decimal value. Any spaces in the input string
preceding the decimal digits are skipped. The decimal digits are
delimited by the next nondecimal character in the input string.
x Expect a hexadecimal value. Input is an optionally signed sequence of
hexadecimal digits. Any spaces in the input string preceding the
hexadecimal digits are skipped. The hexadecimal digits are delimited
by the next non-hexadecimal character in the input string.
{} Expect a string that is not delimited by spaces. The character string is
set within the braces. The corresponding input field is read to the first
character that does not appear between braces ({}). If the first character
is ¬ (or ‘5F’x), the effect is reversed. The input field is read to the first
character that appears between braces ({}). Do not insert blanks
between braces ({}) unless this is the desired effect.
{¬} Parses until the end of the string.
{¬a} Parses until the character a is found.
{a} Parses until any character other than an a is found.
{} Parses until any character is found.
Note: The receiving variable to contain the character string result must
be declared as a varying length character string.
4. If your format string specifies fewer data elements to be parsed and converted
than your input string contains, the remaining data elements in the input string
are ignored.
5. CNMSCAN returns when it encounters a format specification it does not expect
or when it reaches the end of the input string.
6. If you invoke CNMSCAN using the PL/I call format and all 10 paflds are not
specified, a warning message is issued at compile time.
7. You can use CNMSCAN only in an HLL command processor or installation exit
routine written in PL/I.
8. The PARSEL2R command provides a function similar to CNMSCAN. However,
because of its conversion capabilities, CNMSCAN is more suitable to HLL
command processors.
Return Codes:
C INVOCATION:
void Cnmscop(char *sccmd, char *sckwd, char *scvalue)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
sccmd
Is an 8-byte character field that specifies the verb of the command to be
checked for authorization. Blanks or (*) imply that the command verb that
started the HLL command processor is used. This field is required.
sckwd
Is an 8-byte character field that specifies a keyword of the command to be
checked for authorization. Blanks or (*) imply that no specific keyword is
checked.
scvalue
Is an 8-byte character field that specifies a value of sckwd to be checked for
authorization. Blanks or (*) imply that no specific keyword value is to be
checked.
Usage Notes:
1. Authorization to access commands, keywords, and keyword values is defined
by the setting of the CMDAUTH keyword on the REFRESH command or by
the setting of the SECOPTS.CMDAUTH statement in the CNMSTYLE member.
For more information, refer to IBM Tivoli NetView for z/OS Security Reference.
2. CNMSCOP does not check the validity of a command. Use it only to verify
whether an operator has authorization to issue a particular command.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmsmsg(void *smtext, char *smmsgtyp, char *smdestyp,
char *smdestid)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
smdestid
Is an 8-byte character field that specifies the destination ID. This is a required
operand when smdestyp is EXTLOG, SEQLOG, TASK, or OPCLASS.
When smdestyp is EXTLOG, SEQLOG, or TASK, smdestid is the name of the
destination task. You can use an asterisk (*) to imply “self” when smdestyp =
TASK. Specifying smdestid = * is the same as issuing CNMSMSG with smdestyp
= OPER and smdestid = null.
When smdestyp is OPCLASS, smdestid is the group ID of a particular group of
operators defined by the ASSIGN command. Refer to the ASSIGN command in
the NetView online help for more information.
Note: PPT is accepted as a synonym for the primary POI task (xxxxxPPT)
where xxxxx is the domain ID in the local NetView program.
smdestyp
Is an 8-byte character field that specifies the destination type. This is a required
operand. Possible values follow:
AUTHRCV
Authorized receiver
EXTLOG
External system management facility (SMF) log
NETVLOG
NetView log
OPCLASS
All operators in group
OPER Operator task invoking this service routine
SEQLOG
Sequential log
SYSOP
System console
Table 17 on page 253 shows message and destination type combinations that are
not valid.
Usage Notes:
1. The amount of data that can be sent by CNMSMSG varies based on the value
of smmsgtyp. The following limits are enforced for the smmsgtyp values.
MSG 32000 bytes
MSG_C
32000 bytes
MSG_L
32000 bytes
MSG_D
32000 bytes
MSG_E
32000 bytes
MSG_F
32000 bytes
COMMAND
31998 bytes
REQUEST
31989 bytes
DATA 32500 bytes
2. Multiline messages are treated as single line messages when CNMSMSG is
started from DSIEX02A.
3. CNMSMSG generates a return code of CNM_BAD_INVOCATION when started
from DSIEX04 or DSIEX09. You can invoke CNMSMSG from DSIEX02A only
when smdestyp is TASK and smmsgtyp is one of the message options.
COMMAND and REQUEST are not permitted as smmsgtyp values. When
invoking CNMSMSG from DSIEX02A. you can also send a command to
another task, in a way similar to EXCMD, by specifying
smmsgtyp=COMMAND, smdestyp=TASK, and the desired smtext and smdestid.
4. Messages sent to a console with smmsgtyp = MSG_C, MSG_D, MSG_E, MSG_F,
or MSG_L are truncated if they are longer than the screen width of that
console.
5. You can display as many control (MSG_C) and label (MSG_L) lines on a
console as desired. However, a maximum of six control or label lines are held
on the screen if the data lines for that multiline message cause the screen to
wrap.
6. Do not invoke CNMSMSG with smdestyp = OPER while holding a lock. The
operator task can be running with autowrap off, and the HLL command
processor or installation exit routine might hang waiting for the operator to
clear the screen, thus holding the lock for an indefinite period.
7. When the SECOPTS.AUTHCHK statement in the CNMSTYLE member specifies
SOURCEID, or the REFRESH command specifies SECOPTS=AUTHCHK,
command authorization checking is performed against the original source of
the command rather than against the environment in which the command runs.
When CNMSMSG is used to queue a command, a SOURCEID is also queued.
If the invoker is running in an installation exit, the SOURCEID is the name of
the task (TVBOPID) under which the installation exit that started CNMSMSG is
running. If CNMSMSG is started in a command processor, the SOURCEID is
the ID of the task under which the command is issued or the existing
SOURCEID at the time the command was queued. For more information about
SOURCEID, refer to the IBM Tivoli NetView for z/OS Administration Reference.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
The data is sent in the form of an MDS-MU. The invocation can supply:
v A completely built MDS-MU
v An MDS-MU that is missing one or more of the following:
– A unit of work correlator
– An origin NETID
– An origin LUNAME
v Data and sufficient other fields for the service routine to build an MDS-MU
header.
Note: Refer to the SNA library for more information about MDS-MUs.
The CNMSMU service routine builds the necessary NetView MQS buffer with the
specified data and queues it for the NetView MS transport.
C INVOCATION:
void Cnmsmu(char *sudtype, void *sudata, void *susupcor,
void *sucorrar, int sutimout, char *susynch,
char *surplcmd, char *suoappl, char *sudstnet,
char *sudstlu, char *sudstapl, int sumutype,
char *supri)
Where:
hlbptr
Is a 4-byte character field containing the address of the HLB control block.
sucorrar
Is a 53-byte area in which a new unit of work correlator (X'1549') GDS variable
is created and returned by the CNMSMU service routine.
If you specify sucorrar for MDSMU, NetView creates the unit of work
correlator in this area and inserts it into the specified MDS-MU while copying
it into the buffer for the MS transport. If you omit sucorrar, the MDS-MU must
be complete and ready to be transmitted as supplied.
For a NONMDSMU, specify either sucorrar or susupcor. If you specify sucorrar,
CNMSMU creates the UOWC GDS variable in this area and uses it in building
the MDS header.
sudata
Is a varying length character field containing the data being sent. For either
MDSMU or NONMDSMU, the first 2 bytes must contain the entire length of
the data and the next 2 bytes must contain the key.
sudstapl
Is an 8-byte character field that specifies the destination application name.
The application name can be one of the following:
Note: For sends within the same NetView, the send services always fills in the
NetView LU name as the origin LU.
sudstnet
Is an 8-byte character field that specifies the ID of the network of the
destination LU or VTAM CP. Specify the 1–8 character NETID (padded with
blanks to 8 characters) beginning with an EBCDIC character 0—9 and A—Z
(capitals only), @, #, or $, and followed by EBCDIC characters 0—9 and A—Z
(capitals only). The value of this field defaults to the network name that VTAM
determines based on the LU name or VTAM CP name of the remote node
(specified with the hsdstlu field) if:
v You specify blanks for this field for the PL/I call format.
v You do not specify the DESTNET keyword when using the PL/I macro
format.
v You specify blanks for this field for the C invocation format.
sudtype
Is an 8-byte character field indicating whether the data item specified in the
sudata keyword is an MDS-MU or a non-MDS-MU.
MDSMU
Indicates that the sudata is an MDS-MU. MDSMU is the default for the
PL/I macro format.
NONMDSMU
Indicates that the sudata is not a complete MDS-MU because it does
TEST CNMSMU queues the request based on the command priority of the
receiving task. The command priority can be set using the OVERRIDE
or DEFAULT commands. Refer to the NetView online help.
surplcmd
Is an 8-byte character field containing the name of the NetView command to
be driven with the reply. The surplcmd field is used only in an MS application
that is sending a REQUEST_WITH_REPLY with the reply being received
asynchronously. Otherwise, it is ignored.
This is an optional field. The default is the registered command for the
invoking application.
susupcor
Is a varying length character field containing a complete unit of the unit of
work correlator (X'1549') GDS variable. Refer to the SNA library for more
information about defining the correlator.
The susupcor field is not valid for MDSMU. For NONMDSMU, specify either
suspcor or sucorrar. If you specify susupcor, the supplied value is used to build
the MDS header. No validity checking is done for a correlator supplied by the
invoker.
susynch
Is an 8-byte character field that specifies whether the MS application is to
receive the reply synchronously.
NO Indicates that the reply is received asynchronously. NO is the default
for the PL/I macro format.
NO_BUF
Do not suspend the application but buffer replies until the one last is
received. This value is equivalent to the NO value.
NO_UNBUF
Do not suspend the application and forward replies immediately.
YES Indicates that the reply is received synchronously.
YES_BUF
Suspend the application and buffer its replies. This value is equivalent
to the YES value.
If you do not specify the SYNCH keyword when using the PL/I macro format
for REQUEST_WITH_REPLY, the default value is used. Otherwise, this field is
required for REQUEST_WITH_REPLY.
sutimout
Is a 4-byte integer field that specifies the number of seconds to wait for a reply
to an outstanding REQUEST_WITH_REPLY.
For a REQUEST_WITH_REPLY that generates multiple replies, the timeout
value applies only to the last reply.
For requests that generate multiple replies, the timeout value applies only to
the last reply.
NetView initializes the default and maximum timeout values for the LU 6.2
transport send services. The initial default and maximum timeout values are
120 seconds and 86400 seconds, respectively. You can change these values with
the DEFAULTS command.
The valid values for sutimout are:
1 ... X
Where X is the maximum timeout value.
0 Indicates the default timeout value.
–1 Indicates the maximum timeout value.
If you do not specify the TIMEOUT keyword when using the PL/I macro
format for REQUEST_WITH_REPLY, the default timeout value is used.
Otherwise, this field is required for REQUEST_WITH_REPLY.
Usage Notes:
1. For a synchronous REQUEST_WITH_REPLY, control is returned to the
invoking program after the last reply or an error message is received and
placed on the MDSMUQ data queue. Otherwise, control is returned after
CNMSMU successfully queues the request to the MS transport.
2. When the invoking program is suspended because of a synchronous
REQUEST_WITH_REPLY, the NetView task where the program is running is
not suspended. The task still receives and processes messages and commands.
3. For a synchronous REQUEST_WITH_REPLY from a data services task (DST), a
DSRB is marked in-use and the DSRB is not available for other use until the
suspended program is resumed.
4. For MDSMU, all fields within the MDS-MU header must be correct except for
origin NETID and LUNAME. NETID and LUNAME must be left out, not
blank or null, for the service routine to determine and set these fields. If the
correlator is not contained in the data, specify sucorrar.
5. For REPLY_ONLY, REPLY_NOTLAST, REPLY_LAST, and ERROR_MESSAGE,
specify susupcor to return the correlator sent with the request.
6. The MS transport implements a timeout value for the application receiving the
data. If the invocation of CNMSMU specifies a timeout value greater than the
timeout value set by the transport at the receiving node, the sending
application might time out in less than the specified interval.
7. When VTAM is active, you can use CNMSMU to send data to another
application in the same domain.
8. If sudstnet is not the NETID determined by VTAM for the LU specified in
sudstlu, the send fails.
9. An MS application or operations management served application cannot send
data to itself within the same NetView program.
10. If you specify both susupcor and sucorrar, susupcor is used.
11. Return code 24 or 28 from DSIPUSH indicates that DSIOLGFP is not defined
correctly in DSICMD.
12. If CNM_BAD_CES is returned:
v Make sure DSI6SNDP is defined correctly in DSICMD.
v If you specify hrrepcmd, make sure it is defined correctly in DSICMD.
v If you specify a synchronous REQUEST_WITH_REPLY, make sure
DSIOSRCP is defined correctly in DSICMD.
v If the sending application is an operations management served application,
make sure DSIOARCP is defined properly in DSICMD.
13. Refer to the IBM Tivoli NetView for z/OS Administration Reference for the correct
definitions of the command processors supplied by the NetView product.
14. For MDSMU, if you omit the NETID subfield of the destination subvector
from the MDS-MU header, VTAM determines the network name used, based
on the LU name in the NAU name subfield of the destination subvector.
15. If you do not specify the destination NETID, and the destination LU name
exists in more than one network, VTAM determines the destination NETID
based on the active configuration.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmsubs(void *sssource, void *sstarget, int *sslen, char *sstype)
Where:
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
sslen
Is a 4-byte integer field containing the length of both sssource and sstarget
which must be the same length.
If the value specified by sslen is less than the length of the data to be returned,
the truncated data is returned and a return code of CNM_DATA_TRUNC is
generated. The length of the returned data is stored in HLBLENG(Hlbleng).
If the value specified by sslen is equal to or greater than the length of the data
to be returned and HLBRC(Hlbrc) = CNM_GOOD, the length of the returned
data is stored in HLBLENG(Hlbleng).
If the value specified is greater than the length of the receiving data area
(sstarget), a storage overlay can occur.
sssource
Is a 4-byte pointer field containing the address of the source character string
which has MVS system symbolics embedded in it or a single MVS system
symbolic. Substitution is always performed on the &DOMAIN symbolic, unless
substitution was disabled when NetView was started. For MVS and
user-defined system symbolics, substitution is not performed if substitution
was disabled when NetView was started, or you have not defined an MVS
system symbolic on your MVS system.
sstarget
Is a 4-byte pointer field containing the address of the target character string
which contains the source string with the MVS system symbolic values
substituted upon completion of this service.
sstype
Is an 8-byte character field specifying whether the source and target fields are
fixed or varying fields. The following are the valid types:
FIXTOFIX
Both sssource and sstarget are fixed length fields.
FIXTOVAR
sssource is a fixed length field and sstarget is a varying length field.
VARTOFIX
sssource is a varying length field and sstarget is a fixed length field.
VARTOVAR
Both sssource and sstarget are varying length fields.
Usage Notes:
1. The source and target fields cannot overlap.
2. The length field of varying length fields is not set or altered by CNMSUBS.
3. When using CNMSUBS with C and sstype's of FIXTOFIX, FIXTOVAR, or
VARTOFIX, pass CNMSUBS the address of a pointer to your fixed length field.
You can do this by coding a variable as a pointer to a string, and then passing
CNMSUBS the address of that pointer.
Return Codes:
Refer to IBM Tivoli NetView for z/OS Programming: Assembler for more information.
C INVOCATION:
void Cnmvars(char *cvfunc, void *cvdata, int cvdatlen,
void *cvname, char *cvpool)
Where:
cvdata
Is a varying length character field containing the value of the named variable.
This field is required for PUT and GET, but not used for DCL.
cvdatlen
Is a 4-byte integer field containing the length of cvdata. This is the maximum
length of the area provided to receive the returned data. You provide cvdatlen.
This field is required only for GET.
If the value specified by cvdatlen is less than the length of the data to be
returned, the truncated data is returned in cvdata and a return code of
CNM_DATA_TRUNC is generated. The full length of the data that was
truncated is stored in HLBLENG (Hlbleng).
If the value specified by cvdatlen is equal to or greater than the length of the
data to be returned, and HLBRC (Hlbrc) = CNM_GOOD, the length of the
returned data is stored in HLBLENG (Hlbleng).
If the value specified by cvdatlen is greater than the length of the receiving data
buffer (cvdata), a storage overlay can occur.
cvfunc
Is an 8-byte character field that specifies the function to be performed. This
field is required for all CNMVARS calls.
DCL Declares the local variable to belong to one of the global pools, or
resets it to the local pool. (You cannot declare a variable that belongs to
the caller’s pool.)
GET Gets the variable value
PUT Sets the variable value
cvname
Is a varying length character field that specifies the name of the variable. This
field is required for all functions.
Valid characters are A–Z, 0–9, @, #, $, +, ., !, ?, and underscore. The first
character of cvname cannot be a number or a period.
cvpool
Is an 8-byte character field that specifies the variable pool. This field is
required for all functions.
CALLER
The local pool of the calling command procedure or HLL installation
exit routine (if one exists).
CGLOBAL
Common global
LOCAL
The local pool of the current HLL command processor or installation
exit routine
TGLOBAL
Task global
hlbptr
Is a 4-byte pointer field containing the address of the HLB control block.
Usage Notes:
1. You can access all existing NetView command list language and REXX local or
global variables (both task and common) using CNMVARS. In the NetView
command list language, local variable names are restricted to a length of 1–11
characters. All other variable names can be 1-250 characters.
2. Although the length limits for task and common global variable names and
values are 250 and 31000 bytes, respectively, the Save/Restore database
(managed by the DSISVRT task) limits are lower. Refer to the GLOBALV
SAVE command for more detailed information. For double-byte character sets
(DBCS), the maximum number of double-byte characters between the shift-out
(X'0E') and shift-in (X'0F') control characters is 15499.
3. If you are accessing REXX or HLL global variables from the NetView
command list language, the REXX and HLL variable names must adhere to
NetView command list language rules. The character set allowed for variable
names in NetView command list language is also smaller than in REXX and
HLL. The valid characters for REXX variable names are the same as HLL; see
the operand cvname previously mentioned.
4. The C program using CNMVARS must be called by a command list language,
REXX, or HLL command procedure to PUT to or GET from a CALLER pool.
Otherwise, a return code of CNM_BAD_POOL is issued.
5. You do not have to initially put a value into the calling HLL command
processor or installation exit routine’s LOCAL pool before issuing a PUT in
the called HLL command processor or installation exit routine CALLER pool.
When control is returned to the calling HLL command processor or
installation exit routine, you can issue a GET for the same variable name in
the LOCAL pool to retrieve the value set in the called HLL command
processor or installation exit routine’s CALLER pool.
6. Any PUTs in an HLL command processor or installation exit routine’s
CALLER pool change the value of the same variable name in the calling
command procedure or HLL installation exit routine’s LOCAL pool.
7. You can set three different values (cvdata) in the same variable name (cvname)
if you specify different pools (cvpool). For example:
CNMVARPOOL FUNC(’PUT’) NAME(x) POOL(’LOCAL’) DATA(’cvdata1’);
CNMVARPOOL FUNC(’PUT’) NAME(x) POOL(’CGLOBAL’) DATA(’cvdata2’);
CNMVARPOOL FUNC(’PUT’) NAME(x) POOL(’TGLOBAL’) DATA(’cvdata3’);
8. The calling HLL command processor or installation exit routine’s LOCAL pool
is the same as the called HLL command processor or installation exit routine’s
CALLER pool.
9. The DCL operand can be useful when an HLL command processor invokes
VIEW. Ensure that the variables are properly declared to the corresponding
common or task global pools. Otherwise, the variables used can be from the
local pool and the full-screen panel is not automatically updated.
10. Declare task and common global variables to their respective pools before
invoking VIEW from an HLL command processor. Otherwise, VIEW does not
pick up the values. DCL is not necessary for local variables.
Return Codes:
Values for X:
or
CNMVARPOOL FUNC(’DCL’) NAME(cvname) POOL(’TGLOBAL’)
v Example 2: Changing the Value of a Variable
REXX or NetView command list language has declared variables to the task or
common global pool and values have been assigned to these variables. These
values must be changed within an HLL command processor or installation exit
routine and then displayed on a full-screen panel. Before invoking VIEW, code
in the HLL command processor or installation exit routine:
CNMVARPOOL FUNC(’PUT’) NAME(cvname) POOL(’CGLOBAL’) DATA(cvdata)
CNMVARPOOL FUNC(’DCL’) NAME(cvname) POOL(’CGLOBAL’)
or
CNMVARPOOL FUNC(’PUT’) NAME(cvname) POOL(’TGLOBAL’) DATA(cvdata)
CNMVARPOOL FUNC(’DCL’) NAME(cvname) POOL(’TGLOBAL’)
or
CNMVARPOOL FUNC(’DCL’) NAME(cvname) POOL(’TGLOBAL’)
Note: If only a DCL is done (with no PUT), the VIEW panel is blank for that
variable.
v Example 4: Declaring a Variable to the Local Pool
You might need to declare (DCL) a variable back to the local pool. Assume you
have the same variable name in both the local and common global pool. If you
have just started VIEW, the variable is declared to the common global pool. If
you want to change the value of the variable in the local pool, issue:
CNMVARPOOL FUNC(’DCL’) NAME(cvname) POOL(’LOCAL’)
Note:
1. Refer to the prologues of the samples for information about how certain
samples are related and special cases for installation exit routines.
2. Each alias name for PL/I begins with the letter P.
3. In PL/I the alias name is the same as the procedure name, which is limited to 7
characters.
This appendix also contains a description of each sample, and coded samples of an
installation exit routine and two command processors.
Table 19. PL/I Samples Shipped with the NetView Program (continued)
Sample Function PL/I Alias Sample
CNMSAMP
Uses CNMSMSG to log text to a sequential log PSEQLOG CNMS4219
Sets a common global variable for the USERVSAM PXITDI CNMS4220
DST
Primes VSAM empty data set for USERVSAM DST PXITVN CNMS4221
Sends a request to USERVSAM DST PSNDDST CNMS4222
Processes VSAM requests under USERVSAM DST PDOVSAM CNMS4223
Primes VSAM empty data set for PKEYIO PPRIME CNMS4224
Sends a software alert to an application over the PHSNDMU CNMS4226
high performance transport
Uses CNMQAPI to access a RODM PRODMCON CNMS4230
Sends an MSU directly to the automation table for PAUTOTB CNMS4231
evaluation
Registers or deregisters an application as an MS PREGISTR CNMS4232
application or an operations management served
application
Sends a software alert to ALERT_NETOP from an PSENDMU CNMS4233
MS application
Registers an application with the high performance PHREGSTR CNMS4236
transport
Uses CNMPMDB to process MDB PPRSMDB CNMS4239
Uses the PIPE command to activate an LU, wait, and PACTPIP CNMS4305
trap the output messages
PTMPPLT (CNMS4200)
This sample is a template for commands and installation exit routines in PL/I.
PEXIT3 (CNMS4210)
This is a sample DSIEX03 that sets a task global variable. This global variable
contains the value of the last time that a command other than PSNDDAT was
entered under an operator station task (OST). PWATDAT and PSNDDAT are used
to interrogate this value. The HLL service routines used in this sample are
CNMINFC (CNMINFOC) and CNMVARS (CNMVARPOOL).
PSNDDAT (CNMS4211)
This sample uses CNMSMSG to send data. The sample is part of an example of
sending messages containing a request, waiting for the response, and parsing the
results.
The example finds the last time that a command was entered on a given OST. A
task global variable is set by PEXIT3 every time a command is entered on an OST.
PWATDAT uses CNMSMSG to issue a PSNDDAT on the task in question.
PWATDAT then goes into a wait state. PSNDDAT retrieves the value of the global
variable and uses CNMSMSG to send the data back to the task that issued the
PWATDAT. PWATDAT breaks out of the wait state and parses and displays the
data.
The HLL service routines used in this sample are CNMVARS (CNMVARPOOL),
CNMSMSG (CNMSENDMSG), and CNMINFC (CNMINFOC).
PWATDAT (CNMS4212)
This sample uses the WAIT FOR DATA request. The sample is part of an example
of sending messages containing a request, waiting on the response, and parsing the
results.
The example finds the last time that a command was entered on a given OST. A
task global variable is set by PEXIT3 every time a command is entered on an OST.
PWATDAT uses CNMSMSG to issue a PSNDDAT on the task in question.
PWATDAT then goes into a wait state. PSNDDAT retrieves the value of the global
variable and uses CNMSMSG to send the data back to the task that issued the
PWATDAT. PWATDAT breaks out of the wait state and parses and displays the
data.
The HLL service routines used in this sample are CNMSMSG (CNMSENDMSG),
CNMSCAN (CNMSSCAN), CNMCMD (CNMCOMMAND), and CNMGETD
(CNMGETDATA).
PEXIT2A (CNMS4213)
This sample exit converts a write-to-operator (WTO) to a multiline
write-to-operator (MLWTO) by adding two lines to the single-line WTOs that drive
the exit. The HLL service routines used in this sample are CNMGETD
(CNMGETDATA) and CNMALTD (CNMALTDATA).
PCNMI (CNMS4214)
This sample uses CNMCNMI to send FORWARD RUs to a PU requesting that the
product set ID be returned. Any data returned is sent as a message to the operator.
The prolog of the sample contains instructions for setup.
The NetView program provides the CNMCNMI service routine for use in
communicating with devices in the network through the communications network
management interface (CNMI). You can access any data that is returned using the
CNMGETD service routine to retrieve records from the CNMI solicited data queue
(CNMIQ).
The HLL service routines used in this sample are CNMSCAN (CNMSSCAN),
CNMCNMI (CNMI), CNMGETD (CNMGETDATA), and CNMSMSG
(CNMSENDMSG).
PKEYIO (CNMS4215)
This sample illustrates how to code a NetView HLL command processor that
allows input/output (I/O) to a VSAM file through the CNMKIO service routine.
The command processor must run on a data services task (DST). To run this
command, use the EXCMD command or the CNMSMSG service routine (using type
set to COMMAND). The prologue of the sample explains how to set up the
command processor.
The HLL service routines used in this sample are CNMKIO (CNMKEYIO) and
CNMSMSG (CNMSENDMSG).
PSCOPCK (CNMS4216)
This sample illustrates the command authorization checking capabilities provided
by the NetView program. It authorizes keywords and values using the PSCOPCK
command. Set up the following elements:
v Operator ID
v Operator classes that can access the command
v Operator profile
Refer to the prologue of the sample for more information. This command yields a
message if the operator is not authorized to use the keyword and value specified
when invoking the command.
The HLL service routines used in this sample are CNMSCAN (CNMSSCAN),
CNMSCOP (CNMSCOPECK), and CNMSMSG (CNMSENDMSG).
PFLVIEW (CNMS4217)
This sample illustrates the use of the full-screen VIEW command processor.
The HLL service routines used in this sample are CNMCMD (CNMCOMMAND)
and CNMVARS (CNMVARPOOL).
PACTLU (CNMS4218)
This sample illustrates how to issue a VTAM command to activate a logical unit
(LU), trap the VTAM messages that result, and respond depending on the
messages received.
The HLL service routines used in this sample are CNMSCAN (CNMSSCAN),
CNMCMD (CNMCOMMAND), CNMGETD (CNMGETDATA), and CNMSMSG
(CNMSENDMSG).
PSEQLOG (CNMS4219)
This sample uses CNMSMSG to log text to a sequential log. The prolog of the
sample contains instructions for setup.
The HLL service routines used in this sample are CNMSCAN (CNMSSCAN),
CNMINFC (CNMINFOC), and CNMSMSG (CNMSENDMSG).
PXITDI (CNMS4220)
This sample illustrates the DST initialization exit that is used by the USERVSAM
DST. The HLL service routines used in this sample are CNMVARS
(CNMVARPOOL) and CNMSMSG (CNMSENDMSG).
PXITVN (CNMS4221)
This sample primes a VSAM empty data set for the USERVSAM DST.
PSNDDST (CNMS4222)
This sample sends a PUT or GET request to the sample HLL data services
command processor PDOVSAM to store and retrieve a given value for a specified
key (key and value limited to 11 characters in length). The sample also allows a
specified NetView program command list language variable (defined by the caller)
to be set to the retrieved value.
The HLL service routines used in this sample are CNMSCAN (CNMSSCAN),
CNMSMSG (CNMSENDMSG), CNMVARS (CNMVARPOOL), CNMGETD
(CNMGETDATA), and CNMCMD (CNMCOMMAND).
PDOVSAM (CNMS4223)
This sample is an HLL data services command processor that runs under the
sample data services task (task ID USERVSAM). It processes PUT or GET requests
sent by the PSNDDST sample, and writes or reads an 11-character value associated
with an 11-character key to the sample DST's VSAM data set. The prologue of
PDOVSAM contains instructions on installing the sample USERVSAM data
services task.
The HLL service routines used in this sample are CNMSCAN (CNMSSCAN),
CNMSMSG (CNMSENDMSG), and CNMKIO (CNMKEYIO).
PPRIME (CNMS4224)
This sample primes a VSAM empty data set for PKEYIO.
PHSNDMU (CNMS4226)
This sample sends a software alert to an application over the high performance
transport.
PRODMCON (CNMS4230)
This sample invokes CNMQAPI which enables the user to access a RODM under
the control of the NetView program. The coded example shows a RODM
CONNECT function.
The HLL service routines used in this sample are CNMSMSG (CNMSENDMSG)
and CNMQAPI (CNMOPREP).
PAUTOTB (CNMS4231)
This sample sends an MSU directly to the automation table for evaluation. This
sample provides a method of testing automation table statements without sending
an alert through the hardware monitor.
The HLL service routines used in this sample are CNMAUTO (CNMAUTOTAB),
CNMSMSG (CNMSENDMSG), and CNMSCAN (CNMSSCAN).
PREGSTR (CNMS4232)
This sample registers or deregisters an application as an MS application or an
operations management served application.
Refer to the prologue of the sample for more information. This command sends a
message to the invoking operator that reports the return code from the registration
or deregistration.
The HLL service routines used in this sample are CNMRGS (CNMREGIST),
CNMSMSG (CNMSENDMSG), and CNMSCAN (CNMSSCAN).
PSENDMU (CNMS4233)
This sample sends a software alert to ALERT_NETOP from an MS application.
The HLL service routines used in this sample are CNMSMU (CNMSENDMU) and
CNMSMSG (CNMSENDMSG).
PHREGSTR (CNMS4236)
This sample registers an application with the high performance transport.
Refer to the prologue of the sample for more information. This command sends a
message to the invoking operator that reports the return code from the registration
or deregistration.
The HLL service routines used in this sample are CNMHRGS (CNMHREGIST),
CNMSMSG (CNMSENDMSG), and CNMSCAN (CNMSSCAN).
PPRSMDB (CNMS4239)
This HLL sample sends a Message Data Block (MDB) to the NetView program for
processing. The MDB is a designed structure for message data. The MDB structure
is mapped by the MVS control block IEAVM105.
The HLL services used in this sample are CNMPMDB (CNMPRSMDB) and
CNMSMSG (CNMSENDMSG).
PACTPIP (CNMS4305)
This sample illustrates how to use the PIPE command to issue a VTAM command.
The VTAM command activates a logical unit (LU), traps the resulting VTAM
messages, and responds depending on the messages received.
The HLL service routines used in this sample are CNMSCAN (CNMSSCAN),
CNMVARS (CNMVARPOOL), CNMCMD (CNMCOMMAND), and CNMSMSG
(CNMSENDMSG).
Note:
1. Refer to the prolog of the samples for information about how certain samples
are related and special cases for installation exit routines.
2. Each alias name for C begins with the letter C.
This appendix also contains a description of each sample, and coded samples of an
installation exit routine and two command processors.
CTMPPLT (CNMS4201)
A template for commands and installation exit routines in C. It is included in
Chapter 9, “C high-level language services,” on page 117.
CEXIT3 (CNMS4240)
A sample DSIEX03 that sets a task global variable. This global variable contains the
value of the last time that a command other than CSNDDAT was entered under an
operator station task (OST). CWATDAT and CSNDDAT are used to interrogate this
value. The HLL service routines used in this sample are Cnminfc and Cnmvars.
CSNDDAT (CNMS4241)
Uses Cnmsmsg to send data. It is part of an example of sending messages
containing a request, waiting on the response, and parsing the results.
The example finds the last time that a command was entered on a given OST. A
task global variable is set by CEXIT3 every time a command is entered on an OST.
CWATDAT uses Cnmsmsg to issue a CSNDDAT on the task in question.
CWATDAT then goes into a wait state. CSNDDAT retrieves the value of the global
variable and uses Cnmsmsg to send the data back to the task that issued the
CWATDAT. CWATDAT breaks out of the wait state (it has received the data it was
waiting for), and parses and displays the data.
The HLL service routines used in this sample are Cnmvars, Cnmsmsg, and Cnminfc.
CWATDAT (CNMS4242)
Uses WAIT FOR DATA. It is part of an example of sending messages with a type
of request, waiting on the response, and parsing the results.
Its purpose is to find the last time that a command was entered on a given OST. A
task global variable is set by CEXIT3 every time a command is entered on an OST.
The HLL service routines used in this sample are Cnmsmsg, Cnmcmd, and Cnmgetd.
CEXIT2A (CNMS4243)
An exit that converts a write-to-operator (WTO) to an MLWTO by adding two
lines to the single-line WTOs that are driving the exit. The HLL service routines
used in this sample are Cnmgetd and Cnmaltd.
CCNMI (CNMS4244)
This sample uses Cnmcnmi to send RUs to a PU requesting that the product set ID
be returned. Any data returned is sent as a message to the operator. The prolog of
the sample contains instructions for setup.
The NetView program provides the Cnmcnmi service routine for communicating
with devices in the network through the CNMI. You can access any data that is
returned using the Cnmgetd service routine to retrieve records from the CNMI
solicited data queue (CNMIQ).
The HLL service routines used in this sample are Cnmcnmi, Cnmgetd, and Cnmsmsg.
CKEYIO (CNMS4245)
Shows how to code a NetView HLL command processor that allows input/output
to a VSAM file through the Cnmkio routine. The command processor must run on a
DST. To run this command, use the EXCMD command or the Cnmsmsg service
routine (with a type of COMMAND). The prolog of the sample explains how to set
up a DST.
The HLL service routines used in this sample are Cnmkio and Cnmsmsg.
CSCOPCK (CNMS4246)
Shows the command authorization checking capabilities provided by the NetView
program. It authorizes keywords and values using the CSCOPCK command. For
the command, set up:
v Operator ID
v Operator classes that can access the command
v Operator profile
Refer to the prolog of the sample for more information. This command yields a
message if the operator is not authorized to use the keyword and value specified
when invoking the command.
The HLL service routines used in this sample are Cnmscop and Cnmsmsg.
CFLVIEW (CNMS4247)
Illustrates the use of the full-screen VIEW command processor.
The HLL service routines used in this sample are Cnmcmd and Cnmvars.
CACTLU (CNMS4248)
Shows how to issue a VTAM command to activate an LU, trap the VTAM
messages that result, and respond depending on the messages received.
The HLL service routines used in this sample are Cnmcmd, Cnmgetd, and Cnmsmsg.
CSEQLOG (CNMS4249)
Uses Cnmsmsg to log text to a sequential log. The prolog of the sample contains
instructions for setup.
The HLL service routines used in this sample are Cnminfc and Cnmsmsg.
CXITDI (CNMS4250)
Illustrates the DST initialization exit that is used by the USERVSAM DST. The HLL
service routines used in this sample are Cnmvars and Cnmsmsg.
CXITVN (CNMS4251)
Prepares a VSAM empty data set for the USERVSAM DST.
CSNDDST (CNMS4252)
Sends a PUT or GET request to the sample HLL data services command processor
CDOVSAM to store and retrieve a given value for a specified key (key and value
limited to 11 characters in length). The sample also allows a specified NetView
command list language variable (defined by the caller) to be set to the retrieved
value.
The HLL service routines used in this sample are Cnmsmsg, Cnmvars, Cnmgetd, and
Cnmcmd.
CDOVSAM (CNMS4253)
Is an HLL data services command processor that runs under the sample data
services task (task ID USERVSAM). The command processor processes PUT or GET
requests sent by the CSNDDST sample, and writes or reads an 11-character value
associated with an 11-character key to the sample DST’s VSAM data set. The
prolog of CDOVSAM contains instructions on installing the sample USERVSAM
data services task.
The HLL service routines used in this sample are Cnmsmsg and Cnmkio.
CPRIME (CNMS4254)
Prepares a VSAM empty data set for CKEYIO.
CHSNDMU (CNMS4256)
Sends a software alert to an application over the high performance transport.
CRODMCON (CNMS4260)
Starts CNMQAPI which enables the user to access a RODM under the control of
the NetView program. The coded example shows a RODM CONNECT function.
The HLL service routines used in this sample are Cnmsmsg and Cnmqapi.
CAUTOTB (CNMS4261)
Sends an MSU directly to the automation table for evaluation. It provides a
method of testing automation table statements without sending an alert through
the hardware monitor.
The HLL service routines used in this sample are Cnmauto, Cnmsmsg, and Cnmscan.
CREGISTR (CNMS4262)
Registers or deregisters an application as an MS application or an operations
management served application.
Refer to the prolog of the sample for more information. This command sends a
message to the invoking operator that reports the return code from the registration
or deregistration.
The HLL service routines used in this sample are Cnmrgs and Cnmsmsg.
CSENDMU (CNMS4263)
Sends a software alert to ALERT_NETOP from an MS application.
The HLL service routines used in this sample are Cnmsmu and Cnmsmsg.
CHREGSTR (CNMS4266)
Registers an application with the high performance transport.
v Registration type
v Focal point category
v Focal point option
v Notify option
Refer to the prologue of the sample for more information. This command sends a
message to the invoking operator that reports the return code from the registration
or deregistration.
The HLL service routines used in this sample are Cnmhrgs and Cnmsmsg.
CPRSMDB (CNMS4269)
This HLL sample sends an MDB to the NetView program for processing. The MDB
is a designed structure for message data. The MDB structure is mapped by the
MVS control block IEAVM105. The HLL service routines used in this sample are
Cnmpmdb and Cnmsmsg.
CACTPIP (CNMS4405)
Shows how to use the PIPE command to issue a VTAM command which activates
an LU, traps the resulting VTAM messages, and responds depending on the
messages received.
The HLL service routines used in this sample are Cnmvlc, Cnmvars, Cnmcmd, and
Cnmsmsg.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user's responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
IBM Corporation
2Z4A/101
11400 Burnet Road
Austin, TX 78758
U.S.A.
The licensed program described in this document and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement or any equivalent agreement
between us.
COPYRIGHT LICENSE:
Each copy or any portion of these sample programs or any derivative work, must
include a copyright notice as follows:
© (your company name) (year). Portions of this code are derived from IBM Corp.
Sample Programs. © Copyright IBM Corp. _enter the year or years_. All rights
reserved.
Trademarks
IBM, the IBM logo, and ibm.com® are trademarks or registered trademarks of
International Business Machines Corp., registered in many jurisdictions worldwide.
Other product and service names might be trademarks of IBM or other companies.
A current list of IBM trademarks is available on the Web at “Copyright and
trademark information” at http://www.ibm.com/legal/copytrade.shtml .
Java and all Java-based trademarks and logos are trademarks or registered
trademarks of Oracle and/or its affiliates.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Other product and service names might be trademarks of IBM or other companies.
This Software Offering does not use cookies or other technologies to collect
personally identifiable information.
If the configurations deployed for this Software Offering provide you as customer
the ability to collect personally identifiable information from end users via cookies
and other technologies, you should seek your own legal advice about any laws
applicable to such data collection, including any requirements for notice and
consent.
For more information about the use of various technologies, including cookies, for
these purposes, See IBM’s Privacy Policy at http://www.ibm.com/privacy and
IBM’s Online Privacy Statement at http://www.ibm.com/privacy/details the
section entitled “Cookies, Web Beacons and Other Technologies” and the “IBM
Software Products and Software-as-a-Service Privacy Statement” at
http://www.ibm.com/software/info/product-privacy.
Notices 289
290 Programming: PL/I and C
Index
Special characters asynchronous (continued)
panel update 4
(\0) end-of-string character 109 atdata operand 185
& (address) operator 106, 107 ATTNID, CNMGETA attribute 195
&HDRMTYPE variable 207 AUTCONID 218
&LINETYPE variable 207 authorization checking
&MSGID variable 207 command 75, 138
&MSGORIGIN variable 207 command, keyword, value 249
&PARMSTR variable 62 logon 18
&PAUSE function 72, 134 authorized receiver 251
#pragma C variable 39 automating MSUs
{} type specifier 248 C example 157
PL/I example 90
automating NetView messages 4
A AUTOTOKE, CNMGETA attribute 195
AAUTSKLP subtask 22
abbreviate command 17
access B
command list variable BNJDSERV subtask 22
C example 130 BNJNETOP data set 22
PL/I example 70 BNJPALEX installation exit 13, 14
data 4 BNJPNL1 data set 232
data set 80, 144 BNJPNL2 data set 232
servers across hosts 8 books
storage 79, 143 see publications xiii
VSAM file 83 BSAM 21
accessibility xvii building request units, CNMI 119
ACTIONDL, CNMGETA attribute 194
ACTIONMG, CNMGETA attribute 194
adbuf operand 184
ADDR function C
description 53 C control blocks, description 112
IEL0872I message 53 C examples
passing pointer variables 52 accessing command list variables 130
address of the HLB control block 103 altering data 141
addressing mode 44 automating MSUs 157
adfunc operand 184 CNMI 145
adindex operand 184 coding DST installation exits 151
adorigin operand 54, 108, 184 coding installation exits 152
adqueue operand 184 coding WAIT FOR DATA 153
alert command authorization checking 138
high-performance transport data set access 144
C example 161 Hlbrc C return code field 12
PL/I example 96 invoking synchronous commands 123
MS transport keyed file access 149
C example 160 locks 133
PL/I example 95 message processing 137
alias, C sample 281 operator input 134
ALLOCATE command 7, 56, 113 registering applications
allocating files, PL/I 56 high-performance transport 159
altering data MS transport 158
C example 141 operations management 158
PL/I example 78 registering applications, MS transport 158
API (application program interface) 4 registering applications, operations management 158
application registration retrieving information 129
with high-performance transport 94, 159 sending alerts, MS transport 160
with MS transport 92, 158, 241 sending commands 123
argc parameter in C 103 sending data, high-performance transport 161
argv parameter in C 103 sending MDB to NetView 162
asynchronous sending messages 122
command running 3 storage access 143
Index 293
critical preinitialized programs 40 destnet operand 213
CRODMCON (CMS4260) C sample 285 device communications 81, 145
cross-domain directory names, notation xix
alert 22 DISCORIG, mapping Origblck 103
command 17 DISPLAY, avoiding 58
traffic, monitor 17 domain ID 207, 219
CSCOPCK (CNMS4246) C sample 283 DSCP 28
CSENDMU (CNMS4263) C sample 285 DSIC C include file 109, 112, 279
CSEQLOG (CNMS4249) C sample 284 DSICCALL C include file 113, 279
csfrom operand 191 DSICCNM
cslen operand 191 C include file 113, 279
CSNDDAT (CNMS4241) C sample 13, 282 resolving composite return codes 173
CSNDDST (CNMS4252) C sample 284 DSICCONS C include file 108, 113, 279
csto operand 191 DSICES macro 188
cstype operand 191 DSICHLB C include file 279
CTMPPLT (CNMS4201) C sample 282 DSICLD data set 232
CURCONID 219 DSICORIG C include file 113, 279
current date function 219 DSICPRM C include file 113, 279
CURSYS 219 DSICRTR subtask 22
customization, check 18 DSICVARC C include file 109, 113, 279
cvdata operand 263 DSIDKS macro 232
cvdatlen operand 263 DSIEX01 installation exit 13, 14
cvfunc operand 263 DSIEX02A installation exit 13, 14
cvname operand 264 DSIEX03 installation exit 13, 15
cvpool operand 264 DSIEX04 installation exit 13, 15, 16
CWATDAT (CNMS4242) C sample 13, 282 DSIEX05 installation exit 13, 16
CXITDI (CNMS4250) C sample 14, 284 DSIEX06 installation exit 13, 16
CXITVN (CNMS4251) C sample 14, 284 DSIEX07 installation exit 13, 17
DSIEX09 installation exit 13, 17
DSIEX10 installation exit 13, 17
D DSIEX11 installation exit 13, 17
DSIEX12 installation exit 13, 18
d type specifier 247
DSIEX13 installation exit 13, 19
data access 4
DSIEX14 installation exit 13, 19
data alteration 78, 141
DSIEX16 installation exit 13, 20
data definition (DD) statement 56, 113
DSIEX16B installation exit 13, 20
data queue 5
DSIEX17 installation exit 13, 20
data queue management 61, 121
DSIEX18 installation exit 13, 20
data set access
DSIEX19 installation exit 13, 20
C example 144
DSIEX20 installation exit 13, 21
closing 231
DSIEX21 installation exit 13, 21
opening 232
DSIGET macro 178
PL/I example 80
DSILCS macro 188
data sets, access from HLL 7
DSILOG task 26
data, requesting
DSILOGDS mapping function 26
C 154
DSIMQS macro 19, 178
PL/I 88
DSIMSG data set 232
data, sending
DSIOPEN data set 232
C 156
DSIPARM data set 232
PL/I 89
DSIPCNM PL/I include file 56, 269
DATAQ access queue 61, 121, 207
DSIPCONS PL/I include file 55, 269
datatype operand 214
DSIPHLB PL/I include file 55, 269
DATE 219
DSIPHLLS PL/I include file 56, 269
DATETIM2 219
DSIPLI PL/I include file 55, 269
DATETIME 219
DSIPORIG PL/I include file 55, 269
deallocate files
DSIPPRM PL/I include file 56, 269
deallocating files 56
DSIPRF data set 232
dynamically 7
DSIPSS macro 15
PL/I 56
DSIPUSH macro 236
debug support
DSITIB control block 223
remote interactive debugger (RID) 8, 167
DSITRACE task 26
traces 8
DSITVB control block 222, 223
DELAY, avoiding 58
Dsivarch, varying length character string 106, 109, 119
deleting a message 12
DSIVTAM data set 232
deliver request unit (RU) 22
DSIWCS macro 17
DESC, CNMGETA attribute 195
DSIZCSMS macro 174
destappl operand 213
DSRBO keyword 29
destlu operand 213
Index 295
gdorigin operand 54, 108, 206 HLL definition facilities
gdqueue operand 206 HLLENV command
GET statement 57 DEFAULT keyword 38
getchar routine 114, 115 preinitialized environments, defining 37
GETDATA function 121 REGENVS and CRITENVS keywords 37
global installation exit 11 storage keywords 37
global variables 176 HLL installation exit routines
GLOBALV command 176 invocation restriction 3
GO command 4, 177 overview 11
HLL PL/I restrictions 58
HLL program
H accepting queued input 38
end on cancel/reset 39
HAPIENTR debug option 168, 171
HLL runtime options
HAPIEXIT debug option 168, 171
default values 38
hardcopy log 15, 219
specifying, HLLOPTS 38
HCOPY 219
HLL service routines
HDRMTYPE field 187
CNMALTD (CNMALTDATA) 183
hexadecimal conversation 111
CNMAUTO (CNMAUTOTAB) 185
high performance transport
CNMC2T (CNMCODE2TXT) 192
description 6
CNMCELL (CNMSTRCELL) 186
NetView bridge remote access 8
CNMCMD(CNMCOMMAND) 187
PHREGSTR sample 276
CNMCNMI (CNMI) 189
PHSNDMU sample 275
CNMCPYS (CNMCOPYSTR) 190
high-level language 3
CNMGETA (CNMGETATTR) 193
high-performance transport
CNMGETD (CNMGETDATA) 204
API 208, 212
CNMHRGS (CNMHREGIST) 208
CNMGETD service routine 207
CNMHSMU (CNMHSENDMU) 212
CNMHRGS service routine 210
CNMINFC (CNMINFOC) 218
CNMHSMU service routine 212, 216
CNMINFI (CNMINFOI) 221
data queue management 61, 121
CNMIPXL (CNMIPXLATE) 224
registering applications
CNMKIO(CNMKEYIO) 227
C example 159
CNMLK (CNMLOCK) 229
PL/I example 94
CNMMEMC (CNMCLOSMEM) 231
sending alerts
CNMMEMO (CNMOPENMEM) 232
C example 161
CNMMEMR (CNMREADMEM) 233
PL/I example 96
CNMMMDB (CNMMMDBPRS) 236
sending data
CNMNAMS (CNMNAMESTR) 234
C example 161
CNMPOOL (CNMSTRPOOL) 237
PL/I example 96
CNMQAPI (CNMOPREP) 239
HLB control block 58, 115
CNMRGS (CNMREGIST) 241
Hlbleng C storage field 194, 218, 228
CNMSCAN (CNMSSCAN) 246
HLBLENG PL/I storage field 194, 218, 228
CNMSCOP (CNMSCOPECK) 249
Hlbptr
CNMSMSG (CNMSENDMSG) 251
C pointer field 106
CNMSMU (CNMSENDMU) 254
description 103
CNMVARS (CNMVARPOOL) 263
initial parameter in C 103
description 183
restrictions for Cnmcpys invocation 106
input parameters
HLBPTR
fixed-length character strings 54
initial parameter of PL/I program 49
integer variables 53
PL/I pointer field 52
pointer variables 52
restrictions with pointer variables 52
varying-length character strings 54
Hlbrc
HLL_NO_CANCEL runtime option
return code field in C 12
description 39
HLBRC
HLL_QUEUED_INPUT runtime option 38
resolving composite return codes 173
HLL, description 3
return code field in PL/I 12, 58
HLLENV command
HLL command processors
REGENVS and CRITENVS keywords
coding in C 103
critical programs 37
considerations for 57, 115
programs 37
HLL commands
HLLOPTS external C variable
GO 175, 177
HLL_NO_CANCEL runtime option 39
overview 175
HLL_QUEUED_INPUT runtime option 38
QUEUE 175, 178
syntax 38
RESET 179
hrapplname operand 208
TRAP 175, 182
hrcmdname operand 209
WAIT 175, 182
hrlogmod 209
Index 297
invoking synchronous commands MCSFLAG, CNMGETA attribute 198
C example 123 mctoken operand 231
PL/I example 65 MDB
IPV6 219 C example 162
IPv6Env statement 219 PL/I example 97
IRB (interruption request block) exit 11 processing 236
ISASIZ PL/I runtime option mdb operand 237
displayed by RID 170 MDS-MUs 5
istring operand 111, 112 MDSMU keyword
CNMHSMU statement 214
CNMSMU statement 254
J MDSMUQ access queue 61, 121, 207
member name 232
JOBNAME, CNMGETA attribute 197
message identifier 207
JOBNUM, CNMGETA attribute 197
message receiver 19
message text 207
messages
K automation 4, 14
key-sequenced data set (KSDS) 25 buffer, sending copies 17
key-sequenced VSAM files 227 change VTAM message 16
KEY, CNMGETA attribute 198 editing system console 17
keyed file access logging 8
C example 149 multiline 4, 74
PL/I example 83 NetView, automating 4
under a DST 227 processing, C example 137
keyword authorization checking 249 processing, PL/I example 74
replace 12, 14
send to a specific log 15
L sending a single unit 4
sending with C 122
label line message 252
sending, PL/I 61
LEOPTS static external variable 51, 105
suppress logging 15
line mode
trapping 4
input 4
using 12
link-edit
messages (event type) 182
JCL 43
MLWTO 4
PL/I program 43
moddname operand 232
lkfunc operand 230
momemnam operand 232
lkname operand 230
monitor cross-domain traffic 17
lkoption operand 230
motoken operand 232
lkscope operand 230
mrdata operand 233
local pool 264
mrdatlen operand 233
lock management
mrinclude operand 233
C example 133
mrtoken operand 234
controlling 229
MS Applications 6
PL/I example 71
MS transport
user-defined locks 7
registering applications
log output 15
C example 158
logging messages 8
PL/I example 92
logical unit name 219
sending alerts
LOGOFF command 19
C example 160
LOGOFF routine 223
PL/I example 95
logon validation 13, 18
MS transport layer 6
long-running command 187
MSGAUTH, CNMGETA attribute 198
LOSTERM exit 19
MSGCATTR, CNMGETA attribute 198
LU 219
MSGCBGPA, CNMGETA attribute 200
LU 6.2 transport 6, 215, 258
MSGCMISC, CNMGETA attribute 198
MSGCMLVL, CNMGETA attribute 199
MSGCMSGT, CNMGETA attribute 199
M MSGCOJBN, CNMGETA attribute 199
MACRF keyword 29 MSGCPROD, CNMGETA attribute 199
main function in C 103 MSGCSPLX, CNMGETA attribute 200
major vector key 23 MSGCSYID, CNMGETA attribute 200
management services (MS) transport 6 MSGDOMFL, CNMGETA attribute 200
manuals MSGGDATE, CNMGETA attribute 200
see publications xiii MSGGFGPA, CNMGETA attribute 201
MCGASID, CNMGETA attribute 198 MSGGMFLG, CNMGETA attribute 201
Index 299
ORIGBLCK initial parameter, PL/I program 49 PL/I examples (continued)
origin blocks 108 coding, DST installation exit 85
origin of request, Origblck 103 coding, installation exit 86
OST (operator station task) 13, 18 coding, WAIT FOR DATA 87
OST/NNT message receiver 19 command authorization checking 75
output data set access 80
operator 14 high-performance transport 96
system console 17 HLBRC field 12
OVERRIDE command options, DSIEX02A 14 invoking synchronous commands 65
OWNER 220 keyed file access 83
MDB, sending to NetView 97
message processing 74
P MS transport 95
MSUs, automating 90
PACTLU (CNMS4218) PL/I sample 274
operator input 72
PACTPIP (CNMS4305) PL/I sample 67, 277
overriding PSTACK and PHEAP values 51
pafld1,...pafld10 operand 246
parsing character strings
panumfld operand 246
CNMSCAN 63
parameters passed to HLL service routines
NetView 62
C 105
REXX 63
PL/I 51
registering applications
parsing character strings 7, 62, 246
high-performance transport 94
PARTID, CNMGETA attribute 203
MS transport 92
partitioned data sets 7, 231, 232
operations management 92
password function 18
retrieving information 69
pastring operand 247
sending commands 65
path names, notation xix
sending messages 61
pattern operand 247
storage access 79
PAUTOTB (CNMS4231) PL/I sample 275
using locks 71
pcfunc operand 186
VIEW command processor 73
PCNMI (CNMS4214) PL/I sample 273
VSAM access 83
pcstrptr operand 186
waiting and trapping 66
pctoken operand 186
PL/I high-level language services 59
PDDNM keyword 29
PL/I include files
PDOVSAM (CNMS4223) PL/I sample 14, 275
description 55
performance considerations, PL/I and C installation exits 12
DSIPCNM 56, 269
PEXIT2A (CNMS4213) PL/I sample 13, 273
DSIPCONS 55, 269
PEXIT3 (CNMS4210) PL/I sample 13, 272
DSIPHLB 55, 269
PFLVIEW (CNMS4217) PL/I sample 274
DSIPHLLS 56, 269
PHREGSTR (CNMS4236) PL/I sample 276
DSIPLI 55, 269
PHSNDMU (CNMS4226) PL/I sample 275
DSIPORIG 55, 269
PID 220
DSIPPRM 56, 269
PIPE command
PL/I INCLUDE files, optional
C examples
DSIPCNM 56
accessing stem variables 131
DSIPCONS 55
trapping messages 125
PL/I INCLUDE files, required
description 177
DSIPHLLS 56
online help 178
DSIPLI 55
PL/I examples
DSIPORIG 55
accessing stem variables 70
DSIPPRM 56
trapping messages 67
PL/I installation exits, support for 49
PKEYIO (CNMS4215) PL/I sample 273
PL/I program
PL/I
coding template 59
control blocks 55
commands to avoid
DSIPHLB 55
DELAY 58
INCLUDE files 55
DISPLAY 58
preinitialized environment
ON FIXEDOVERFLOW 58
runtime options automatically set 50
ON OVERFLOW 58
runtime options
ON UNDERFLOW 58
TRAP(OFF) 57
ON ZERODIVIDE 58
TRAP(ON) 57
PLIRETC 58
PL/I command processors, support for 49
PLIRETV 58
PL/I examples
WAIT 58
access command list variables 70
compiling 43
altering data 78
ending normally 58
CNMI 81
environment 49
code points, translating 91
file I/O capability 56
coding template 59
Index 301
registering applications (continued) RID
high-performance transport (continued) CONTINUE 167
description 208 description 167, 169
high-performance-transport END 168
PL/I example 94 MODNAME 168
MS transport OPTION 168
C example 158 RUN 168
description 241 STEP 168
PL/I example 92 ROUTCODE, CNMGETA attribute 203
operations management ROUTE-INOP request 22
C example 158 RTM 6
PL/I example 92 RU formats 22
regular command 15 runtime options
Remote NetView Bridge 8 default values 38
remote systems, operating 6 specifying, HLLOPTS 38
replace messages 12
reply identifier 203
reply RU 189
replycmd operand 215
S
s type specifier 248
REPLYID, CNMGETA attribute 203
sccmd operand 249
REPORT option 104
schedule commands under the DST 29
request handling 3
sckwd operand 249
requesting data
SCNMMAC1 data set 269, 279
C example 154
scvalue operand 249
PL/I example 88
SDDNM keyword 29
RESET command 179, 223
sending alerts
resetting and terminating HLL program 39
high-performance transport
response handling 3
C example 161
restrictions
PL/I example 96
C program 115
MS transport
PL/I program 58
C example 160
RETCODE exit value 171
PL/I example 95
retrieving information
sending an MDB to NetView
C example 129
C example 162
PL/I example 69
PL/I example 97
return codes
sending commands
C 115
C example 123
composite
PL/I example 65
major and minor 173
sending data
resolving 173
C example 156
description 12
PL/I example 89
passed by installation exits 12
sending messages
passed in C HLBRC field 12
C example 122
passed in PL/I HLBRC field 12
description 251
PL/I 58
PL/I example 61
simple 173
serial number of screen update 223
USERASIS 12
serialize access 229
USERDROP 11, 12
service xvii
USEREVNT 24
service management connect xvii
USEREXLG 24
service routines, limitations, installation exits 11
USERHCL 16
SESSID, CNMGETA attribute 203
USERHCLR 16
signal function 114
USERLOG 16
simulated terminal input 15
USERLOGR 16
single line message 252
USERNSL 16
SMC xvii
USERNSLR 16
smdestid operand 251
USERSWAP 12
smdestyp operand 251
revision codes xix
SMF 8
REXX language 264
smmsgtyp operand 220, 252
rgappl operand 242
SMSGID, CNMGETA attribute 203
rgcmd operand 243
smtext operand 252
rgfocpt operand 243
solicited VTAM messages 13, 16
rgfpcat operand 243
source operand 237
rgrepl operand 244
SPASS keyword 29
rgtype operand 244
spclass operand 238
RH header 189
spfunc operand 108, 238
Index 303
USERHCLR return code 16 WAIT (continued)
USERLOG return code 16 data 57, 87, 153
USERLOGR return code 16 waiting and trapping
USERNSL return code 16 C example 125
USERNSLR return code 16 C example using PIPE 127
USERSWAP return code 12 PL/I example 66
PL/I example using PIPE 67
V
value authorization checking 249 X
variables (command list language) x type specifier 248
&HDRMTYPE 207 XITBN installation exit 13, 21
&LINETYPE 207 XITBO installation exit 14, 22
&MSGID 207 XITCI installation exit 14, 22
&MSGORIGIN 207 XITCO installation exit 14, 24
access 5 XITDI installation exit 14, 25
variables, global 176 XITVI installation exit 14, 25
variables, notation for xix XITVI keyword 29
VARTOVAR constant 106 XITVN installation exit 14, 25
varying length character string XITVN keyword 29
Cnmnvlc 120 XITVO installation exit 14, 26
Cnmvlc 119 XITVO keyword 29
copying null-terminated text into 119 XITXL installation exit 14, 26
description 108, 119
verify operator authorization 16
VIEW command 73
VIEW command processor
Y
Yahoo user group, NetView xviii
C example 136
description 4
PL/I example 73
virtual storage, managing 7 Z
VOST 220 z/OS Language Environment libraries 50
VSAM
access
C example 149
PL/I example 83
data set 26
database 25
DST installation 27
empty file 14, 25
files 5, 229
I/O 25, 26, 149
input 14, 25
keyed file access 149
open failure 25
output 14, 26
services 29
vsdata operand 227
vsdatlen operand 227
vsfunc operand 228
vskey operand 228
vsoption operand 228
vstring operand 111, 112
VT 220
VTAM 220
command invocation 13, 16
component ID 221
level 220
messages, changing 16
VTCOMPID 221
W
WAIT
avoiding 58
command 182
Printed in USA
SC27-2860-03