IBM Support

ANZSVCDTA

General Page

ANZSVCDTA command

This command is used to parse and validate the result data, returned from the RUNSVCCMD, against the expected result list provided in the command parameters.  The command optionally returns the total of numeric values in a specified column of the results

Note:  This can only be called from within a program

Parameters

SVCDTA - Specifies the complete path and name of the result data file created from the RUNSVCCMD command

VALIDATE - A list (1 to 10) of validation entries to be matched against the result data

Note:  The columns in the result file must be comma-separated and have no headers. The results of each file row are evaluated from the first to the last expected value.

Element 1 - Column position (required)

The comma-separated column position for this entry.  This value must be from 1 to 20.

Element 2 - Expected value (required)

The case-sensitive character string that is expected.  This value must be enclosed in apostrophes and may contain alphanumeric characters, blanks and punctuation marks (excluding commas).

Note:  Strings that are NOT to be found may be specified by placing a minus sign (-) as the first character of the string

Element 3 - Logic to next in list (required on all list entries except the last)

*AND     - The expected results in this entry AND the next entry in the list must validate

*OR        - The expected results in this entry OR the next entry in the list must validate

Note:  Careful consideration must be made when using both *AND and *OR values

ROWS - The rows that are to be evaluated

*ALL      - The results specified in the validation list are expected to be found in all of the result row files

*ONE     - The results specified in the validation list are expected to be found in at least one of the rows specified

SUMCOLUMN - The comma-separated column positional value that is to be summed and returned in the TOTAL parameter. Numeric values from 1 to 20 are allowed.  The default is *NONE.

Note:  If a numeric value is specified, the content of that column in the result file may only contain numeric data

TOTAL - Specifies the name of the CL program variable that receives the total value being returned.  The type and length for the CL variable must be TYPE(INT) LEN(4).

Note:  This parameter is required when the value of SUMCOLUMN is set to something other than *NONE

RTNCOLUMN - The comma-separated column positional value that is to be returned in the return value (RTNVALUE) parameter.  Numeric values from 1 to 20 are allowed.  The default is *NONE. 

Note:  Refer to the return key (RTNKEY) parameter below. This parameter requires that the RTNCOLUMN parameter is also specified.

RTNKEY - The key string used to locate the row in the result file where the return value (RTNVALUE ) will be extracted.  The default is *NONE.

Note:  If a numeric value is specified for RTNCOLUMN and this parameter is set to *NONE, the value in the first row of the result file is returned in RTNVALUE.  If a numeric value is specified for RTNCOLUMN and this parameter specifies a key value, the value in the first row of the result file that contains that key is returned in RTNVALUE.

Note:  This parameter requires that RTNCOLUMN and RTNVALUE parameters are also specified.

RTNVALUE - The name of the CL program variable that receives the character value being returned.  The type and length for the CL variable must be TYPE(*CHAR) LEN(80).

Note:  This parameter requires the RTNCOLUMN parameter also be specified.

RTNTYPE - Specifies how the indication of success or failure of the validation is returned

*ESCMSG       - An escape message will be signalled for validation errors

*RTNCODE     - The first character of the RTNVALUE parameter will be set to '1' for successful completion and '0' for failure

Note:  If *RTNCODE is specified, no column data will be returned in the RTNVALUE parameter

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Document Information

Modified date:
07 January 2020

UID

ibm11169200