REXX RECORD LAYOUT PROCEDURE This REXX Procedure was developed to create COBOL Record Layouts to be uploaded to the Mainframe or to be used on the PC such as in MicroFocus COBOL. The REXX Procedure was created using the IBM OS/2 v1.3 Database Manager User's Guide, Pages J-4 through J-7, and my own limited knowledge of REXX. This REXX procedure is not perfect. There are some known problems, requirements, and some general limitations to use this procedure. As I am doing this in my spare time, it will be upgraded when I have time available. Files in this ZIP. LAYOUT.TXT TABLES.TXT LAYOUT.CMD Known defects: If the EXEC fails during processing, restarting the procedure will sometimes cause an SQL error. Am working on fixing this but it happens intermittently so I haven't paid much attention to it. Normally, just retyping the Proc name and the structure name will take care of the problem. Hope to be fixed in next release. Requirements: This EXEC requires OS/2 EE ver 1.2 or higher. You must have installed Database Manager as part of EE. In addition, the Database and tables must be defined. See the file TABLES.TXT for a listing of the table layouts. You must change the Table names and Database name in the procedure to your own. They are in the procedure as: Database - NMRDD Tables - SRS.STRUCTURE SRS.ELEMENT_STRUCTURE Also, if you change any of the field names, you must change them in the query statements as well. General Limitations: This EXEC requires certain standards to be followed. Levels must begin at 01 or 05. Additional levels within a structure must increase by 5 for each new level. The maximum level you can use is 20. 88 Levels are the only exception to the rule. The following is a sample layout: 01 DATA-RECORD. 05 MIC-OFFICE-CD-RECORD. 10 MIC-REC-ALT-KEY. 15 MIC-RECORD-TYPE-CODE PIC X(01). 88 MIC-RECORD-TYPE-NEW VALUE 'N'. 88 MIC-RECORD-TYPE-OLD VALUE 'O'. 15 MIC-REC-PRIMARY-KEY. 20 MIC-EFFECTIVE-DATE PIC X(06). 20 MIC-BRANCH PIC X(05). 10 MIC-DATA. 15 MIC-OFFICE-GROUP PIC X(19). 15 MIC-OFFICE-DESC PIC X(32). 15 MIC-REGION PIC X(09). 15 MIC-REGION-CODE PIC X(02). 10 MIC-FILLER PIC X(26). The maximum level is 20 because COBOL names can be 30 characters in length. The more levels you indent, the less room you have for additional data on that line. New releases will have additional checks for more robust formatting. Last but not least, this is FREEWARE. I have borrowed other peoples examples and used my own. If you find this useful, pass it on to someone else you think might benefit from it. Thanks, Jonathan Schafer