Previous Topic: Configuration Files and Output FilesNext Topic: CSV Configuration File and Output File Example


CSV Configuration File

The CSV configuration file (JCKCSVC DD statement) guides and directs the CSV conversion process. Basically, for each report line on the primary report file, CA JCLCheck CSV conversion processing attempts to find a match on the CSV configuration file. The CSV configuration file consists of 2-line template pairs. Each template pair consists of matching text (first line) and an action to perform (second line) when a match is found. As soon as a match is found, CSV conversion processing performs the requested action. No additional template pairs are searched for the current report line.

There are four types of template pairs. The remainder of this topic describes the four types of template pairs.

Heading Template Pair

'matching text from first line of each report'
HEAD n

The heading template pair must be the first template pair representing each report found on the primary report file. The matching text must be quoted on both ends and can be up to 78 characters in length. The CSV conversion process uses this template pair to determine which report is currently being processed. The matching text must contain enough information to match the first line of each report on the primary file. The n following the HEAD keyword is optional. When present, it indicates the number of title lines to skip on subsequent pages (not the first page of the current report). The default is 6.

Asis Template Pair

'matching text from line of report user wants left as-is'
ASIS n

The asis template pair requests that one or more lines on the primary report file will be copied as-is onto the converted output file. The matching text must be quoted on both ends and can be up to 78 characters in length. The n following the ASIS keyword is optional. When present, it indicates the number of primary report file lines to copy as-is onto the converted output file. The default is 1 and it must be a numeric value between 1 and 9999.

If the defined matching text is simply '', each primary report line in the current report which found no match until this asis template pair, will be matched by this asis template pair. When matched, the primary report line will be copied as-is onto the converted output file. This is known as a catch-all, or default, template pair.

Skip Template Pair

'matching text from line of report user wants skipped'
SKIP n

The skip template pair requests that one or more lines on the primary report file will be skipped and will not be written on the converted output file. The matching text must be quoted on both ends and can be up to 78 characters in length. The n following the SKIP keyword is optional. When present, it indicates the number of primary report file lines to skip and not to write on the converted output file. The default is 1 and it must be a numeric value between 1 and 9999.

If the defined matching text is simply '', each primary report line in the current report which found no match until this skip template pair, will be matched by this skip template pair. When matched, the primary report line will be skipped and will not be written to the converted output file. This is known as a catch-all, or default, template pair.

Comma Template Pair

'matching text from line of report user wants converted to the CSV format'
COMMA 1,n,n,n,n,132

The comma template pair is the main template pair actually implementing the CSV conversion process. This template pair indicates where, on the primary report file line, to place comma delimiters and double-quotes when writing the line to the converted output file. Each number represents a column number on the primary report file line. The list of column numbers must be in ascending order and must be between 1 and 132. The matching text must be quoted on both ends and can be up to 78 characters in length. The column numbers following the COMMA keyword are required. There is no default value. However, whether present or not, column 1 and 132 is assumed to be present in the list of columns. The maximum number of columns specified is 15.

If the defined matching text is simply '', each primary report line in the current report which found no match until this comma template pair, will be matched by this comma template pair. When matched, the primary report line will be comma-delimited according to the columns specified and will be written to the converted output file. This is known as a catch-all, or default, template pair.

Comment Line

*

In addition to the four template pairs, there is also a comment line. Comment lines are for user purposes only. The CSV conversion process ignores them completely.