home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / ETOOLS.ZIP / WHATOUT.BAK < prev    next >
Text File  |  1992-09-01  |  2KB  |  85 lines

  1. /* Generic in command for tlib - uses the 'whoami' command for the 'w'
  2.    Parameter */
  3. /* trace results */
  4. ARG name
  5.  
  6. lastline = 'name'
  7. fileptr = 0
  8.  
  9. /* kill the existing queue entries */
  10. lines = QUEUED()
  11. DO x = 1 TO lines
  12.    PARSE PULL junk
  13. END
  14.  
  15. if (name = "") then
  16.    do
  17.       /* find out who is issueing this command */
  18.       '@whoami | rxqueue'
  19.  
  20.       PARSE PULL wholine
  21.       name = WORD(wholine,4)
  22.    end
  23.  
  24. namelen = LENGTH(name)
  25.  
  26. lines = QUEUED()
  27. DO x = 1 TO lines
  28.    PARSE PULL junk
  29. END
  30.  
  31. say
  32. say name 'has the following files checked out for version 1.10'
  33. say
  34.  
  35. '@type "q:\eis\lib\*.?^?"  2>&1 | rxqueue'
  36. lines = QUEUED()
  37. DO x = 1 TO lines
  38.    PARSE PULL line
  39.    line = STRIP(line)
  40.    testname = SUBSTR(line,1,namelen)
  41.    if (line <> "") then
  42.      do
  43.       if (lastline = "name") then
  44.          do
  45.             lastline = "file"
  46.             filename = line
  47.          end
  48.       else
  49.          do
  50.             lastline = "name"
  51.             if (testname = name) then
  52.                do
  53.                   fileptr = fileptr + 1
  54.                   parse var filename junk1 "\" junk2 "\" junk3 "\" filearray.fileptr
  55.                end
  56.          end
  57.      end
  58. end  /* do */
  59. /*  trace results*/
  60.  
  61. DO x = 1 TO fileptr
  62.  
  63.    parse var filearray.x front '^' back
  64.    filearray.x = front || '?' || back
  65.    CALL CleanQueue
  66.    '@attrib q:\eis\source\' || filearray.x || ' > nul'
  67.    if (rc = 0) then
  68.       do
  69.          '@attrib q:\eis\source\' || filearray.x || ' | rxqueue'
  70.          PARSE PULL line
  71.          line = STRIP(line,'t')
  72.          realname = substr(line,26,(LENGTH(line)-25))
  73.          say realname
  74.       end
  75.  
  76. END
  77. EXIT
  78.  
  79. CleanQueue:
  80.    lines = QUEUED()
  81.    DO y = 1 TO lines
  82.       PARSE PULL junk
  83.    END
  84. return
  85.