home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / LAYOUT.ZIP / LAYOUT.TXT < prev    next >
Text File  |  1991-05-17  |  3KB  |  59 lines

  1.                                          REXX  RECORD LAYOUT PROCEDURE
  2.  
  3.  
  4. 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.
  5.  
  6.  
  7.     Files in this ZIP.
  8.  
  9.         LAYOUT.TXT
  10.         TABLES.TXT
  11.         LAYOUT.CMD
  12.  
  13.  
  14.  
  15. 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.
  16.  
  17. 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:      
  18.  
  19.         Database - NMRDD
  20.                 Tables   - SRS.STRUCTURE 
  21.                SRS.ELEMENT_STRUCTURE
  22.  
  23.     Also, if you change any of the field names, you must change them in the query statements as well.
  24.  
  25.  
  26. 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:
  27.  
  28.  
  29.             01  DATA-RECORD.
  30.         05  MIC-OFFICE-CD-RECORD.
  31.                 10  MIC-REC-ALT-KEY.
  32.                     15  MIC-RECORD-TYPE-CODE                  PIC X(01).
  33.                           88  MIC-RECORD-TYPE-NEW                     
  34.                          VALUE 'N'.
  35.                        88  MIC-RECORD-TYPE-OLD                     
  36.                                 VALUE 'O'.
  37.                 15  MIC-REC-PRIMARY-KEY.
  38.                             20  MIC-EFFECTIVE-DATE                PIC X(06).
  39.                             20  MIC-BRANCH                        PIC X(05).
  40.                     10  MIC-DATA.
  41.                         15  MIC-OFFICE-GROUP                      PIC X(19).
  42.                         15  MIC-OFFICE-DESC                       PIC X(32).
  43.                         15  MIC-REGION                            PIC X(09).
  44.                         15  MIC-REGION-CODE                       PIC X(02).
  45.                     10  MIC-FILLER                                PIC X(26).
  46.  
  47. The maximum level is 20 because COBOL names can be 30 characters in length.  The more levels you indent, the
  48. less room you have for additional data on that line.  New releases will have additional checks for more robust formatting.
  49.  
  50.  
  51.  
  52. 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.
  53.  
  54.  
  55.  
  56. Thanks,
  57.  
  58.  
  59. Jonathan Schafer