home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / REXXOV.ZIP / ADDTYPE.OVR < prev    next >
Text File  |  1992-08-14  |  1KB  |  25 lines

  1. /* Create a new associated type */
  2.                                        /* register the rexxutil pkg  */
  3. if rxfuncadd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs') = 0 then
  4.   call sysloadfuncs
  5. parse arg type                         /* get the new type           */
  6. type = strip(type)                     /* strip blanks for safety    */
  7.                                        /* add the new type           */
  8. call sysini 'user', 'PMWP_ASSOC_TYPE', type
  9.                                        /* delete existing type list  */
  10. if stream('typelist.dat','C', 'QUERY EXISTS') <> '' then do
  11.   if sysfiledelete("typelist.dat") <> 0 then do
  12.     '@CLOSE("TypeList")'
  13.     call sysfiledelete "typelist.dat"
  14.   end
  15. end
  16.                                        /* get the current type list  */
  17. call sysini 'user', 'PMWP_ASSOC_TYPE', 'all:', 'list.'
  18. do i=1 to list.0                       /* write the list to disk     */
  19.   call lineout "typelist.dat", list.i
  20. end
  21.                                        /* close the file             */
  22. call stream "typelist.dat", "c", "close"
  23.                                        /* create list box link       */
  24. '@ASCIIOPEN("TypeList", "typelist.dat", "Current Types", 0)'
  25.