Sei sulla pagina 1di 110

EASYTRIEVE

PLUS MANUAL
INTRODUCTION
TO EZT+
INTRODUCTION TO EZT+
What is EZT+?

EZT+ is an information retrieval and data management system. It provides the NEW
USER the tools to produce comprehensive reports. The experienced programmer is
given the tools to create more complex reports.

EZT+ is an ENGLISH style language somewhat similar to COBOL.

Processing in an EZT+ environment is in a 'straight-line' code from the beginning to the


end of the program logic.

EZT+ is intended for the quick and basic report. There are features of the package that
allow the programmer to customize their logic to easily process control breaks,
accumulate totals, perform special functions AFTER lines have been printed and so on.
These features and many more will be covered in this manual.

INTRODUCTION TO EZT+
EZT+ has many features that make it an attractive package to the COBOL programmer.
Among the more notable features are.......

AUTOMATIC OPENING AND CLOSING FILES

* * All of the files that you define (I/O as well as sort and summary files)
are AUTOMATICALLY opened and closed by EZT+.

AUTOMATIC RECORD RETRIEVAL


* * AUTOMATIC record retrieval of records from the primary input file (see the
JOB STATEMENT discussion for more information on PRIMARY input
files). EZT+ eliminates the need to code read commands as well as
EOF logic. The standard processing of EZT+ is to AUTOMATICALLY
retrieve input records until all records are processed at which point EZT+
stops processing.

AUTOMATIC PRINT FEATURES

* * EZT+ automatically positions report titles and headings on your final


printed report. Additionally, data-items on a detail line are
automatically placed under the appropriate heading. This eliminates the
time consuming efforts to set up and align detail lines with header
information.

MISCELLANEOUS SPECIAL FEATURES

* * EZT+ allows you to change the SEQUENCE of your printed output


relative to the order of the input dataset

* * EZT+ provides for simplified CONTROL BREAK processing on your


reports

* * EZT+ provides for AUTOMATIC accumulation of specified data-items on a


total line

* * EZT+ provides a wide-variety of special procedures that are


AUTOMATICALLY invoked at certain points in your processing logic.
Special processing logic can be inserted in these procedures to annotate
your final report. These special procedures can occur . . . . . . . . . . .

Before or After printing of detail lines


Before or After processing CONTROL BREAKS

INTRODUCTION TO EZT+
MISCELLANEOUS SPECIAL FEATURES (cont'd)

Before processing a REPORT ACTIVITY

At EOJ or a page break

* * EZT+ provides easy sort and summary processing

* * EZT+ provides simplified table processing

* * EZT+ provides for simplified loop processing designed to control repetitive


logic

EXECUTION JCL

* * easy to understand execution JCL

* * see section on JCL samples for more information on the subject of execution
JCL

EZT+ STRUCTURE
This section will introduce you to the general structure of EZT+ programs as well as
show you the syntax that is needed to code an EZT+ program. In this section you will
see ......

* * the sections that are coded to create an EZT+ program

* * the ENVIRONMENT SECTION

* * the LIBRARY SECTION

* * the ACTIVITY SECTION

* * the syntax of EZT+ commands and statements

* * special characters that are used in EZT+

EZT+ STRUCTURE
How is EZT+ coded?

An EZT+ program consists of three sections that have parallels to a COBOL


environment. Those three sections are the ENVIRONMENT SECTION, the LIBRARY
SECTION and the JOB ACTIVITY SECTION.

* Environment Section - Use this optional section to establish program parameters


and override standard parameters.

* Library Section - Use this section to define all input, output, and temporary work
files along with any field definitions and working storage definitions.

* Activity Section - Two activities - JOB and SORT - make up the main body of
the program. The JOB ACTIVITY is used to access files, manipulate data and
produce files and reports. The SORT ACTIVITY is used to create sequenced
files.

Proceed to the next sections to review the ENVIRONMENT SECTION, the LIBRARY
SECTION and the ACTIVITY SECTION.

ENVIRONMENT SECTION
PARM statement

The PARM statement allows a user to customize the environment in which a


program is compiled and executed.

At OHIO CASUALTY, defaults are normally used.

Suppose, however, that you want to suppress the printing of EZT+ program
statements, and print only the actual report.

To do this, code the following in the ENVIRONMENT section of the program:

/ / SYSIN DD *
LIST OFF
PARM LIST (NOFILE NOPARM)
FILE file-name

For a complete list of other PARM options, refer to the EZT+ PLUS
REFERENCE MANUAL.

LIBRARY SECTION
The Library Section identifies the file(s) that are to be processed and any miscellaneous
Working Storage items that are needed to perform your logic.

All files (including input, output, sort, summary files, etc.) that will be used in your
EZT+ logic MUST be defined in the Library Section of your EZT+ program.

Working Storage items can include accumulators, hold areas, tables and so on that are
used to make your EZT+ program logic process more efficiently.

The Library Section begins immediately AFTER the / / SYSIN DD statement of your
executing of your JCL and is identified by the first FILE entry . . . . . . . .

/ / SYSIN DD *
LIST OFF
FILE file-name -------
. |
. | This is where you will
. | define your Library.
. |
. |
JOB activity -------
ACTIVITY SECTION
The Activity Section is REQUIRED in all EZT+ programs. In this area of your EZT+
program you code the actual logic to process your input data file(s) and generate the
desired output.

There are two (2) types of ACTIVITY that can be coded in this area - - the JOB
ACTIVITY and the SORT ACTIVITY.

* SORT ACTIVITY - - sort your designated input before processing


the JOB ACTIVITY

* JOB ACTIVITY - - automatically processes your designated input dataset

EZT+ SYNTAX
EZT+ and its free-form ENGLISH language structure make it easy for you to develop an
efficient and flexible style of programming. To avoid fundamental programming errors
you should follow these simple EZT+ syntax rules.

STATEMENT AREA

All EZT+ source statements are records of 80 characters.

Column 1 - 72 are reserved for your EZT+ statements.

It is recommended (just as with COBOL) to indent your EZT+ logical statements


in order to increase the readability of your program.

MULTIPLE STATEMENTS

EZT+ allows the programmer to code several commands on one line.

When coding several commands on one line you should use the period to delimit
these commands.

O/C programming standards strongly discourage the use of multiple commands


on one line - - this will NOT add to the readability of your program logic.

COMMENTS

EZT+ allows for comments to be placed within the logic of your program.

Comments in an EZT+ program are recognized in several ways . . . . . . .


* * The first non-blank character of a state is an asterisk (*) - - this can be in
any column

* * A statement containing ALL blanks

NOTE: Comments can occur ANYWHERE in your EZT+ logic except within a
continued statement.

EZT+ SYNTAX
CONTINUATION

Continuation of an EZT+ statement is done by coding a plus-sign (+) or hyphen


(-) as the last non-blank character on a statement. The choice of continuation
characters (+/-) is important only when continuing a line in the middle of a word.

For more information on continuation characters, see the SPECIAL


CHARACTERS discussion in the next topic.

KEYWORDS

EZT+ keywords can be used in the same way as they are used in a COBOL
program.

Some keywords are reserved words and other keywords are non-reserved.

A non-reserved keyword can be used as a field-name.

Reserved keywords CANNOT be used as field-names and when used as such will
cause EZT+ processing errors.

See APPENDIX A for a list of reserved words.

MULTIPLE PARAMETERS

Any time multiple parameters are coded in an EZT+ statement they MUST be
enclosed in parentheses.

FIELD NAMES

Field names are used to identify data items that reside on an input/output file or in
Working Storage.

Fields names are composed of a combination of NOT more than forty (40)
characters chosen from the following . . . . . . . . .
* * alphabetic characters (A - Z) in upper or lower case

* * decimal digits (0 - 9)

* * all special characters (except delimiters)

EZT+ SYNTAX
FIELD NAMES (cont'd)

Syntax rules regarding field names are . . . . . .

* * First character MUST be alphabetic or numeric

* * The name MUST contain at least one alphabetic or special character to


distinguish the field name from a number

* * All field names MUST be unique (unless qualified)

EZT+ SYNTAX
* * Qualified names are defined in the following way . . . . . . . .

FILEA : INSDNAME
WORK : INSDNAME

The qualified name consists of the QUALIFYING word


(FILEA or WORK) followed by a colon (:) and the
field name in question.

LABELS

Labels are used to specify JOBS, REPORTS, PROCEDURES or


PARAGRAPHS.

Labels can be up to forty (40) characters long.

They can contain any character other than a delimiter.

Valid characters are any alphabetic (A - Z) or numeric digit (0 - 9) - - but they


can NOT be all numbers.

LITERALS

Literals can be alphabetic or numeric.

Alphabetic . . . . . . .
* * They must be enclosed in single quotes

* * They can contain anywhere from 1 - 254 characters

* * They can contain ONLY EBCDIC characters

Numeric . . . . . . . .

* * They can contain up to eighteen (18) numeric digits

* * A +/- sign prior to the value can be used to indicate the algebraic value

* * A single decimal point can be used to indicate the specific fractional


value

EZT+ SYNTAX
Hexadecimal . . . . . . .

They are used to code EBCDIC values containing characters that are NOT
available on standard data entry keyboards.

You should code a HEXADECIMAL literal as follows . . . . . . .

X ' 4040 '

EZT+ compresses the pair of digits within the apostrophes into one (1)
character.
Valid characters in a HEXADECIMAL literal are 0 - 9 and A - F

SPECIAL CHARACTERS
The following characters have special meaning to EZT+. They are always used
according to these rules.

* (period) - The period terminates a statement. Although you can put more than
one statement on a line, in practice, each statement has it's own line.

* (space) - The space, or blank, is the basic delimiter in each statement. Multiple
blanks are read as one. For example:

REGION 1 1 A

REGION 1 1 A

are the same to EZT+.


* (comma) - The comma can be used for readability. The comma means nothing to
EZT+ so you still must use the required space delimiter between
words. For example:

REGION, 1, 1, 1 -- is valid

REGION,1,1,A -- is NOT valid

* (apostrophe) - The apostrophe encloses all alphabetic literals. This makes it


impossible to mistake a field name for a literal. Example:

TITLE 1 'SAMPLE REPORT'

* + (plus) and - (hyphen) - Both plus and the hyphen are used to continue a
statement. They must be the last non-blank
character on the line. The plus (+) implies that the
statement continues at the first non-blank character of
the next line. The hyphen (-) implies the statement
continues on the first position of the next line.

For example: TITLE 1 'SAMPLE REP+


ORT '
prints SAMPLE REPORT
but: TITLE 1 'SAMPLE REP-
ORT'
prints SAMPLE REP ORT

SPECIAL CHARACTERS
* ( ) (parentheses) - Parentheses enclose multiple parameters. They also override
the arithmetic order of operations and logical IF/AND/OR
operations to force execution in a specified order

* * (asterisk) - The asterisk begins a comment statement. It must be the first


character in the statement. For example:

DEPT 1 1 N. *THIS IS A COMMENT

The first statement on this line defines the field DEPT. It ends with a period.
The asterisk begins the second statement, a comment.

NOTE: Spaces, apostrophes, periods, commas, parentheses and colons are


DELIMITERS and can NOT be used in LABELS and/or data names.

EZT+LIBRARY
EZT+ LIBRARY
FILE STATEMENT

All files and their associated fields (including any Working Storage items) used in
your EZT+ program MUST be described in the library section BEFORE they are
used in your program.

The FILE STATEMENT is used to define the beginning of your FILE (or
FILES) and the field names you are going to be processing.

The FILE STATEMENT initiates your EZT+ logic and follows the / / SYSIN
JCL statement.

The syntax for the FILE STATEMENT is . . . . . . .

/ / SYSIN DD *
FILE file-name VS UPDATE

FILE : This is a reserved keyword that marks the beginning of your FILE
DEFINITION.

file-name : This is a 1 - 8 character name describing the file that you wish to
define.

The file-name used MUST be unique in your program.

The file-name MUST also correspond to the file as it is defined in


the execution JCL.

VS : indicates that this is a VSAM file

UPDATE : indicates that the designated VSAM file can be updated.

NOTE: There are additional parameters available with the FILE STATEMENT,
they will be discussed when they are applicable.

NOTE: See additional FILE definition requirements in the sections on


SUMMARY FILES and the SORT ACTIVITY.

EZT+ LIBRARY
FIELD DEFINITION

An EZT+ field definition statement has four basic parts. Each part is separated
by at least one space. If more than one definition is on a line, they must be
separated by a period and a space. Those basic parts are the FIELD NAME, the
STARTING LOCATION, the FIELD LENGTH and the DATA FORMAT

FIELD NAME

* A field name which is 1 - to - 40 characters long and unique in a


particular file

STARTING LOCATION

* The beginning location of the field relative to the first position of the
record (for working storage, a W or S is placed in this position)

* Start-location can be explicitly defined relative to position one in the


record:

FILE file-name
NAME 1 17 (NAME begins in position 1)
ADDRESS 18 37 (ADDRESS begins in pos 18)
PAY-NET 55 10 (PAY-NET begins in pos 55)

* The start-location can be relatively defined as immediately following the


end of the previously defined field:

FILE file-name
FILLER1 * 5
NAME * 20 | All field-names MUST
FILLER2 * 5 | be defined when file
ADDRESS * 20 | is defined in this
FILLER3 * 5 | manner. This would include
PAY-NET * 20 FILLER also.

FIELD LENGTH

* The length of the field in bytes

* The length of the field has been added to our example below.

EZT+ LIBRARY
FIELD LENGTH (cont'd)

* EZT+ permits the programmer to define a segment of a data item if they so


desire, for instance; if they only wished to process fifteen (15) bytes of
the NAME field they could define the length as 15, rather than 33 bytes.
FILE file-name
NAME 17 15
ADDRESS 37 33
PAY-NET 90 4

DATA FORMAT

* The type of data (A, N, P, U, or B)


* A - Alphabetic or alphanumeric

* N - Zoned decimal

* P - Packed decimal

* U - Unsigned packed decimal

* B - Binary

* The EZT+ programmer defines the DATA Format of the data item they are
defining by adding the appropriate character AFTER the record length
parameter.

FILE file-name
NAME 17 33 A
ADDRESS 37 33 A
PAY-NET 90 4 P

The maximum size that is permitted for each DATA FORMAT is shown below . . . . .

Data Format Maximum Length Number of Decimal


Code (bytes) Positions
A 32,767 not valid
N 18 0 - 18
P 10 0 - 18
B 4 0 - 10
U 9 0 - 18

EZT+ LIBRARY
DECIMAL POSITIONS

For numeric data items, you can indicate the number of decimal places (0 - 18)
by adding the appropriate numeric value AFTER the data format value.

The use of the DECIMAL indicator also informs EZT+ that this data item will be
QUANTIFIED. This tells the EZT+ job that the accumulated value for the
designated data item will be automatically maintained and printed by EZT+ at
programmer defined control breaks. More will be said regarding this in the
REPORT ACTIVITY section on control breaks.

The use of the DECIMAL indicator also guarantees that a sign will be generated
for NEGATIVE values.

The addition of the numeric entry AFTER the definition of the PAY-NET field
accomplishes several things for the EZT+ programmer . . . . . . .

* it defines the PAY-NET field as having two (2) decimal fields

* it makes the data item QUANTITATIVE

* it will insure that a sign will be generated when it is appropriate

FILE file-name
NAME 17 33 A
ADDRESS 37 33 A
PAY-NET 90 4 P 2

SAMPLE OF A FIELD DEFINITION


A typical field definition looks like this:

GROSS - PAY 94 4 P 2
. . . . .
field name . . . . . . . . . . . . .
. . . .
starting location . . . . . . . . . . . . . . . . . .
. . .
field length . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
type (packed decimal) . . . . . . . . . . . . . . . . . . . . . . .
.
number of decimals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

EZT+ LIBRARY
REDEFINITION OF A FIELD NAME

Redefinition can occur in a FILE entry or in the Working Storage section of


your EZT+ program.

Explicit redefinition is done within the FILE ENTRY of the FIELD NAME
definition

- - - - - - > FILE ENTRY


DATE-OF-BIRTH 103 6 N
MONTH 103 2 N
DAY 105 2 N
YEAR 107 2 N

The redefinition in the FILE ENTRY is similar to the IMPLIED


redefinition in a COBOL program's FILE SECTION entry. Since the
DATE-OF-BIRTH entry has a specific starting location (103), the
REDEFINED fields will be coded AFTER the original entry and
will use the same storage locations as the original.

- - - - - -> WORKING STORAGE

W-HOLD-STA W 8 N
STATE W-HOLD-STA 2 N
TERR W-HOLD-STA +2 2 N
AGENCY W-HOLD-STA +2 4 N

With a Working-Storage item there is NO specific starting location.


Therefore, you use RELATIVE starting locations as well as
QUALIFIED data names to redefine the Working Storage entry.

* When QUALIFYING the redefined data item you simply add the
name of the object of the redefine AFTER the redefined
entry.

* The first redefined entry has NO relative starting location and the
EZT+ program assumes that it will start at the beginning of
the Working Storage item it is redefining.

* Subsequent redefined entries have RELATIVE starting locations


which are the sum of ALL previous record lengths.

EZT+ LIBRARY
EDIT MASK

* An edit Mask is a pattern specifying how numeric data is to be printed.


(Alphanumeric fields cannot have masks attached).

* The edit MASK allows you to format dollar signs (or other currency signs),
asterisks, dashes, and parentheses, into your output.

* An edit mask is created by using combinations of the following characters:

9 Formats digits.
Z Suppresses leading zeroes.
* Replaces leading zeroes with asterisk.
- Prints a minus sign prior to first non-zero digit of a negative number.
$ Prints a currency symbol prior to the first non-zero digit.

* Each digit in the field must be designated in the mask. This includes PACKED
fields. A data-item that is 9 (04) and packed will use a mask that contains seven
(7) characters because a four (4) byte packed data-item has seven (7) digits plus
the sign field . . . .

For example:

Mask Field Result


$$,$$9 01234 $1,234

The edit MASK is part of your field definition. All masks are defined as literals in single
quotes.

Syntax rules for EDIT MASKS

* The mask is part of the field definition

* Continuation characters MUST be coded if the MASK is NOT coded on the same
line as the field definition

* Multiple parameters coded with the MASK must be enclosed in parentheses.

EZT+ LIBRARY
EDIT MASK (cont'd)

Mask Examples

GROSS-PAY 94 4 P 2 +
MASK (G BWZ '$$,$$9.99-')

* The above field definition uses the plus-sign (+) to continue because the
MASK is on the next line.

* The mask parameters are enclosed in parentheses since there are MULTIPLE
(3) parameters.

* The mask value is enclosed in single quotes.

* The character 'G' names the mask. Subsequent data items may use the same
mask by simply coding the edit mask as follows. . . . . . .

NET-PAY 98 4 P 2 +
MASK (G)
NOTE: Any ALPHABETIC character (excluding 'Z') can be used to name
an edit mask

* The BWZ is an optional parameter for BLANK WHEN ZERO which will
zero suppress the whole field when the contents of the entire record are
ZEROES.

* The mask should contain the same number of characters as digits in the
field-name. The mask (defined above) has seven (7) characters in it due
to the fact that there are seven (7) digits in a PACKED four-byte data item.

* The negative sign at the end of the mask will print when the contents of the
data item are NEGATIVE.

EZT+ LIBRARY
HEADING

Report headings can be supplied in the field definition of a data item.

When NOT coded with the data item, the actual field name is used as a heading.

The heading can be specified by simply using the HEADING parameter of the field
definition. The HEADING parameter has several important features . . . . .

* The HEADING is a literal

* You can print multiple words on the same line by placing a space between
the words.

* By enclosing MULTIPLE literals within single quotes, you can stack and
center the headings above the appropriate column

* You can code up to ninety-nine (99) literals for each heading

EXAMPLES OF HEADING PARAMETERS

SOC-SEC-NUM 4 5 -
MASK '999-99-9999' -
HEADING ('SOCIAL' 'SEC NUM')

Now, in addition to having a mask for printing, there is an alternate column heading.
The headings as coded in the above example will print as shown here . . . . .

SOCIAL
SEC NUM
DEDUCTIONS W 4 P 2 -
MASK (G BWZ) -
HEADING ('PAYROLL DEDUCTIONS')

Here you have the working storage field DEDUCTIONS. The column heading for
PAYROLL DEDUCTIONS will print as shown below . . . . . .

PAYROLL DEDUCTIONS

EZT+ LIBRARY
WORKING STORAGE

Just as in COBOL, EZT+ Working Storage gives you a method for setting aside a
temporary area of storage to define data items used in processing logic that is
independent of FILE definitions.

EZT+ has two types of work fields:

* W fields - W fields are used mainly for additional report fields. They can also be
SEQUENCE fields.

* S fields - S fields are static fields used mainly for totaling and percentages.
They are not part of any VFM record.

Static fields (S-fields) are used to store accumulated values that are printed at the end of
a report or at a control break. Static fields do NOT go to the work file.

Non-static fields (W-fields) are output to the work file for every record in the input file.
Such a field used in accumulating totals will appear on the work-file. If the work file is
re-sequenced, the accumulated values will be unpredictable.

HOW TO CODE WORKING STORAGE

* Define working storage by specifying W or S as the start location:

WORK-NAME W 25 A HEADING ('EMPL' 'NAME')

WORK-DEDUCT W 4 P 2 MASK '$$,$$9.99 CR' +


HEADING 'DEDUCTIONS'
TOTAL-READS S 2 P 0 +
MASK 'ZZ9' +
HEADING ('TOTAL RECDS' 'READ')

* The VALUE option initializes the contents of a working storage field. Zeroes
(for numeric fields) or blanks (for alphabetic fields) are the defaults if no VALUE
is specified.

* The data can be any valid literal whose type matches that of the field being
initialized. For example,
CURR-MON W 10 A VALUE 'JANUARY'

EZT+ LIBRARY
WORKING STORAGE (cont'd)

* The RESET option when added to a Working Storage data item returns the W-
field to its original value whenever a record is retrieved in a JOB/SORT activity.

NOTE : EZT+ sets Working-Storage data-items to the appropriate values at the


beginning of execution.

NUMERICS - - - - - - - - - > set to ZEROES


ALPHA NUMERICS - - - > set to SPACES

Originally EZT would re-initialize Working-Storage data-items to their original value


when a new record was retrieved. This is no longer the case. Now you have two (2)
options available to you . . . . . .

** reinitialize in your program logic

** use the RESET option when defining a Working-Storage data item

EZT+ LIBRARY
COPY

* The COPY statement duplicates the field definitions of a named file.

* Unlimited number of COPY statements can be used with a file.

* The syntax is:

COPY file-name
record-name

* Because the same field-name can be used in more than one file, you must qualify
duplicate field names by adding the file-name in parentheses - such as FLD-ONE
(INTWO).

* Example:
FILE INONE
FLD-ONE * 1 A
FLD-TWO * 3 N
FILE INTWO
COPY INONE
JOB INPUT INTWO NAME COPY-EXAMPLE
IF FLD-ONE (INTWO) .......

ACTIVITY SECTION
ACTIVITY SECTION
The Job Activity begins with the JOB STATEMENT. The JOB STATEMENT defines
the primary input file and also activates AUTOMATIC FILE PROCESSING.

Command syntax

/ / SYSIN DD *
FILE file-name
.
.
JOB INPUT file-name NAME job-name

** INPUT : reserved word defining the primary input file

** file-name : primary input file

** NAME job-name : optional DOCUMENTATION information

DEACTIVATING AUTOMATIC FILE INPUT

JOB INPUT NULL NAME job-name

** NULL : deactivates AUTOMATIC FILE PROCESSING, requires the EZT+


programmer to code I/O command that is needed for record
retrieval

** EOF : because there is NO AUTOMATIC FILE PROCESSING, the EZT+


programmer MUST account for EOF. To check for an EOF
condition, you should code the following . . . . . . .

IF (NOT) EOF file-name


ACTIVITY SECTION
START AND FINISH PROCS

/ / SYSIN DD *
FILE file-name
data-names on file-name
.
.
.
Working-Storage entries
.
.
JOB INPUT file-name +
START proc-name1 +
FINISH proc-name2 +
NAME job-name

The optional START parameter identifies a procedure to be executed during the


initiation of the JOB.

EZT+ performs the procedure coded in proc-name-1 before it retrieves the first
automatic input record. A typical START procedure sets working storage fields to an
initial value or positions an indexed or keyed sequentially processed file to a specific
record. You cannot reference fields in automatic input files since no records have been
retrieved at this stage of processing.

The optional FINISH parameter identifies a procedure to be executed during the normal
termination of the JOB. After EZT+ processes the last automatic input record, it
performs the proc-name-2 procedure. A typical FINISH procedure displays control
information accumulated during the activity.

See USER PROCEDURE section for more information on the syntax of user procs.

VARIOUS I/O
COMMANDS
VARIOUS I/O COMMANDS
This section will cover a wide variety of commands that will be essential to the EZT+
programmer in organizing the logic that is necessary to construct an EZT+ program.

The statements to be covered are . . . . .


PRINT - which 'prints' an output record to the VFM file by activating
the designated REPORT ACTIVITY

DISPLAY - directs a 'literal' message and important programmer defined


values to a printer, it is somewhat similar to the COBOL
command

STOP - terminates an EZT+ JOB activity

PUT - places a record on a QSAM output file

GET - retrieves a record from an input file once the automatic record
retrieval feature of EZT+ has been turned off

POINT - 'points' to a record on a KEYED file this is somewhat similar


to the START command

READ - retrieves a record from a VSAM file

WRITE - writes a logical record to a designated VSAM file

VARIOUS I/O COMMANDS


PRINT STATEMENT

The PRINT Statement is necessary to select a record for output to a report.

Activates the report logic defined by the REPORT definition statements.

The result of a PRINT statement is data output to either a print file or a work file.

Syntax

PRINT report - name

Example:

IF REG = 25
PRINT RPT1
END - IF

Only records with REG = 25 are output to RPT1.

EZT+
program
print
VFM
printed output
-------------> ----------------->


resequencing
--------------------

* When EZT+ executes a PRINT statement, a detail line is 'placed' on the


intermediate VFM file.

* At EOF, the contents of the VFM are placed in the output queue; if
'resequencing' was requested it occurs at this time.

* ANY data item used in a SEQUENCE, CONTROL or LINE command will


be placed in the VFM

VARIOUS I/O COMMANDS


DISPLAY STATEMENT

The DISPLAY statement transfers data to the system output device (SYSPRINT).

SYNTAX

DISPLAY file-name1 NEWPAGE Literal - 2


SKIP integer - 1 Field-name - 1
+Integer - 2 HEX
-Integer - 2
COL
POS

file-name1

When file-name1 is specified, EZT+ prints data to the named file. If this
parameter is omitted, the default is SYSPRINT.

When used, file-name1 MUST be defined in the execution JCL and the
LIBRARY SECTION of your program.

NEWPAGE
A skip to a new page occurs before the data is printed.

SKIP literal - 1

Specifies that integer-1 number of lines are skipped before the data is printed.

Literal-2/Field-name-1

Code these items in the order you want them to appear on the report line.

Alphanumeric literals must be enclosed with apostrophes.

+Integer-2/-Integer-2

Modifies the horizontal spacing between display items on the report line.

Integer-2 is any item that does not extend beyond the end of the line.

VARIOUS I/O COMMANDS


DISPLAY STATEMENT (cont'd)

COL integer - 3

Specifies the print column number where EASYTRIEVE PLUS places the next
DISPLAY item.

Integer - 3 is any item that does not extend beyond the end of the line.

POS integer - 4

Within report procedures, this option causes the next DISPLAY data item to be
positioned under the corresponding integer - 4 item on the line 01 statement.

HEX

Produces a hexadecimal and character dump of the current record of the file, or
the specified field name

DISPLAY HEX cannot be used in report procedures

VARIOUS I/O COMMANDS

DISPLAY STATEMENT (cont'd)

E X A M P L E S O F D I S P L A Y S T A T E M E N T

* IF DEPT = 911
DISPLAY NEWPAGE POLICY SSN DATE-OF-BIRTH
END - IF

After ejecting to a new page, the values in POLICY, SSN, and DATE-OF-
BIRTH would be printed beginning in column 1 which is the default
position

E X A M P L E S O F D I S P L A Y S T A T E M E N T

* IF DEPT = 911
DISPLAY COL 7 '*** ERROR *** '
END - IF
- - - - + - - - - 1 - - - - + - - - - 2- - - - + - - - -3 - - - -+ - - - - 4 - - - - +- - - - 5 - - - -+ - - - -
6
*** ERROR ***

The default is overridden by the COL 7 parameter and the display value
(*** ERROR ***) starts displaying in column 7

E X A M P L E S O F D I S P L A Y S T A T E M EN T

* IF STATE = 34
DISPLAY SKIP 3 'THE STATE IS' STATE
END - IF

THE STATE IS 34

After skipping three lines, the information would be displayed as shown


above - - column 1 is the DEFAULT.

E X A M P L E S O F D I S P L A Y S T A TE M E N T

* DISPLAY HEX POLNUM


CHAR 2120182
ZONE FFFFFFF
NUMR 2120182
1. . . 5 . .
The above display provides the numeric and zoned numeric value that is
found in POLNUM

VARIOUS I/O COMMANDS


STOP STATEMENT

The STOP statement permits the EZT+ programmer to terminate an activity.


The syntax of the STOP statement . . .

Stop

* When coded alone in the above manner, the current JOB activity ends and
processing will start subsequent JOB activities if they are coded

Stop Execute

* When coded with the execute parameter, all EZT+ activities are terminated
including subsequent JOB activities.

NOTE : When using the NULL parameter to turn off automatic processing, you MUST
stop processing at EOF.

VARIOUS I/O COMMANDS


PUT COMMAND

The PUT command will 'write' a record to a sequentially defined output file.

Command syntax . . . . .

PUT OUTFILE (FROM file-name)

* OUTFILE is the designated output file as defined in the execution JCL and
the FILE ENTRY of your EZT+ program

* FROM file-name is an optional parameter that is like executing a move


BEFORE the PUT command. This is similar to COBOL processing.

Examples

JOB INPUT MASTIN


.
.
.
MOVE MASTIN TO MASTOUT
PUT MASTOUT

-OR-

PUT MASTOUT FROM MASTIN

NOTE : For VARIABLE-LENGTH output files, you MUST be aware of varying


record lengths. Use the EZT+ reserved word RECORD-LENGTH to
assign the proper length to the output file. See the following example . . .

PUT file-name1 : RECORD-LENGTH from file-name2

Set RECORD-LENGTH to the appropriate value before the PUT command

VARIOUS I/O COMMANDS


GET COMMAND

The GET command is used to retrieve the NEXT INPUT RECORD of the designated file
into the file input area.

The GET command requires the EZT+ programmer to 'turn off' the automatic record
retrieval aspect of EZT+ therefore you MUST code the NULL parameter of the JOB
STATEMENT (see the section on the JOB STATEMENT)

Since you no longer utilize the automatic data retrieval capability of EZT+, you MUST
test for EOF when using the GET command and STOP processing when EOF is reached
(see the JOB STATEMENT section for more information on the EOF check).

Command syntax . . .

GET file-name

* The file-name corresponds to the designated input file that is defined in the
FILE ENTRY.

NOTE : You may use the GET command with a secondary file even though automatic
processing is still active on the primary file.

VARIOUS I/O COMMANDS


POINT COMMAND

The point command is used to establish a starting point for sequential processing of a
KEYED file.

EZT+ does NOT require you to specify the length or location of the KEY item

The POINT command does NOT retrieve a record, it MUST be followed by a GET
command.

Since you are using the GET command to retrieve a record that has been 'pointed to', you
MUST turn off the automatic record retrieval function of EZT+ by coding the NULL
parameter on the JOB STATEMENT. (See JOB STATEMENT section for additional
information on EOF checking.)

Command syntax . . .

POINT file-name operator field-name STATUS

file-name - Keyed file (VSAM)

operator - relational operator can be = (EQ) or >= (GE)

field-name - any valid field-name or literal can be used as a KEY search


value

STATUS - sets system defined field (FILE-STATUS) to a numeric


value AFTER any I/O operation. Check FILE-
STATUS following any I/O operation to determine
the success or failure of the command, for
example:

IF VSAMFILE:FILE-STATUS NE O

See Appendix B for a list of common VSAM status values.

VARIOUS I/O COMMANDS


READ COMMAND

The read command provides for random access to KEY sequenced VSAM files

Command syntax :

READ file-name KEY field-name STATUS

file-name - KEYED file (VSAM)

field-name - any valid field-name or literal can be used as a KEY search


value

STATUS - sets system defined field (FILE-STATUS) to a numeric


value AFTER any I/O operation. Check FILE-
STATUS following any I/O operation to determine
the success or failure of the command. The FILE
STATUS for a VSAM file should be
qualified with the VSAM file name as shown below .
..

IF VSAMFILE:FILE-STATUS NE O
See Appendix B for a list of common VSAM status values.

VARIOUS I/O COMMANDS


WRITE COMMAND

The write command is used to ADD, UPDATE or DELETE records on a VSAM file

Command syntax :

WRITE file-name-1 operation FROM file-name-2 STATUS

file-name-1 - KEYED file (VSAM) being written

operation - ADD: used to write a new record to the VSAM file

UPDATE: used to alter an existing VSAM record

DELETE: used to remove an existing VSAM record


FROM file-name 2- is used to identify the record that is being ADDED,
UPDATED or DELETED on the VSAM file

NOTE : not used with the DELETE function

STATUS - sets system defined field (FILE-STATUS) to a numeric


value AFTER any I/O operation. Check FILE-
STATUS following any I/O operation to determine
the success or failure of the command. The FILE
STATUS for a VSAM file should be
qualified with the VSAM file name as shown
below. . . . .

IF VSAMFILE:FILE-STATUS NE O

NOTE : For VARIABLE-LENGTH output files, you MUST be aware of varying `


record lengths. Use the EZT+ reserved word RECORD-LENGTH to
assign the proper length to the output file. See the following example . . . . .

WRITE file-name1:RECORD-LENGTH ADD from file-name2

Set RECORD-LENGTH to the appropriate value before the WRITE


command

See Appendix B for a list of common VSAM status values.


IF STATEMENT
IF STATEMENT
* Data selection and processing in an EZT+ program takes place in the logic
section of your program

* 'Top-to-bottom' processing is the NORMAL flow in an EZT+ job.

* Processing in an EZT+ program can be altered by conditional IF statements


strategically placed in your logic.

* When an IF statement is present, each record read from the input file is processed
against this conditional statement.

* ELSE specifies alternative processing when condition set is not met

* Every IF statement must end with END-IF.

Command syntax . . .

EQ =
NE = field-two
IF field-one LT < literal
LE <= arithmetic expression
GT >
GE >=

Statements executed for true IF


ELSE
Statements executed for false IF
END-IF

* For true IF's, all commands up to the ELSE (or END-IF if no ELSE is present)
are executed.

* For false IF's, processing will execute all commands after the ELSE, up to the
END-IF. If no ELSE exists, processing will continue with the next statement.

IF STATEMENT
Examples:

* Compare the value in a field to:


* A literal:

IF DEPT = 910
IF NAME = 'SMITH'
IF AMT GE 500

NOTE: ALPHANUMERIC literals MUST be enclosed in single quotes.

* The value in another field:

IF DIV = HOLD - DIV

* A series of literals:

IF STATE = 'GA' 'SC' 'TN'


IF STATE NE 1, 3, 7, 9
IF CLASS = 'A' THRU 'E'
IF AMT NE 100 THRU 500
IF DEPT = 900 940 THRU 950 960 970 THRU 980

NOTE : EZT+ assumes the presence of AND/OR connectors

EQ conditions assumes the OR connector


NE conditions assumes the AND connector

Special Ifs

Examples:

ALPHABETIC
NUMERIC
SPACE
IF field-name NOT SPACES
ZERO
ZEROS
ZEROES

*Examples:

IF AMT NOT NUMERIC


IF NAME NOT SPACES
IF STATE ALPHABETIC
IF AMT-DUE ZERO

Note : The absence of equal signs (=) is by design. Their use with a FIGURATIVE
CONSTANT will cause an error. The use of the equal sign generates a B082
error indicating that the FIGURATIVE CONSTANT was NOT defined !!!!

IF STATEMENTS
Combining IF Statements

* You can combine any IF statements.

* All conditional expressions are considered one statement.

* AND statements are evaluated before ORs.

* Parentheses specify the order of evaluation.

Examples:

IF DIV = 'A' AND +


AMT GE 500 AND +
STATE = 'GA'

selects only records with

DIV = 'A' and AMT GE 500 and STATE = 'GA'

IF DIV = 'A' OR STATE = 'GA' AND AMT GE 500


selects only records with

DIV = 'A'
or
STATE = 'GA' and AMT GE 500.

IF (DIV = 'A' THRU 'F') +


OR ( ( AMT = 100 200) AND (STATE = 'IL) )
selects records with:

DIV = 'A' through 'F'


or
AMT = 100 and STATE = 'IL'
or
AMT = 200 and STATE = 'IL'

NOTE : Logical connectors are NOT assumed when combining IF statements as


shown in the above examples.

Nesting IF Statements

* Any IF format can be nested.


* Each IF statement can have any AND/OR logic and an ELSE statement.

* Each IF must have an END-IF.

Examples:

IF STATE NE 04 09
PREMIUM EQ PREMIUM * 1.15
ELSE
IF STATE EQ 04
PREMIUM EQ PREMIUM * 1.25
ELSE
IF STATE EQ 09
PREMIUM EQ PREMIUM * 1.10
ELSE
DISPLAY 'INVALID RISK STATE ' STATE
END-IF
END-IF
END-IF

NOTE : Just as in COBOL, the O/C programmer is discouraged from nesting more than
three (3) levels of IF statements.

DO WHILE
STATEMENT
DO WHILE STATEMENT
* The DO WHILE logic provide an automatic loop for repetitive program logic.

* They can be nested. (The inner logic loop must be completely within the outer
logic loop.)

* The DO WHILE logic must be terminated with the END-DO scope terminator.

* The logic between DO WHILE and END-DO is executed until a conditional


expression on the DO WHILE statement is false.

* This logic is useful for indexing.


* The EZT+ programmer MUST have control over the retrieval of records from the
input file, therefore AUTOMATIC INPUT PROCESSING must be 'turned off'
by using the NULL parameter on the JOB STATEMENT.

* Use the GET command to retrieve records (BEFORE and WITHIN the do
while loop)

* Use EOF check to terminate processing when reading the whole file

* Pre-sort your file when necessary - - - this is somewhat of an efficiency !!!!


DO WHILE/END-DO Example
...
JOB INPUT NULL NAME DO-EX-1
* GET FILENAME
* IF EOF FILENAME
* STOP
* END-IF
CTR = 0
DO WHILE CTR LT 10
CTR = CTR + 1
PERFORM ABC
PRINT RPT1
CALC = FLD * 1.3
DISPLAY CTR
* GET FILENAME
* IF EOF FILENAME
* STOP
* END-IF
END-DO
IF . . .
...
Nesting Example
...
JOB INPUT NULL NAME DO-EX-2
* GET FILENAME
* IF EOF FILENAME
* STOP
* END-IF
CTR1 = 0
DO WHILE CTR 1 LT 10
...
CTR 2 = 0
DO WHILE CTR2 LT 5
...
CTR2 = CTR2 + 1
* GET FILENAME
* IF EOF FILENAME
* END-IF
END-DO
..
CTR1 = CTR1 +1
* GET FILENAME
* IF EOF FILENAME
* END-IF
END-DO
...
* -- special processing considerations when using the Do While statement

GO TO
STATEMENT
GO TO STATEMENT
* GO TO branching logic allows you to modify the natural top-to bottom logic
flow in a program.

* Command syntax . . .

GO TO label
GO TO JOB

NOTE : The GO TO command can be coded as one or two words in EZT+

* GOTO label transfers control immediately to the first statement following the
named label statement. (The label statement must be in the same activity or
procedure.)

* GOTO JOB transfers control to the top of current JOB activity. This allows the
EZT+ programmer to bypass records that are NOT to be processed.

Example:

IF DEPT = 900 THRU 940


GO TO CHECK-DIV-RTN
else
go to job
END-IF
...
...
...
CHECK-DIV-RTN
IF . . .

NOTE : For information on the PARAGRAPH LABEL, see the section on EZT+
SYNTAX . . .

DATA
MANIPULATION
ASSIGNMENT STATEMENT
* The Assignment statement establishes a value in a field by copying from another
field or literal.

* The Assignment statement also accomplishes data conversion, such as packing or


unpacking data. This is the preferred method of doing data movement at OHIO
CASUALTY

* The value to the RIGHT of the equal sign (=) is the sending field while the data
item to the LEFT of the equal sign (=) is the receiving field in the A
ASSIGNMENT statement.

* Command syntax . . .
field -name-1 INTEGER = field-name-2
ROUNDED EQ literal
TRUNCATED arithmetic expression

* INTEGER ignores fractional components during ASSIGN

* ROUNDED rounds fractional components to LEAST SIGNIFICANT digit


when receiving field is SMALLER than sending field

* TRUNCATION drops extra (rightmost) characters when the receiving field


is SMALLER than the sending field

Examples:
HOLD-DIV = DIV
DEPT-NAME = 'ACCOUNTING DEPT'
SENDFLD W 5 N 2 VALUE (10.75)
RCVFLD W 5 N 1

Then: Result
RCVFLD INTEGER ROUNDED = SENDFLD 11.0
RCVFLD INTEGER TRUNCATED = SENDFLD 10.0
RCVFLD INTEGER = SENDFLD 10.0
RCVFLD ROUNDED = SENDFLD 10.8
RCVFLD TRUNCATED = SENDFLD 10.7
RCVFLD = SENDFLD 10.7

NOTE : The use of FIGURATIVE CONSTANTS causes an EZT+ error with the
assign function (B082) . . .
field-name-1 = SPACES
is an invalid statement . . . . . . . . . . . . . .
MOVE STATEMENT
* The MOVE statement transfers data from one location to another

* You can move a field or a literal to a record or a field.

* A sending field longer than a receiving field is truncated on the right.

* A longer receiving field is padded on the right with spaces.

* Length may be overridden on the statement.

* Spaces or zeroes can be moved to one or many fields.

Command syntax . . .

Format 1

MOVE data-name-1 send-length TO data-name-2

receive-length FILL literal

* Data-name-1 is the sending field. It can be a file-name, field-name or literal

* Send-length is a numeric value limiting the number of bytes sent to the


receiving item.

MOVE DATA-NAME-1 15 (sends the first fifteen (15) bytes of


DATA-NAME-1 to the
receiving item.)

* Data-name-2 is the receiving field. It can be a file-name or a field-name.

* Receive-length is a numeric value limiting the number of bytes received by


the receiving item.

. . . to DATA-ITEM-2 10 (receives the first ten (10) bytes of


the sending field)

* The FILL parameter allows the programmer to FILL a larger receiving field
with a designated literal value.

. . . to DATA-ITEM-2 FILL '*'(will FILL remaining space in DATA-


ITEM-2 with asterisks.)
MOVE STATEMENT
Command syntax . . .

Format 2

SPACE
SPACES
MOVE ZERO TO field-name . . .
ZEROS
ZEROES

Examples:

MOVE ZEROS TO AMT

MOVE ZEROS TO AMT, AMT-HOLD

MOVE SPACES TO NAME, HOLD-NAME, HOLD-DIV

MOVE NAME TO HOLD-NAME FILL '*'

* Moving spaces or zeroes is useful for initializing fields.

* Because no data conversion is done when moving data of one format to


another, the MOVE statement is not the preferred method of data
movement at OHIO CASUALTY.

ARITHMETIC OPERATIONS
* There are four arithmetic operations in EZT+:

* multiplication
/ division
+ addition
- subtraction

* Multiplication and division are performed before addition and subtraction.

* Parentheses can be used to override the normal order of operation.

* Any level of parentheses nesting is allowed; operation proceeds from the


innermost level to the outermost.

Command syntax . . .

FIELD NAME INTEGER ROUNDED = Arithmetic expression


TRUNCATED

FIELD-NAME: Resultant field


INTEGER: Ignores the fractional portion of the value being assigned. Causes
only the numerics to the left of the decimal point to be moved to
the resultant field.

ROUNDED: Used when the resultant field is too small to handle the fractional
result of the assignment. ROUNDED rounds off the fractional
result of the assignment statement. This eliminates the need for
the EZT+ programmer to have to add a 'rounding factor' to the
resultant field.

ARITHMETIC OPERATIONS
Examples:

RESULT = GROSS - AMT * 1.3

* * multiplication is performed FIRST then the subtraction

RESULT = (GROSS - AMT) * 1.3

* * the PARENTHESES alters the calculation sequence so that the subtraction is


done first then the multiplication

RESULT = 1.3 * (GROSS - (AMT + DEDUCT)

ARITHMETIC OPERATIONS
Examples using ROUNDED and INTEGER

PREMIUM ROUNDED EQ PREMIUM * 1.05

* * causes the calculation to round the INTERMEDIATE field to the LEAST


SIGNIFICANT digit before storing results in the PREMIUM field

PREMIUM INTEGER EQ PREMIUM * 1.05

* * causes the fractional components (if any) to be dropped from the


INTERMEDIATE field when results are stored in the PREMIUM field

PREMIUM INTEGER ROUNDED EQ PREMIUM * 1.05

* * rounds the value in the INTERMEDIATE field and then drops any fractional
components when stored in the receiving field

PREMIUM EQ PREMIUM * 1.05 + .005


* * old version of ROUNDING - - adding .005 to calculation is the same as
ROUNDING

the zeroes indicate the number of decimal values that are in the receiving
field

CALL
STATEMENT
CALL STATEMENT
At OHIO CASUALTY, we have several pre-written programs which accomplish certain
tasks, thus reducing duplicate programs, as well as redundancy of code.

To invoke these routines from an EZT+ program, the CALL statement must be used.

Command syntax . . .

CALL program-name USING (field1 field2) RETURNS field4

Program-name: The program-name is the name of the subprogram to be invoked.

USING: The USING clause specifies the parameter list to be passed to the
subprogram.

NOTE : Be sure to enclose the parameter list in parentheses!!!

Field1: Field1 (etc) identifies either a system-defined field or a


working-storage field. A maximum of 64 fields can be
specified on the parameter list. The parameter list specified on
the USING clause is dependent upon the subprogram
invoked.

RETURNS: Identifies a numeric field which contains the return - code passed
by a called subprogram.

If a COBOL module has been called, the return-code value is the


value in the COBOL return-code special register

Field4: A 2-byte binary field which will contain the RETURNED value
USER
PROCEDURES
USER PROCEDURES
* A user-PROC is a group of user-written EZT+ statements designed to accomplish
a task.

* Code a PROC at the end of the activity in which it is invoked. All logic-related
procs must appear at the end of the JOB activity, before the REPORT ACTIVITY

* A USER proc is:

* Identified by a PROC-name one to 40 characters in length beginning with a letter.

* Delimited by the PROC keyword at the beginning and the END-PROC keyword
at the end.

proc-name PROC proc-name


. . . statements (or) PROC
END-PROC . . . statements
END-PROC

PERFORM STATEMENT

* PROCS are executed only when PERFORMed

Command syntax . . .
PERFORM proc-name

* At END-PROC, control is returned to the statement following PERFORM.

Example:
IF CODE = 1
PERFORM CODE1-RTN
ELSE
PERFORM CODE2-RTN
END-IF
...
...
CODE1-RTN. PROC
...
END-PROC
CODE2-RTN. PROC
...
END-PROC

REPORT ACTIVITY
REPORT ACTIVITY
The REPORT statement is the first statement in your report definition and should be
coded at the end of the JOB ACTIVITY. It establishes the type and characteristics of the
report. You have numerous options to choose from but most reports will use the default
parameter values.

Statement syntax

REPORT report-name

* * report-name is the EXACT same as coded on the PRINT command

* * additional parameters (coded AFTER the REPORT statement) are available


to the EZT+ programmer in order that they can customize the printed
OUTPUT. These parameters are:

* * SEQUENCE - - sorts final OUTPUT

* * CONTROL -- provides CONTROL breaks in final OUTPUT

* * SUM -- specifies QUANTITATIVE fields printing on the total


line

* * TITLE -- defines desired TITLE lines

* * HEADING -- overrides HEADINGS coded in LIBRARY

* * LINE -- defines content of DETAIL lines

These commands give substance to your report and will be discussed in subsequent
topics in this unit of the EZT+ manual.

REPORT ACTIVITY
Listed below are various special options that are available with the REPORT
ACTIVITY.

. REPORT report-name
. PAGESIZE nn
. LINESIZE nn
. SKIP nn
. SPACE nn
. TITLESKIP nn
Spacing . SPREAD
Control . . . . . . . NOSPREAD
Parameters . NOADJUST
. NODATE
. NOPAGE
. NOHEADING

File . FILE file-name


Directing . . . . . . PRINTER file-name
Parameters .

. EVERY
. DTLCTL FIRST
. NONE
.
. ALL
Format . SUMCTL HIAR DTLCOPY
parameters . . . . . NONE
.
. SUMMARY
. SUMSPACE n
. TALLYSIZE n
. SUMFILE file-name
. LABELS ACROSS nn DOWN nn SIZE nn

Testing . LIMIT literal-1


Aid . . . . . . . . . . . EVERY literal-1
Parameters .
REPORT ACTIVITY
SPACING PARAMETERS

* PAGESIZE - lines per page (default is 58).

* LINESIZE - length of each line (default is 132 print positions).

* SKIP - number of blank lines to be inserted between line


groups (default is 0).

* SPACE - number of blanks inserted between field columns and


between fields and literals in title lines (default is
3).
* TITLESKIP - number of blank lines inserted after last title line
before first heading or detail lines (default is 3).

* SPREAD - requests that the columns of data be spread evenly


over the entire line, overrides the SPACE parameter
(default is NOSPREAD).

* NOADJUST - requests that the title lines and report be left - justified
on the page. The default is for the report to be
centered on the page. SPREAD and
NOADJUST are mutually exclusive.

* LIMIT - Limits the number of records processed by the report.

* EVERY - specifies that only every Nth line is printed in the


report. 'N' has a valid range of 1 - 32,767.

* Most simple reports use defaults so the parameters do not need to be coded.

REPORT ACTIVITY
SUPPRESSION PARAMETERS

* NODATE prevents SYSDATE from printing in positions 1 - 8 of the first title


line.

* NOPAGE prevents page numbers from printing at the end of the first title line.

* NOHEADING prevents column headings from being printed.


REPORT ACTIVITY
FILE DIRECTING PARAMETERS

* The FILE Parameter

* Identifies a work file

* Is used when a report is too large for the default work file

* The PRINTER Parameter

* Directs the report's printed output to a different file.

* Default is SYSPRINT/SYSLST.

REPORT ACTIVITY
TESTING AID PARAMETERS

* LIMIT - limits the number of records processed by the report. Has a valid
range of 1 - 32,767. exclusive.

* EVERY - specifies that only every Nth line is printed in the report. 'N'
can have a value of 1 - 32,767.

***********************************************************************
*

Example of the REPORT STATEMENT

REPORT REPT1 PAGESIZE 59 NODATE NOPAGE SPREAD LINESIZE 70 +


TITLESKIP 4 LIMIT 50

** PAGESIZE - overrides EZT+ default and prints 59 lines to the page

** NODATE - suppresses printing the DATE on title line

** NOPAGE - suppresses printing the PAGE on title line

** SPREAD - spreads columns of data EVENLY over the line

** LINESIZE - alters length of line to 70 print positions

** TITLESKIP - prints 'n' lines between title and first line

** LIMIT - processes 'n' number of records

NOTE : The sequence of options used on the REPORT STATEMENT can vary.

REPORT ACTIVITY
REPORT DEFINITION STATEMENTS

* Report definition statements define the contents of the report.

* All report definition statements are optional.

* Report definition statements must be coded immediately after the REPORT


statement, in the following order:

SEQUENCE

CONTROL
SUM

TITLE

HEADING

LINE

* Report definition statements must be coded in the above ORDER when multiple
statements are used.

* If coded in a sequence other than that shown above, EZT+ generates a B014 error
- - unable to recognize statement.

REPORT ACTIVITY
SEQUENCE STATEMENT

* Sequencing occurs AFTER all records have been processed and your INPUT file
has reached EOF. The intermediate file (VFM) where records are written by the
PRINT command is resequenced according to your specifications. The sorted
output file is then directed to the appropriate output device.

* Any field, with the exception of 'S' working storage, referenced in a REPORT
subactivity is written to the work file.

NOTE : this includes the SEQUENCE, CONTROL and LINE commands

* You can sequence any field from any input file or any W working storage field.

* Sequence on as many fields as your system sort will allow. Sequence fields are
entered in major to minor order.

* Default is ascending unless D follows the field-name.

* The syntax is:

SEQUENCE field-name1 D field-name2 D

* Examples:

SEQUENCE CO DIV DEPT GROSS-PAY D

SEQUENCE GROUP AMT D CODE

REPORT ACTIVITY
CONTROL STATEMENT

* A CONTROL statement specifies that a BREAK should occur whenever the


value of a CONTROL field changes or an EOF condition is reached.

* The CONTROL statement also specifies that a report should automatically


accumulate and print totals for all data items that are defined as
QUANTITATIVE. See the section on DECIMAL POSITIONS for more
information on QUANTITATIVE fields.

* Control can be any nonquantitative field from any input file or on any W working
storage field. Quantitative fields will cause an EZT+ error when used on a
CONTROL statement.

* You can specify an unlimited number of control fields.

* Fields are coded on the CONTROL statement in a major to minor order.

* The syntax is . . . . .

CONTROL FINAL field-name(s) NOPRINT NEWPAGE RENUM

* Final totals are automatically provided. You can alter the default by coding
FINAL NOPRINT.

* NOPRINT following any field or FINAL causes totals (which have been
accumulated) not to print at the control break.

* NEWPAGE following any field or FINAL causes a new page after the control
break totals are printed (or, in the case of FINAL, before final totals are printed).
Page numbers continue.

* RENUM following any field or FINAL causes a new page with page numbers
beginning at 1 after the control break totals are printed.

* Examples:

CONTROL CO RENUM DIV DEPT NOPRINT

CONTROL FINAL NOPRINT CO NEWPAGE DIV

REPORT ACTIVITY
TALLY

** reserved word that counts the number of detail lines within a Control Break
** can be used ONLY with control processing and can be printed on total lines by
coding the TALLY option on the LINE statement

TALLY SAMPLE

FILE PRIMER
EMPNO 9 5 N
NAME 17 8 A
NET 90 4 P 2
GROSS 94 4 P 2
DEPT 98 3 n
JOB INPUT PRIMER

EZT+ LOGIC

REPORT REPORT 1
SEQUENCE DEPT
CONTROL DEPT
TITLE 01 'NUMBER OF EMPLOYEES PER DEPARTMENT'
LINE 01 DEPT NAME TALLY

7/03/63 NUMBER OF EMPLOYEES PER DEPARTMENT

DEPT NAME TALLY


911 LEE
MEADE
STUART
SICKLES
PICKET
911 5

912 DAVIS
COBB
BENJAMIN

REPORT ACTIVITY
FORMAT DETERMINATION PARAMETERS - - DTLCTL

* DTLCTL determines when control field values are printed on detail lines:

* EVERY detail line (prints all control fields on every detail line)

* FIRST detail line (prints all control fields on the first detail line at top-of-
page and after each break. This is also the default.
* NONE (prints no control fields on detail lines)

REPORT ACTIVITY
EXAMPLE OF DTLCTL FIRST

REPORT REPT1 LINESIZE 80 DTLCTL FIRST


CONTROL REGION BRANCH
TITLE 1 'EASYTRIEVE PLUS CONTROL EXAMPLE'
LINE 1 REGION BRANCH STATUS NAME NET

8/22/85 DLTCTL FIRST SAMPLE

EMPLOYEE
REGION BRANCH STATUS NAME
NET PAY
------> 5 02 M WARD
141.47 M
ZOLTAN 25.00
5 02
166.47

-------> 5 03 M JONES
560.63
S HAFER 96.64
M JUDAR 459.57
M WALTERS 282.45
M RYAN 291.70
5 03
1690.99

5
1857.46

NOTE : The region and branch ONLY print on the FIRST detail line in a group of
detail lines
REPORT ACTIVITY
EXAMPLE OF DTLCTL EVERY

REPORT REPT1 LINESIZE 80 DTLCTL EVERY


CONTROL REGION BRANCH
TITLE 1 'EASYTRIEVE PLUS CONTROL EXAMPLE'
LINE 1 REGION BRANCH STATUS NAME NET
8/22/85 DTLCTL EVERY SAMPLE

EMPLOYEE
REGION BRANCH STATUS NAME NET PAY
-----> 5 02 M WARD
141.47
-----> 5 02 M ZOLTAN 25.00
5 02 166.47

-----> 5 03 M JONES 560.63


-----> 5 03 S HAFER 96.64
-----> 5 03 M JUDAR 459.57
-----> 5 03 M WALTERS 282.45
-----> 5 03 M RYAN 291.70
5 03 1690.99

5 1857.46

NOTE : Control fields (region and branch) print on all the detail lines (as well as
on the CONTROL line)
REPORT ACTIVITY
EXAMPLE OF DTLCTL NONE

*
REPORT REPT1 LINESIZE 80 DTLCTL NONE
CONTROL REGION BRANCH
TITLE 1 'EASYTRIEVE PLUS CONTROL EXAMPLE'
LINE 1 REGION BRANCH STATUS NAME NET
*

8/22/85 DTLCTL NONE SAMPLE

EMPLOYEE
REGION BRANCH STATUS NAME NET PAY
M WARD 141.47
M ZOLTAN 25.00
5 02
166.47

M JONES 560.63
S HAFER 96.64
M JUDAR
459.57
M WALTERS 282.45
M RYAN 291.70
5 03
1690.99

5 1857.46

NOTE : Control fields (region and branch) do NOT print on the detail lines
ONLY on the CONTROL LINES.

REPORT ACTIVITY
FORMAT DETERMINATION PARAMETERS - - SUMCTL

* SUMCTL determines when control field values are printed on total lines.

* ALL control fields are printed on all total lines.

* HIAR prints all fields (MAJOR and MINOR) when a minor control break occurs
but prints ONLY the MAJOR field when the MAJOR break occurs.

* NONE prints no control field values on total lines.

* TAG prints the control field name and the literal 'TOTAL' on the left side of the
report for total lines.

* DTLCOPY prints values from detail lines on total lines when using the
SUMMARY option on the REPORT STATEMENT.
REPORT ACTIVITY
FORMAT DETERMINATION PARAMETERS - - SUMCTL ALL

27 REPORT CTLRPT3 LINESIZE 92 DTLCTL NONE SUMCTL ALL


28 SEQUENCE REGION MARITAL - STAT BRANCH EMP # D
29 CONTROL FINAL NEWPAGE REGION MARITAL-STAT
30 TITLE 1 'EASYTRIEVE PLUS CONTROL EXAMPLE THREE'
31 TITLE 3 'NOTICE THE CONTROL BREAK FIELDS'
32 TITLE 4 'AND CONTROL BREAK LINES'
33 LINE 1 REGION BRANCH MARITAL-STAT EMP # GROSS NET DEDUCTIONS

* OUTPUT ON NEXT PAGE


REPORT ACTIVITY
FORMAT DETERMINATION PARAMETERS

1/16/84 SUMCTL ALL SAMPLE

NOTICE THE CONTROL BREAK FIELDS


AND CONTROL BREAK LINES
MARITAL EMPLOYEE GROSS NET
REGION BRANCH STATUS NUMBER PAY PAY
DEDUCTIONS

02 11473 759.20 547.88 211.32


04 11467 396.68 259.80 136.88
1 M 1,155.88 807.68
348.20

01 12267 373.60 251.65 121.95


01 02200 804.64 554.31 250.33
02 00370 554.40 340.59 213.81
03 11602 344.80 250.89
93.91
03 02688 146.16 103.43
42.73
04 11931 492.26 355.19 137.07
04 11357 283.92 215.47 68.45
04 01963 445.50 356.87 88.63
1 S 3,445.28 2,428.40
1,016.88

1 S 4,601.16 3,236.08
1,365.08

01 11376 360.80 223.71 137.09


02 03571 242.40 182.09 60.31
03 04234 386.40 283.19 103.21
03 03416 13.80 13.19 .61
05 04225 295.20 230.50 64.70
05 01895 279.36 189.06 90.30
2 M 1,577.96 1,121.74
456.22

NOTE : Both control fields (region and marital status) are printing on the
control line.
REPORT ACTIVITY
FORMAT DETERMINATION PARAMETERS - - SUMCTL HIAR
27 REPORT CTLRPT4 LINESIZE 92 DTLCTL NONE SUMCTL HIAR
28 SEQUENCE REGION MARITAL-STAT BRANCH EMP # D
29 CONTROL FINAL NEWPAGE REGION MARITAL-STAT
30 TITLE 1 'EASYTRIEVE PLUS CONTROL EXAMPLE FOUR'
31 TITLE 3 'NOTICE THE FOLLOWING VARIABLE TITLE INFORMATION'
32 TITLE 5 'THIS PAGE CONTAINS INFORMATION ABOUT'
33 TITLE 6 'REGION:' REGION
34 LINE 1 REGION BRANCH MARITAL-STAT EMP# GROSS NET DEDUCTIONS

FORMAT DETERMINATION PARAMETERS - - SUMCTL HIAR

1/16/84 SUMCTL HIAR SAMPLE


MARITAL EMPLOYEE GROSS NET
REGION BRANCH STATUS NUMBER PAY PAY DEDUCTIONS

02 11473 759.20 547.88


211.32
04 11467 396.68 259.80
136.88
1 M 1,155.88 807.68
348.20

01 12267 373.60 251.65


121.95
01 02200 804.64 554.31
250.33
02 00370 554.40 340.59
213.81
03 11602 344.80 250.89
93.91
03 02688 146.16 103.43
42.73
04 11931 492.26 355.19
137.07
04 11357 283.92 215.47
68.45
04 01963 445.50 356.87
88.63
1 S 3,445.28 2,428.40
1,016.88

1 4,601.16 3,236.08
1,365.08

1/16/84 SUMCTL HIAR SAMPLE

MARITAL EMPLOYEE GROSS NET


REGION BRANCH STATUS NUMBER PAY PAY DEDUCTIONS

01 11376 360.80 223.71


137.09
02 03571 242.40 182.09
60.31
03 04234 386.40 383.19
103.21
03 03416 13.80 13.19
.61
05 04225 295.20 230.50
64.70
2 M 1,577.96 1,121.74
456.22

NOTE : MAJOR break ONLY prints the major (REGION) field.


MINOR break (or EOF) prints all control fields.

REPORT ACTIVITY
FORMAT DETERMINATION PARAMETERS - - SUMCTL NONE

27 REPORT CTLRPT 4 LINESIZE 92 DTLCTL FIRST SUMCTL NONE


28 SEQUENCE REGION MARITAL-STAT BRANCH EMP# D
29 CONTROL FINAL NEWPAGE REGION MARITAL-STAT
30 TITLE 1 'EASYTRIEVE PLUS CONTROL EXAMPLE FOUR'
31 TITLE 3 'NOTICE THE FOLLOWING VARIABLE TITLE INFORMATION'
32 TITLE 5 'THIS PAGE CONTAINS INFORMATION ABOUT'
33 TITLE 6 'REGION:' REGION
34 LINE 1 REGION BRANCH MARITAL-STAT EMP # GROSS NET DEDUCTIONS

FORMAT DETERMINATION PARAMETERS - - SUMCTL NONE

1/16/84 SUMCTL NONE SAMPLE

MARITAL EMPLOYEE GROSS NET


REGION BRANCH STATUS NUMBER PAY PAY DEDUCTIONS

1 02 M 11473 759.20 547.88


211.32
04 11467 396.68 259.80
136.88
1,155.88 807.68
348.20

1 01 S 12267 373.60 251.65


121.95
01 02200 804.64 554.31
250.33
02 00370 554.40 340.59
213.81
03 11602 344.80 250.89
93.91
03 02688 146.16 103.43
42.73
04 11931 492.26 355.19
137.07
04 11357 283.92 215.47
68.45
04 01963 445.50 356.87
88.63
3,445.28 2,428.40
1,016.88

4,601.16 3,236.08
1,365.08

NOTICE : The Control Fields print is suppressed when the NONE subparameter is used
with the SUMCTL parameter.
FORMAT DETERMINATION PARAMETERS - - SUMCTL TAG

26 *
27 REPORT CTLRPT 2 LINESIZE 92 DTLCTL FIRST SUMCTL TAG
28 SEQUENCE REGION MARITAL-STAT BRANCH EMP# D
29 CONTROL REGION MARITAL-STAT
30 TITLE 1 'EASYTRIEVE PLUS CONTROL EXAMPLE TWO'
31 TITLE 3 'NOTICE THE CONTROL BREAK FIELDS'
32 TITLE 4 'AND CONTROL BREAK LINES'
33 LINE 1 REGION BRANCH MARITAL-STAT EMP# GROSS NET DEDUCTIONS

*OUTPUT

1/16/84 EASYTRIEVE PLUS SUMCTL TAG SAMPLE PAGE 1

NOTICE THE CONTROL BREAK FIELDS


AND CONTROL BREAK LINES

MARITAL EMPLOYEE GROSS NET


REGION BRANCH STATUS NUMBER PAY PAY DEDUCTIONS

1 02 M 11473 759.20 547.88


211.32
04 11467 396.68 259.80
136.88
MARITAL-STAT TOTAL 1,155.88 807.68
348.20

1 01 S 12267 373.60 251.65


121.95
01 02200 804.64 554.31
250.33
02 00370 554.40 340.59
213.81
03 11602 344.80 250.89
93.91
03 02688 146.16 103.43
42.73
04 11931 492.26 355.19
137.07
04 11357 283.92 215.47
68.45
04 01963 445.50 356.87
88.63
MARITAL-STAT TOTAL 3,445.28
2,428.40 1,016.88

REGION TOTAL 4,601.16 3,236.08


1,365.08

2 01 M 11376 360.80 223.71


137.09
02 03571 242.40 182.09
60.31
03 04234 386.40 383.19
103.21
05 03416 13.80 13.19
.61
05 04225 295.20 230.50
64.70
05 01895 279.36 189.06
90.30
MARITAL -STAT TOTAL 1,577.96 1,121.74
456.22

NOTE : The system-generated TAGS are printed on all total lines. The values
found on the TAGS come from the actual field-names.

REPORT ACTIVITY

SUMMARY OPTION

Summary is a report parameter that causes the report name on the PRINT command to
print as a SUMMARY report.

Summary reports consist of

* * control fields and totals of quantitative fields

* * NO detail information - - all detail fields are suppressed.

DTLCOPY option

Adding some detail information to a SUMMARY report can add to a report's readability.

DTLCOPY option will copy detail information at a CONTROL break and place this data
on the TOTAL LINE. It will enhance a SUMMARY report's appearance.

See next examples . . . .


REPORT ACTIVITY
SUMMARY WITHOUT SUMCTL DTLCOPY

/ / SYSIN DD *
FILE PRODDOC
STA 27 8 N +
HEADING ('STATE' 'TERRITORY' 'AGENCY') +
MASK ('99-99-9999')
TOTALPREM 619 4 P 2 +
HEADING ('TOTAL' 'RATED' 'PREMIUM') +
MASK ('$$,$$$.99-')
AGENTNAME 2358 33 A +
HEADING ('NAME OF' 'THE AGENT')
JOB INPUT PRODDOC
PRINT PREMTOTS
REPORT PREMTOTS SUMMARY
SEQUENCE STA
CONTROL STA
TITLE 1 'SUMMARY PREMIUM TOTAL BY STA'
TITLE 3 'NOT USING THE DTLCOPY OPTION OF SUMCTL'
LINE 1 AGENTNAME AGENTADDR STA TOTALPREM

SUMMARY PREMIUM TOTAL BY STA


NOT USING THE DTLCOPY OPTION OF SUMCTL

NAME OF ADDRESS OF STATE TOTAL


THE AGENT THE AGENT TERRITORY RATED
AGENCY PREMIUM

04-10-0500 $677.66
09-00-1359 $693.82

NOTE : Without the DTLCOPY option, only the QUANTITATIVE fields and the
CONTROL field print on the SUMMARY report.

REPORT ACTIVITY
SUMMARY WITH SUMCTL DTL COPY

/ / SYSIN DD *
FILE PRODDOC
STA 27 8 N +
HEADING ('STATE' 'TERRITORY' 'AGENCY') +
MASK ('99-99-9999')
TOTALPREM 619 4 P 2 +
HEADING ('TOTAL' 'RATED' 'PREMIUM') +
MASK ('$$,$$$.99-')
AGENTNAME 2358 33 A +
HEADING ('NAME OF' 'THE AGENT'
AGENTADDR 2391 33 A +
HEADING ('ADDRESS OF' 'THE AGENT')
JOB INPUT PRODDOC
PRINT PREMTOTS
REPORT PREMTOTS SUMMARY SUMCTL DTLCOPY
SEQUENCE STA
CONTROL STA
TITLE 1 'SUMMARY PREMIUM TOTAL BY STA'
TITLE 3 'NOT USING THE DTLCOPY OPTION OF SUMCTL'
LINE 1 AGENTNAME AGENTADDR STA TOTALPREM

SUMMARY PREMIUM TOTAL BY STA


USING THE DTLCOPY OPTION OF SUMCTL

NAME OF ADDRESS OF STATE TOTAL


THE AGENT THE AGENT TERRITORY RATED
AGENCY PREMIUM

MORRIS AGENCY INC. 130 MAIN ST 04-10-0500 $677.66


ADAMS AGENCY INC. 238 BROWN ST. 09-00-1359 $693.82

NOTE : By using the DTLCOPY option, the detail items print along with the
QUANTITATIVE fields and the CONTROL field print on the SUMMARY
report.

REPORT ACTIVITY
SUM STATEMENT

* The SUM statement is used in conjunction with CONTROL.

* SUM explicitly specifies the fields to be totaled in a report. It overrides the


normal totaling processing.

* You can SUM any quantitative field from any active file or any W field.

* The syntax is:

SUM quant-fld-1 quant-fld-2 . . . . . .

* Example:

REPORT RPT1
SEQUENCE CO DIV
CONTROL CO DIV
SUM GROSS NET
TITLE 1 'TOTAL YTD REPORT'
HEADING EMP-NO ('EMP' 'NO')
LINE 1 CO DIV EMP-NO GROSS NET DEDUCTIONS
REPORT ACTIVITY
TITLE STATEMENT

* The TITLE statement defines the optional report title.

* Up to 99 titles are allowed.

* You can specify literal and/or variable title items.

* Syntax

TITLE NN field-name
literal
nn
COL XX

* NN indicates the Title line.

* nn is used to alter the normal spacing between literals or fields on the


title lines. nn spaces are added to or subtracted from the SPACE
parameter (default of 3).

* COL XX specifies the print column number where the next title item is
to begin. If you specify COL XX, you must also specify
NOADJUST on the REPORT statement.

* Examples:

TITLE 1 'REPORT ONE'


TITLE 3 'THIS PAGE FOR DIV' - 2 DIV-NO
TITLE 4 'ABC COMPANY'

REPORT ACTIVITY

HEADING STATEMENT

* The optional HEADING statement defines an alternative heading for a field

* Use one HEADING statement per field.

* You can specify up to 99 subheadings per field.

* A heading coded on the HEADING statement overrides a heading coded in the


library portion of the program.

* The syntax is:


HEADING field-name ('literal' . . . . )

* Examples:

HEADING EMP-NO ('EMP' 'NO')

prints a column heading on the report that looks like

EMP
NO

HEADING SSN ('SOCIAL' 'SECURITY' 'NUMBER')

prints the column heading

SOCIAL
SECURITY
NUMBER

REPORT ACTIVITY

LINE STATEMENT

* Defines the content of a report line.

* Up to 99 lines per record.

* You can specify any field in an input file or in working storage.

* The syntax is

LINE NN field-name
literal
nn
POS n
COL n

* Literals will print on all lines.

* nn is used to alter the normal spacing between line items. nn is added


to or subtracted from the SPACE parameter (default of 3).

* POS provides for aligning fields under the corresponding field positions
on LINE 1 statements.

*COL nn specifies the print column number where the next line item is
to begin. If you specify COL nn, you must also specify
NOADJUST on the REPORT statement.
* Examples:

LINE 1 DEPT DIV NAME


LINE 3 POS 2 CODE POS 3 ADDRESS
LINE 4 POS 3 CITY

prints the field's contents in the following format:

DEPT DIV NAME

CODE ADDRESS
CITY

REPORT ACTIVITY
MULTIPLE REPORTS

To produce more than one report in one pass of your input file, EZT+ uses different
PRINT statements in one JOB activity.

The processing flow for an EZT+ program looks like this:

V F M

EASYTRIEVE RPT1
PAYROLL= = = > PLUS = = => . . . = = =>SEQUENCE = =
=>REPORT
STATEMENTS RPT2 (1)

V F M

REPORT
RPT2 = = = = = = => (2)

How is the Virtual File Manager used?

Only one VFM work area is required for this job. It is divided into a separate section for
each report. Each section holds the selected records required to produce the reports.
EZT+ automatically handles the separation of two or more reports held in one actual
VFM work area.

Note that the VFM space needed for the first report is automatically freed after the first
report is completed. Likewise, the area of the second report is freed when it is no longer
needed. This way only one VFM area is used, even for multiple JOB activities
producing many reports.
REPORT ACTIVITY
MULTIPLE REPORTS (cont'd)

The following EZT+ program produces both these reports with one pass of the input
file.

1 FILE PAYROLL
2 EMP# 9 5 N
3 NAME 17 8 A
4 NET 90 4 P 2
5 GROSS 94 4 P 2
6 DEPARTMENT 98 3 N
7 DEDUCTIONS W 4 P 2
8 JOB INPUT PAYROLL NAME DBL-RPTS
9 IF DEPARTMENT = 911 THRU 914 921
10 DEDUCTIONS = GROSS - NET
11 PRINT SORT - DEPT - RANGE - RPT
12 END-IF
13 IF DEPARTMENT = 911
14 DEDUCTIONS = GROSS - NET
15 PRINT NO-SORT-911-RPT
16 END-IF
17 REPORT SORT-DEPT-RANGE-RPT LINESIZE 78
18 SEQUENCE DEPARTMENT NAME
19 TITLE 1 'DEPARTMENT RANGE WITH SORT'
20 LINE 1 NAME DEPARTMENT EMP# GROSS NET DEDUCTIONS
21 REPORT NO-SORT-911-RPT LINESIZE 78
22 TITLE 1 'DEPARTMENT 911 - NO SORT'
23 LINE 1 NAME EMP# GROSS NET DEDUCTIONS

NOTE : All REPORT sections MUST come at the end of your JOB
activity.

SUMMARY
PROCESSING
SUMMARY PROCESSING
* A summary file is a file that contains the values for all control and ALL
QUANTITATIVE fields at each minor break. It has three (3) basic parts . . . .

* Control Field Area - the concatenation of all control fields.

* The value of TALLY.

EZT+ recognizes the first ten (10) bytes (PACKED and NO decimal value)
after the control field (s) as your TALLY field.

* QUANTITATIVE fields - the concatenation of all the quantitative fields on


the input field, if any of these fields are not on the summary file you
will receive a B054 error indicating you have an invalid summary file !!!!!!

* It can be processed by subsequent JOB activities.

* SUMFILE is the keyword used on the REPORT statement to define your


summary file.

NOTE : Do NOT, under any circumstances, use the SUM parameter in the REPORT
ACTIVITY when creating a SUMMARY FILE. This will create a data
exception (SOC7) abend !!!!!!!

SUMMARY PROCESSING
FILE DEFINITION

The Summary file can be a temporary dataset that is used for the summary processing
and then automatically deleted at the EOJ if the programmer so desires. Of course, the
summary file can also be a permanent file if that is the course the programmer chooses.

In either case, the summary file MUST be defined in the FILE entry of the EZT+
program, the summary file will look like this . . . . . .

FILE SUM-FILE-NAME F (nn) VIRTUAL


CONTROL FIELD (S)
TALLY
QUANTIFIED-FIELD (S)

* SUM-FILE-NAME is the unique file name assigned by the programmer

* F (nn) is the numeric length of the summary file

* VIRTUAL indicates that this is a temporary file that will be deleted at the
EOJ
SUMMARY PROCESSING
REPORT ACTIVITY

Once the summary file is defined, the EZT+ programmer MUST provide for control
records being written to it.

This is done through the REPORT statement that is invoked by the PRINT command.

Example . . . . .

REPORT REPORT-NAME SUMFILE SUM-FILE-NAME

* SUMFILE is the reserved keyword that is coded on the REPORT statement


indicating that a summary file is to be created whenever a CONTROL
BREAK is encountered in printing detail lines

* SUM-FILE-NAME is the file-name that was defined by the EZT+


programmer in the summary file entry in the EZT+ library section

PRINTING YOUR SUMMARY FILE

It is accepted practice that the summary file that has been created should be printed in a
second REPORT ACTIVITY, see the subsequent example of the summary file
processing.
SUMMARY PROCESSING
* Example

1 FILE FILEA
2 REGION 1 1 N
3 BRANCH 2 2 N
4 NAME 17 8 A
5 DEPT 98 3 N
6 EMP# 9 5 N
7 NET 90 4 P 2
8 GROSS 94 4 P 2
9 REC-PRT S 2 P 0
10 *
11 *
12 *
13 FILE SUMM F (33) VIRTUAL
14 SUM-DEPT * 3 N
15 SUM-TALLY * 10 P 0
16 SUM-NET * 10 P 2
17 SUM-GROSS * 10 P 2
18 *
19 JOB INPUT FILEA
20 IF DEPT = 900 THRU 920
21 PRINT TESTER
22 END-IF
23 *
24 REPORT TESTER LINESIZE 80 SUMFILE SUMM
25 SEQUENCE DEPT
26 CONTROL DEPT
27 TITLE 1 'USE OF THE SUMMARY FILE'
28 LINE 1 REGION BRANCH DEPT NAME NET GROSS TALLY
29 *
30 *
31 JOB INPUT SUMM
32 PRINT REPT 2
33 *
34 REPORT REPT 2 LINESIZE 80
35 LINE 1 SUM-DEPT SUM-TALLY SUM-GROSS
36 *

** OUTPUT ON NEXT PAGE

SUMMARY PROCESSING
9/21/84 USE OF THE SUMMARY FILE PAGE 1

REGION BRANCH DEPT NAME NET GROSS


TALLY
5 03 901 WALTERS 282.45 424.00
901 282.45 424.00
1

4 01 903 WIMN 251.65 373.60


903 251.65 373.60
1

4 02 911 P/OST 206.60 292.00


4 01 POWELL 167.96 243.20
4 01 LARSON 215.47 283.92
4 01 ARNOLD 356.87 445.50
5 03 HAFER 96.64 121.95
5 02 YOUNG 229.69 313.60
5 02 REYNOLDS 134.03 174.15
4 03 STRIDE 272.53 386.40
4 03 ISAAC 219.91 313.60
4 03 GREEN 238.04 365.50
4 02 SMOTH 202.43 315.20
4 02 KRUSE 182.09 242.40
911 2,522.26 3,497.52
12

4 02 912 LOYAL 230.50 295.20

912 230.50 295.20


1

5 01 914 CROCI 215.95 376.00


5 01 GRECO 685.23 1,004.00
5 03 RYAN 291.70 399.20
4 01 MANHART 250.89 344.80
4 02 VETTER 189.06 279.36
914 1,632.83 2,403.36
5

4 01 915 CORNING 103.43 146.16


915 103.43 146.16
1

4 01 917 TALL 355.19 492.26


917 355.19 492.26
1

4 01 918 BRANDOW 554.31 804.64


5 01 EPERT 224.36 310.40
918 778.67 1,115.04
2

4 02 919 DENNING 109.60 135.85


919 109.60 135.85
1

5 02 920 MILLER 222.61 313.60


920 222.61 313.60
1

6,489.19 9,196.59
26

SUMMARY PROCESSING

DEPT SUM-TALLY GROSS


901 1 424.00
903 1 373.60
911 12 3,497.52
912 1 295.20
914 5 2,403.36
915 1 146.16
917 1 492.26
918 2 1,115.04
919 1 135.85
920 1 313.60

This sample print shows the results of the summary file processing that occurred
in the first REPORT ACTIVITY.
You should note that the individual lines correspond to the control totals that
were generated in the previous detail report that generated this summary file.

SPECIAL
PROCEDURES
SPECIAL PROCEDURES
EZT+ provides special report PROCedures which are automatically performed to give
you logic capabilities during report production.

These special report PROCedures are provided to accomplish the more complex
reporting tasks:

* REPORT-INPUT gives you a final screening to omit or modify your data.

* BEFORE-LINE allows you to perform special report annotation before each


LINE is printed: detail lines have been created but not yet printed.

* AFTER-LINE allows you to do special report annotation after each printed


LINE.

* BEFORE-BREAK allows you to modify control totals prior to automatic


printing of each summary/break total line. You can use it to calculate averages or
percentages in addition to formatting and printing your own total lines and break
messages.

* AFTER-BREAK allows you to print any special annotation or highlighting after


the automatic break totals are printed.

* ENDPAGE allows you to print messages (Footers) at the bottom of each page.

* TERMINATION allows you to print messages or totals at the end of the report
(Finals).
SPECIAL PROCEDURES
Syntax . . .

You can code the PROCedures in any order, but you must place them after the LINE
statements within each report definition.

Here are some rules that apply to all seven of these REPORT PROCedures.

* They start with the PROCedure name.


* The name is followed by a period, blank, and the keyword PROC.

* They end with END-PROC.

* You do not PERFORM these PROCedures. They are automatically performed at


the time their name dictates.

* You can put any logic into these PROCedures, except the following:

* STOP or STOP EXECUTE

* PERFORM a standard JOB PROCedure.

* Any input or output operations (GET, PUT, READ).

* Each PROCedure can reference only specific fields. When referencing fields,
EZT+ automatically uses either detail field or internal accumulators based on the
PROCedure being performed.

* In REPORT-INPUT, BEFORE-LINE, AFTER-LINE, END-PAGE, and


TERMINATION (in non-CONTROLLed REPORTS) you can reference literals
or fields from any active file or working storage.

* In BEFORE-BREAK, AFTER-BREAK, and TERMINATION (in CONTROLled


REPORTs), you can reference only CONTROL fields, automatic accumulators,
literals and S working storage fields.

SPECIAL PROCEDURES
REPORT-INPUT. PROC

* Allows for final screening of report input data.

* Performed for each executed PRINT statement.

* Must execute a SELECT statement in the PROC to cause data to continue into
report.

* If a report has been SEQUENCED, this procedure is invoked as each spooled


record is output from the sort.

See the sample on the next page of REPORT-INPUT processing.

SPECIAL PROCEDURES
REPORT-INPUT. PROC
1 FILE FILEA
2 BRANCH 2 2 N
3 NAME 17 8 A
4 CODE 16 1 N
5 CONTRIBUTION W 7 N 2
6 PERCENT W 4 N 2 HEADING ('PERCENT' 'OF TOTAL')
7 NET-PAY 90 4 P 2
8 GROSS 94 4 P 2
9 AVERAGE W 7 N 2 MASK ('$$,$$9.99')
10 TOTAL-CONTRIBUTION S 7 N 2
11 JOB TITLE W 17 A
14 JOB INPUT FILEA
16 IF CODE = 5
17 CONTRIBUTION = .05 * GROSS
18 ELSE
19 CONTRIBUTION = .10 * GROSS
20 END-IF
23 TOTAL-CONTRIBUTION = TOTAL-CONTRIBUTION + CONTRIBUTION
25 PRINT REPT
27 REPORT REPT LINESIZE 80
28 SEQUENCE CONTRIBUTION D
29 TITLE 1 'RETIREMENT CONTRIBUTION REPORT'
30 LINE 1 BRANCH NAME CONTRIBUTION PERCENT TOTAL-CONTRIBUTION
32 REPORT-INPUT. PROC
34 PERCENT = CONTRIBUTION / TOTAL-CONTRIBUTION * 100
35 SELECT
36 END-PROC

8/23/85 RETIREMENT CONTRIBUTION REPORT PAGE 1


PERCENT
BRANCH NAME CONTRIBUTION OF TOTAL
TOTAL-CONTRIBUTION
01 GRECO 100.40 6.17
1,627.08
03 JONES 80.48 4.94
1,627.08
03 JUDAR 59.12 3.63
1,627.08
01 NAGLE 55.44 3.40
1,627.08

* * The Report - Input proc performs the PERCENT calculation

* * The SELECT command directs the detail line to the output file
otherwise the line will NOT be output.

SPECIAL PROCEDURES
BEFORE - BREAK. PROC
* Allows for modification of totals and special annotation before total line printing
caused by CONTROL statement.

AFTER - BREAK. PROC

* Allows for special annotation after control break lines are printed.

SPECIAL PROCEDURES
LEVEL

* LEVEL, a system-defined field, can be tested to determine the appropriate break:

HOW DOES THIS SYSTEM-DEFINED FIELD WORK?

* The system-defined field LEVEL works with CONTROL FIELDS to


determine which 'level' break has occurred.

* Control fields are processed in MAJOR to MINOR order, the keyword


LEVEL reverses this and processes from lowest MINOR to MAJOR, for
example . . .

* CONTROL FIELD1 FIELD2 FIELD3 FIELD4 - - - could be a control


statement for your EZT+ program

* Level values proceed from FIELD4 to FIELD1 to determine which data-item


caused the break; the FINAL break can be determined by taking the
number of control fields and adding 1 to it - - - -

* To determine the level break you simply code a standard IF statement. . . . .

IF LEVEL = 1 (FIELD4 control break)


IF LEVEL = 2 (FIELD3 control break)
IF LEVEL = 3 (FIELD2 control break)
IF LEVEL = 4 (FIELD1 control break)
IF LEVEL = 5 (FINAL control break)

* This LEVEL checking can be very beneficial during either BEFORE or


AFTER break processing.

SPECIAL PROCEDURES
BEFORE-BREAK SAMPLE

FILE PAYROLL
EMPNO 9 5N HEADING ('EMPLOYEE' 'NUMBER')
NET 90 4 P 2 HEADING ('NET' 'PAY')
DEPT 98 3 N
GROSS 94 4 P 2 HEADING ('GROSS' 'PAY')
DED W 3P 2
PCT W 4N 2
JOB INPUT PAYROLL
.
.
REPORT PCT-REPORT
SEQUENCE DEPT
CONTROL FINAL NOPRINT DPT NOPRINT
TITLE 1 'THIS REPORT WILL ILLUSTRATE BEFORE-BREAK PROCESSING'
LINE 01 DEPT EMPNO GROSS NET DED PCT
BEFORE-BREAK. PROC
PCT = DED / GROSS * 100
IF LEVEL = 1
DISPLAY SKIP 1 'DEPARTMENT' DEPT POS 3 GROSS POS 4 NET +
POS 5 DED POS 6 PCT
DISPLAY SKIP 1
END-IF
IF LEVEL = 2
DISPLAY SKIP 1 'FINAL' DEPT POS 3 GROSS POS 4 NET POS 5 +
DED POS 6 PCT
END-IF
***********************************************************************
*

8/20/85 THIS REPORT WILL ILLUSTRATE BEFORE-BREAK PROCESSING

EMPLOYEE GROSS NET


DEPT NUMBER PAY PAY DED PCT

911 00445 292.00 206.60 85.40


28.24
11710 243.24 167.96 75.24
30.93
11357 283.92 215.47 68.45
24.10

03571 242.40 182.09 60.31


24.88
DEPARTMENT 911 3,497.52
2,522.26 975.26 27.88

914 07231 376.00 215.95 160.05


31.75
SPECIAL PROCEDURES
AFTER-BREAK SAMPLE

FILE PAYROLL
EMPNO 9 5 N HEADING ('EMPLOYEE' 'NUMBER')
NET 90 4 P 2 HEADING ('NET' 'PAY')
DEPT 98 3 N
GROSS 94 4 P 2 HEADING ('GROSS' 'PAY')
DED W 3 P 2
PCT W 4 N 2
JOB INPUT PAYROLL
.
.
REPORT PCT-REPORT
SEQUENCE DEPT
CONTROL FINAL NOPRINT DEPT NOPRINT
TITLE 1 'THIS REPORT WILL ILLUSTRATE AFTER-BREAK PROCESSING'
LINE 01 DEPT EMPNO GROSS NET DED PCT
AFTER-BREAK. PROC
PCT = DED / GROSS * 100
IF LEVEL = 1
DISPLAY 'TOTALS FOR DEPARTMENT NUMBER' DEPT
END-IF
***********************************************************************
*
8/20/85 THIS REPORT WILL ILLUSTRATE AFTER-BREAK PROCESSING
EMPLOYEE GROSS NET
DEPT NUMBER PAY PAY DED PCT

911 00445 292.00 206.60 85.40 28.24


11710 243.24 167.96 75.24 30.93
11357 283.92 215.47 68.45 24.10

03571 242.40 182.09 60.31 24.88


3,497.52 2,522.26 975.26 27.88

TOTALS FOR DEPARTMENT NUMBER 911

914 07231 376.00 215.95 160.05 31.75

SPECIAL PROCEDURES
BEFORE-LINE AND AFTER-LINE PROCS

* Allows for special annotation before each detail line is printed.


AFTER-LINE. PROC

* Allows for special annotation after each detail line is printed.

SPECIAL PROCEDURES
BEFORE-LINE example

FILE FILEA
LAST-NAME 1 5 A
STATE 6 2 A
ZIPCODE 8 5 N
PAY-NET 13 5 N 2
JOB INPUT FILEA

EZT+ LOGIC

REPORT REPORT 1
SEQUENCE STATE ZIPCODE LAST-NAME
CONTROL STATE ZIPCODE
LINE 01 LAST-NAME STATE ZIPCODE PAY-NET
BEFORE-LINE. PROC
IF PAY-NET GE 500
DISPLAY 'EMPLOYEE' LAST-NAME 'EXCEEDED SALARY GOAL'
END-IF
END-PROC
***********************************************************************
*

LAST-NAME STATE ZIPCODE PAY-NET


EMPLOYEE WHITE EXCEEDED SALARY GOAL
WHITE IL 60076 678.90
PLUMB IL 60076 123.45
MUSTARD IL 60076 234.87
PEACOCK IL 60076 345.67
EMPLOYEE SCARLETT EXCEEDED SALARY GOAL
SCARLETT IL 60076 750.00

SPECIAL PROCEDURES
AFTER-LINE EXAMPLE

FILE FILEA
LAST NAME 1 5 A
STATE 6 2 A
ZIPCODE 8 5 N
PAY-NET 13 5 N 2
JOB INPUT FILEA

EZT+ LOGIC

REPORT REPORT1
SEQUENCE STATE ZIPCODE LAST-NAME
CONTROL STATE ZIPCODE
LINE 01 LAST-NAME STATE ZIPCODE PAY-NET
AFTER-LINE. PROC
IF PAY-NET GE 500
DISPLAY 'EMPLOYEE' LAST-NAME 'EXCEEDED SALARY GOAL'
END-IF
END-PROC
***********************************************************************
*

LAST-NAME STATE ZIPCODE PAY-NET


WHITE IL 60076 678.90
EMPLOYEE WHITE EXCEEDED SALARY GOAL
PLUMB IL 60076 123.45
MUSTARD IL 60076 234.87
PEACOCK IL 60076 345.67
SCARLETT IL 60076 750.00
EMPLOYEE SCARLETT EXCEEDED SALARY GOAL

SPECIAL PROCEDURES
ENDPAGE. PROC

* Invoked whenever end of page is detected.

* Allows for page totals or footer information.

Example of the ENDPAGE PROC

1 FILE PAYROLL
2 NAME 17 8 A
3 EMP# 9 5 N
4 DEPARTMENT 98 3 N
5 NET 90 4 P 2
6 GROSS 94 4 P 2
7 REC-PRT S 2 P 0
8 JOB INPUT PAYROLL NAME SHOW-TERM
9 IF DEPARTMENT = 900 THRU 920
10 PRINT DEPT-RANGE-RPT
11 REC-PRT = REC=PRT + 1
12 END-IF
13 REPORT DEPT-RANGE RPT NOADJUST
14 SEQUENCE DEPARTMENT
15 CONTROL DEPARTMENT
16 TITLE 1 COL 60 'SAMPLE REPORT'
17 TITLE 3 COL 49 'ILLUSTRATING TERMINATION PROCEDURE'
18 TITLE 4 COL 46 'PRINTING MESSAGE OF TOTAL RECORDS PRINTED'
19 LINE 1 COL 20 NAME +4 EMP # DEPARTMENT +4 NET +4 GROSS
20 ENDPAGE. PROC
22 DISPLAY SKIP 4 COL 20 'ATTN : DEPARTMENT MANAGER'
22 DISPLAY SKIP 1 COL 20 'REPORT PREPARED BY JOHN DOE'
23 END-PROC
SPECIAL PROCEDURES
ENDPAGE. PROC - - - OUTPUT

SAMPLE REPORT

ILLUSTRATION TERMINATION PROCEDURES


PRINTING MESSAGE OF TOTAL RECORDS PRINTED

NAME EMP# DEPARTMENT NET GROSS

WALTERS 11211 901 282.45


424.00
901 282.45 424.00

WIMN 12267 903 251.65 373.60


903 251.65 373.60

---------------------------------------------------------------------------------------------------------
----
* * * DATA LEFT OUT * * *
---------------------------------------------------------------------------------------------------------
----
RYAN 10961 291.70 399.20
914 1,632.83 2,403.36

CORNING 02688 915 103.43


146.16
915 103.43 146.16

TALL 11931 917 355.19 492.26


917 355.19 492.26

BRANDOW 02200 918 554.31


804.64
EPERT 07781 224.36 310.40
918 778.67 1,115.04

DENNING 02765 919 109.60


135.85
919 109.60 135.85

MILLER 05914 920 222.61 313.60


920 222.61 313.60

6,489.19 9,196.59

ATTN : DEPARTMENT MANAGER


REPORT PREPARED BY JOHN DOE

SPECIAL PROCEDURES
TERMINATION. PROC

* Invoked at end of report.

* Allows for report footer information.

Example of the TERMINATION PROC

1 FILE PAYROLL
2 NAME 17 8 A
3 EMP# 9 5 N
4 DEPARTMENT 98 3 N
5 NET 90 4 P 2
6 GROSS 94 4 P 2
7 REC-PRT S 2 P 0
8 JOB INPUT PAYROLL NAME SHOW-TERM
9 IF DEPARTMENT = 900 THRU 920
10 PRINT DEPT-RANGE-RPT
11 REC-PRT = REC-PRT + 1
12 END-IF
13 REPORT DEPT-RANGE RPT NOADJUST
14 SEQUENCE DEPARTMENT
15 CONTROL DEPARTMENT
16 TITLE 1 COL 60 'SAMPLE REPORT'
17 TITLE 3 COL 49 'ILLUSTRATING TERMINATION PROCEDURE'
18 TITLE 4 COL 46 'PRINTING MESSAGE OF TOTAL RECORDS PRINTED'
19 LINE 1 COL 20 NAME +4 EMP# +4 DEPARTMENT +4 NET +4
GROSS
20 TERMINATION. PROC
22 DISPLAY SKIP 4 COL 20 REC-PRT 'RECORDS PRINTED'
23 END-PROC
SPECIAL PROCEDURES
TERMINATION. PROC - - - OUTPUT

SAMPLE REPORT

ILLUSTRATION TERMINATION PROCEDURES


PRINTING MESSAGE OF TOTAL RECORDS PRINTED

NAME EMP# DEPARTMENT NET GROSS

WALTERS 11211 901 282.45


424.00
901 282.45 424.00

WIMN 12267 903 251.65 373.60


903 251.65 373.60

---------------------------------------------------------------------------------------------------------
----
* * * DATA LEFT OUT * * *
---------------------------------------------------------------------------------------------------------
----
RYAN 10961 291.70 399.20
914 1,632.83 2,403.36

CORNING 02688 915 103.43


146.16
915 103.43 146.16

TALL 11931 917 355.19 492.26


917 355.19 492.26

BRANDOW 02200 918 554.31


804.64
EPERT 07781 224.36 310.40
918 778.67 1,115.04

DENNING 02765 919 109.60


135.85
919 109.60 135.85

MILLER 05914 920 222.61 313.60


920 222.61 313.60

6,489.19 9,196.59

26 RECORDS PRINTED
SORT ACTIVITY
SORT ACTIVITY
A very common activity is creating a sorted output file.

How do you do this with EZT+?

* The SEQUENCE statement invokes your system sort to put REPORTS in a certain
order.

* The SORT statement does the same when you want to create a file in a certain order.

Command syntax . . . . .

SORT filename1 to filename2 USING (field-name D.) +


BEFORE proc-name

SORT: Describes activity

Filename1: Specifies input file

Filename2: Specifies output file

USING: Identifies sort key (s)

BEFORE: - Optional

- Identifies a proc that prescreens, selects, modifies records for


SORT

- In order for the records to be selected in this proc, the SELECT


statement must be coded.

SORT ACTIVITY
DEFINING THE SORTED FILE

The sorted file MUST be defined in the EZT+ FILE SECTION just as any file that is to
be processed by your EZT+ program.

Just like the SUMMARY FILE, the sorted file can be a permanent file or a temporary
file that will be deleted at the EOJ.

Example. . . . . . .
FILE PAYROLL
REGION 1 1 A
EMP-NAME 17 8 A
FILE PAYSORT FB (150 1800 ) VIRTUAL
field definitions

* PAYSORT is the file-name assigned by the EZT+ programmer to the sorted file
that will be created in this EZT+ program

* The FB (150 1800) parameter provides the DCB information that is needed for
the sorted output file. The FB is used to indicate that this is FIXED-
BLOCK file. The 150 is the record-length of the sorted file and the 1800 is
the block-size.

* The VIRTUAL is again used to indicate that this is a temporary file that will be
deleted at the EOJ

NOTE: When creating a PERMANENT sorted output file, it is not necessary to code
the DCB information and the VIRTUAL parameter

SORT ACTIVITY
CODING THE SORT STATEMENT

The EZT+ SORT statement begins a SORT activity. A SORT activity creates a
sequenced file containing all or part of the records from another file. In most cases,
one statement is the entire activity. The following example uses only one SORT
statement to sort the records of the file PAYROLL:

FILE PAYROLL
REGION 1 1 A
EMP-NAME 17 8 A
FILE PAYSORT FB (150 1800) VIRTUAL
field definition
- - - - - - - - - - -> SORT PAYROLL TO PAYSORT USING (REGION D EMP-
NAME)
| JOB INPUT PAYSORT . . . .
|
----- * SORT is the keyword that activates the sort process

* PAYROLL is the UNSORTED input file

* TO is the keyword identifying the SORTED output file

* PAYSORT is the SORTED output file


* USING is the keyword identifying the sort fields

* REGION and EMP-NAME are the sort fields on which the SORTED input
file will be resequenced - - these data items will be found on the
UNSORTED input file

* ASCENDING is the default sort sequence, the 'D' after REGION indicates
that this sort field will be sorted in DESCENDING sequence.

CODING THE SORT STATEMENT WITH THE BEFORE OPTION

FILE PAYROLL
REGION 1 1 A
EMP-NAME 17 8 A
GROSS-PAY 90 4 P 2
FILE PAYSORT FB (150 1800) VIRTUAL
field definitions
SORT PAYROLL TO PAYSORT USING +
(REGION D EMP-NAME)
- - - - - - - - - - - - - -> BEFORE SORT-REG-4
| SORT-REG-4. PROC
| IF REGION = '4'
| GROSS-PAY = GROSS-PAY + 100
| SELECT
| END-IF
| END-PROC
| JOB INPUT PAYSORT
|
- - -Here you added BEFORE SORT-REG-4 to the SORT statement as well as the
SORT-REG-4 procedure . . . NOTE: the BEFORE procedure is coded between
the SORT and JOB activities.

The BEFORE parameter automatically performs a PROCEDURE SORT-REG-4 to


select specific records before sorting.

In this example, you are SELECTING only REGION 4 records, and adding 100 to
their GROSS-PAY fields. After execution, PAYSORT will contain only region 4
records.

The SELECT Statement

Notice that the SORT activity alone, without any PROCedure, automatically selects
all records for output. But when you use a PROCedure with the BEFORE parameter,
you have to use the SELECT statement to actually choose a record for output.

See the sample on the next page of the BEFORE OPTION.


SORT ACTIVITY
1 FILE FILEA
2 COURSECD 1 7 A HEADING ('COURSE' 'CODE')
3 STUDENT 8 20 A
4 STARTDATE 39 6 A HEADING ('STARTING' 'DATE')
5 ENDDATE 45 6 A HEADING ('ENDING' 'DATE')
6 ENDMO 45 2 A
7 ENDDAY 47 2 A
8 ENDYR 49 2 A
9 HRS 51 4 A
10 DAYS 55 2 N
11 CARDCD 80 1 A
12 COURSENAME W 40 A HEADING ('COURSE' 'NAME')
13 COURSE 9 40 A
14 TOTHRS W 5 A
15 *
16 FILE CLASSTAB TABLE 600
17 ARG 1 7 A
18 DESC 8 20 A
19 *
20 *
21 SORT FILEA TO CLASSTAB +
USING (COURSECD) +
BEFORE SELECT-SORT
22 *
23 SELECT-SORT. PROC
25 IF CARDCD = '1'
26 SELECT
27 END-IF
28 END-PROC
29 *
30 JOB INPUT FILEA
31 IF STUDENT = 'SMITH, ROBERT'
32 SEARCH CLASSTAB WITH COURSECD, GIVING COURSENAME
33 PRINT REPT5
34 END-IF
35 *
36 *
37 REPORT REPT5
38 TITLE 1 'COURSE LISTING'
39 LINE 1 STUDENT COURSECD COURSENAME STARTDATE ENDDATE HRS

9/21/84 COURSE LISTING


COURSE COURSE
STUDENT CODE NAME
SMITH, ROBERT R0S-001 ROSCOE TRAINING CLASS
SMITH, ROBERT SAS-001 SAS BASIC COURSE
TABLES TABLES
TABLES

* A table is a collection of uniform data records in a form suitable for quick reference

* Each table entry has:

* An argument (ARG) that uniquely identifies that entry.

* A description (DESC), which is the remainder of the entry.

* The user's objective is to obtain the one value from an array of values that
corresponds to the search argument.

* A table file must be arranged in ascending order by argument.

* No duplicate arguments can be placed in the file.

* You can use any number of tables in a job.

Example:

ARG DESC

01 ALABAMA
02 ALASKA
03 ARIZONA
TABLES
DEFINITION IN LIBRARY

* The table paramenter must be specified on the FILE statement.

FILE file-name TABLE INSTREAM


literal

INSTREAM denotes that the table file immediately follows the file description.

literal specifies the number of entries in an external table (a table called by the
program).

* External table files must be sequentially accessible.


* Data for an INSTREAM table immediately follows the ARG and DESC statements
in the program.

* ENDTABLE must be the last entry in the instream table data, and must be coded in
columns 1 through 8.

Example:

FILE STATETBL TABLE INSTREAM


ARG 1 2 N
DESC 3 15 A
01ALABAMA
02ALASKA
03ARIZONA
...
50WYOMING
ENDTABLE

TABLES
SEARCH STATEMENT

* The SEARCH statement causes the table to be searched, item by item.

* Can be coded any place within a JOB activity.

* Can be issued any number of times against any number of tables.

Command syntax . . .

SEARCH file-name WITH field-name-1 GIVING field-name-2

file-name is a file with a TABLE attribute

field-name-1 is the field containing the search argument

the search argument should be a NUMERIC data-item

field-name-2 is the receiving field for the results of the table search.

TABLES
SEARCH STATEMENT EXAMPLES
You can code SEARCH statements any place within a JOB activity, SORT
procedure, or REPORT procedure.
*
FILE CALENDR
DAY-OF-WEEK 12 1 N
NAME-OF-DAY 14 9 A

FILE WEEKDAY TABLE INSTREAM


ARG 1 1 N
DESC 3 9 A
1 SUNDAY
2 MONDAY
3 TUESDAY
4 WEDNESDAY
5 THURSDAY
6 FRIDAY
7 SATURDAY
ENDTABLE
*

JOB INPUT CALENDR


SEARCH WEEKDAY WITH DAY-OF-WEEK, GIVING NAME-OF-DAY
IF WEEKDAY
DISPLAY NAME-OF-DAY, ' IS DAY ' , DAY-OF-WEEK
ELSE
DISPLAY '* * * * INVALID DAY OF WEEK = ', DAY-OF-WEEK
END-IF

* * * Output would look like this: THURSDAY IS DAY 5

NOTE : NO FINDS can also be determined by coding a negative with the


file-name

IF NOT WEEKDAY

TABLES
VARIABLE TABLES

Variable tables are tables that will contain values that will vary from one execution to the
next of your EZT+ program.

A Working Storage entry uses the OCCURS and INDEX clauses to define a VARIABLE
TABLE to the EZT+ program.
Example . . . . .

COUNTERS S 3 N MASK ('ZZ9') +


OCCURS 10 INDEX CNTR-INDX

** The mask is an optional entry that can be used should you want to print
EDITED accumulators at EOJ.

** The OCCURS clause uses a numeric value to define the number of entries in
the VARIABLE TABLE.

** The INDEX clause defines the INDEX data-item that will be used with the
VARIABLE TABLE entries.

TABLES
REFERENCING VARIABLE TABLES

** A specific subscript can be used to reference a VARIABLE TABLE item. Since


the tenth (10) item in the COUNTERS table is the run total, you can code a
specific subscript to add 1 to the record read counter . . . .

COUNTERS (10) = COUNTERS (10) + 1

** Relative indexing is performed by setting the INDEX value to a variable value -


- you would use the ASSIGN statement to accomplish this . . .

CNTR-INDX = RECTYPE

Then add to the appropriate COUNTER by coding the following arithmetic


operation . . .

COUNTERS (CNTR-INDX) = COUNTERS (CNTR-INDX ) + 1

** Do While processing can be used in repetitious logic that prints accumulators at


the EOJ. The code that is needed to accomplish this is shown below....

CNTR - INDX = 1
DO WHILE CNTR-INDX < 11
DISPLAY 'SPECIAL MESSAGE ' COUNTERS (CNTR-INDX)
CNTR-INDX = CNTR-INDX +1
END-DO

MATCH PROCESSING
MATCH PROCESSING
* EZT+ automatically matches an unlimited number of input files using an unlimited
number of keys.

* Due to the complexity of using more than two (2) files, it is recommended that
MATCH processing be limited to two (2) files.

FILE ENTRY INFORMATION

FILE MASTER
POL NO 7 8 N
FILE TRANS
POLICY 1 8 N

* the KEY information must be accurate for BOTH files.

* all KEYS must be defined

JOB STATEMENT FOR MATCH PROCESSING

JOB INPUT (MASTER KEY (POLNO) +


TRANS KEY (POLICY) )

* both files should be in the same KEYED sequence.

* sorting might be required

* same NUMBER of keys should be specified for both files

* MASTER file should be first in the JOB STATEMENT

MATCH PROCESSING
* MATCH TEST

IF (NOT) MATCHED MASTER TRANS

compares the TRANS to the MASTER file for matched

* FILE PRESENCE TEST

IF (NOT) EOF file-name

can be used to verify that a file has reached EOF or that a record is available from the
designated file
* DUPLICATE TESTING

IF (NOT) DUPLICATE TRANS

compares the current TRANS record - - comparison is TRUE if the TRANS


record is EQUAL to the PREVIOUS and the NEXT TRANS record on
the file

IF (NOT) FIRST-DUP TRANS

TRUE comparison is returned when the current TRANS record is EQUAL to


the NEXT record but different than PREVIOUS record

IF (NOT) LAST-DUP TRANS

TRUE comparison is returned when the current TRANS record is EQUAL to


the PREVIOUS record but different than NEXT

MATCH PROCESSING
EZT+ LOGIC EZT+ FILES
FILE MASTER MASTER TRANS
MKEY 1 4 N
FILE TRANS 68 16
TKEY 1 4 N 70 17
JOB INPUT (MASTER KEY (MKEY) + 150 18
TRANS KEY (TKEY) ) 18
IF FIRST-DUP TRANS 18
DISPLAY . . . 19
ELSE 20
IF LAST-DUP TRANS 21
DISPLAY . . . 70
GO TO JOB
ELSE
IF DUPLICATE TRANS PROCESSING FLOW
DISPLAY . . .
GO TO JOB 1) Each file retrieves a
record
END-IF automatically
END-IF 2) The HIGH KEY value is
stored
END-IF and LOW KEY value
continues
IF MATCHED MASTER TRANS processing
PRINT MATCH-REPT 3) Record 16 successfully
passes
END-IF NOT MATCHED and displays
IF NOT MATCHED TRANS the desired information
DISPLAY . . . 4) Record 17 is retrieved and
steps
GO TO JOB 2 and 3 are repeated
END-IF 5) Record 18 is retrieved and
steps 2 and 3 are repeated.
6) Record 18 is retrieved and
it is recognized to be a
DUPLICATE
7) Record 18 is retrieved and
it is recognized to be a
LAST-DUP
8) Records 19, 20 and 21 are
retrieved and steps
2 and 3 are repeated.
9) Record 70 is retrieved and
stored because it is
greater than the
MASTER record.
10) Record 70 is retrieved
from the MASTER record
and a match is
encountered.
11) Normal processing
encounters EOF on
both files

MACRO PROCESSING
MACRO PROCESSING
MACRO FACILITY

The EZT+ macro facility permits often repeated source statements to be duplicated easily
for any program. Even the most casual programmer can use EZT+ macros.

MACRO LIBRARY

The macro library is a very convenient place to store data definitions of frequently-used
files.

At OHIO CASUALTY, we use PANVALET as our source maintenance product. With


this type of library, the user has the ability to secure the macro against unauthorized
access.

CREATING A MACRO
To create a macro, follow these steps:

* Go to P.2 (PANVALET Edit) and allocate a new member. The member name
must begin with your system prefix, and can contain a maximum of 10
characters.

* The first statement in the member must be the keyword 'MACRO' and can be
coded in any column between 1 and 72.

* Other statements immediately follow.

INVOKING A MACRO

* To include macro statements within your program, code:

%macroname

JCL
SAMPLE JCL
S A M P L E J C L T O E X E C U T E E Z T P L U S

(As an In-stream Compile-Link-Go Module)

/ / # # # # # # # JOB ,'programmer-name', MSGCLASS=X, CLASS=B, NOTIFY=USER


// PERFORM =5

/ / STEP1 EXEC PGM = EZTPA00

/ / SYSOUT DD SYSOUT=*

/ / SYSUDUMP DD SYSOUT=*

/ / PANDD1 DD DSN=UTI.PROD.PAN.OTHER.PANSCR,DISP=SHR

/ / EZTVFM DD UNIT=SYSDA,SPACE= (4096, (100, 100) )

/ / SORTMSG DD SYSOUT=*

/ / SYSPRINT DD SYSOUT=*

/ / SYSIN DD *

//* I N S E R T Y O U R E Z T P L U S L O G I C H E R
E
/*

This is the most common EZT+ JCL that you will encounter. Most, if not
all, of your EZT+ programs will execute with this skeleton JCL. The
most important features of this JCL are . . . .

* * PGM=EZTPA00 -- this is the current EZT+ package that is


available at O/C

* * EZTVFM -- this represents the VIRTUAL FILE


MANAGER where temporary output is
stored

* * SYSIN -- this defines your EZT+ statements to the


executing program

SAMPLE JCL
S A M P L E J C L T O C O M P I L E / E X E C U T E

(Source code stored as a separate Panvalet member)

/ / ####### JOB, ' ###############' , MSGCLASS=X, CLASS=H, NOTIFY=####,


// PERFORM=5

/ / STEP1 EXEC PAN1EZTG,PANLIBR='YOUR LIBRARY NAME'

/ / PAN.SYSIN DD *

++ WRITE WORK, YOUR PANVALET MEMBER

/ / EZTG.SYSPRINT DD SYSOUT=*

//* YOUR INPUT/OUTPUT DD STATEMENTS GO HERE

/*

//

SAMPLE JCL

S A M P L E J C L T O C O M P I L E / L I N K

(Source code stored as a separate PANVALET member)


/ / ####### JOB , '###############' , MSGCLASS=X, CLASS=H, NOTIFY=####,
// PERFORM=5

/ / STEP1 EXEC PAN1EZT,PANLIBR= 'YOUR LIBRARY NAME'

/ / PAN. SYSPRINT DD SYSOUT=*

/ / PAN.SYSIN DD *

++ WRITE WORK, YOUR PANVALET MEMBER

/ / LKED.SYSLMOD DD DSN=YOUR LOAD.LIBRARY (MEMBER), DISP=SHR

/*

//

* * * NOTE * * * When executing this procedure, the 'LINK' option of the 'PARM'
statement is required.

PARM LINK (EDUJEZTP R)

SAMPLE JCL
EDIT - - - - - EDU.PROD.JPKEZT(EZTCOMP) - 01.01---------------COLUMNS 001 072
COMMAND = = = = > SCROLL = = => CSR
* * * * * ***********************TOP OF DATA ****************************
==MSG> -CAUTION- PROFILE CHANGED TO "CAPS ON" (FROM "CAPS OFF)
==MSG> DATA DOES NOT CONTAIN ANY LOWER CASE CHARACTERS.
000001 / / JPK1COMP JOB MSGCLASS=X, CLASS=H, PERFORM=5 NOTIFY=JPK1
000002 / / STEP1 EXEC PAN1EZT,PANLIBR= 'OTHER'
000003 / / PAN.SYSPRINT DD SYSOUT=*
000004 / / PAN.SYSIN DD *
000005 ++WRITE WORK.JPK1TAPES
000006 / / LKED.SYSLMOD DD DSN=EDU.TEST.COB2PROD.LOADLIB (JPK1TAPE),DISP=SHR
000007 / /
000008
000009 COMPILE JCL
000010 * SOURCE MODULE RESIDES ON PANVALET (OTHER)
000011 * LINKING TO EDU.TEST.COB2PROD.LOADLIB AS JPK1TAPE
000012 *JPK1TAPE CONTAINS ALL EZT STATEMENTS AND COMMANDS FROM THE
000013 FILE STATEMENT
000014 * REQUIRES PARM LIK (LOAD-MODULE NAME R) AS THE FIRST CARD OF THE
000015 MEMBER
* * * * * ********************************BOTTOM OF DATA****************************

..................................................................................
. . . . 14:47 - - - - - - - - - - - - - - - - - -FLASHER Jobname Selection - - - - - - - - - - Invalid line command

SAMPLE JCL
EDIT - - - - EDU.PROD.JPKEZT (EZTEXEC) - 01.01 - - - - - - - - - - - - - - - - - - -COLUMNS 001
072
COMMAND = = => SCROLL = = => CSR
== MSG> - CAUTION- PROFILE CHANGED TO "CAPS ON" (FROM "CAPS OFF")BECAUSE
==MSG> THE DATA DOES NOT CONTAIN ANY LOWER CASE CHARACTERS.
000001 / / JPK1TAPE JOB MSGCLASS=X, CLASS=H, PERFORM=5, NOTIFY=JPK1
000002 / / STEP1 EXEC PGM=JPK1TAPE
000003 / / STEPLIB DD DSN=EDU.TEST.COB2PROD.LOADLIB,DISP=SHR
000004 / / SYSPRINT DD SYSOUT=*
000005 / / SYSOUT DD SYSOUT=*
000006 / / EZTVFM DD UNIT = SYSDA,SPACE=(4096, (100, 100) )
000007 / / TAPES DD DSN-EDU.PROD.JPK1.TAPE.LIST,DISP=SHR
000008 / / SYSIN DD *
000009 / /
000010
000011 EXECUTION JCL
000012 * STEPNAME DEFINES THE PROGRAM TO BE EXECUTED
000013 * STEPLIB DEFINES LOAD LIBRARY
000014 * SYSPRINT, SYSOUT AND EZTVFM ARE STANDARD STATEMENTS
000015 * TAPES IS THE FILENAME
000016
* * * * * *****************************BOTTOM OF DATA******************************

..................................................................................
...
FLASHER outlist for JPK1TAPE (J04422) Sys - - - - Line 00000420 Col 001 080

PROCESSING PARM
INFORMATION
PASSING PARM INFO
To pass information from the JCL 'PARM' statement, the following items are required:

* A START procedure to receive control at the beginning of the job

* This procedure must code a call to a subprogram which will, in turn, move the
PARM information into an EZT+ field

* The maximum length of the field must be contained in 'PARM-LTH'

* If no JCL parameter is being passed on the JCL EXEC statement, PARM-LTH will
contain a zero.
EXAMPLE
FILE PERSNL
%PERSONL
* JCL PARM DECODE DEFINITIONS
PARM-INFO W 5 A
PARM-LTH PARM-INFO 2 B
PARM-DATA PARM-INFO +2 3 A
*
SELECT-REGION PARM-DATA 1 N
SELECT-BRANCH PARM-DATA +1 2 N

JOB INPUT PERSNL START (PARM-ANALYSIS)


.
.
.
PARM-ANALYSIS. PROC
CALL EZTPX01 USING (PARM-REGISTER PARM-INFO)
IF PARM - LTH NE 3
DISPLAY SKIP 3 '* * MISSING JCL PARM * *'
STOP EXECUTE
END-IF
IF SELECT-REGION NE 1 THRU 4
DISPLAY SKIP 3 ' * * INVALID REGION NUMBER * * '
STOP EXECUTE
END-IF
IF SELECT-BRANCH NE 1 THRU 5
DISPLAY SKIP 3 ' * * INVALID BRANCH NUMBER * * '
STOP EXECUTE
END-IF
END-PROC

ACCOUNTING
INFORMATION
ACOUNTING INFORMATION
DIVISION CODES
****************
1 = INSURANCE SERVICES 2 = PROPERTY AND LIABILITY
3 = SYSTEM SUPPORT SERVICES 4 = ALL OTHERS
______________________________________________________________________________
GROUP CODE
**********
INSURANCE SERVICES PROPERTY & LIABILITY
A = CLAIMS
L = PC B = RECON
O = OHIO LIFE C = DAB/ABC
P = PAYROLL/PERSONNEL D = MAP/CLM
S = ACCIDENT & HEALTH E = 8100/DSX
F = PREMIUM ENTRY
G = MANAGER
SYSTEM SUPPORT SERVICES H = HOMEOWNERS
I = AUTO
J = CPR
E = EDUCATION K = CLASS
O = OPERATIONS L = RATE MAINTENANCE
P = TELEPROCESSING M = ISO
X = TRAINEES N = CLASS
T = TECHNICAL O = MCCORMICK AND DODGE
W= TECHNICAL WRITERS S = INTERNAL STAT CODING
W = WORKERS COMP

ALL OTHERS
- = NOT APPLICABLE
T = TEXT TRANSCRIPTION CLERKS
A = AUDIT
______________________________________________________________________________
PROGRAMMER CODE 4TH DIGIT OF LOGON ID
(NON/PROD ONLY) - = NOT APPLICABLE

SYSTEM PREFIX HOR, MAP, ETC.

PROD - NON/PROD P = PRODUCTION


N = NON/PRODUCTION
S = SPECIAL PRODUCTION

COMPILE INDICATOR C = COMPILE


T = COMPILE PLUS TEST
- = NOT APPLICABLE

TSO INDICATOR T = TSO SUBMITTED


- = NOT APPLICABLE

ACCOUNTING INFORMATION
PROPER JOB CLASSES AND PERFORM PARAMETERS

PERFORM JOB CLASSES DESCRIPTION


PARAMETER
______________________________________________________________________________

5 B $ 10 MINUTES OR LESS REGARDLESS OF CPU


RATE; 2 OR LESS 9TRACK TAPE UNITS.

# V JOB USES MORE THAN 5 9TRACK TAPE UNITS.


WHEN A REPLY IS NEEDED.

# Z JOB USES MORE THAN 5 9TRACK TAPE UNITS


AND ALSO HAS A CPU RATE OVER 50%.
# - DEFAULTS TO PERFORM PARAMETER 1.

$ - CLASS B WILL BE CANCELLED WITH A DUMP AFTER 20 MINUTES.

TAPE UNITS (9TRACK ONLY)

PERFORM JOB CLASSES CPU RATE:


PARAMETER 0-2 3-4 5
_______________________________________________________________________
_

1 E F H 20% OR LESS
1 J K L 21% TO 40%
1 N P Q 41% TO 50%

DATE CONVERSIONS
DATE CONVERSION
GREGJULN

I. PURPOSE

A. THE GREGJULN ROUTINE CONVERTS A GREGORIAN DATE


(MMDDYY) TO A JULIAN DATE (YYDDD).

II. OPTIONS - NONE

III. REQUIREMENTS

A. TWO DISPLAY FIELDS

1. ONE 6-DIGITS (INPUT TO ROUTINE)


2. ONE 5-DIGITS (OUTPUT OF ROUTINE

B. A VALID MONTH AND DAY OF MONTH

1. MONTH 01-12
2. DAY OF MONTH 01-28, 29,30,31 DEPENDING ON MONTH AND
YEAR.

IV. RESTRICTIONS

A. THE GREGORIAN DATE MUST BE CONSIDERED AS BEING WITHIN


THE 20TH CENTURY.
V. INPUT

A. GREGJULN IS LOCATED IN "UTI.PRO.SUBLIB'.

B. GREGORIAN DATE - MMDDYY

MM - MONTH (01-12)
DD - DAY (01-28, 29, 30, 31)
YY - YEAR (00-99)

VI. OUTPUT

A. JULIAN DATE YYDDD (ZEROS IF INPUT DATE IS INVALID.)

YY - YEAR (00-99)
DDD - DAY OF YEAR (01-365,366)

DATE CONVERSION
JULNGREG

I. PURPOSE

A. THE JULNGREG ROUTINE CONVERTS A JULIAN DATE TO A


GREGORIAN DATE PLUS SUPPLIES THE DAY OF THE WEEK.

II. GENERAL OPTIONS - NONE

III. REQUIREMENTS

A. TWO 7-DIGIT DISPLAY FIELDS, ONE TO PASS '00YYDDD' AND


ONE TO RECEIVE 'WMMDDYY'.

B. A VALID DAY BETWEEN 1 AND 365 OR 366 MUST BE PASSED TO THE


ROUTINE.

IV. RESTRICTIONS

A. THE JULIAN DATE MUST BE FROM 00001 TO 99365

(JAN. 1, 1900 TO DEC. 31, 1999)

V. INPUT

A. JULNGREG IS LOCATED IN 'UTI.PROD.SUBLIB'.

B. A FIELD CONTAINING 7-DIGITS; 00, FOLLOWED BY A VALID JULIAN


DATE (YYDDD).

VI. OUTPUT
A. A FIELD CONTAINING 7-DIGITS (ZEROS IF INPUT DATE IS INVALID)

W - DAY OF WEEK (1 - SUNDAY THRU 7 = SATURDAY)


MM - MONTH
DD - DAY OF MONTH
YY - YEAR

DATE CONVERSION
JULNFDN (ALSO CALLED FDN)

I. PURPOSE

A. JULNFDN IS AN ASSEMBLER ROUTINE WHICH CAN BE CALLED TO


CONVERT ANY JULIAN DATE FROM JANUARY 1, 1900 THROUGH
DECEMBER 31, 1999 TO A FIVE DIGIT NUMBER (FDN)

B. JULNFDN ENABLES US TO DETERMINE THE NUMBER OF DAYS


ELAPSED BETWEEN ANY TWO DATES IN THE 20TH CENTURY.
ALSO, THE DAY OF THE WEEK CORRESPONDING TO ANY FDN CAN
BE DETERMINED.

II. GENERAL OPTIONS

A. CONVERT ANY JULIAN DATE OF THE 20TH CENTURY TO A FDN.

B. DETERMINE THE DAY OF THE WEEK CORRESPONDING TO ANY FDN.

III. REQUIREMENTS

A. 400 BYTES.

B. A CALL FROM COBOL TO FDN WITH A PARAMETER LIST CONSISTING


OF:

1. INPUT DATE - - JULIAN DATE TO BE CONVERTED TO A FDN,


DEFINED AS PIC 9 (5) COMP-3.

2. FDN OUTPUT AREA - - AN AREA TO PLACE THE FDN, DEFINED AS


PIC 9 (5) COMP-3.

3. DAY OF WEEK OUTPUT AREA - - AN AREA TO PLACE THE DAY OF


THE WEEK, DEFINED AS PIC 9 COMP-3.

IV. RESTRICTIONS

A. JULIAN DATE SUPPLIED MUST BE IN THE RANGE OF 00001 THROUGH


99365.
DATE CONVERSION
JULNFDN (ALSO CALLED FDN)

V. INPUT

A. JULIAN DATE

B. LINKAGE EDITOR INPUT

1. MODULES JULNFDN AND FDN ARE IN THE CATALOGED DATA SET


UTI.PROD.SUBLIB

VI. OUTPUT DATA

A. FIVE DIGIT NUMBER (FDN) - (ZERO IF INPUT DATE INVALID).

B. DAY OF WEEK CORRESPONDING TO THE FDN.

1 DIGIT NUMBER - 0 (SUNDAY) THROUGH 6 (SATURDAY)

C. RETURN CODE (0 - GOOD DATE, 16 = INVALID DATE)


APPENDIX A

Reserved and Unreserved Keywords

ABEXIT
ACCESS
ACROSS
ADD
AFTER-BREAK
AFTER-LINE
ALL
ALPHABETIC
ALTSEQ
AND
AREA
ARG
ASA

BEFORE
BEFORE-BREAK
BEFORE-LINE
BIND
BUFNO
BUSHU
BWZ
BY

CALC
CALL
CARD
CASE
CHKP
CHKP-STATUS
CISIZE
COL
COLOR
COMMIT
COMPILE
CONNECT
CONSOLE
CONTROL
COPY
CREATE
CRITICAL
CURRENT

APPENDIX A

Reserved and Unreserved Keywords

DA
DBCSCODE
DBKEY
DBNAME
DB2SSID
DEBUG
DEFAULT
DEFER
DEFINE
DELETE
DENWA
DESC
DEVICE
DIAG
DICTNAME
DICTNODE
DISCONNECT
DISL
DISPLAY
DLI
DLM
DMAP
DO
DOWN
DTLCOPY
DTLCTL
DUMP
DUPLICATE

ELEMENT-RECORD
ELSE
EMPTY
END
END-CASE
END-DO
END-IF
END-PROC
ENDPAGE
ENDTABLE
EQ
ERASE
ES
EVERY
EXC
EXCLUSIVE
EXECUTE
EXIT
EXITSTR
EXTENDED
EXTERNAL
APPENDIX A

Reserved and Unreserved Keywords

FB
FBA
FILE
FILE-STATUS
FILL
FINAL
FIND
FINISH
FIRST
FIRST-DUP
FLDCHK
FLOW
FLOWSZ
FOR
FROM
FULLTRK

GE
GET
GIVING
GO
GOTO
GQ
GT

HEADING
HEX
HIAR
HIGH-VALUES
HIGHEST

ID
IDMS
IDMSDB
IDMSNODE
IF
IN
INDEX
INPUT
INSTREAM
INTO
IS

JOB

KEEP
KEY
KEYFILE
KEYVALUE

APPENDIX A

Reserved and Unreserved Keywords

LABELS
LAST-DUP
LE
LEVEL
LIKE
LIMIT
LINE
LINE-COUNT
LINE-NUMBER
LINESIZE
LINK
LIST
LOGICAL-RECORD
LONG
LOW VALUES
LOWEST
LQ
LRF
LS
LT

MACRO
MACROS
MASK
MATCHED
MAX
MDO
MELSE
MEMBER
MEMBERS
MEMORY
MEND
MIF
MIXED
MOD
MODIFY
MOVE
MRETURN
MSET
MSG
MSTART

APPENDIX A

Reserved and Unreserved Keywords

NAME
NE
NEWPAGE
NEXT
NL
NO
NOADJUST
NOCLIST
NODATE
NODE
NODIAG
NODMAP
NOERASE
NOFILE
NOFLDCHK
NOFLOW
NOHEADING
NOMACRO
NOMACROS
NONE
NOPAGE
NOPARM
NOPMAP
NOPRINT
NORWD
NOSNAP
NOSPREAD
NOSTATE
NOT
NOTE
NOTP
NOVERIFY
NOXREF
NQ
NR
NTH
NULL
NUMERIC

OCCURS
OF
OFF
ON
OR
OWNER

APPENDIX A

Reserved and Unreserved Keywords

PAGE-COUNT
PAGE-NUMBER
PAGESIZE
PARM
PARM-REGISTER
PASSWORD
PATH-ID
PERMANENT
PERFORM
PMAP
POINT
POP
POS
PREP
PREPNAME
PRESIZE
PRIMARY
PRINT
PRINTER
PRIOR
PROC
PROCEDURE
PROCESS
PROGRAM-NAME
PROTECTED
PUNCH
PUSH
PUT

READ
READY
REAL
RECORD
RECORD-COUNT
RECORD-LENGTH
RELEASE
RENUM
REPORT
REPORT-INPUT
RESET
RETAIN
RETRIEVE
RETURN-CODE
REWIND
ROLLBACK

APPENDIX A

Reserved and Unreserved Keywords

SCREEN
SEARCH
SECONDARY
SELECT
SELECTIVE
SEQUENCE
SET
SHARE
SHORT
SHR
SIZE
SKIP
SMAP
SNAP
SORT
SOURCE
SPACE
SPACES
SPREAD
SQL
SSA
SSANO
START
STATE
STATISTICS
STATUS
STOP
STORE
SUM
SUMCTL
SUMFILE
SUMMARY
SUMSPACE
SYNTAX
SYS
SYSDATE
SYSIN
SYSIPT
SYSLST
SYSPRINT
SYSNAP
SYSTIME

APPENDIX A

Reserved and Unreserved Keywords

TABLE
TAG
TALLY
TALLYSIZE
TAPE
TERM
TERMINATION
THRU
TITLE
TITLESKIP
TO
TP
TRC

UNIQUE
UNLOAD
UNTIL
UPDATE
USER
USERID
USING

VALUE
VB
VBS
VERIFY
VFM
VIRTUAL
VS

WHERE
WHILE
WITH
WORK
WORKAREA
WRITE

XOR
XREF
XRST

YES

ZERO
ZEROES
ZEROS

APPENDIX B
COMMON VSAM STATUS KEYS

0- - operation performed successfully


4- - end-of-file during GET operation
8- - duplicate record (PUT or WRITE)
duplicate record (GET operation
12- - sequence error (PUT operation)
16- - record NOT found (READ operation)

—A—
ACCOUNTING INFORMATION
JOB CLASSES, 148
PERFORM PARAMETER, 148
ACOUNTING INFORMATION
JOB CARD, 147
ACTIVITY SECTION, 9
AFTER - BREAK. PROC
INTRODUCTION, 108
AFTER-BREAK. PROC
EXAMPLES, 111
AFTER-LINE. PROC
EXAMPLES, 114
AFTER-LINE. PROC
INTRODUCTION, 112
ARITHMETIC OPERATION
EXAMPLES, 59
INTEGER OPTION, 61
INTRODUCTION, 59
ROUNDED OPTION, 61
ASSIGNMENT
EXAMPLES, 56
SYNTAX, 56
—B—
BEFORE PROC
SORT ACTIVITY, 122
BEFORE-BREAK. PROC
EXAMPLES, 110
BEFORE-LINE PROC
INTRODUCTION, 112
BEFORE-LINE. PROC
EXAMPLES, 113
—C—
CALL STATEMENT
SYNTAX, 63
CONTROL
REPORT ACTIVITY, 75
COPY STATEMENT, 28
—D—
DATA FORMAT, 20
DECIMAL POSITIONS, 21
DISPLAY STATEMENT, 35
DO WHILE
INTRODUCTION, 51
DTLCTL NONE
REPORT ACTIVITY, 80
DTLCTL EVERY
REPORT ACTIVITY, 79
DTLCTL FIRST
REPORT ACTIVITY, 78
—E—
EDIT MASK, 23
ENDPAGE. PROC
EXAMPLES, 116
INTRODUCTION, 115
ENVIRONMENT SECTION, 7
EOF CHECKING, 30
EZT+ RESERVED WORDS
APPENDIX A, 154
—F—
FIELD LENGTH, 19
FIELD NAME, 19
FILE DIRECTING PARAMETERS
REPORT ACTIVITY, 71
FILE STATEMENT, 18
FINISH PROC, 31
—G—
GET COMMAND, 40
GO TO COMMAND
EXAMPLES, 54
SYNTAX, 54
GREGJULN
DATE CONVERSION, 150
—H—
HEADING
FIELD DEFINITION, 25
HEADING STATEMENT
REPORT ACTIVITY, 92
—I—
IF COMMAND
BASIC SAMPLES, 46
COMPOUND CONDITIONS, 48
NESTING, 49
SYNTAX, 45
—J—
JCL
BASIC EXAMPLE, 139
COMPILE / EXECUTE, 140
COMPILE / LINK, 141
JULNFDN
DATE CONVERSION, 152
JULNGREG
DATE CONVERSION, 151
—L—
LEVEL FEATURE, 109
LIBRARY SECTION, 8
LINE STATEMENT
REPORT ACTIVITY, 93
—M—
MACRO PROCESSING
CREATING A MACRO, 137
INTRODUCTION, 137
INVOKING A MACRO, 137
LIBRARY, 137
MATCH PROCESSING
DUPLICATES, 134
EXAMPLE, 135
FILE-PRESENCE, 134
FIRST-DUP, 134
INTRODUCTION, 133
LAST-DUP, 134
MATCHED, 134
SYNTAX, 133
MOVE
FORMAT 1 EXAMPLES, 57
FORMAT 2 EXAMPLES, 58
MULTIPLE REPORTS
EXAMPLES, 95
INTRODUCTION, 94
—P—
PARM PROCESSING
EXAMPLES, 145
INTRODUCTION, 145
PERFORM STATEMENT
USER PROCEDURES, 65
POINT COMMAND, 41
PRINT COMMAND, 34
PUT COMMAND, 39
—R—
READ COMMAND, 42
REDEFINITION
FILE ENTRY, 22
WORKING STORAGE, 22
REPORT ACTIVITY
INTRODUCTION, 67
SAMPLE, 72
REPORT-INPUT. PROC
EXAMPLES, 107
INTRODUCTION, 106
—S—
SEARCH COMMAND
TABLES, 128
SEQUENCE
REPORT ACTIVITY, 74
SORT ACTIVITY
CODING SORT STATEMENT, 122
DEFINING SORT STATEMENT, 121
EXAMPLES, 124
INTRODUCTION, 120
SYNTAX, 120
SPACING PARAMETERS
REPORT ACTIVITY, 69
SPECIAL CHARACTERS, 15
SPECIAL FEATURES, 3
SPECIAL PROCEDURES
SYNTAX, 105
START PROC, 31
STARTING LOCATION, 19
STOP COMMAND, 38
STRUCTURE, 5
SUM STATEMENT
REPORT ACTIVITY, 90
SUMCTL
REPORT ACTIVITY, 81
SUMCTL ALL
REPORT ACTIVITY, 82
SUMCTL HIAR
REPORT ACTIVITY, 84
SUMCTL DTLCOPY
REPORT ACTIVITY, 87
SUMCTL NONE
REPORT ACTIVITY, 85
SUMCTL TAG
REPORT ACTIVITY, 86
SUMMARY FILE PROCESSING
EXAMPLES, 100
FILE DEFINITION, 98
INTRODUCTION, 97
REPORT ACTIVITY, 99
SUMMARY REPORT
REPORT ACTIVITY, 87
SUPPRESSION PARAMETERS
REPORT ACTIVITY, 70
SYNTAX, 10
—T—
TABLES
DEFINING VARIABLE TABLES, 130
INTRODUCTION, 126
LIBRARY DEFINITION, 127
REFERENCING VARIABLE TABLES, 131
TALLY
REPORT ACTIVITY, 76
TERMINATION. PROC
INTRODUCTION, 117
TESTING AID PARAMETERS
REPORT ACTIVITY, 72
TITLE STATEMENT
REPORT ACTIVITY, 91
—U—
USER PROCEDURES
EXAMPLES, 65
INTRODUCTION, 65
—V—
VSAM STATUS KEY VALUES
APPENDIX B, 161
—W—
What is EZT+?, 2
WORKING STORAGE
'S' AND 'W' FIELDS, 26
HOW TO CODE, 26
RESET CLAUSE, 27
VALUE CLAUSE, 26
WRITE COMMAND, 43

Potrebbero piacerti anche