You can convert a TAB, TAB2, and FLASHBACK report that you have created to CSV format for use in a PC spreadsheet program.
Note: We recommend using OPTION(ZEROFLD=ZERO) in your reports. This option helps you ensure that fields with a zero value do not appear as blanks in the CSV output.
Usage of the CSVGEN utility to convert the generated report to CSV format.
Use the prepared sample job $CSVJCL, which is an extension of $SAMPJCL. The CSV formatted output is generated in the second step of the $CSVJCL job:
//PARSE EXEC PGM=IKJEFT01 //SYSEXEC DD DISP=SHR,DSN=sysview.REPORT.SCSYSAMP //SYSTSPRT DD SYSOUT=* //RWO DD SYSOUT=* //CSVIN DD DSN=*.REPORT.SYSPRINT,DISP=(OLD,DELETE) //CSVOUT DD SYSOUT=* //SYSTSIN DD * CSVGEN CSVIN CSVOUT VS=, DS=. /*
DD names:
Copies the original (source) report here.
Specifies the source report, which is typically generated in the first step, but a stored report could also be used.
Stores the CSV formatted report here.
Invokes the conversion utility with all parameters.
$CSVJCL introduces a second job step, converting the report that is generated in the first step to a CSV formatted file. CSV formatted reports contain only data and relevant headers, presented in the same order as in the source report.
The CSVGEN utility has the following syntax:
CSVGEN {<IN> <OUT>} [OPTIONAL PARAMETERS]
Indicates the utility name.
(Required) The input ddname. Points to original (source) report which is being converted.
(Required) The output ddname. The report in CSV format is stored here.
Some optional parameters can be used to tailor your CSV formatted output. These parameters are only one character long.
Value Separator. This parameter changes the default value separator value.
Default: comma (,)
Example, to specify a semicolon use the following format:
VS=;
Decimal Separator. This parameter changes the default decimal separator value.
Default: period (.)
Example, to specify a comma use the following format:
DS=,
Your report is converted to CSV format and ready to download to your PC.
|
Copyright © 2013 CA.
All rights reserved.
|
|