Which fields from the input log records to include in CSV or JSON output
You must decide which fields from the input log records you want to include in the CSV or JSON output.
By default, the CSV and JSON commands select all fields
from the input log records. This is typically more than you need, unless you plan to use the CSV or
JSON for the type of deep dive
analysis that you can perform using the log browser in the
Transaction Analysis Workbench ISPF dialog.
For a few record types, ISPF dialog option 5 provides a curated list of fields as a suggested starting point.
Selecting fields individually by name
To select fields to include in CSV or JSON output, use either of the following methods:
Selecting all numeric fields
In some log record types, most or all numeric fields might be useful for performance analysis, while only some non-numeric fields might be useful for this purpose. For these log record types, it can be useful to include all numeric fields in the output, and then select non-numeric fields individually by name as required.
Including all numeric fields without naming them individually is useful when numeric fields are frequently added to a log record type to reflect new features in the system that generate those logs. New numeric fields are automatically included in output.
To include all numeric fields without naming them individually, specify the ALLNUMBERS parameter on the CSV or JSON command.
To select additional, non-numeric, fields by name, use the FIELDS command or FORM parameter.
Writing bit flags as separate fields
Some fields contain bit flags, where each bit conveys a different meaning. Each bit flag has its own field name.
To write bit flags as separate fields in the output, use the FIELDS command to explicitly specify the bit flag field names.
To list bit flag field names, use the log browser in the Transaction Analysis Workbench ISPF dialog to zoom on the corresponding parent field.
The value of an individual bit field is output as true or false for JSON, 1 or 0 for CSV. If the value is an accumulation of multiple instances of that field from repeating sections, the value is an integer that represents the number of instances where the bit flag is on.
Excluding missing fields from JSON output
By default, the JSON command excludes fields that are selected for output but are missing from the input log record.
This default behavior reduces data volume, which is especially useful if the pricing plan of your analytics platform is based on data volume.
To always include all fields that are selected for output, even when fields are missing from an
input log record, specify the MISSING(INCLUDE) parameter on the
JSON command. Fields that are missing from the input log record will have the
JavaScript value null.
If you specify MISSING(INCLUDE), be aware that some JSON parsers interpret the
value null as the string value "null". That behavior is typically
undesirable. For example: if you use numeric functions to process the field, then a string value is
inappropriate, and might cause errors.