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.
- 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.
- 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.
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.
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.
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.
Any time multiple parameters are coded in an EZT+ statement they MUST be enclosed in parentheses.
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)
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)
* * 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 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 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
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.
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.
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+
prints SAMPLE REPORT
but: TITLE 1 ‘SAMPLE REP-
prints SAMPLE REP ORT
* ( ) (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.
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.