ES_WRITE_CUSTOM_HSF

Writes data to a custom field in the HSF record viewable from the generated .csv file.

Syntax:

call "ES_WRITE_CUSTOM_HSF" using by value length
                                 by reference  data
                                 by value  id

Parameters:

length
Call prototype (see Key): cblt-x4-comp5
Picture: pic x(4) comp-5.
data
Picture: pic x(n).
id
Call prototype (see Key): cblt-x4-comp5
Picture: pic x comp-5.

On Entry:

length
Specifies the length of the custom data (1-255 chars).
data
The data to be written to the custom field.
id
A one-byte value that identifies the custom field.
Note: This can be a value between 0-255.

On Exit:

return-code
0 Success
12 No id specified
16 length is 0 or >255

Comments:

You can add up to five separate custom fields; configure the number of custom fields using the ES_HSF_CFG environment variable.

A call to this routine results in a trace (or traces if the data exceeds the maximum data length for a single entry - 8 bytes for 32-bit or 16 bytes for 64-bit) being written to the local trace table. Each call in the table can be identified by using the unique id used in the call - the trace id appears as x'ffid02'.

When the trace table is dumped to the .csv report, the custom fields (CUSTOM01, CUSTOM02, etc...) are populated in the order in that the custom entries are found (up to five entries, depending on the value of ES_HSF_CFG). If multiple calls are made for the same id, the call data is concatenated in the appropriate custom field (up to a maximum of 255 bytes).

If the user trace flag is switched on, the trace (or traces) are also written to the system trace table.