Earl is a powerful report writing tool, capable of producing complex reports. Many Broadcom mainframe products distribute tailored Earl Service report request samples.
This Knowledge Base article provides instructions on creating an EARL report
Earl report request contains at most 6 sections, but only 3 sections are required:
This article look at these 3 sections.
The other 3 optional sections are: the Options Section, the GSA Area Definitions Section, and the Presort Section.
Sample Earl report:
NOTE ==============================================================
NOTE This is the FILE DEFINITIONS section - the file and fields
NOTE to be used are identified here
NOTE ==============================================================
AIRPORTS: FILE EARLGET RECORD=48
DEF A_NAME 1-18 X 'NAME OF' 'AIRPORT'
DEF A_CITY 20-35 X 'CITY'
DEF A_COUNTRY 37-39 X 'COUNTRY' 'ABBREVIATION'
DEF A_PASS 41-48 N 'NUMBER OF' 'PASSENGERS'
PIC 'ZZ,ZZZ,ZZ9'
NOTE ==============================================================
NOTE This is the REPORT SECTION - one or more reports may be
NOTE defined here
NOTE ==============================================================
REPORT 'World''s 50 Busiest Airports, 1998' ! report title
PRINT A_NAME A_CITY A_COUNTRY A_PASS ! print line contents
! =================================================================
! This is the required END statement
! =================================================================
END !
Earl has many control statements and syntax options. The following 5 statements are required in every report:
Using only these 5 statements and the standard Earl Service EARLGET user module (which is provided in the Common Services product and contains AIRPORTS file data), a basic Earl Service report request can be created as shown above.
Earl Service source statements are free-form, and normally only columns 1 through 72 are used. A command may begin in any column, and a single source line may contain multiple commands. A single source statement may be coded on multiple source lines, but command words, field names, numeric constants and alphanumeric literals cannot spill from one line to the next.
Comments are optional and may be added anywhere in an Earl Service request. The entire line will be treated as a comment if the first word in the line is NOTE or an exclamation point (!). A comment may be added to another Earl Service statement by following the command with the word NOTE or an exclamation point (!). Comments are never continued; the end of the source line is the end of the comment statement.