[Info-vax] Command Procedure Pipe output to a variable

HCorte hmmbcorte at gmail.com
Tue Aug 31 05:49:45 EDT 2021


Implementing a command procedure that first obtains the device allocated to a process for example purposes called YYYYYY.

How to output the results of (SEARCH SYS$INPUT "Devices allocated") to the variable DEVICEAUX tried (READ SYS$PIPE DEVICEAUX) but with no success.

$ pipe SH PROCESS YYYYYY | SEARCH SYS$INPUT "Devices allocated" | (READ SYS$PIPE DEVICEAUX)
$ WRITE SYS$OUTPUT DEVICEAUX
$ DEVICE_AUX = F$EDIT(F$ELEMENT(1, ":", TEST),"TRIM")
$ WRITE SYS$OUTPUT DEVICE_AUX

can make it work to write to a file
$ pipe SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" > DEVICEAUX.DAT

but would prefer to avoid having to write and read from file if possible, also in command procedure should alls use SYS$PIPE instead of SYS$INPUT?



More information about the Info-vax mailing list