- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Spawn command in Asynchronous mode
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2006 04:46 PM
тАО04-24-2006 04:46 PM
Spawn command in Asynchronous mode
Could some one please let me know syntax for a spwan command on OPen VMS?
i need to run a C program from Uniface on Open VMS in asynchronous mode.
If I use this
;spawn_str = "%%spawn_str %%$LIST$"
it runs the program in synchronous mode.
But I want to run this C pgm in Asynch mode, as per the documentation, if I use PIPE (-------)&, it doesnt work.
;spawn_str = "PIPE ( %%spawn_str %%$LIST$ ) &"
Could some one please let me know how to run in asynch mode?
Regards,
Rajni.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2006 05:05 PM
тАО04-24-2006 05:05 PM
Re: Spawn command in Asynchronous mode
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2006 08:33 PM
тАО04-24-2006 08:33 PM
Re: Spawn command in Asynchronous mode
SPAWN/NOWAIT/OUTPUT=my.log mycommand param1 param2 ...
This is almost equivalent to
PIPE mycommand param1 param2 ... > my.log &
Whatever it means in Uniface syntax is beyond my knowlege.
SPAWN is the original VMS way of executing a command in a (asynchroneous) sub-process.
The later PIPE command was added to approach the syntax and behaviour of Unix systems.
As seen in previous threads, You think it is necessary to combine spawn and some other async program execution (creprc or pipe).
Only one or the other method is o.k..
I see no sense in Spawning a PIPE, it just creates another subprocess-level.
Or are You thinking on some combination of fork/exec(l,v,vp) in Unix ?
And: whatever method of async execution You choose, always redirect output to some file (except in interactive tests on a terminal),
SPAWN/OUTPUT=
PIPE ... > logfile
And not to forget: in VMS there is HELP !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2006 08:45 PM
тАО04-24-2006 08:45 PM
Re: Spawn command in Asynchronous mode
Because readers here are unlikey to be familiar with Uniface rules, you may have to help us understand that.
When you mention 'spawn' we expect you are talking about the RTL Library routine LIB$SPAWN or the DCL command 'SPAWN'.
The RTL function have a 4th argument (see doc) which is flag where bit-0 (value 1) indicates that the main process should not wait for the completion of the sub-process to be created.
A similar flag is available in DCL (/NOWAIT).
In both cases the child can continue asynchroneously, but *must* finish before the parent stops, otherwise it will be killed.
An alternative is to create a detached process, which is also async. Please check the VMS doc for details, notably the system service SYS$CREPRC.
If the Spawn call is made by Uniface code, then tt is not clear to me whether you can pass along that flag or not. Check with Uniface (documentation).
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2006 09:05 PM
тАО04-24-2006 09:05 PM
Re: Spawn command in Asynchronous mode
Thanks for the replies.
The syntax which i have written here is from Uniface.
Am not able to run the DCL script in asynch mode from Uniface.
Regards,
Rajni.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2006 11:49 PM
тАО04-24-2006 11:49 PM
Re: Spawn command in Asynchronous mode
Just clearly state, what You really intend to produce on the VMS side:
Does SPAWN/NOWAIT/OUTPUT=my.log mycommand p1 p2
work directly under VMS/DCL ?
If yes, then it is up to Uniface to produce the right call-frame or request to execute this DCL command on a target VMS system.
Apparently noone here in this forum has experience with Uniface (?) .
If the above does not work directly on VMS, then tell us what does not work, error messaqges etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 08:03 AM
тАО04-26-2006 08:03 AM
Re: Spawn command in Asynchronous mode
Please bare in mind that a subprocess (spawn, LIB$SPAWN, LIB$DO_COMMAND etc) is a subprocess and therefore killed the moment the main (owner) process dies. (logs off or killed otherwise).
To create an independant process (a detached process) you could use something like RUN SYS$SYSTEM:LOGINOUT.EXE or SYS$CREPRC.
Regards,
Martin Hoogenboom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 03:25 PM
тАО04-26-2006 03:25 PM
Re: Spawn command in Asynchronous mode
Have a look in authorize for a uniface username/uic and check quotas/limits eg. prclm.
Also check the accounting log for the uniface account, and log files under uniface directories.
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 11:55 PM
тАО04-26-2006 11:55 PM
Re: Spawn command in Asynchronous mode
Rajni also posted this question in comp.os.vms.
John Briggs seems to have given a good answer there.
Hein.
http://groups.google.com/group/comp.os.vms/browse_frm/thread/77298c3296583c01/#