APPX Software Library

Files, Streams and Other Software

How do you run an os command and pipe the results through a stream read?

   SET      --- STREAM OPEN TYPE           =      r
   SET      --- TEMP 256                   =      |ls -la /usr1/appx/
   APPEND   --- TEMP 256                   0      data/C01/AGP/Files/
   APPEND   --- TEMP 256                   0  AGP FILES NAME
   SET      --- STREAM FILE PATHNAME       =  --- TEMP 256
   GOSUB    --- STREAM OPEN
   IF       --- STREAM RETURN CODE         NE     0
T  ERROR    Cannot Get File Listing
T  END
   *
   SET      --- STREAM EOR SEQUENCE        =      LF
   GOSUB    --- STREAM READ
   *        The results will be in --- STREAM BUFFER
   DISPLAY  --- STREAM BUFFER              (AT APPEARANCE #    )
Don't forget to close, GOSUB    --- STREAM CLOSE