Overview
The
NIST COBOL Tests have been downloaded and are being used
as an initial test of zcobol compliance with the COBOL 1985
Standard. There are 459 COBOL test programs of which 409
are currently being tested with zcobol. See the
summary statistics showing
translation, assembly, and execution by 2 character program
name prefix. Currently they all translate without
errors.
See the
translation statistics showing the frequency of each
generated zcobol macro call listed in descending order by
frequency followed by alphabetical list. The zcobol
translator program zc390.java/class in z390.jar consists of
1625 lines of java code and uses regular expression parsing
support to translate COBOL programs into equivalent HLASM
compatible macro assembler calls. It's interesting to
note that out of about 440,000 lines of COBOL code, the
following make up over 80% of all verbs: PERIOD, MOVE, WS, PERFORM, LABEL, GO,
IF, ADD, ELSE, and EXIT. PERIOD is the name of the macro
generated to process end of sentence closing structures etc.
WS is the name of the generated macro to handle all data
definitions in working-storage and linkage section with unique
qualified names. LABEL is the generated macro to handle
creating unique qualified paragraph names. The
translator also maps dashes in names to underscores, double
quotes to single quotes, START to ZCSTART, and END
DECLARATIVES to END_DECLARATIVES to avoid assembler conflicts.
See the
Generated HLASM Assembler Instructions showing the
frequency of each generated HLASM assembler instruction listed
in descending order by frequency followed by alphabetical
list. The zcobol directory currently contains 119 macros
corresponding to COBOL verbs and reserved section names plus
9copybooks totaling 7470 lines of conditional structured macro
code. The zcobol directory macros in turn call code
generation macros for the target language environment.
The zcobol\z390 directory contains 44 code generation macros
and 4 copybooks totaling 13,250 lines of conditional
structured macro code. Of the million plus lines of
generated HLASM assembler code generated, over 80% consist of
the following: DS, LARL, EQU, L, MVC, BASR, DC, MVI, LAY,
USING, ORG, DROP, and BRC. The LARL is used to address
single literal pool without requiring base register.
Much work has been done and the zcobol compiler does
compile and execute programs including a number of EXEC CICS
COBOL programs and also a number of demo and zcobol regression
test COBOL programs. However, there is still much work
to do to complete the NIST COBOL 1985 test suite. See
the
pending priority list here and join the zcobol user email
group to participate in future direction of zcobol and the setting
of priorities going forward.
The HLASM generation macros could now be copied to other
target language directories for Java, C, and MASM and then
modified to generate the appropriate equivalent source code.
However, the current focus will remain on HLASM and since the
zcobol generic language macros which call the code generation
macros are still subject to change, delaying the start of
other target language macro libraries is recommended.
There are existing example generation macros already included
which support compiling the zcobol\demo\HELLO.CBL program into
executable J2SE Java, Microsoft Visual C, and Intel MASM
assembler.
|
Summary
Statistics
The following summary report shows the current progress
toward translating, assembling, and executing 409 NIST
test programs for COBOL 1985 using zcobol and z390 version
v1.5.01. This report was generated automatically using
the following set of ZPAR utility commands:
call zpar\ZPARGEN zpar\ZCCLG \work\nist\src\*.CBL
call zpar\ZPARSUM2
\work\nist\src\*.ERR
TRANSLATE ASSEMBLY EXECUTION
ID TOT RC=0 RC>0 RC<=4 RC=8 RC>8 RC=0 RC>0
CM 7 7 0 0 7 0 0 0
DB 10 10 0 0 10 0 0 0
EX 1 1 0 0 1 0 0 0
IC 35 35 0 26 9 0 7 7
IF 42 42 0 0 42 0 0 0
IX 38 38 0 0 38 0 0 0
NC 92 92 0 18 72 0 2 18
OB 9 9 0 3 6 0 0 2
RL 32 32 0 0 32 0 0 0
RW 4 4 0 0 4 0 0 0
SG 10 10 0 0 10 0 0 0
SM 7 7 0 1 6 0 0 1
SQ 82 82 0 0 82 0 0 0
ST 39 39 0 0 39 0 0 0
**
408 408 0 48 358 0 9 28
Notes:
-
The total NIST COBOL 1985 test suite
includes 459 programs.
-
SM201A and SM206A
have been removed pending completion of RPI 1068 support for
split pseudo literal for COPY REPLACING.
-
IC223a thru IC237A
(11) have been removed pending RPI 1070 to add support for
batch compiles from single CBL source with END PROGRAM
statements.
-
Removed 31 programs
of the form IDNNNM which intentionally raise flags to test
for error checking.
-
Remove SM201A through SM208A until RPI
1006 is implemented to support the REPLACE verb.
-
All of the remaining 408 programs
translate and assemble without any abnormal terminations in
30 minutes which is an average of about 4 seconds per
program on Dell 3 GHZ duo core Windows Vista system..
-
The next step will
be to add missing functions identified by MNOTE's in order
to assemble and execute successfully.
|
Pending
Priority List for zcobol Development
The following priorities for
the open source zcobol portable COBOL compiler are based on
user feedback. Special thanks to Bill Klein for starting
the process. To submit your priorities, join the
zcobol
user email group and post your requests:
- Nucleus
- Data Division (fix a few remaining unsupported clauses
such as JUSTIFIED RIGHT)
- IF (add support for expressions using ZC_CALC shared
with COMPUTE)
- MOVE CORRESPONDING
- Functions
-
Date
functions
-
Ordering
(MIN, MAX, ORD-MIN, and ORD-MAX)
-
MIsc ORD,
CHAR, UPPER-/LOWER-CASE
-
Math
functions (SQRT, SIN, COS, etc.).
- Debugging
- EXHIBIT (READY/RESET TRACE already done)
-
File Access
-
Sequential
(ESDS, QSAM,LINE SEQUENTIAL already done)
-
Random
(RRDS, BDAM)
-
Indexed
(KSDS)
-
Source text
management
-
REPLACE
(COPY REPLACING already supported)
- SORT and MERGE
-
Last
priority after everything else is done
-
Segmentation
-
Communications
|