Function calls for the C language
QMF provides two function calls for the C language: DSQCIC and DSQCICE.
DSQCIC
This call is for QMF commands that do not require access to application
program variables. Use this call for most QMF commands.
DSQCIC (&DSQCOMM,&CMDLTH,&CMDSTR)
The parameters have the following values:
- DSQCOMM
- The interface communications area
- CMDLTH
- Length of the command string, CMDSTR; a long type parameter
- CMDSTR
- QMF command to run, specified as an array of unsigned character type
of the length specified by CMDLTH. The QMF command must be uppercase.
DSQCICE
This call has an extended syntax for the three QMF commands that do require
access to application program variables: START and the extended formats
of GET GLOBAL and SET GLOBAL.
DSQCICE (&DSQCOMM,&CMDLTH,&CMDSTR,
&PNUM,&KLTH,&KWORD,
&VLTH,&VALUE,&VTYPE);
The parameters have the following values:
- DSQCOMM
- The interface communications area.
- CMDLTH
- Length of the command string, CMDSTR; a long integer parameter.
- CMDSTR
- QMF command to run. It is an array of unsigned character type. The QMF
command must be uppercase.
- PNUM
- Number of command keywords. It is a long integer parameter.
- KLTH
- Length of each specified keyword, &KWORD. It is a long integer
parameter or an array of long integer parameters.
- KWORD
- QMF keyword or keywords. Each is an unsigned character array.
- VLTH
- Length of each value associated with the keyword; a long integer parameter
or array of long integer parameters
- VALUE
- Value associated with each keyword. Its type is specified in the VTYPE
parameter, and can be an unsigned character array, a long integer parameter,
or array of long integer parameters.
- VTYPE
- Data type of the value string VALUE. This type has one of two values,
which are provided in the communications macro, DSQCOMMC:
- DSQ_VARIABLE_CHAR for unsigned character type
- DSQ_VARIABLE_FINT for long integer
All of the values specified in the VALUE field must have the data
type specified in VTYPE.
The C language interface is similar to the others. There are, however,
the following parameter considerations:
- Command strings, START, GET, and SET command parameters are all input
character strings. For these, C requires you to pass a storage area that is
terminated with a null value, which must be included in the parameter's length.
The compile-time length function should be used to obtain the parameter length
that is passed to the QMF interface.
- If the string is not terminated by a null before reaching the end of the
string, an error is returned by QMF. The null value (X'00') indicates
the end of a character string.
- For C parameters that are output character strings, including values obtained
by the GET command, QMF moves data from QMF storage to the application's storage
area and sets the null indicator at the end of the string. If the character
string does not fit in the user's storage area, a warning message is issued
and the data is truncated on the right. A null indicator is always placed
at the end of the data string.
[ Previous Page | Next Page | Contents | Index ]