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. C high-level language services 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.