home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / 3x400 / indntcl2.lzh / READ.ME < prev   
Text File  |  1989-07-12  |  3KB  |  71 lines

  1.  
  2. Indented CLP Listing Command (INDENTCL)
  3. Written by: Scott Shepler
  4.             Programmer/Analyst for Systems Management, Inc. (SMI)
  5.  
  6. This command is used to create a listing of a CLP source member on the IBM
  7. System/38 (or optionally, AS/400).  On the listing, all command lines are
  8. organized into a common format showing command labels always starting in the
  9. same column and also showing all DO groups in an indented fashion.  The source
  10. member itself is not changed.
  11.  
  12. The most common usage of this command is when you encounter a source member
  13. that has multiple nested IF-THEN-DO groups.  This will allow you to print the
  14. member in a common, familiar format that is easy to read.
  15.  
  16. This command also comes in handy when you have to debug a long CL Program which
  17. was written by a programmer that lays their code out in a strange fashion that
  18. to them, may seem easy to read, but to you looks like trash!  Running this
  19. command against the source will re-format the code into a listing that will be
  20. easier for you to interpret and debug.
  21.  
  22. UPLOADING THE SOURCE:
  23.  
  24.   PC Support/38 was used to download the source using "no conversion".
  25.   The reason it was done this way is to preserve the special attributes used
  26.   in commenting the source so, when you upload the source members to your S/38,
  27.   use "no conversion".
  28.  
  29. CHANGING THE SOURCE FOR THE AS/400 (Optional):
  30.  
  31.   If this source is to be compiled on the IBM AS/400, one minor change needs to
  32.   be made to the CLP source before it can be compiled in native mode.  Please
  33.   make the following change to the CLP source member INDENTCP.CLP:
  34.  
  35.   Change ==> 0033.00 OVRDBF FILE(SRCFILE) TOFILE(&FILE.&LIB) MBR(&MBR)
  36.       To ==> 0033.00 OVRDBF FILE(SRCFILE) TOFILE(&LIB/&FILE) MBR(&MBR)
  37.  
  38. CREATING THE OBJECTS:
  39.   
  40.   1). Execute the following command:
  41.  
  42.       CRTSRCPF FILE(SRCFILE)
  43.  
  44.       This will create a dummy source file in QGPL that will be used in
  45.       compiling the RPG program.
  46.  
  47.   2). Compile the RPG program (INDENTCL.RPG).
  48.  
  49.   3). Delete the dummy source file.
  50.  
  51.       DLTF FILE(SRCFILE)
  52.  
  53.   4). Compile the CLP program (INDENTCP.CLP).
  54.  
  55.   5). Create the command INDENTCL using the source in INDENTCL.CMD
  56.       and specifying the CL Program INDENTCP as the CPP (Command Processing
  57.       Program.)
  58.  
  59. RUNNING THE COMMAND:
  60.  
  61.   From a Command Entry line, type INDENTCL and prompt using Cmd4.  Fill in 
  62.   the name of the source file, source file library, and source file member
  63.   and press Enter.  This command is also executable from within a CL program.
  64.  
  65.   The print file used to create the listing is QSYSPRT, so if you wanted the
  66.   listing to go to an outq other than QPRINT, or you wanted the listing to
  67.   be SAVed after printing, before executing the INDENTCL command, execute an
  68.   override with print file (OVRPRTF) command to override the normal spool file
  69.   attributes of QSYSPRT.
  70.  
  71.