- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Passing process logical to spawned process
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
Forums
Discussions
Discussions
Discussions
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
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
09-01-2006 12:21 AM
09-01-2006 12:21 AM
IN APACHE
Cgi-script
RUN xxxx
xxx will set process logicals and spawn (using defaults) RUN yyy.
yyy will read process logicals and can spawn RUN zzz.
zzz will read process logicals and do work.
Runs successfully - all programs can read the process logicals.
IN BATCH
RUN xxx
xxx will set process logicals and spawn (using defaults) RUN yyy.
yyy will read process logicals and can spawn RUN zzz.
zzz will read process logicals and do work.
SHOW logicals/process displays logicals correctly set by xxx
Neither yyy nor zzz can see the process logicals set by xxx.
All quotas are set high enough that they should not have any effect and are similar for both the Apache and Batch jobs.
As I understand it a spawn should by default copy its process logicals from the parent to the child.
Why are the process logicals not being passed within the batch process?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 12:56 AM
09-01-2006 12:56 AM
Re: Passing process logical to spawned process
I've tested this with a couple of DCL procedures and it seems to work for me - interactively and in batch.
Please test this on your system.
Proc_1: defines level_0 logical and spawns @proc_2
proc_2: defines level_1 logical and spawns @proc_3
proc_3: show level_0 and level_1 logical
The LIB$SPAWN RTL routine has a flags argument, in which the NOLOGNAM bit could prevent logical names to be passed to the spawned (child) process. Same as /NOLOGNAM qualifier used with the SPAWN DCL command. The default is to pass process logicals to the spawned subprocess.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 12:56 AM
09-01-2006 12:56 AM
Re: Passing process logical to spawned process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 12:58 AM
09-01-2006 12:58 AM
Re: Passing process logical to spawned process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 01:39 AM
09-01-2006 01:39 AM
Re: Passing process logical to spawned process
However it works as part of the cgi-script which suggests that the code is okay but there is a problem with the configuration / environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 01:46 AM
09-01-2006 01:46 AM
Re: Passing process logical to spawned process
Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 01:59 AM
09-01-2006 01:59 AM
Re: Passing process logical to spawned process
for a logical to be visible for all processes in a job tree (parent and spawned processes), it's sufficient to use DEFINE/JOB - DEFINE/SYSTEM/EXEC may be a bit of an over-kill.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 02:05 AM
09-01-2006 02:05 AM
Re: Passing process logical to spawned process
Thanks for correction, it's true - DEFINE/JOB is realy sufficient.
Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 02:41 AM
09-01-2006 02:41 AM
Re: Passing process logical to spawned process
RUN xxx
xxx will set job logicals and spawn @yyy
yyy (in DCL) will read job logicals and set process logicals and RUN zzz
It works but is a real hack and does not answer the underlying problem.
I need to use process logicals as that is the table zzz reads from, also I can' change it (program zzz is effectively an exe only).
I can change program xxx and yyy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 02:51 AM
09-01-2006 02:51 AM
Re: Passing process logical to spawned process
so XXX, when run in batch mode, will not copy its process logicals to the spawned subprocess, right ?
Do you use the flags argument in the call to LIB$SPAWN - 4th argument ?
This should be the only variable being able to influence this behaviour.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 03:19 AM
09-01-2006 03:19 AM
Re: Passing process logical to spawned process
status_flag = TRUE
stat = lib$spawn(p_command)
IF stat<>SS$_NORMAL THEN
status_flag = FALSE
END IF
! Set return value
! ----------------
fgi_spawn = status_flag
I have tried lib$spawn(p_command,,,0) but it makes no difference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2006 05:40 AM
09-01-2006 05:40 AM
Re: Passing process logical to spawned process
I've tried the following simple BASIC program TEST.BAS:
call lib$spawn('SHOW LOG/PROC')
end
Create a .COM procedure:
$ DEFINE/PROCESS ABC test
$ RUN test
And run it interactively or in batch. The ABC logical is printed in both cases (tested on OpenVMS Alpha V7.2-1) and I don't expect it to behave any different on any other version of OpenVMS.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2006 09:32 PM
09-03-2006 09:32 PM
Re: Passing process logical to spawned process
For example: F$GETJPI("","PRCCNT")
Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2006 09:49 PM
09-03-2006 09:49 PM
Re: Passing process logical to spawned process
Exec and kernel mode are not copied. Also the /name=confine logicals are not copied.
Is your login defining them differently according to the mode (I/B/O) ?
In batch, did you check if the logicals are visible by xxx ? I'm thinking of IFs in your login.com.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2006 09:17 PM
09-04-2006 09:17 PM
SolutionSPAWN command...
By default, all process logical names and logical name tables are copied to the subprocess except those explicitly marked CONFINE or created in executive or kernel mode.
------------------------------
If the Batch jobs is submitted under different user account than the CGI script user and batch jobs doesn't work well as expected , then there must be user level privilege difference.
Note that you must have SYSNAM or SYSPRV privileges to create logical names in executive mode in any logical name table.
When you use the DEFINE command without specifying a mode, DCL creates the logical name in supervisor mode.
----------------------------
regards
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2006 03:39 AM
09-08-2006 03:39 AM
Re: Passing process logical to spawned process
The solution was to pass job logicals into spawned DCL and copy them to process logicals to run the required exe.
Better solutions can be imagined and will be implemented when time allows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2006 03:39 AM
09-08-2006 03:39 AM