With this product it is possible to create CSV files from the CA Earl Report Writer for availability to desktop applications. Creating a CSV file from the CA Earl Report Writer is accomplished by specifying the JSICSVE program on the PRTEXIT option, and adding DD statements to the execution JCL. Creating CSV files through the use of CA Earl allows you to create CSV files derived from RMF records; this cannot be accomplished using the CA JARS Report Writer. The PDS used to store CSV files from CA Earl can be the same or a separate PDS data set from the one used to store CSV files created as output from the CA JARS Report Writer. The CA Earl print exit program builds and maintains the index data set that keeps track of the location of CSV files. This data set can be separate from the one used by the CA JARS Report Writer, or it can be shared. On the next page is an example CA Earl program that creates a CSV file as output. Each required statement is documented following the program example. The example shows only the parts of the program that are required for CSV file production. A complete listing of the program can be found in the CAJREARL library under the name of ERXT0259.
OPTION LIST OFF
NOTE*******************************************************************
NOTE* REPORT ID: CACHE SUBSYSTEM ACTIVITY *
NOTE* REPORT NAME: CACHE ACTIVITY REPORT (CSV) *
NOTE* DESCRIPTION: CACHE ACTIVITY CSV BY DEVICE *
NOTE* *
NOTE* RECORD TYPES: MRXTHDR, *
NOTE* MRXT74B *
NOTE* MACROS: DEFDATE - DEFINE FIELDS FOR JULIAN TO GREG CNV *
NOTE* TIMEHMS - CONVERT TIME TO PRINTABLE FORMAT *
NOTE*******************************************************************
!
OPTION PRINTER = 216
OPTION PAGE = 99999
OPTION PRTEXIT = JSICSVE
OPTION EXCLUDE
OPTION OMIT ALL BLANK LINES
!
.
.
.
.
PRINT TOTALS ONLY
' MEM=CSVCACHE'
' KEY=K5D7'
' TITLE=CACHE ACTIVITY '
' EURO=.$'
' XI=Y'
' SID=' SID
' DATE=' CAI_PRTDATE
' SUBSYS=' SUBSYST
' CNTRL=' GSA_DEV
' SUBID=' GSA_SID
' VOL=' DVOL
' RDHIT=' READHIT
' DFWHIT=' DFWHIT
' CFWHIT=' CFWHIT
' STAGE=' STAGE
' DFWBP=' DFWBP
' ICL=' ICL
END
This option causes the CA Earl program listing to be omitted from the output. It can be turned to ON during program development to aide in debugging.
This option sets the maximum print line length for this execution to the CA Earl maximum of 216. We recommend that you always set this value to the maximum. When creating CSV output files, no hardcopy reports are produced, only the CSV file. Note that CA Earl still calculates the line length internally. It counts positions between the single quotes as literals, and adds this amount to the calculated line length, even though the actual CSV line length is significantly shorter. This results in RC=16 and message "CALC257E Field SPACED OUTSIDE COLUMNS 1 TO 216." Specifying a value greater than 216 causes a default to a length of 132.
This option sets the number of lines to be printed on each report page. A specification of 99999 causes CA Earl to not generate page breaks.
This option specifies that all page and column headings should be suppressed.
This option will compress reports by omitting all detail and/or total lines that are entirely blank or zero.
The PRINT statement specifies:
When producing CSV output files using the JSICSVE print exit, a detail or summary report can be created but DOUBLE or TRIPLE spacing must not be specified. If DOUBLE or TRIPLE spacing is specified, the print exit program does not function properly, and the resultant CSV files are not created as expected. Refer to the CA Earl documentation for a complete list of PRINT statement options. Another restriction for CSV file creation is that multiple reports in a single execution are not allowed. If this is attempted the JSICSVE print exit program issues a message and terminates processing.
The first three fields following the PRINT or PRINT TOTALS ONLY control statement are required for CSV file production and their format is documented next. The fourth field is optional and is specified by users who wish to create CSV files in European format. The remainder of the fields are "pairs" of header information and data fields that appear in the CSV output file. If expected fields are not found by the exit or not found in the proper sequence, an error message is issued before termination.
The MEM= statement begins with a blank and can contain up to an eight-character member name following the equal sign. This names the member to be stowed in the PDS data set referenced by the CAIJSCSV DDNAME in the execution JCL. The member name must begin with a character, must be one to eight characters long, and cannot contain embedded blanks.
The KEY= statement begins with a blank, and contains four characters following the equal sign. 'K5' indicates how many keys (sort control keys and control breaks) are in the CSV file. If K5 is specified, the first five print items that are heading and data item pairs should be KEYS. D7 indicates how many data elements (heading and data item pairs) the CSV file contains that are not KEYS. A specification of KEY=K5D7 indicates that the CSV file has 12 data elements for each data line of the CSV file, (five keys and seven elements).
The TITLE= statement begins with a blank, and contains up to 68 characters of information for the title of the CSV file. This information appears in the index file referenced by the CAIJSIDX DDNAME in the execution JCL, and the CAIJSCSV PDS member being created as part of the identification record. Because specifying the title uses space on the print line, which is limited by to 216 bytes, you should make the title as concise as possible.
The EURO= statement is optional, but must follow the TITLE= statement, if used. This statement begins with a blank and is used to indicate the method of representing the period and the currency symbol in use. The default, as shown in the sample, is a period to represent a period, and the currency symbol is the dollar sign. For European support, specify a comma instead of a period and the currency symbol in use. In this case the resultant CSV output file has its variables delimited by semi-colons and periods and the numeric fields represented with commas. An example of a European format CSV file is shown earlier in this chapter in the section European Support.
' SID=' SID ' DATE=' CAI_PRTDATE ' SUBSYS=' SUBSYST ' CNTRL=' GSA_DEV ' SUBID=' GSA_SID ' VOL=' DVOL ' RDHIT=' READHIT ' DFWHIT=' DFWHIT ' CFWHIT=' CFWHIT ' STAGE=' STAGE ' DFWBP=' DFWBP ' ICL=' ICL
The 'XI=' statement is optional, but must follow the title statement and, if present, the EURO= statement. The statement begins with a blank and is used to indicate that an iCan Service Management Suite XML profile member describing the CSV member is to be generated. If a value of Y is present, the iCan Service Management Suite XML profile is created for the CSV report. If there is any other value or no keyword, the report is not generated.
The remaining items on the PRINT statement are the actual column headings and data item 'pairs'. To print a data item, print a 'heading' to identify the data item in the CSV file. These 'headings' all begin with a blank and end with an equal sign, with the data item following. The 'headings' cannot contain embedded blanks. If you must specify a multiple word heading such as SUBSYS ID, it must be specified as 'SUBSYS-ID=' or in some similar manner that does not include an embedded blank.
The following output data illustrates what is generated from the ERXT0259 CA Earl Report just described.
"HCSV","0000","JARS","C.0","19980930","150115","CSVCACHE","CAI","JARS",12,0000,"K5D7"," ","CACHE ACT" "SID","DATE","SUBSYS","CNTRL","SUBID","VOL","RDHIT","DFWHIT","CFWHIT","STAGE","DFWBP","ICL" "XE44","98/01/06",3990-03,"0C41","007A","VMCHI3",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"0C41","007A","VM9325",0.4,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"0C41","007A","VM9326",2.3,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,0501,"007B","IM1001",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,0501,"007B","IM1002",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,0501,"007B","IM1003",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,0501,"007B","DEMPP1",0.3,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2041,"007C","DLB430",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2041,"007C","VMU042",0.1,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2041,"007C","DLB510",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"223F",0080,"MV136A",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"223F",0080,"SECB1A",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"223F",0080,"MINI03",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"223F",0080,"SECB1B",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2261,0081,"OMVS02",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2261,0081,"DLI394",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2261,0081,"EMAIL1",9.0,0.8,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"22C1",0083,"MVXE84",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"22C1",0083,"MVXE99",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"22C1",0083,"CAT394",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"22C1",0083,"OPSL09",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,"22C1",0083,"ECAM02",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2121,"00E0","MVR52D",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2121,"00E0","MV392I",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2121,"00E0","DLI392",0.0,0.0,0.0,0.0,0.0,0.0 "XE44","98/01/06",3990-03,2121,"00E0","YR2000",0.0,0.0,0.0,0.0,0.0,0.0
The record types found within the individual CSV members are described earlier in this chapter as is the format and content of the index file, both of which are created by the print exit program JSICSVE.
| Copyright © 2012 CA. All rights reserved. |
|