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

Create process with loginout.exe

SOLVED
Go to solution
Dario Karlen
Frequent Advisor

Create process with loginout.exe

Hi all

We have an I64 with OpenVMS 8.3, running following script:
$ SET VERIFY
$ SHOW TIME
$ log_file = "INA_DISK:[INA.LOGS]WAGO_OUTPUT.LOG"
$ RUN/UIC=[300,1] SYS$SYSTEM:LOGINOUT.EXE -
/procnam="WAGO_Log" -
/INPUT=INA_PROGS:WAGO_START.COM -
/ERROR='log_file -
/OUTPUT='log_file -
/subprocess=20 -
/privileges=(group,grpnam,tmpmbx,netmbx) -
/ast_limit=300 -
/working_set=8192 -
/io_direct=300 -
/io_buffered=300 -
/buffer_limit=300000 -
/page_file=200000 -
/job_table_quota=16384 -
/enqueue_limit=8000 -
/FILE_LIMIT=200
$ SHOW TIME
$ EXIT

When I run the wago_start.com from DCL it works perfectly and creates a process, but when I run the script above the process seems to be created but stops somewhere, I don't find it in the process list after the start why?
DCL ouput:
$ SHOW TIME
15-OCT-2007 14:02:48
$ log_file = "INA_DISK:[INA.LOGS]WAGO_OUTPUT.LOG"
$ RUN/UIC=[300,1] SYS$SYSTEM:LOGINOUT.EXE -
/procnam="WAGO_Log" -
/INPUT=INA_PROGS:WAGO_START.COM -
/ERROR=INA_DISK:[INA.LOGS]WAGO_OUTPUT.LOG -
/OUTPUT=INA_DISK:[INA.LOGS]WAGO_OUTPUT.LOG -
/subprocess=20 -
/privileges=(group,grpnam,tmpmbx,netmbx) -
/ast_limit=300 -
/working_set=8192 -
/io_direct=300 -
/io_buffered=300 -
/buffer_limit=300000 -
/page_file=200000 -
/job_table_quota=16384 -
/enqueue_limit=8000 -
/FILE_LIMIT=200
%RUN-S-PROC_ID, identification of created process is 204DD674
$ SHOW TIME
15-OCT-2007 14:02:48
$ EXIT
Any ideas???
7 REPLIES
Ian Miller.
Honored Contributor

Re: Create process with loginout.exe

Are the INA* logicals defined in a table accessable to the created process?
Does the created process have access to INA_DISK:[INA.LOGS]?

Do realise your command will create two files called INA_DISK:[INA.LOGS]WAGO_OUTPUT.LOG ?


If you have accounting enabled for detached process terminations then there will be a record for PID 204DD674

$ ACCOUNT/ID=204DD674/FULL

This will show you the final exit code for the process which may help.


____________________
Purely Personal Opinion
Volker Halle
Honored Contributor
Solution

Re: Create process with loginout.exe

Dario,


When I run the wago_start.com from DCL it works perfectly and creates a process


Does WAGO_START.COM create ANOTHER process ? Or does it just start an image in your current process, if you run the procedure manually from DCL ?

Volker.
Dario Karlen
Frequent Advisor

Re: Create process with loginout.exe

guys, thanks for your help.
It was like Volker mentioned. we created a new process and didn't created it detached. we changed it and started the process detached and it worked out.
thanks a lot...
Jess Goodman
Esteemed Contributor

Re: Create process with loginout.exe

FYI, the /ERROR qualifier is ignored when you RUN LOGINOUT.
I have one, but it's personal.
Hoff
Honored Contributor

Re: Create process with loginout.exe

>>> FYI, the /ERROR qualifier is ignored when you RUN LOGINOUT. <<<

Eh?

SYS$ERROR is the (documented) backdoor used for the DECwindows workstation device creation.

It's most certainly not ignored.

In addition to simply launching a DECwindows-based application that needs a CLI for some reason, passing in SYS$ERROR is particularly useful for debugging a detached process; you can pass in a /DEBUGified image and a WS-device value for SYS$ERROR, and summon the Debugger.

Quoth:

A somewhat more complicated implementation ... takes advantage of a feature of LOGINOUT.EXE.

If SYS$ERROR points to a WS device, LOGINOUT defines DECW$DISPLAY to be the translation of SYS$ERROR and then redefines SYS$ERROR to be the translation of SYS$OUTPUT. This allows error messages from the detached process to be written to a log file.


$ SET DISPLAY/CREATE/TRANSPORT=LOCAL
$ CREATE TEST.COM
$ RUN SYS$SYSTEM:DECW$CLOCK
$ RUN/DETACH/ERROR='F$TRNLNM("DECW$DISPLAY")' -
_$ /INPUT=TEST.COM/OUTPUT=TEST.LOG -
_$ SYS$SYSTEM:LOGINOUT

Jess Goodman
Esteemed Contributor

Re: Create process with loginout.exe

Yes, I know it is used as a back door for some specical cases, but my point was /ERROR does not work in what the normal manner a user would expect it to. I used the term "ignored" because that's the term the documentation uses:

$ HELP RUN PROCESS /ERROR
RUN
Process
/ERROR
/ERROR=filespec
Defines an equivalence name string of 1 to 63 alphanumeric characters for the logical device name SYS$ERROR. The logical name and equivalence name are placed in the process logical name table for the created process. (The /ERROR qualifier is ignored if you are running SYS$SYSTEM:LOGINOUT.)
I have one, but it's personal.
Jess Goodman
Esteemed Contributor

Re: Create process with loginout.exe

$ TYPE TEST.COM
$ DIRECTORY doesnoteexit.dat

$ RUN SYS$SYSTEM:LOGINOUT.EXE -
/PROCESS=TEST/DETACHED/INPUT=TEST.COM -
/OUTPUT=TEST.LOG /ERROR=TEST.ERR
%RUN-S-PROC_ID, identification of created process is 631536B6

$ TYPE TEST.LOG
$ DIRECTORY doesnoteexit.dat
%DIRECT-W-NOFILES, no files found
GOODMAN job terminated 15-OCT-2007 18:18:26

$ TYPE TEST.ERR
%TYPE-W-SEARCHFAIL, error searching for DSKC:[GOODMAN]TEST.ERR;
-RMS-E-FNF, file not found
I have one, but it's personal.