Dear Group,
I have a detached process that I wish to execute and wait for
completion of a DCL command procedure. Since it is a detached
process I have no CLI so I cannot use lib$do_command etc.
I have seen from the system services manual sys$creprc and attempted
to use it. I have been able to create a detached process, however I
have not been able to execute the command procedure and wait for its
completion.
Is sys$creprc the correct system service to use? Does anyone have an
example is C or Fortran that uses sys$creprc to execute and wait for
the completion of a command procedure from a detached process.
Thanks
Stuart
|
|
0
|
|
|
|
Reply
|
stuie_norris (81)
|
10/14/2007 9:24:46 AM |
|
stuie_norris@yahoo.com.au schrieb:
> I have a detached process that I wish to execute and wait for
> completion of a DCL command procedure. Since it is a detached
> process I have no CLI so I cannot use lib$do_command etc.
>
> I have seen from the system services manual sys$creprc and attempted
> to use it. I have been able to create a detached process, however I
> have not been able to execute the command procedure and wait for its
> completion.
>
> Is sys$creprc the correct system service to use? Does anyone have an
> example is C or Fortran that uses sys$creprc to execute and wait for
> the completion of a command procedure from a detached process.
Out of a program, sys$creprc is o.k., but if You want a CLI (DCL), then
the image to start must be the DCL login program
SYS$SYSTEM:LOGINOUT.EXE: it establishes a DCL environment with the usual
symbols and process logicals. As the input for the process specify a DCL
procedure which in turn should run the target image.
I don't have an example ready, but pass to sys$creprc parameters
equivalent to the DCL command:
RUN/DETACH/AUTH SYS$SYSTEM:LOGINOUT/input=myproc.com/output=mylog.log
And in myproc.com:
$! establich default directory etc.
$ RUN myimage
$ EXIT
--
Joseph Huber - http://www.huber-joseph.de
|
|
0
|
|
|
|
Reply
|
joseph.huber3 (36)
|
10/14/2007 10:08:02 AM
|
|
stuie_norris@yahoo.com.au wrote:
> Dear Group,
>
> I have a detached process that I wish to execute and wait for
> completion of a DCL command procedure. Since it is a detached
> process I have no CLI so I cannot use lib$do_command etc.
>
> I have seen from the system services manual sys$creprc and attempted
> to use it. I have been able to create a detached process, however I
> have not been able to execute the command procedure and wait for its
> completion.
>
> Is sys$creprc the correct system service to use? Does anyone have an
> example is C or Fortran that uses sys$creprc to execute and wait for
> the completion of a command procedure from a detached process.
>
> Thanks
>
> Stuart
>
The customary trick used when you want a detached process to have DCL
available is to have it run LOGINOUT.EXE.
|
|
0
|
|
|
|
Reply
|
rgilbert88 (4360)
|
10/14/2007 3:16:36 PM
|
|
On Oct 14, 11:16 am, "Richard B. Gilbert" <rgilber...@comcast.net>
wrote:
> stuie_nor...@yahoo.com.au wrote:
> > Dear Group,
>
> > I have a detached process that I wish to execute and wait for
> > completion of a DCL command procedure. Since it is a detached
> > process I have no CLI so I cannot use lib$do_command etc.
>
> > I have seen from the system services manual sys$creprc and attempted
> > to use it. I have been able to create a detached process, however I
> > have not been able to execute the command procedure and wait for its
> > completion.
>
> > Is sys$creprc the correct system service to use? Does anyone have an
> > example is C or Fortran that uses sys$creprc to execute and wait for
> > the completion of a command procedure from a detached process.
>
> > Thanks
>
> > Stuart
>
> The customary trick used when you want a detached process to have DCL
> available is to have it run LOGINOUT.EXE.- Hide quoted text -
>
> - Show quoted text -
Yep. And here is an example stub from a real world application:
$!
$ run sys
$system:loginout -
/process_name =
"Advocate_Srvr" -
/uic
=[346,6] -
/
noswap -
/
noresource_wait -
/
priv=all -
/input = CSMIS
$com:advocate_server_init.com -
/output = CSMIS
$log:advocate_server.out -
/ERROR = CSMIS
$log:advocate_server.err -
/prior = 4
$!
The file "advocate_server_init.com" could simply contain one DCL line
like "$run my_app.exe"
Neil Rieck
Kitchener/Waterloo/Cambridge,
Ontario, Canada.
http://www3.sympatico.ca/n.rieck/links/cool_openvms.html
http://www3.sympatico.ca/n.rieck/links/openvms_demos.html
|
|
0
|
|
|
|
Reply
|
n.rieck (1973)
|
10/14/2007 10:56:50 PM
|
|
In article <fespq2$5fv$1@online.de>, Joseph Huber <joseph.huber@NIRWANA.web.de> writes:
>
> Out of a program, sys$creprc is o.k., but if You want a CLI (DCL), then
> the image to start must be the DCL login program
> SYS$SYSTEM:LOGINOUT.EXE: it establishes a DCL environment with the usual
> symbols and process logicals. As the input for the process specify a DCL
> procedure which in turn should run the target image.
This is exactlly what the $CREPRC documentation is supposed to say.
I wonder what the OP actually tried.
|
|
0
|
|
|
|
Reply
|
koehler2 (8190)
|
10/15/2007 1:28:06 PM
|
|
On Oct 14, 5:24 am, stuie_nor...@yahoo.com.au wrote:
> Dear Group,
:
> Is sys$creprc the correct system service to use? Does anyone have an
> example is C or Fortran that uses sys$creprc to execute and wait for
> the completion of a command procedure from a detached process.
Stuart,
The main question has been answerred.
But what abour the undelying question...
what are you really trying to do... in the command procedure to be
launched ?
You wouldn't be the firrst one to use such mechanism for a 'submit' or
'mail' where a direct call to SYS$SNDJC or MAIL$mublefratz would be so
much more elgant and more efficient without being much more difficult
than the (apparently too difficult) call to sys$creprc.
Cheers,
Hein.
|
|
0
|
|
|
|
Reply
|
heinvandenheuvel2 (577)
|
10/15/2007 2:22:10 PM
|
|
On Oct 14, 6:56 pm, Neil Rieck <n.ri...@sympatico.ca> wrote:
> On Oct 14, 11:16 am, "Richard B. Gilbert" <rgilber...@comcast.net>
> wrote:
*** repost ***
$!
$!
$run sys$system:loginout -
/process_name ="Advocate_Srvr" -
/uic =[346,6] -
/noswap -
/noresource_wait -
/priv=all -
/input= CSMIS$com:advocate_server_init.com -
/output= CSMIS$log:advocate_server.out -
/ERROR= CSMIS$log:advocate_server.err -
/prior= 4
$!
$!
BTW, the only reason for doing this is to attach a CLI (command
language interpretor) so that certain calls like LIB$ will work.
Neil Rieck
Kitchener/Waterloo/Cambridge,
Ontario,Canada.
http://www3.sympatico.ca/n.rieck/links/cool_openvms.html
http://www3.sympatico.ca/n.rieck/links/openvms_demos.html
|
|
0
|
|
|
|
Reply
|
n.rieck (1973)
|
10/15/2007 9:53:21 PM
|
|
Neil Rieck <n.rieck@sympatico.ca> writes:
>*** repost ***
>$!
>$!
>$run sys$system:loginout -
> /ERROR= CSMIS$log:advocate_server.err -
>$!
>$!
Note that DCL does something funky with SYS$ERROR when starting up.
Usually harmless, but if you go looking for CSMIS$log:advocate_server.err
and don't see it, that's why.
>BTW, the only reason for doing this is to attach a CLI (command
>language interpretor) so that certain calls like LIB$ will work.
Not all LIB$, just a few of them, such as LIB$SPAWN and LIB$SET_LOGICAL
and things like CLI$PRESENT.
|
|
0
|
|
|
|
Reply
|
moroney (973)
|
10/15/2007 11:15:22 PM
|
|
In article <1192485201.923845.294680@k35g2000prh.googlegroups.com>, Neil Rieck <n.rieck@sympatico.ca> writes:
> On Oct 14, 6:56 pm, Neil Rieck <n.ri...@sympatico.ca> wrote:
>> On Oct 14, 11:16 am, "Richard B. Gilbert" <rgilber...@comcast.net>
>> wrote:
>
> *** repost ***
>
> $!
> $!
> $run sys$system:loginout -
> /process_name ="Advocate_Srvr" -
> /uic =[346,6] -
> /noswap -
> /noresource_wait -
> /priv=all -
> /input= CSMIS$com:advocate_server_init.com -
> /output= CSMIS$log:advocate_server.out -
> /ERROR= CSMIS$log:advocate_server.err -
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What is this? SYS$SYSTEM:LOGINOUT.EXE discards the
pre-existing translation for SYS$ERROR (using it as a parameter in
oddball cases such as DECNET connects) and arranges things so
that the SYS$ERROR process permanent file always points to a copy
of the SYS$OUTPUT process permanent file.
$ run sys$system:loginout /auth /detach -
/input=disk_user:[decuserve_user.briggs]test.com -
/out=disk_user:[decuserve_user.briggs]test.log -
/error=disk_user:[decuserve_user.briggs]test.err -
%RUN-S-PROC_ID, identification of created process is 000E6375
$ type test.log
This is test.com
ORG_FILE_NAME = "EISNER$DRA3:[DECUSERVE_USER.BRIGGS]TEST.COM;20"
ORG_FILE_NAME = "EISNER$DRA3:[DECUSERVE_USER.BRIGGS]TEST.LOG;4"
ORG_FILE_NAME = "EISNER$DRA3:[DECUSERVE_USER.BRIGGS]TEST.LOG;4"
$ type test.com
$ write sys$output "This is test.com"
$ ppf = "$sys$login:ppf"
$ ppf sys$input
$ show sym org_file_name
$ ppf sys$output
$ show sym org_file_name
$ ppf sys$error
$ show sym org_file_name
$ exit
|
|
0
|
|
|
|
Reply
|
briggs3 (572)
|
10/16/2007 11:55:48 AM
|
|
|
8 Replies
42 Views
(page loaded in 0.208 seconds)
Similiar Articles: bash commands with pipes immediately suspended (SIGTTOU). - comp ...Whenever I run a command which uses a pipe, the ... truss output from a static shell process right before running the command ... 25257: lwp_create(0xFFBEF628, LWP_DETACHED ... Health checks for Solaris - comp.unix.adminHmm, I think your best bet is to run: truss -p 1 -o ... but you can search for it at http://docs.sun.com/?q ... am getting bash-2.05b# truss -f -p 0 truss: system process ... Could anyone give me the spice-mode.el - comp.emacsHi, All I am new to *NIX and I am thinking of writing spice code under Emacs. However, I have no idea of Emacs Lisp. Hence, I could not write a packa... recovering from failed system disk - comp.sys.hp.hpuxShall I let fsck run? The point is, of ... > Use the vgimport command to complete the process. ... failed boot disk is not a very difficult procedure ... Solaris 10 update 05/08 is released - comp.unix.solarisWell, this didn't work, because after selecting command ... the console was something like "in use by another process ... But when you do that, most of the "Sun can't run web ... Keyboard Input and Command Line Buffers - comp.lang.asm.x86 ...... Procedures Handler: PUSHA IN AL, 60h TEST AL ... Then you can process it at your leisure. > I've had a ... CS:intCursor], 2 And I added this code to be run ... Save file defaults to utf-16 - comp.emacs... try to start Emacs from the command line like this: emacs -q ... Mule-UCS with the default procedure as documented in that package and triggering the auto-detection process ... Keyboard Input - comp.lang.asm.x86... to accept inputs from the keyboard to try to make a command ... XOR AX, AX ;Clear DS MOV DS, AX ;To run ... 4','5','6','7','8','9','0','-','=', 8 db 9, 'q','w ... HP/UX printing queues - comp.sys.hp.hpuxA route add command may have to be run, depending on the environment ... BootP request by a client, all boot process ... This procedure may vary depending on the OS ... Week number - comp.lang.rexxThanks again, but this killed process bug already solved ... code you write, does it contain no function / procedure ... They just run the best running business in the whole ... Execute a Stored ProcedureThis topic describes how to execute a stored procedure in SQL Server 2012 by ... database is recovered during that startup process. Setting up procedures to execute ... PsExec - Execute process remotely - SS64Execute a command-line process on a remote machine. Syntax psexec \\computer[, ... Options: computer The computer on which psexec will run command. 7/29/2012 2:47:54 AM
|