Need help related to using a C$SYSTEM Tasklist > redirection to a file name to be read again. See code provided. Things I learned: I have to use 255 versus 129 and it works for a non-acuthin (thick) user, but the @[DISPLAY] will not create the file

 

 

 ACCEPT SYSTEM-INFORMATION FROM SYSTEM-INFO.
           IF STATION-ID (1:2) = "at"
           STRING
            "@[DISPLAY]:c:\apps\PIDLIST-" DELIMITED BY SIZE    
              STATION-ID DELIMITED BY " "
               ".csv" DELIMITED BY SIZE
                  INTO WS-TASK-LIST-CSV-FILE-NAME
           else
             STRING
            "c:\apps\PIDLIST-" DELIMITED BY SIZE    
              STATION-ID DELIMITED BY " "
               ".csv" DELIMITED BY SIZE
                  INTO WS-TASK-LIST-CSV-FILE-NAME
           end-if.
           ACCEPT SYSTEM-INFORMATION FROM SYSTEM-INFO.
           STRING "tasklist.exe /FO CSV /NH | "
                 delimited by size
               "findstr wrun32.exe > "
               DELIMITED BY SIZE
                WS-TASK-LIST-CSV-FILE-NAME DELIMITED BY " "           
                 INTO CMD-LINE.  
           CALL "C$SYSTEM" USING CMD-LINE, 255
               giving EXIT-STATUS.