Operating System - OpenVMS
1827964 Members
3004 Online
109973 Solutions
New Discussion

flush the log of detached process quicker

 
SOLVED
Go to solution
labadie_1
Honored Contributor

flush the log of detached process quicker

For the batch jobs, I know the $ set output_rate=small to read the log file quickly.

With my Vms 7.3-1, it seems that a detached process needs 1 minute before the log file can be read (run sys$system:loginout/detach/auth/input=a.com/output=a.log...)

can I modify this one minute time to a smaller value ?
12 REPLIES 12
labadie_1
Honored Contributor

Re: flush the log of detached process quicker

Well in fact it is quite easy...
Wim Van den Wyngaert
Honored Contributor

Re: flush the log of detached process quicker

Didn't test it but help set out
says it is valid for detached too.

Wim
Wim
Lokesh_2
Esteemed Contributor

Re: flush the log of detached process quicker

Hi ,

I tested it and it works for detached too.

Thanks & regards,
Lokesh
What would you do with your life if you knew you could not fail?
labadie_1
Honored Contributor

Re: flush the log of detached process quicker

Yes, but it would not work if I run my.exe instead of loginout :-)
labadie_1
Honored Contributor

Re: flush the log of detached process quicker

is one minute wait a system parameter or hard coded ?
Wim Van den Wyngaert
Honored Contributor

Re: flush the log of detached process quicker

If you do run my without /detach, it is not a detached process.

Wim
Wim
Antoniov.
Honored Contributor

Re: flush the log of detached process quicker

Hi Gerard,
when you execute loginout you run a command file within /INP qualifier that's like a batch execution;
when you type run/detach execute a image file and /INP qualifier is the standard input for your detached process, not the comand file.

Antonio Vigliotti
Antonio Maria Vigliotti
Uwe Zessin
Honored Contributor

Re: flush the log of detached process quicker

Can't you do a periodic FLUSH on the output channel?
.
John Gillings
Honored Contributor
Solution

Re: flush the log of detached process quicker

Gerard,

A better approach than relying on OUTPUT_RATE is to use RMS shared files. For example, consider the DCL:

$ CREATE MYLOG.LOG
$ OPEN/APPEND/SHARE OUT MYLOG.LOG
...
$ WRITE OUT SomeRecord


From another process, this file can be read because it's open for SHARE access. HOWEVER! the EOF mark won't be updated unless RMS thinks someone else wants to write to the file. So:

$ OPEN/READ/WRITE/SHARE IN MYLOG.LOG
$ CLOSE IN
$ TYPE MYLOG.LOG

will always display the complete contents at the time of the CLOSE.

For most languages you just need to add SHARE when you OPEN the log file. (I haven't found a simple way to make this happen for implicit output files or process permanent file like SYS$OUTPUT)
A crucible of informative mistakes
Antoniov.
Honored Contributor

Re: flush the log of detached process quicker

Look at this command procedure example:
$ DEF SYS$OUTPUT MYPROC.LOG
$ SET OUTPUT=:00:30
$ RUN/DETACH MYPROG.EXE
$ EXIT

Antonio Vigliotti
Antonio Maria Vigliotti
Wim Van den Wyngaert
Honored Contributor

Re: flush the log of detached process quicker

Wouldn't it be nice if engeneering added
"a flush of deferred written records whenever RMS thinks someone else wants to read or write to the file" ?

This way deferred write can be used and contents can be viewed. Without any tricks.

Wim
Wim
Jan van den Ende
Honored Contributor

Re: flush the log of detached process quicker

Wim,

Great idea!

Maybe you SHOULD formally suuggest it to Engeneering?

You may point to me as seconding!!

Jan
Don't rust yours pelled jacker to fine doll missed aches.