Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Cant Run Detach Process

Eddy_fj
Advisor

Cant Run Detach Process

Hi there all again. For some reason when i run a process under detached. the process just does not stay in the system.

 

Below is the file (STARTRDBJDBC.COM) that i created to be sumbit into a detach process.

 

$ set proc/privi=all
$ @SYS$COMMON:[JAVA$150.COM]JAVA$150_SETUP.COM
$ @SYS$COMMON:[RDB$JDBC.0702-5V386O]RDBJDBC_STARTUP.COM
$ define my_classes rdb$jdbc_home
$ define JAVA$CLASSPATH [],RDB$JDBC_HOME:RDBNATIVE.JAR,RDB$JDBC_HOME:RDBTHIN.JAR
$ set def rdb$jdbc_home
$ spawn/nowait/proc=rdbthinsrv java -jar rdbthinsrv.jar -srv.mcBasePort 0

 

Here is the file (SUBMIT_JDBC.COM) which submits the file to a detached process.

 

$ run/detached/authorize/input=STARTRDBJDBC.COM/error=rdbjdbc_error.log -
 /output=rdbjdbc_server.log sys$system:loginout.exe

 

Also below is the end of log file created by @SUBMIT_JDBC.COM

 

$ set def rdb$jdbc_home
$ spawn/nowait/proc=rdbthinsrv java -jar rdbthinsrv.jar -srv.mcBasePort 0
%DCL-S-SPAWNED, process RDBTHINSRV spawned
 
  MBOOKA       job terminated at 13-FEB-2013 11:02:40.56
<CR><LF>  Accounting information:
  Buffered I/O count:                295      Peak working set size:       1888
  Direct I/O count:                   99      Peak virtual size:         171936
  Page faults:                       239      Mounted volumes:                0
  Charged CPU time:        0 00:00:00.11      Elapsed time:       0 00:00:00.36

 

 

Request if some1 would advise me how to submit this file so that the process runs as a detach process and not terminate upon completion.     Thanks

3 REPLIES
CA1225221
Visitor

Re: Cant Run Detach Process

Why are you spawning rather than running the java command directly?

 

If you must spawn then you will probably want to remove the /NOWAIT - otherwise the parent process terminates right after spawning off the subprocess and the termination of the parent process also results in the termination of the subprocess. (It does not work the way it would in Unix/Linux.)

Antoniov.
Honored Contributor

Re: Cant Run Detach Process

I think you would run a daemon process which stay resident.

 

I look at my sample code where I used run with /UIC option instead of /AUTHORIZE

 

Here sample code (lowercase must be supplied)

RUN/DETACH/OUTPUT=RDBJDBC_SERVER.LOG/PROC=process_name/UIC=user_uic-
        /INPUT=STARTRDBJDBC.COM SYS$SYSTEM:LOGINOUT

 

Hope can help you.

 

Antonio Maria Vigliotti
Highlighted

Re: Cant Run Detach Process

Hello,

 

This is what i did setup at a customer and is working fine:

 

the contents of jdbc_startup.com

 

$ set verify
$ NODE = F$GETSYI("NODENAME")
$!
$ set noon                                      
$ rename RDB$JDBC_LOGS:'node'_rdbpool.log *.GOL/LOG
$ set on
$!
$ run sys$system:loginout.exe    -
 /detach      -
 /authorize     -
 /output=rdb$jdbc_logs:'node'_rdbpool.log -
 /err=rdb$jdbc_logs:'node'_rdbpool.err    -
 /process_name=rdbpool    -
 /input=sys$startup:jdbc_pool.com
$
$ set noverify
$exit

 

and where jdbc_pool.com contains:

 

$ node = f$getsyi("nodename")
$ set noverify
$ set def rdb$jdbc_home
$ def java$classpath [],rdb$jdbc_home:rdbnative.jar,rdb$jdbc_home:rdbthin.jar,rdb$jdbc_home:rdbthinsrvpool.jar
$ java -jar rdbthinsrvpool.jar -cfg rdb$jdbc_com:'node'_rdb_jdbc.xml -name rdbpool

$