A new mode can be set to specify that report output is to be formatted as a Delimited Separated List (DSL). This is typically used where the output needs to be processed by another program. This could be the application that is using the P4API, or it could be a third party program.

The Delimiter is normally a comma or a tab character. The terms CSL or CSV are often used for Comma Separated List (or Values), and TSL or TSV for Tab Separated List (or Values). A delimiter sequence of up to four bytes may be used.

DSL mode can be used for any report destination type, not just for API output. Each record of the report output will be passed back to the calling program as the report is executed.

The returned data has the following characteristics:

Typically, the format of the report should be designed to be simple, to make it easy for the calling program to parse. For example, easy-to-parse reports might have the following attributes:

The PROIV function is constructed in the same way as any other PROIV report function. All the same features are available to the programmer.

One additional item needs to be set up: the Report Destination needs to specify DSL Mode. This is described in the next section. That definition also sets the separator characters used between fields in the returned data stream.

Comment on this topic

Topic ID: 540037