Another approach is to try using the J2SE Java open source parser that comes with zcobol in the z390 Portable Mainframe Assembler and COBOL open source package for Windows, Linux, and Apple OSX which you can download from www.z390.org. The first step in compiling any COBOL (.CBL) source including copybooks (.CPY) is to run zc390.java class parser which reads the source and all nested copybooks and parses it into a single HLASM assembler source program (.MLC) containing zcobol macro call statements for each COBOL verb plus EXEC CICS etc. The operands for each COBOL verb appear as assembler positional macro call operands. The zc390.java parser includes a table of reserved word COBOL verbs which may be useful even if you decide to go the REXX or other language route.
You could either modify the java parser or write an assembler parser to extract exactly what you are looking for. You could also just try and compile the source COBOL using the zcobol macro assembler based compiler which generates HLASM basic assembler output source which can be assembled with other zcobol and assembler programs, linked, and executed using z390 and zcobol runtime for J2SE platforms. The zcobol error log file (.ERR) may provide the list of missing field names you are looking for. Don Higgins [email protected] ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
