home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / listin.zip / LISTINI.CMD < prev    next >
OS/2 REXX Batch file  |  1994-12-25  |  73KB  |  1,049 lines

  1. /*------------------------------------------------------------------------*\
  2. |                                                                          |
  3. |            LISTINI.CMD - Version 2.2 - Version Date 1994-12-25           |
  4. |                 Copyright (C) 1994 by C F S Nevada, Inc.                 |
  5. |                                                                          |
  6. |                  by Dick Goran  - Voice    702-732-9616                  |
  7. |                                 - FAX      702-732-3847                  |
  8. |                                 - CIS      71154,2002                    |
  9. |                                 - Internet dgoran@cfsrexx.com            |
  10. |                                                                          |
  11. |  03/30/94 - Shift "partial" right                                        |
  12. |                                                                          |
  13. |  12/25/94 - Ignore the "colors" application names if the environment     |
  14. |             variable COLORS=NO has been set.                             |
  15. |                                                                          |
  16. | ------------------------------------------------------------------------ |
  17. |  REXXLIB.DLL  - OS/2 REXX external function library                      |
  18. |                 (c) Copyright 1992-94 Quercus Systems                    |
  19. \*------------------------------------------------------------------------*/
  20. parse Version         REXX_Version .                              /* 0020 */
  21. parse Source          OS_Name,                                    /* 0021 */
  22.                       Calling_Environment,                        /* 0022 */
  23.                       program_path_and_name                       /* 0023 */
  24. GBL.environment     = 'OS2ENVIRONMENT'                            /* 0024 */
  25. GBL.program_name    = FILESPEC( 'N', program_path_and_name )      /* 0025 */
  26. GBL.program_path    = FILESPEC( 'D', program_path_and_name ) ||,  /* 0026 */
  27.                       FILESPEC( 'P', program_path_and_name )      /* 0027 */
  28. GBL.program_version = 2.2           /* version / mod of this program */
  29. call TIME 'E'                       /* set elapsed timer - sssss.uuuuu */
  30.                                                                   /* 0030 */
  31. say 'Begin' GBL.program_name 'at' TIME('N')                       /* 0031 */
  32. call REGISTER_REQUIRED_FUNCTIONS                                  /* 0032 */
  33.                                                                   /* 0033 */
  34.    SIGNAL ON ERROR                  /* trap object time errors     */
  35.    SIGNAL ON FAILURE                /* trap object time errors     */
  36.    SIGNAL ON HALT                   /* trap object time errors     */
  37.    SIGNAL ON NOVALUE                /* trap object time errors     */
  38.    SIGNAL ON SYNTAX                 /* trap object time errors     */
  39.  
  40. /*01---------------------------------------------------*
  41.  *                                                     *
  42.  *    Get optional input parameters:                   *
  43.  *                                                     *
  44.  *    1) SHORT | long - short vs. long form output     *
  45.  *    2) file_name - output file name                  *
  46.  *    3) INI file name                                 *
  47.  *                                                     *
  48.  *    default: S, LISTINI.SHT, BOTH                    *
  49.  *                                                     *
  50.  *-----------------------------------------------------*/
  51. syslst_format = 'S'     /* default is short form output */        /* 0051 */
  52. syslst = 'LISTINI.SHT'  /* default is ?:\program_path\LISTINI.??? */
  53.                                                                   /* 0053 */
  54. /*---------------------------*\                                   /* 0054 */
  55. |  Processs input parameters  |                                   /* 0055 */
  56. \*---------------------------*/                                   /* 0056 */
  57. parse upper arg  input_parameters                                 /* 0057 */
  58. parse value input_parameters with  short_vs_long,                 /* 0058 */
  59.                              ','   output_device,                 /* 0059 */
  60.                              ','   ini_arg_name                   /* 0060 */
  61.                                                                   /* 0061 */
  62. /*----------------------------------*\                            /* 0062 */
  63. |  Format of output - SHORT or long  |                            /* 0063 */
  64. \*----------------------------------*/                            /* 0064 */
  65. select                                                            /* 0065 */
  66.    when ABBREV( 'LONG',  short_vs_long, 1 ) then                  /* 0066 */
  67.       do                                                          /* 0067 */
  68.          syslst_format = 'L'                                      /* 0068 */
  69.          syslst = LEFT( GBL.program_name, LENGTH(GBL.program_name) - 3 ) ||,
  70.                  'LNG'                                            /* 0070 */
  71.       end                                                         /* 0071 */
  72.    when ABBREV( 'SHORT', short_vs_long, 1 ) then                  /* 0072 */
  73.       do                                                          /* 0073 */
  74.          syslst_format = 'S'                                      /* 0074 */
  75.          syslst = LEFT( GBL.program_name, LENGTH(GBL.program_name) - 3 ) ||,
  76.                   'SHT'                                           /* 0076 */
  77.       end                                                         /* 0077 */
  78.    when short_vs_long = '' then nop                               /* 0078 */
  79.    otherwise                                                      /* 0079 */
  80.       do                                                          /* 0080 */
  81.          say ' '                                                  /* 0081 */
  82.          say 'Parameters required as follws:'                     /* 0082 */
  83.          say ' '                                                  /* 0083 */
  84.          call LIST_SOURCE_STATEMENTS 01                           /* 0084 */
  85.       end                                                         /* 0085 */
  86. end                                                               /* 0086 */
  87.                                                                   /* 0087 */
  88. /*--------------------------------*\                              /* 0088 */
  89. |  Validate output device or file  |                              /* 0089 */
  90. \*--------------------------------*/                              /* 0090 */
  91. output_device = STRIP(output_device)                              /* 0091 */
  92. char_1 = LEFT( output_device, 1 )   /* get leading character of file name */
  93. if ( char_1 = '"' )  |  ( char_1 = "'" ) then                     /* 0093 */
  94.    output_device = STRIP( output_device, 'B', char_1 )            /* 0094 */
  95.                                                                   /* 0095 */
  96. /* assure that 2nd parameter was not omitted accidentally */      /* 0096 */
  97. if output_device \= '' then                                       /* 0097 */
  98.    do                                                             /* 0098 */
  99.       if RIGHT( output_device, 4 ) = '.INI' then                  /* 0099 */
  100.          do                                                       /* 0100 */
  101.             ini_arg_name = output_device                          /* 0101 */
  102.             output_device = ''                                    /* 0102 */
  103.             say ini_arg_name 'is assumed to be the Ini file name' /* 0103 */
  104.             say '^C to quit or <Enter> to continue'               /* 0104 */
  105.             pull                                                  /* 0105 */
  106.          end                                                      /* 0106 */
  107.       else                                                        /* 0107 */
  108.          do                                                       /* 0108 */
  109.             syslst = output_device                                /* 0109 */
  110.          end                                                      /* 0110 */
  111.    end                                                            /* 0111 */
  112.                                                                   /* 0112 */
  113. /*-------------------------------------------*\                   /* 0113 */
  114. |  Determine which INI files to use as input  |                   /* 0114 */
  115. \*-------------------------------------------*/                   /* 0115 */
  116. ini_arg_name                 = STRIP(ini_arg_name)                /* 0116 */
  117. ini_attributes_and_file_name = ''  /* attributes of user specified INI file */
  118.                                                                   /* 0118 */
  119. char_1 = LEFT( ini_arg_name, 1 )   /* get leading character of file name */
  120. if ( char_1 = '"' )  |  ( char_1 = "'" ) then                     /* 0120 */
  121.    ini_arg_name = STRIP( ini_arg_name, 'B', char_1 )              /* 0121 */
  122.                                                                   /* 0122 */
  123. select                                                            /* 0123 */
  124.    when ini_arg_name = '' then                                    /* 0124 */
  125.       ini_file_name  = 'BOTH'                                     /* 0125 */
  126.    when ini_arg_name = 'BOTH' then                                /* 0126 */
  127.       ini_file_name  = 'BOTH'                                     /* 0127 */
  128.    when ini_arg_name = 'USER' then                                /* 0128 */
  129.       ini_file_name  = VALUE( 'USER_INI',, GBL.environment )      /* 0129 */
  130.    when ini_arg_name = 'SYSTEM' then                              /* 0130 */
  131.       ini_file_name  = VALUE( 'SYSTEM_INI',, GBL.environment )    /* 0131 */
  132.    otherwise                                                      /* 0132 */
  133.       do                                                          /* 0133 */
  134.          call SysFileTree ini_arg_name, 'ini_file_stem'           /* 0134 */
  135.          if ini_file_stem.0 ¬= 1 then                             /* 0135 */
  136.             do                                                    /* 0136 */
  137.                say '   Unable to locate' ini_arg_name             /* 0137 */
  138.                call EOJ                                           /* 0138 */
  139.             end                                                   /* 0139 */
  140.          parse value ini_file_stem.1 with,                        /* 0140 */
  141.             ini_file_date,                                        /* 0141 */
  142.             ini_file_time,                                        /* 0142 */
  143.             ini_file_size,                                        /* 0143 */
  144.             ini_file_attr,                                        /* 0144 */
  145.             ini_file_name                                         /* 0145 */
  146.          ini_file_name = STRIP( ini_file_name )                   /* 0146 */
  147.          if SUBSTR( ini_file_attr, 3, 1 ) = 'H' then              /* 0147 */
  148.             do                                                    /* 0148 */
  149.                '@attrib' '"'ini_file_name'"' '-h'                 /* 0149 */
  150.             end                                                   /* 0150 */
  151.       end                                                         /* 0151 */
  152. end                                                               /* 0152 */
  153.                                                                   /* 0153 */
  154. syslst_device_type = STREAM( syslst, 'C', 'Query Exists' ) /*     /* 0154 */
  155.                                                        device vs. file ID */
  156. syslst_line_ct = 999                /* nbr of lines on current page       */
  157. syslst_line_max = 59                /* default is 60 lines per page       */
  158. syslst_line_width = 76              /* arbitrary (not exactly) page width */
  159. syslst_page_ct = 0                  /* current page number                */
  160. col_1_width = 20 + 1                /* print column width - incl space delimiter */
  161. col_2_width = 20 + 1                /* print column width - incl space delimiter */
  162. col_3_width = LENGTH("Len='....'x  ")                             /* 0162 */
  163. col_4_width = syslst_line_width -,                                /* 0163 */
  164.               (col_1_width + col_2_width + col_3_width)           /* 0164 */
  165. short_hex_prefix = COPIES( ' ', col_1_width + col_2_width + col_3_width - 1 ) ||,
  166.                    '|'                                            /* 0166 */
  167. long_hex_prefix = COPIES( ' ', 11 )                               /* 0167 */
  168.                                                                   /* 0168 */
  169. /* used for hex display of data */                                /* 0169 */
  170. contig_hex_tt = XRANGE('01'x, '21'x)                              /* 0170 */
  171. spread_hex_tt = XRANGE('01'x, '08'x) || '21'x ||,                 /* 0171 */
  172.                 XRANGE('09'x, '10'x) || '21'x ||,                 /* 0172 */
  173.                 XRANGE('11'x, '18'x) || '21'x ||,                 /* 0173 */
  174.                 XRANGE('19'x, '20'x)                              /* 0174 */
  175.                                                                   /* 0175 */
  176. tt_128 = COPIES( '.', 32 ) || XRANGE('20'X, '7F'X) || COPIES( '.', 128 )
  177. tt_256 = '2E01 0203 0405 062E 2E2E 2E0B 0C2E 0E0F'X ||,           /* 0177 */
  178.          '1011 1213 1415 1617 1819 1A2E 1C1D 1E1F'X ||,           /* 0178 */
  179.          XRANGE('20'X, 'FE'X) || '.'                              /* 0179 */
  180.                                                                   /* 0180 */
  181. /*------------------------*\                                      /* 0181 */
  182. |  setup centered heading  |                                      /* 0182 */
  183. \*------------------------*/                                      /* 0183 */
  184. heading_1 = DATE('U')  TIME('N')    /* left side of heading               */
  185. title_1_ini_name = ini_file_name                                  /* 0185 */
  186. if title_1_ini_name = 'BOTH' then                                 /* 0186 */
  187.    do                                                             /* 0187 */
  188.       title_1_ini_name =,                                         /* 0188 */
  189.          FILESPEC( 'D', VALUE( 'USER_INI',, GBL.environment ) ) ||,
  190.          FILESPEC( 'P', VALUE( 'USER_INI',, GBL.environment ) ) ||,
  191.          '*.INI'                                                  /* 0191 */
  192.    end                                                            /* 0192 */
  193. title_1 = TRANSLATE( GBL.program_name ) GBL.program_version ||,   /* 0193 */
  194.           ' - List of ' ||,                                       /* 0194 */
  195.           title_1_ini_name                                        /* 0195 */
  196. title_1_space_count = MAX( 1, ( syslst_line_width -,              /* 0196 */
  197.                                LENGTH(heading_1) - 8 -,           /* 0197 */
  198.                                LENGTH(title_1) ) % 2 )            /* 0198 */
  199. title_1_spaces = COPIES( ' ', title_1_space_count )               /* 0199 */
  200. heading_1 = heading_1 || title_1_spaces || title_1 || title_1_spaces || 'Page'
  201. if LEFT( ini_file_name, 2 ) = ':\' then                           /* 0201 */
  202.    do                                                             /* 0202 */
  203.       heading_1a = CENTER(,                                       /* 0203 */
  204.                           ini_file_name ||,                       /* 0204 */
  205.                           COPIES( ' ', 3 ) ||,                    /* 0205 */
  206.                           STREAM( ini_file_name, 'C', 'QUERY DATETIME' ),
  207.                           , LENGTH(heading_1) )                   /* 0207 */
  208.    end                                                            /* 0208 */
  209. else                                                              /* 0209 */
  210.    heading_1a = ''                                                /* 0210 */
  211. heading_2 = LEFT( 'Application Name', col_1_width ) ||,           /* 0211 */
  212.             LEFT( 'Key Name', col_2_width ) ||,                   /* 0212 */
  213.             LEFT( 'Length', col_3_width ) ||,                     /* 0213 */
  214.             LEFT( 'Contents', col_4_width )                       /* 0214 */
  215. heading_3 = COPIES( '-', col_1_width - 2 ) || COPIES( ' ', 2 ) ||,
  216.             COPIES( '-', col_2_width - 2 ) || COPIES( ' ', 2 ) ||,
  217.             COPIES( '-', col_3_width - 2 ) || COPIES( ' ', 2 ) ||,
  218.             COPIES( '-', col_4_width )                            /* 0218 */
  219.                                                                   /* 0219 */
  220. /*---------------------------------*\                             /* 0220 */
  221. |  delete output file if it exists  |                             /* 0221 */
  222. \*---------------------------------*/                             /* 0222 */
  223. call SysFileDelete syslst           /* erase any previous file            */
  224. call STREAM syslst, 'C', 'OPEN'     /* create file entry */       /* 0224 */
  225. say 'Listing '       ||,                                          /* 0225 */
  226.     title_1_ini_name ||,                                          /* 0226 */
  227.     ' on '           ||,                                          /* 0227 */
  228.     STREAM( syslst, 'C', 'QUERY EXISTS' )                         /* 0228 */
  229.                                                                   /* 0229 */
  230. /*---------------------------*\                                   /* 0230 */
  231. |  Get All Application Names  |                                   /* 0231 */
  232. \*---------------------------*/                                   /* 0232 */
  233. Apps.        = ''                                                 /* 0233 */
  234. Both_Index.  = ''                                                 /* 0234 */
  235. System_Apps. = ''                                                 /* 0235 */
  236. User_Apps.   = ''                                                 /* 0236 */
  237.                                                                   /* 0237 */
  238. if ini_file_name = 'BOTH' then                                    /* 0238 */
  239.    do                                                             /* 0239 */
  240.       /*--------------------------------------------------*\      /* 0240 */
  241.       |  Build index from both OS2SYS.INI & OS2.INI  |            /* 0241 */
  242.       \*--------------------------------------------------*/      /* 0242 */
  243.       call SysIni 'SYSTEM', 'ALL:', 'System_Apps'                 /* 0243 */
  244.       do i = 1 to System_Apps.0                                   /* 0244 */
  245.          application_name = System_Apps.i                         /* 0245 */
  246.          Both_Index.application_name = 'S '                       /* 0246 */
  247.       end                                                         /* 0247 */
  248.       call SysIni 'USER', 'ALL:', 'User_Apps'                     /* 0248 */
  249.       do i = 1 to User_Apps.0                                     /* 0249 */
  250.          application_name = User_Apps.i                           /* 0250 */
  251.          if Both_Index.application_name = '' then                 /* 0251 */
  252.             do                                                    /* 0252 */
  253.                Both_Index.application_name = 'U '                 /* 0253 */
  254.             end                                                   /* 0254 */
  255.          else                                                     /* 0255 */
  256.             do                                                    /* 0256 */
  257.                Both_Index.application_name = 'B '                 /* 0257 */
  258.             end                                                   /* 0258 */
  259.       end                                                         /* 0259 */
  260.    end                                                            /* 0260 */
  261.                                                                   /* 0261 */
  262. call SysIni ini_file_name, 'ALL:', 'Apps'                         /* 0262 */
  263. if RESULT \= '' then                                              /* 0263 */
  264.    do                                                             /* 0264 */
  265.       say 'SysIni returned' RESULT 'from ALL query'               /* 0265 */
  266.       call EOJ                                                    /* 0266 */
  267.    end                                                            /* 0267 */
  268. if Apps.0 = 0 then                                                /* 0268 */
  269.    do                                                             /* 0269 */
  270.       Say ini_file_name 'exists but contains no keys'             /* 0270 */
  271.       call EOJ                                                    /* 0271 */
  272.    end                                                            /* 0272 */
  273. if RxFuncQuery('ARRAYSORT') = 0 then                              /* 0273 */
  274.    do                                                             /* 0274 */
  275.       /* sort application names */                                /* 0275 */
  276.       call ARRAYSORT 'Apps', 1, Apps.0                            /* 0276 */
  277.    end                                                            /* 0277 */
  278.                                                                   /* 0278 */
  279. /* find longest application name */                               /* 0279 */
  280. apps_max_name_length = 0            /* for displaying names consistently */
  281. do i = 1 to Apps.0                                                /* 0281 */
  282.    apps_max_name_length = MAX( apps_max_name_length, LENGTH(Apps.i) )
  283. end                                                               /* 0283 */
  284.                                                                   /* 0284 */
  285. /*------------------------------------------------------------------------*\
  286. |                                                                          |
  287. |          Get Keys For All Applications and Produce Listing File          |
  288. |                                                                          |
  289. \*------------------------------------------------------------------------*/
  290. bksp = '08'x                                                      /* 0290 */
  291. progress_list = '─\|/'                                            /* 0291 */
  292. progress_subscript = 1                                            /* 0292 */
  293. ignore_colors = ( TRANSLATE( VALUE( 'COLORS',, GBL.environment ) ) = 'NO' )
  294.                                                                   /* 0294 */
  295. do app_number = 1 to Apps.0                                       /* 0295 */
  296.    application_name = Apps.app_number                             /* 0296 */
  297.    if ignore_colors then                                          /* 0297 */
  298.       if LEFT( application_name, 3 ) = 'PM_',                     /* 0298 */
  299.                       &,                                          /* 0299 */
  300.          RIGHT( application_name, 6 ) = 'Colors' then iterate     /* 0300 */
  301.                                                                   /* 0301 */
  302.    call CHAROUT 'CON:', 'Processing ' ||,                         /* 0302 */
  303.                         LEFT( application_name, apps_max_name_length ) ||,
  304.                         COPIES( ' ', 2 )                          /* 0304 */
  305.    call SysCurState 'OFF'                                         /* 0305 */
  306.    call SysIni ini_file_name, application_name, 'ALL:', 'Keys'    /* 0306 */
  307.    if RESULT \= '' then                                           /* 0307 */
  308.       do                                                          /* 0308 */
  309.          say 'SysIni returned ' ||,                               /* 0309 */
  310.               RESULT ||,                                          /* 0310 */
  311.               ' from ' ||,                                        /* 0311 */
  312.               application_name ||,                                /* 0312 */
  313.               ' query'                                            /* 0313 */
  314.          call EOJ                                                 /* 0314 */
  315.       end                                                         /* 0315 */
  316.                                                                   /* 0316 */
  317.    if ( RxFuncQuery('ARRAYSORT') = 0 )   &  ( keys.0 > 1 ) then   /* 0317 */
  318.       do                                                          /* 0318 */
  319.          /* sort key names */                                     /* 0319 */
  320.          call ARRAYSORT 'Keys', 1, Keys.0                         /* 0320 */
  321.       end                                                         /* 0321 */
  322.                                                                   /* 0322 */
  323.    /* Prefix System, User or Both */                              /* 0323 */
  324.    output_line =  Both_Index.application_name ||,                 /* 0324 */
  325.                   application_name                                /* 0325 */
  326.                                                                   /* 0326 */
  327.    /*---------------------------------------*\                    /* 0327 */
  328.    |  Process each key for this application  |                    /* 0328 */
  329.    \*---------------------------------------*/                    /* 0329 */
  330.    do key_number = 1 to Keys.0                                    /* 0330 */
  331.       call CHAROUT 'CON:', bksp ||,                               /* 0331 */
  332.                           SUBSTR( progress_list, progress_subscript, 1 )
  333.       progress_subscript = progress_subscript + 1                 /* 0333 */
  334.       if progress_subscript > LENGTH(progress_list) then          /* 0334 */
  335.          progress_subscript = 1                                   /* 0335 */
  336.                                                                   /* 0336 */
  337.       key_value = SysIni( ini_file_name, application_name, Keys.key_number )
  338.       hex_key_length = D2X( LENGTH(key_value), 4 )                /* 0338 */
  339.       if LENGTH(output_line) < col_1_width then                   /* 0339 */
  340.          do                                                       /* 0340 */
  341.             /* pad output line */                                 /* 0341 */
  342.             output_line = LEFT( output_line , col_1_width )       /* 0342 */
  343.          end                                                      /* 0343 */
  344.       else                                                        /* 0344 */
  345.          do                                                       /* 0345 */
  346.             /* print long line first */                           /* 0346 */
  347.             call PRINT_ROUTINE                                    /* 0347 */
  348.             output_line = COPIES( ' ', col_1_width )              /* 0348 */
  349.          end                                                      /* 0349 */
  350.                                                                   /* 0350 */
  351.       output_line = output_line ||,                               /* 0351 */
  352.                     TRANSLATE( Keys.key_number, tt_256 )          /* 0352 */
  353.       if LENGTH(output_line) < (col_1_width + col_2_width) then   /* 0353 */
  354.          do                                                       /* 0354 */
  355.             /* pad output line */                                 /* 0355 */
  356.             output_line = LEFT(output_line,,                      /* 0356 */
  357.                           col_1_width + col_2_width )             /* 0357 */
  358.          end                                                      /* 0358 */
  359.       else                                                        /* 0359 */
  360.          do                                                       /* 0360 */
  361.             /* print long line first */                           /* 0361 */
  362.             call PRINT_ROUTINE                                    /* 0362 */
  363.             output_line = COPIES( ' ', col_1_width + col_2_width )
  364.          end                                                      /* 0364 */
  365.                                                                   /* 0365 */
  366.       output_line = output_line ||,                               /* 0366 */
  367.                     "Len='" ||,                                   /* 0367 */
  368.                     hex_key_length ||,                            /* 0368 */
  369.                     "'x" ||,                                      /* 0369 */
  370.                     COPIES( ' ', 2 )                              /* 0370 */
  371.                                                                   /* 0371 */
  372.       single_line_key_value = key_value                           /* 0372 */
  373.       if ( LENGTH(key_value) > 1 ) & ( RIGHT( key_value, 1 ) = '00'x ) then
  374.          do                                                       /* 0374 */
  375.             single_line_key_value = LEFT( key_value, LENGTH(key_value) - 1 )
  376.          end                                                      /* 0376 */
  377.       printable_key_value = TRANSLATE( single_line_key_value, tt_128 )
  378.       if ( printable_key_value = single_line_key_value ) &,       /* 0378 */
  379.             ( LENGTH(printable_key_value) <= col_4_width ) then   /* 0379 */
  380.          do                                                       /* 0380 */
  381.             call FORMAT_SINGLE_LINE_KEYS                          /* 0381 */
  382.          end                                                      /* 0382 */
  383.       else                                                        /* 0383 */
  384.          if ( syslst_format = 'S') | ( LENGTH(key_value) <= 8 ) then
  385.             do                                                    /* 0385 */
  386.                call FORMAT_SINGLE_LINE_KEYS                       /* 0386 */
  387.             end                                                   /* 0387 */
  388.          else                                                     /* 0388 */
  389.             call FORMAT_MULTI_LINE_KEYS                           /* 0389 */
  390.       output_line = ''                                            /* 0390 */
  391.    end                                                            /* 0391 */
  392.    call LINEOUT 'CON:', bksp || ' - completed.'                   /* 0392 */
  393.    call SysCurState 'ON'                                          /* 0393 */
  394.                                                                   /* 0394 */
  395. end                                                               /* 0395 */
  396.                                                                   /* 0396 */
  397. if LEFT( syslst_device_type, 4 ) = '\DEV' then                    /* 0397 */
  398.    call CHAROUT syslst, '0C'x       /* eject page                         */
  399. call CHAROUT syslst                 /* close output file                  */
  400.                                                                   /* 0400 */
  401. if ini_attributes_and_file_name <> '' then                        /* 0401 */
  402.    do                                                             /* 0402 */
  403.       ini_attributes = STRIP( LEFT( ini_attributes_and_file_name,,
  404.                                     LENGTH( ini_attributes_and_file_name ) -,
  405.                                     LENGTH( ini_file_name ) ) )   /* 0405 */
  406.       if POS( 'S', ini_attributes ) > 0 then                      /* 0406 */
  407.          '@attrib ' || ini_file_name || ' +s'                     /* 0407 */
  408.       if POS( 'H', ini_attributes ) > 0 then                      /* 0408 */
  409.          '@attrib ' || ini_file_name || ' +h'                     /* 0409 */
  410.    end                                                            /* 0410 */
  411. call EOJ                                                          /* 0411 */
  412.                                                                   /* 0412 */
  413. /*------------------------------------------------------------------------*\
  414. |                                                                          |
  415. |                     Key Values Will Fit On Same Line                     |
  416. |                                                                          |
  417. \*------------------------------------------------------------------------*/
  418. FORMAT_SINGLE_LINE_KEYS:                                          /* 0418 */
  419. if printable_key_value = single_line_key_value then               /* 0419 */
  420.    do                                                             /* 0420 */
  421.       output_line = output_line ||,                               /* 0421 */
  422.                     LEFT( printable_key_value, MIN( col_4_width,, /* 0422 */
  423.                                                LENGTH(printable_key_value) ) )
  424.       if RIGHT( key_value, 1 ) = '00'x then                       /* 0424 */
  425.          output_line = output_line || '.'                         /* 0425 */
  426.       call PRINT_ROUTINE                                          /* 0426 */
  427.       return                                                      /* 0427 */
  428.    end                                                            /* 0428 */
  429.                                                                   /* 0429 */
  430. temp_key_value = LEFT( key_value, MIN( 8, LENGTH(key_value) ) )   /* 0430 */
  431. hex_string = TRANSLATE( spread_hex_tt,,                           /* 0431 */
  432.                         C2X(temp_key_value),,                     /* 0432 */
  433.                         contig_hex_tt )                           /* 0433 */
  434. output_line = output_line ||,                                     /* 0434 */
  435.               '''' ||,                                            /* 0435 */
  436.               STRIP(hex_string)                                   /* 0436 */
  437. if temp_key_value <> key_value then                               /* 0437 */
  438.    do                                                             /* 0438 */
  439.       output_line = output_line || COPIES( ' ', 1 )               /* 0439 */
  440.    end                                                            /* 0440 */
  441. output_line = output_line ||,                                     /* 0441 */
  442.               '''x'                                               /* 0442 */
  443. call PRINT_ROUTINE                                                /* 0443 */
  444. return                                                            /* 0444 */
  445.                                                                   /* 0445 */
  446. /*------------------------------------------------------------------------*\
  447. |                                                                          |
  448. |               Key Values Will Require Multiple Print Lines               |
  449. |                                                                          |
  450. \*------------------------------------------------------------------------*/
  451. FORMAT_MULTI_LINE_KEYS:                                           /* 0451 */
  452. call PRINT_ROUTINE                                                /* 0452 */
  453.                                                                   /* 0453 */
  454. hex_displacement      = 0                                         /* 0454 */
  455. prev_character_string = ''                                        /* 0455 */
  456. sameness_switch       = 0                                         /* 0456 */
  457.                                                                   /* 0457 */
  458. /* check for special hex display lengths */                       /* 0458 */
  459. partial_key_switch = 'partial'                                    /* 0459 */
  460. select                                                            /* 0460 */
  461. when application_name = 'PM_Abstract:Icons' then                  /* 0461 */
  462.    key_value = LEFT( key_value, 72 )                              /* 0462 */
  463. otherwise                                                         /* 0463 */
  464.    partial_key_switch = ''                                        /* 0464 */
  465. end                                                               /* 0465 */
  466.                                                                   /* 0466 */
  467. do until key_value = ''                                           /* 0467 */
  468.    parse value key_value with leading_token 17 key_value          /* 0468 */
  469.                                                                   /* 0469 */
  470.    temp_character_string = LEFT( leading_token, 16 )              /* 0470 */
  471.    if temp_character_string <> prev_character_string then         /* 0471 */
  472.       do                                                          /* 0472 */
  473.          temp_hex_string = TRANSLATE( spread_hex_tt,,             /* 0473 */
  474.                                       C2X(temp_character_string),,
  475.                                       contig_hex_tt )             /* 0475 */
  476.          word_count = ( LENGTH(leading_token) - 1 ) % 4           /* 0476 */
  477.          byte_count = LENGTH(leading_token) - ( 4 * word_count )  /* 0477 */
  478.          temp_hex_length = ( 9 * word_count ) + ( 2 * byte_count )
  479.          output_line = COPIES( ' ', 06 ) ||,                      /* 0479 */
  480.                        '+' || D2X( hex_displacement, 4 ) ||,      /* 0480 */
  481.                        COPIES( ' ', 3 ) ||,                       /* 0481 */
  482.                        '| ' ||,                                   /* 0482 */
  483.                        LEFT( temp_hex_string, temp_hex_length ) ||,
  484.                        COPIES( ' ', 35 - temp_hex_length ) ||,    /* 0484 */
  485.                        ' |' ||,                                   /* 0485 */
  486.                        COPIES( ' ', 2 ) ||,                       /* 0486 */
  487.                        TRANSLATE( temp_character_string, tt_128 ) /* 0487 */
  488.          if key_value = '' then                                   /* 0488 */
  489.             output_line = OVERLAY( partial_key_switch,,           /* 0489 */
  490.                                    output_line,,                  /* 0490 */
  491.                                    syslst_line_width -,           /* 0491 */
  492.                                           LENGTH(partial_key_switch) + 1 )
  493.          call PRINT_ROUTINE                                       /* 0493 */
  494.          sameness_switch = 0                                      /* 0494 */
  495.       end                                                         /* 0495 */
  496.    else                                                           /* 0496 */
  497.       if sameness_switch = 0 then                                 /* 0497 */
  498.          do                                                       /* 0498 */
  499.             output_line = COPIES( ' ', 06 ) ||,                   /* 0499 */
  500.                           '+' || D2X( hex_displacement, 4 ) ||,   /* 0500 */
  501.                           COPIES( ' ', 3 ) ||,                    /* 0501 */
  502.                           '| ' ||,                                /* 0502 */
  503.                           LEFT( 'same', 35 ) ||,                  /* 0503 */
  504.                           ' |'                                    /* 0504 */
  505.             call PRINT_ROUTINE                                    /* 0505 */
  506.             sameness_switch = 1                                   /* 0506 */
  507.          end                                                      /* 0507 */
  508.                                                                   /* 0508 */
  509.    hex_displacement = hex_displacement + 16                       /* 0509 */
  510.    prev_character_string = temp_character_string                  /* 0510 */
  511. end                                                               /* 0511 */
  512. return                                                            /* 0512 */
  513.                                                                   /* 0513 */
  514. /*------------------------------------------------------------------------*\
  515. |                                                                          |
  516. |                       List program source comments                       |
  517. |                                                                          |
  518. \*------------------------------------------------------------------------*/
  519. LIST_SOURCE_STATEMENTS:                                           /* 0519 */
  520. parse arg comment_group                                           /* 0520 */
  521. comment_group_switch = 0                                          /* 0521 */
  522. asterisk_slash = '*' || '/'         /* keep 2 characters separated */
  523. slash_asterisk = '/' || '*'         /* keep 2 characters separated */
  524. do forever                                                        /* 0524 */
  525.    if LINES(program_path_and_name) = 0 then CALL EOJ 255          /* 0525 */
  526.    input_line = LINEIN(program_path_and_name)                     /* 0526 */
  527.    slash_asterisk_pos = POS( slash_asterisk, input_line )         /* 0527 */
  528.    if slash_asterisk_pos > 0 then                                 /* 0528 */
  529.       if SUBSTR( input_line,,                                     /* 0529 */
  530.                  slash_asterisk_pos + 2,,                         /* 0530 */
  531.                  LENGTH(comment_group) ) = comment_group then     /* 0531 */
  532.          comment_group_switch = 1                                 /* 0532 */
  533.    if comment_group_switch = 1 then                               /* 0533 */
  534.       say input_line                                              /* 0534 */
  535.    if comment_group_switch = 1 then                               /* 0535 */
  536.       if POS( asterisk_slash, input_line ) > 0 then CALL EOJ 255  /* 0536 */
  537. end                                                               /* 0537 */
  538.                                                                   /* 0538 */
  539. /*------------------------------------------------------------------------*\
  540. |                                                                          |
  541. |                    Print Routine - Includes Headings                     |
  542. |                                                                          |
  543. \*------------------------------------------------------------------------*/
  544. PRINT_ROUTINE:                                                    /* 0544 */
  545. if syslst_line_ct > syslst_line_max then                          /* 0545 */
  546.    do                                                             /* 0546 */
  547.       syslst_page_ct = syslst_page_ct + 1                         /* 0547 */
  548.       syslst_line_ct = 0                                          /* 0548 */
  549.       if syslst_page_ct = 1  |  (LEFT( syslst_device_type, 4 ) = '\DEV')  then
  550.          do                                                       /* 0550 */
  551.             call LINEOUT syslst, heading_1 || FORMAT( syslst_page_ct, 4 )
  552.             if heading_1a <> '' then                              /* 0552 */
  553.                do                                                 /* 0553 */
  554.                   call LINEOUT syslst, heading_1a                 /* 0554 */
  555.                   syslst_line_ct = syslst_line_ct + 1             /* 0555 */
  556.                end                                                /* 0556 */
  557.             call LINEOUT syslst, ' '                              /* 0557 */
  558.             call LINEOUT syslst, heading_2                        /* 0558 */
  559.             call LINEOUT syslst, heading_3                        /* 0559 */
  560.          end                                                      /* 0560 */
  561.       syslst_line_ct = syslst_line_ct + 4                         /* 0561 */
  562.    end                                                            /* 0562 */
  563. call LINEOUT syslst, output_line                                  /* 0563 */
  564. syslst_line_ct = syslst_line_ct + 1                               /* 0564 */
  565. return                                                            /* 0565 */
  566.                                                                   /* 0566 */
  567. /*------------------------------------------------------------------------*\
  568. |                                                                          |
  569. |                   Register external function routines                    |
  570. |                                                                          |
  571. \*------------------------------------------------------------------------*/
  572. REGISTER_REQUIRED_FUNCTIONS:                                      /* 0572 */
  573.                                                                   /* 0573 */
  574. /*----------------------------------------*\                      /* 0574 */
  575. |  Load REXXUtil External Function Module  |                      /* 0575 */
  576. \*----------------------------------------*/                      /* 0576 */
  577. function_name      = 'SysLoadFuncs'                               /* 0577 */
  578. entry_name         = 'SysLoadFuncs'                               /* 0578 */
  579. module             = 'RexxUtil'                                   /* 0579 */
  580. anticipated_return = ''                                           /* 0580 */
  581. call REGISTER_ROUTINE function_name module entry_name anticipated_return
  582.                                                                   /* 0582 */
  583. /*-----------------------------------*\                           /* 0583 */
  584. |  Load the REXXLIB Function Package  |                           /* 0584 */
  585. \*-----------------------------------*/                           /* 0585 */
  586. if REXX_Version = 'REXX/Personal' then                            /* 0586 */
  587.    do                                                             /* 0587 */
  588.       module = 'qrexxlib'                                         /* 0588 */
  589.    end                                                            /* 0589 */
  590. else                                                              /* 0590 */
  591.    do                                                             /* 0591 */
  592.       module = 'rexxlib'                                          /* 0592 */
  593.    end                                                            /* 0593 */
  594. entry_name         = 'rexxlibregister'                            /* 0594 */
  595. function_name      = 'RexxLibRegister'                            /* 0595 */
  596. anticipated_return = '1'                                          /* 0596 */
  597. call REGISTER_ROUTINE function_name module entry_name anticipated_return
  598.                                                                   /* 0598 */
  599. return                                                            /* 0599 */
  600.                                                                   /* 0600 */
  601.                                                                   /* 0601 */
  602. /*---------------------*\                                         /* 0602 */
  603. |  Register Subroutine  |                                         /* 0603 */
  604. \*---------------------*/                                         /* 0604 */
  605. REGISTER_ROUTINE:                                                 /* 0605 */
  606. parse ARG  function_name,                                         /* 0606 */
  607.            module,                                                /* 0607 */
  608.            entry_name,                                            /* 0608 */
  609.            anticipated_return                                     /* 0609 */
  610.                                                                   /* 0610 */
  611. if RxFuncQuery(function_name) = 0 then return      /* function registered */
  612.                                                                   /* 0612 */
  613. if LENGTH(module) > 8 then                                        /* 0613 */
  614.    do                                                             /* 0614 */
  615.       dll_drive = FILESPEC( 'D', module )                         /* 0615 */
  616.       dll_path  = STRIP( FILESPEC( 'P', module ), 'T', '\' )      /* 0616 */
  617.       module    = FILESPEC( 'N', module )                         /* 0617 */
  618.       '@' || dll_drive                                            /* 0618 */
  619.       '@cd' dll_drive || dll_path                                 /* 0619 */
  620.    end                                                            /* 0620 */
  621. else                                                              /* 0621 */
  622.    do                                                             /* 0622 */
  623.       dll_drive = ''                                              /* 0623 */
  624.    end                                                            /* 0624 */
  625.                                                                   /* 0625 */
  626. parse var module module_fname '.' module_fext                     /* 0626 */
  627. if RxFuncAdd( function_name, module_fname, entry_name ) = 0 then  /* 0627 */
  628.    do                                                             /* 0628 */
  629.       register_call = 'call' function_name                        /* 0629 */
  630.       interpret register_call                                     /* 0630 */
  631.       if WORD( RESULT, 1 ) <> WORD( anticipated_return, 1 ) then  /* 0631 */
  632.          do                                                       /* 0632 */
  633.             Say function_name 'returned' RESULT '-',              /* 0633 */
  634.                                          anticipated_return 'was expected'
  635.             exit 255                                              /* 0635 */
  636.          end                                                      /* 0636 */
  637.    end                                                            /* 0637 */
  638. else                                                              /* 0638 */
  639.    do                                                             /* 0639 */
  640.       Say 'RxFuncAdd returned' RESULT 'registering' module        /* 0640 */
  641.       exit 254                                                    /* 0641 */
  642.    end                                                            /* 0642 */
  643. if dll_drive <> '' then                                           /* 0643 */
  644.    do                                                             /* 0644 */
  645.       '@' || LEFT( program_path_and_name, 2 )                     /* 0645 */
  646.    end                                                            /* 0646 */
  647. return                                                            /* 0647 */
  648.                                                                   /* 0648 */
  649.                                                                   /* 0649 */
  650. !tr! = VALUE('TRACE',,'OS2Environment'); if !tr! <> '' then do; TRACE(!tr!); nop; end
  651. /*------------------------------------------------------------------------*\
  652. |                                                                          |
  653. |                                End of Job                                |
  654. |                                                                          |
  655. \*------------------------------------------------------------------------*/
  656. EOJ:                                                              /* 0656 */
  657.    Procedure                                                      /* 0657 */
  658.                                                                   /* 0658 */
  659. if ARG() = 0 then                                                 /* 0659 */
  660.    eoj_rc = 0                                                     /* 0660 */
  661. else                                                              /* 0661 */
  662.    eoj_rc = ARG(1)                                                /* 0662 */
  663.                                                                   /* 0663 */
  664. elapsed_time = TIME('E')            /* get elapsed time - sssss.uuuuu */
  665. parse value elapsed_time with seconds '.' micro_seconds           /* 0665 */
  666. if SUBSTR( micro_seconds, 1, 1 ) >= 5 then                        /* 0666 */
  667.    seconds = seconds + 1                                          /* 0667 */
  668. ss = FORMAT( seconds // 60, 2 )                                   /* 0668 */
  669. minutes = ( seconds - ss ) / 60                                   /* 0669 */
  670. mm = FORMAT( minutes // 60, 2 )                                   /* 0670 */
  671. hh = FORMAT( ( minutes - mm ) / 60, 2 )                           /* 0671 */
  672. duration = hh':'mm':'ss                                           /* 0672 */
  673.                                                                   /* 0673 */
  674. parse Source   . . program_path_and_name                          /* 0674 */
  675. program_name = FILESPEC( 'N', program_path_and_name )             /* 0675 */
  676. say 'EOJ  ' program_name 'at' TIME('N') ||,                       /* 0676 */
  677.     ', duration' TRANSLATE( duration, '0', ' ' )                  /* 0677 */
  678. exit eoj_rc                                                       /* 0678 */
  679.                                                                   /* 0679 */
  680. /*------------------------------------------------------------------------*\
  681. |                                                                          |
  682. |                              Trap Routines                               |
  683. |                                                                          |
  684. \*------------------------------------------------------------------------*/
  685. ERROR:   call TRAP_PROCESSING SIGL, 'ERROR',   RC                 /* 0685 */
  686. FAILURE: call TRAP_PROCESSING SIGL, 'FAILURE', RC                 /* 0686 */
  687. HALT:    call TRAP_PROCESSING SIGL, 'HALT',    ''                 /* 0687 */
  688. NOVALUE: call TRAP_PROCESSING SIGL, 'NOVALUE', ''                 /* 0688 */
  689. SYNTAX:  call TRAP_PROCESSING SIGL, 'SYNTAX',  RC                 /* 0689 */
  690.                                                                   /* 0690 */
  691. /* Rev. 95/06/27 */                                               /* 0691 */
  692. TRAP_PROCESSING:                                                  /* 0692 */
  693.    parse Source . . TRAP.path_and_program                         /* 0693 */
  694.    trap.line_nbr = ARG(1)                                         /* 0694 */
  695.    if POS( ':', TRAP.path_and_program ) > 0 then                  /* 0695 */
  696.       /* get source line if it is available */                    /* 0696 */
  697.       do t = 1                                                    /* 0697 */
  698.          trap_source_line.t =  SOURCELINE( trap.line_nbr )        /* 0698 */
  699.          trap_source_line.0 = t                                   /* 0699 */
  700.          trap.line_nbr      = trap.line_nbr + 1                   /* 0700 */
  701.          if RIGHT( SOURCELINE( trap.line_nbr ), 1 ) ¬= ',' then   /* 0701 */
  702.             do                                                    /* 0702 */
  703.                if t > 1 then                                      /* 0703 */
  704.                   do                                              /* 0704 */
  705.                      t = t + 1                                    /* 0705 */
  706.                      trap_source_line.t =  SOURCELINE( trap.line_nbr )
  707.                      trap_source_line.0 = t                       /* 0707 */
  708.                   end                                             /* 0708 */
  709.                leave                                              /* 0709 */
  710.             end                                                   /* 0710 */
  711.       end                                                         /* 0711 */
  712.    else                                                           /* 0712 */
  713.       /* program is running in macrospace */                      /* 0713 */
  714.       do                                                          /* 0714 */
  715.          TRAP.path_and_program = VALUE( 'TEMP',, 'OS2ENVIRONMENT' ) ||,
  716.                                  '\' || TRAP.path_and_program     /* 0716 */
  717.          trap_source_line.1 = 'Source line is not available.'     /* 0717 */
  718.          trap_source_line.0 = 1                                   /* 0718 */
  719.       end                                                         /* 0719 */
  720.                                                                   /* 0720 */
  721.    parse value FILESPEC( 'N', TRAP.path_and_program ) with,       /* 0721 */
  722.       TRAP.fn '.' TRAP.fe                                         /* 0722 */
  723.    trap_file_name = FILESPEC( 'D', TRAP.path_and_program ) ||,    /* 0723 */
  724.                     FILESPEC( 'P', TRAP.path_and_program ) ||,    /* 0724 */
  725.                     TRAP.fn || '.' || 'DMP'                       /* 0725 */
  726.                                                                   /* 0726 */
  727.    /*------------------------------------------*\                 /* 0727 */
  728.    |  check for reason not to create .DMP file  |                 /* 0728 */
  729.    \*------------------------------------------*/                 /* 0729 */
  730.    if ARG(2) = 'HALT' then                                        /* 0730 */
  731.       do                                                          /* 0731 */
  732.          trap_file_name = ''                                      /* 0732 */
  733.       end                                                         /* 0733 */
  734.    if RxFuncQuery( 'VARDUMP' ) <> 0 then                          /* 0734 */
  735.       do                                                          /* 0735 */
  736.          trap_file_name = ''                                      /* 0736 */
  737.       end                                                         /* 0737 */
  738.    if POS( ':', trap_file_name ) = 0 then                         /* 0738 */
  739.       do                                                          /* 0739 */
  740.          trap_file_name = ''                                      /* 0740 */
  741.       end                                                         /* 0741 */
  742.                                                                   /* 0742 */
  743.    /*------------------------*\                                   /* 0743 */
  744.    |  Build trap message box  |                                   /* 0744 */
  745.    \*------------------------*/                                   /* 0745 */
  746.    dbl.h    = 'CD'x                 /* ═ double line - horizontal   */
  747.    dbl.v    = 'BA'x                 /* ║ double line - vertical     */
  748.    dbl.bl   = 'C8'x                 /* ╚ double line - bottom left  */
  749.    dbl.br   = 'BC'x                 /* ╝ double line - bottom right */
  750.    dbl.tl   = 'C9'x                 /* ╔ double line - top left     */
  751.    dbl.tr   = 'BB'x                 /* ╗ double line - top right    */
  752.    trap.red = '1B'x || '[1;37;41m'  /* bright white on red          */
  753.    trap.dul = '1B'x || '[0m'        /* reset to normal              */
  754.                                                                   /* 0754 */
  755.    say ' '                                                        /* 0755 */
  756.    trap_error_description =,                                      /* 0756 */
  757.       'Error line = ' || ARG(1) ||,                               /* 0757 */
  758.       '; ' ||,                                                    /* 0758 */
  759.       ARG(2) ||,                                                  /* 0759 */
  760.       ' error.'                                                   /* 0760 */
  761.    if ARG(3) <> '' then                                           /* 0761 */
  762.       trap_error_description = trap_error_description ||,         /* 0762 */
  763.                                '  Return code = ' || ARG(3)       /* 0763 */
  764.    trap.width = MAX( 74, LENGTH( trap_error_description ) )       /* 0764 */
  765.    say trap.red || dbl.tl || COPIES( dbl.h,trap.width + 2 ) || dbl.tr
  766.    say trap.red || dbl.v  || COPIES( ' ',  trap.width + 2 ) || dbl.v
  767.    say trap.red || dbl.v CENTER( TRAP.fn'.CMD',trap.width )    dbl.v
  768.    say trap.red || dbl.v CENTER( trap_error_description, trap.width ) dbl.v
  769.    if trap_file_name <> '' then                                   /* 0769 */
  770.       do                                                          /* 0770 */
  771.    say trap.red || dbl.v  || COPIES( ' ',  trap.width + 2 ) || dbl.v
  772.    say trap.red || dbl.v     CENTER( 'See: ' || trap_file_name,,  /* 0772 */
  773.                                      trap.width )  dbl.v          /* 0773 */
  774.       end                                                         /* 0774 */
  775.    say trap.red || dbl.v  || COPIES( ' ',  trap.width + 2 ) || dbl.v
  776.    say trap.red || dbl.bl || COPIES( dbl.h,trap.width + 2 ) || dbl.br
  777.    say trap.red || COPIES( ' ', trap.width + 4 )                  /* 0777 */
  778.    say trap.red || LEFT( 'Source line at time of trap:', trap.width + 4 )
  779.    do t = 1 to trap_source_line.0                                 /* 0779 */
  780.       say trap.red || LEFT( '   ' || trap_source_line.t, trap.width + 4 )
  781.    end                                                            /* 0781 */
  782.    say trap.red || COPIES( ' ', trap.width + 4 )                  /* 0782 */
  783.                                                                   /* 0783 */
  784.    /*---------------------------------*\                          /* 0784 */
  785.    |  Create .DMP file if appropriate  |                          /* 0785 */
  786.    \*---------------------------------*/                          /* 0786 */
  787.    if trap_file_name <> '' then                                   /* 0787 */
  788.       do                                                          /* 0788 */
  789.          call SysFileDelete trap_file_name                        /* 0789 */
  790.          /* remove meaningless labels from dump for clarity */    /* 0790 */
  791.          drop dbl. TRAP. RC RESULT SIGL !tr!                      /* 0791 */
  792.          call VARDUMP trap_file_name  /* write variables to program.DMP file */
  793.       end                                                         /* 0793 */
  794.    exit 253                                                       /* 0794 */
  795. /*---------  REXX Cross Reference  - Created: 07/09/95 7:05pm ----------*\
  796.    J:\REXXPROG\LISTINI\LISTINI.CMD - Directory time stamp 12/25/94 2:02a
  797.  
  798. ---- VARIABLES ----
  799. !tr!                0650<  0650   0650   0791
  800. Apps.               0233<
  801. Apps.0              0268   0276   0281   0295
  802. Apps.app_number     0296
  803. Apps.i              0282
  804. Both_Index.         0234<
  805. Both_Index.application_name
  806.                     0246<  0251   0253<  0257<  0324
  807. Calling_Environment
  808.                     0022
  809. GBL.environment     0024<  0129   0131   0189   0190   0293
  810. GBL.program_name    0025<  0031   0069   0069   0075   0075   0193
  811. GBL.program_path    0026<
  812. GBL.program_version
  813.                     0028<  0193
  814. Keys.0              0320   0330
  815. Keys.key_number     0337   0352
  816. OS_Name             0021
  817. RC                  0685   0686   0689   0791
  818. RESULT              0263   0265   0307   0310   0631   0633   0640   0791
  819. REXX_Version        0020   0586
  820. SIGL                0685   0686   0687   0688   0689   0791
  821. System_Apps.        0235<
  822. System_Apps.0       0244
  823. System_Apps.i       0245
  824. TRAP.               0791
  825. TRAP.fe             0722
  826. TRAP.fn             0722   0725   0767
  827. TRAP.path_and_program
  828.                     0693   0695   0715<  0716   0721   0723   0724
  829. User_Apps.          0236<
  830. User_Apps.0         0249
  831. User_Apps.i         0250
  832. Version             0020
  833. X                   0176   0176   0177   0178   0179   0179
  834. anticipated_return  0580<  0581   0596<  0597   0609   0631   0634
  835. app_number          0295
  836. application_name    0245<  0250<  0296<  0298   0300   0303   0306   0312
  837.                     0325   0337   0461
  838. apps_max_name_length
  839.                     0280<  0282<  0282   0303
  840. asterisk_slash      0522<  0536
  841. bksp                0290<  0331   0392
  842. byte_count          0477<  0478
  843. char_1              0092<  0093   0093   0094   0119<  0120   0120   0121
  844. col_1_width         0160<  0164   0165   0211   0215   0339   0342   0348
  845.                     0353   0357   0363
  846. col_2_width         0161<  0164   0165   0212   0216   0353   0357   0363
  847. col_3_width         0162<  0164   0165   0213   0217
  848. col_4_width         0163<  0214   0218   0379   0422
  849. comment_group       0520   0531   0531
  850. comment_group_switch
  851.                     0521<  0532<  0533   0535
  852. contig_hex_tt       0170<  0433   0475
  853. dbl.                0791
  854. dbl.bl              0748<  0776
  855. dbl.br              0749<  0776
  856. dbl.h               0746<  0765   0776
  857. dbl.tl              0750<  0765
  858. dbl.tr              0751<  0765
  859. dbl.v               0747<  0766   0766   0767   0767   0768   0768   0771
  860.                     0771   0772   0773   0775   0775
  861. dll_drive           0615<  0618   0619   0623<  0643
  862. dll_path            0616<  0619
  863. duration            0672<  0677
  864. elapsed_time        0664<  0665
  865. entry_name          0578<  0581   0594<  0597   0608   0627
  866. eoj_rc              0660<  0662<  0678
  867. function_name       0577<  0581   0595<  0597   0606   0611   0627   0629
  868.                     0633
  869. heading_1           0184<  0197   0200<  0200   0207   0551
  870. heading_1a          0203<  0210<  0552   0554
  871. heading_2           0211<  0558
  872. heading_3           0215<  0559
  873. hex_displacement    0454<  0480   0500   0509<  0509
  874. hex_key_length      0338<  0368
  875. hex_string          0431<  0436
  876. hh                  0671<  0672
  877. i                   0244   0249   0281
  878. ignore_colors       0293<  0297
  879. ini_arg_name        0060   0101<  0103   0116<  0116   0119   0121<  0121
  880.                     0124   0126   0128   0130   0134   0137
  881. ini_attributes      0403<  0406   0408
  882. ini_attributes_and_file_name
  883.                     0117<  0401   0403   0404
  884. ini_file_attr       0144   0147
  885. ini_file_date       0141
  886. ini_file_name       0125<  0127<  0129<  0131<  0145   0146<  0146   0149
  887.                     0185   0201   0204   0206   0238   0262   0270   0306
  888.                     0337   0405   0407   0409
  889. ini_file_size       0143
  890. ini_file_stem.0     0135
  891. ini_file_stem.1     0140
  892. ini_file_time       0142
  893. input_line          0526<  0527   0529   0534   0536
  894. input_parameters    0057   0058
  895. key_number          0330
  896. key_value           0337<  0338   0372   0373   0373   0375   0375   0384
  897.                     0424   0430   0430   0437   0462<  0462   0467   0468
  898.                     0468   0488
  899. keys.0              0317
  900. leading_token       0468   0470   0476   0477
  901. long_hex_prefix     0167<
  902. micro_seconds       0665   0666
  903. minutes             0669<  0670   0671
  904. mm                  0670<  0671   0672
  905. module              0579<  0581   0588<  0592<  0597   0607   0613   0615
  906.                     0616   0617<  0617   0626   0640
  907. module_fext         0626
  908. module_fname        0626   0627
  909. output_device       0059   0091<  0091   0092   0094<  0094   0097   0099
  910.                     0101   0102<  0109
  911. output_line         0324<  0339   0342<  0342   0348<  0351<  0351   0353
  912.                     0356<  0356   0363<  0366<  0366   0390<  0421<  0421
  913.                     0425<  0425   0434<  0434   0439<  0439   0441<  0441
  914.                     0479<  0489<  0490   0499<  0563
  915. partial_key_switch  0459<  0464<  0489   0492
  916. prev_character_string
  917.                     0455<  0471   0510<
  918. printable_key_value
  919.                     0377<  0378   0379   0419   0422   0423
  920. program_name        0675<  0676
  921. program_path_and_name
  922.                     0023   0025   0026   0027   0525   0526   0645   0674
  923.                     0675
  924. progress_list       0291<  0332   0334
  925. progress_subscript  0292<  0332   0333<  0333   0334   0335<
  926. register_call       0629<  0630
  927. sameness_switch     0456<  0494<  0497   0506<
  928. seconds             0665   0667<  0667   0668   0669
  929. short_hex_prefix    0165<
  930. short_vs_long       0058   0066   0072   0078
  931. single_line_key_value
  932.                     0372<  0375<  0377   0378   0419
  933. slash_asterisk      0523<  0527
  934. slash_asterisk_pos  0527<  0528   0530
  935. spread_hex_tt       0171<  0431   0473
  936. ss                  0668<  0669   0672
  937. syslst              0052<  0069<  0075<  0109<  0154   0223   0224   0228
  938.                     0398   0399   0551   0554   0557   0558   0559   0563
  939. syslst_device_type  0154<  0397   0549
  940. syslst_format       0051<  0068<  0074<  0384
  941. syslst_line_ct      0156<  0545   0548<  0555<  0555   0561<  0561   0564<
  942.                     0564
  943. syslst_line_max     0157<  0545
  944. syslst_line_width   0158<  0163   0196   0491
  945. syslst_page_ct      0159<  0547<  0547   0549   0551
  946. t                   0697   0699   0703   0705<  0705   0707   0779
  947. temp_character_string
  948.                     0470<  0471   0474   0487   0510
  949. temp_hex_length     0478<  0483   0484
  950. temp_hex_string     0473<  0483
  951. temp_key_value      0430<  0432   0437
  952. title_1             0193<  0198   0200
  953. title_1_ini_name    0185<  0186   0188<  0195   0226
  954. title_1_space_count
  955.                     0196<  0199
  956. title_1_spaces      0199<  0200   0200
  957. trap.dul            0753<
  958. trap.line_nbr       0694<  0698   0700<  0700   0701   0706
  959. trap.red            0752<  0765   0766   0767   0768   0771   0772   0775
  960.                     0776   0777   0778   0780   0782
  961. trap.width          0764<  0765   0766   0767   0768   0771   0773   0775
  962.                     0776   0777   0778   0780   0782
  963. trap_error_description
  964.                     0756<  0762<  0762   0764   0768
  965. trap_file_name      0723<  0732<  0736<  0738   0740<  0769   0772   0787
  966.                     0789   0792
  967. trap_source_line.0  0699<  0707<  0718<  0779
  968. trap_source_line.1  0717<
  969. trap_source_line.t  0698<  0706<  0780
  970. tt_128              0176<  0377   0487
  971. tt_256              0177<  0352
  972. with                0058   0140   0468   0665   0721
  973. word_count          0476<  0477   0478
  974. x                   0170   0170   0171   0171   0171   0172   0172   0172
  975.                     0173   0173   0173   0174   0174   0290   0373   0398
  976.                     0424   0746   0747   0748   0749   0750   0751   0752
  977.                     0753
  978.  
  979. ---- LABELS ----
  980. EOJ                 0138   0266   0271   0314   0411   0525   0536   0656:
  981. ERROR               0034   0685:
  982. FAILURE             0035   0686:
  983. FORMAT_MULTI_LINE_KEYS
  984.                     0389   0451:
  985. FORMAT_SINGLE_LINE_KEYS
  986.                     0381   0386   0418:
  987. HALT                0036   0687:
  988. LIST_SOURCE_STATEMENTS
  989.                     0084   0519:
  990. NOVALUE             0037   0688:
  991. PRINT_ROUTINE       0347   0362   0426   0443   0452   0493   0505   0544:
  992. REGISTER_REQUIRED_FUNCTIONS
  993.                     0032   0572:
  994. REGISTER_ROUTINE    0581   0597   0605:
  995. SYNTAX              0038   0689:
  996. TRAP_PROCESSING     0685   0686   0687   0688   0689   0692:
  997.  
  998. ---- FUNCTIONS ----
  999. ABBREV              0066   0072
  1000. ARG                 0659   0662   0694   0730   0757   0759   0761   0763
  1001. ARRAYSORT           0276   0320
  1002. C2X                 0432   0474
  1003. CENTER              0203   0767   0768   0772
  1004. CHAROUT             0302   0331   0398   0399
  1005. COPIES              0165   0167   0176   0176   0199   0205   0215   0215
  1006.                     0216   0216   0217   0217   0218   0304   0348   0363
  1007.                     0370   0439   0479   0481   0484   0486   0499   0501
  1008.                     0765   0766   0771   0775   0776   0777   0782
  1009. D2X                 0338   0480   0500
  1010. DATE                0184
  1011. FILESPEC            0025   0026   0027   0189   0190   0615   0616   0617
  1012.                     0675   0721   0723   0724
  1013. FORMAT              0551   0668   0670   0671
  1014. LEFT                0069   0075   0092   0119   0201   0211   0212   0213
  1015.                     0214   0298   0303   0342   0356   0375   0397   0403
  1016.                     0422   0430   0462   0470   0483   0503   0549   0645
  1017.                     0778   0780
  1018. LENGTH              0069   0075   0162   0197   0198   0207   0282   0334
  1019.                     0338   0339   0353   0373   0375   0379   0384   0404
  1020.                     0405   0423   0430   0476   0477   0492   0531   0613
  1021.                     0764
  1022. LINEIN              0526
  1023. LINEOUT             0392   0551   0554   0557   0558   0559   0563
  1024. LINES               0525
  1025. MAX                 0196   0282   0764
  1026. MIN                 0422   0430
  1027. OVERLAY             0489
  1028. POS                 0406   0408   0527   0536   0695   0738
  1029. RIGHT               0099   0300   0373   0424   0701
  1030. RxFuncAdd           0627
  1031. RxFuncQuery         0273   0317   0611   0734
  1032. SOURCELINE          0698   0701   0706
  1033. STREAM              0154   0206   0224   0228
  1034. STRIP               0091   0094   0116   0121   0146   0403   0436   0616
  1035. SUBSTR              0147   0332   0529   0666
  1036. SysCurState         0305   0393
  1037. SysFileDelete       0223   0789
  1038. SysFileTree         0134
  1039. SysIni              0243   0248   0262   0306   0337
  1040. TIME                0029   0031   0184   0664   0676
  1041. TRACE               0650
  1042. TRANSLATE           0193   0293   0352   0377   0431   0473   0487   0677
  1043. VALUE               0129   0131   0189   0190   0293   0650   0715
  1044. VARDUMP             0792
  1045. WORD                0631   0631
  1046. XRANGE              0170   0171   0172   0173   0174   0176   0179
  1047.  
  1048. \*-------------------  End of REXX Cross Reference  -------------------*/
  1049.