Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Running COM in OpenVMS

 

Running COM in OpenVMS

Hi All,

I just need to know one thing.

If i run a COM , i can redirect the output to some other file.
For example : abc.com /out = abc.log

Here, only after the COM is completely executed, i am able to see the contents in the output file.
Is it possible to get the details into the output file while the COM is running ?
or is it possible to see the output when the COM is running ?
4 REPLIES 4
Jan van den Ende
Honored Contributor

Re: Running COM in OpenVMS

CHANDRASEKARAN,

an outputfile specified this way is single user, so generally: NO.

If you know in advance in a specific case, you can
$ SET HOST 0 /LOG or
$ SET HOST 0 /LOG=

Now you log in again, and @ the .com; and you 'll see the output immediately.

The /LOG=file is especially usefull in debugging!

Success.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Graham Burley
Frequent Advisor

Re: Running COM in OpenVMS

Perhaps this would do:

$ help pipe examples
...
5.$ ! TEE.COM - command procedure to display/log data flowing through
$ ! a pipeline
$ ! Usage: @TEE log-file
...

You could use it like this:

$ pipe @abc | @tee abc.log

Robert Gezelter
Honored Contributor

Re: Running COM in OpenVMS

Chandrasekaran S,

In addition to SET HOST 0, I suggest that you investigate SPAWN/IN=NL:/OUTPUT=. Alternatively, use the SUBMIT command to submit a batch job, which will produce a log file.

SET HOST will create a complete terminal session. SUBMIT will create a batch job. Likewise, SPAWN will create a subprocess. All have slightly different semantics, one or more may be more suitable for your situation.

- Bob Gezelter, http://www.rlgsc.com
John Gillings
Honored Contributor

Re: Running COM in OpenVMS

Yes you can. There are several ways.

Simplest is to execute your procedure as a batch job. You can then use TYPE/TAIL/CONTINUOUS on the log file to see the output as it is generated.

$ SUBMIT ABC
$ TYPE/TAIL/CONTINUOUS ABC.LOG

Remember that output is at the DCL OUTPUT_RATE granularity, by default 30 seconds. You can change it in the executing procedure with:

$ SET OUTPUT_RATE=:0:5 ! Reduce flush interval to 5 seconds

Another option is to send your output to a shared write file. For example:

$ OPEN/WRITE/SHARE=WRITE MYLOG ABC.LOG
$ @ABC/OUTPUT=MYLOG

Now, from another process you can update the EOF mark by opening the file with append intent:

$ OPEN/APPEND/SHARE LOG ABC.LOG
$ CLOSE LOG

You can then TYPE the file up to that point. You need to reexecute the OPEN/APPEND & CLOSE each time you want to update the EOF. Same issue with OUTPUT_RATE.
A crucible of informative mistakes