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
12-19-2005 10:13 PM
12-19-2005 10:13 PM
LIB$SPAWN
I am trying to execute one dcl script in a program using lib$spawn. It seems the program is not executing the script as I am not getting the required result. Is it possible to know, if the script has been successfully executed at DCL prompt or not ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2005 10:32 PM
12-19-2005 10:32 PM
Re: LIB$SPAWN
do you check the system service status return value from the LIB$SPAWN call ?
Do you use the COMPLETION_STATUS parameter ? It will receive the exit status of the spawned subprocess.
You can also check with accounting, whether the subprocess has been created at all and what it's exit status is.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2005 10:44 PM
12-19-2005 10:44 PM
Re: LIB$SPAWN
to capture the result, if any.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2005 10:51 PM
12-19-2005 10:51 PM
Re: LIB$SPAWN
Can you write few lines how to get the completion status in a program, I am using the following line inside program
lib$spawn('@path:xx.com');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2005 10:56 PM
12-19-2005 10:56 PM
Re: LIB$SPAWN
SYS$COMMON:[SYSHLP.EXAMPLES]ALPHA_LOGGER.C
status = LIB$SPAWN(0, &devnam, &devnam, &flags, 0, &pid, 0, 0,
subprocess_exit, 0);
if (status & SS$_NORMAL)
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2005 11:33 PM
12-19-2005 11:33 PM
Re: LIB$SPAWN
Now after putting status check, I could found that lib$spawn is returning not sucess value i.e. DCL script is not executing. Can u guide me why this is not executing ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2005 11:44 PM
12-19-2005 11:44 PM
Re: LIB$SPAWN
Then use that value and translate it to the appropriate error message:
$ WRITE SYS$OUTPUT F$MESSAGE(value)
or
$ EXIT value
Make sure you use the correct radix (hex or decimal) depending on your printf format statement.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2005 11:45 PM
12-19-2005 11:45 PM
Re: LIB$SPAWN
run/proc= program_name/output=err.txt program
I am getting 'no CLI present to perform function' error in the file err.txt
pls suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2005 11:53 PM
12-19-2005 11:53 PM
Re: LIB$SPAWN
It should work, if you run your program straight in your process with: $ RUN PROGRAM
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 02:59 AM
12-20-2005 02:59 AM
Re: LIB$SPAWN
When I am running the program using "RUN prog_name", it is executing my DCL script and is not releasing the terminal. But when I am putting in detached mode, it is not executing my DCL script.
Pls suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 03:05 AM
12-20-2005 03:05 AM
Re: LIB$SPAWN
if you want to execute DCL in a dtetached process (or spawned from such, as you are trying), then use
$ RUN SYS$SYSTEM:LOGINOUT.EXE/INPUT=
This gives your process the CLI, which means, enables DCL.
HTH
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 03:08 AM
12-20-2005 03:08 AM
Re: LIB$SPAWN
$ run/proc= program_name/output=err.txt program
Create a command procedure such as
run_program_name.com
Then you can use this command:
run/proc= program_name/output=err.txt /input=disk:[dir]run_program_name.com sys$system:loginout/authorize
This will create a complete DCL environment, including running the LOGIN.COM of the username the command is run under.
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 03:09 AM
12-20-2005 03:09 AM
Re: LIB$SPAWN
Proost!
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 04:37 AM
12-20-2005 04:37 AM
Re: LIB$SPAWN
I am trying to execute my DCL script using LIB$SPAWN inside a PASCAL program to create & enable a device on a terminal server port.
This script has to run along with the PASCAL code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2005 07:35 AM
12-20-2005 07:35 AM
Re: LIB$SPAWN
>LIB$SPAWN inside a PASCAL program to
>create & enable a device on a terminal
>server port.
Why not create and enable the terminal server port directly from your program? See I/O Users Guide, Chapter Terminal Driver, in particular example 5-1 in Section 5.6.
http://h71000.www7.hp.com/doc/82FINAL/aa-pv6sg-tk/aa-pv6sg-tk.PDF
For further assistance, please log a case with your local customer support centre.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2005 12:00 AM
12-21-2005 12:00 AM
Re: LIB$SPAWN
Pls suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2005 12:07 AM
12-21-2005 12:07 AM
Re: LIB$SPAWN
Yes, you can use LIB$DO_COMMAND, but that work a little like the Unix 'exec' and conflicts with your requirement "This script has to run along with the PASCAL code."
As per online doc:
LIB$DO_COMMAND
Execute Command
The Execute Command routine stops program execution and directs the command language interpreter (CLI) to execute a command that you supply as the argument. If successful, LIB$DO_COMMAND does not return control to the calling program. Instead, LIB$DO_COMMAND begins execution of the specified command.
If you want control to return to the caller, use LIB$SPAWN instead.
fwiw.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2005 12:07 AM
12-21-2005 12:07 AM
Re: LIB$SPAWN
LIB$DO_COMMAND -- transfers -- control to the named procedure, and EXITs your image.
That means, it is THE LAST statement in your programm that gets executed.
As far as I understand you so far, that is NOT what you try to achieve!
hth,
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2005 12:18 AM
12-21-2005 12:18 AM
Re: LIB$SPAWN
Pls suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2005 12:35 AM
12-21-2005 12:35 AM
Re: LIB$SPAWN
re-read yesterdays answer by Robert Boyd and myself: RUNning SYS$SYSTEM:LOGINOUT with /INPUT=
hth
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2005 01:59 AM
12-21-2005 01:59 AM
Re: LIB$SPAWN
The next part is :
When my server is directly comming as duty server, it will work. But in my standby server where all the processes are remain in HIB. Once duty server crashed, the standby server processes will come into LEF & CEF state and will become duty server. So what should I do for taking care that part ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2005 02:12 AM
12-21-2005 02:12 AM
Re: LIB$SPAWN
Well, we would need to know how your interprocess communication scheme looks like.
One nice, VMS, solution for this problem is for the main server to take out an application defined lock (SYS$ENQ), and holds it. The slave or alternate server then tries to also take out the lock (SYS$ENQW) and waits for it. When the master dies, the slave gets the lock automagically and becomes the master.
A nice variant can be not to worry about who initially becomes the master slave. Who-eveer gets the lock first is the master.
If the master needs help, it coudl release the lock, with a short mesage in the Lock Value Block to tell a slave to come to help.
Instead of waiting and be blocked, the slaves could also set up a blocking AST to be notified when the lock is free.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2005 04:32 AM
12-22-2005 04:32 AM
Re: LIB$SPAWN
$ telnet/create_sess 10.192.10.12 2001 1
$ set term tna1:/perm/spedd= .......
$ set prot=(S:rwlp,O:RWLP,G:,W:)/dev TNA1:
Now when I am executing this dcl script through small pascal code consists of $CREPRC & $CREMBX, it is successfully creating the device TNA1: with desired protection(S:rwlp,O:RWLP,G:rwlp,W:). But when I am putting this pascal code inside my main pascal program and executing it, it is unable to execute the "$ set prot=(S:rwlp,O:RWLP,G:,W:)/dev TNA1:" while it is executing the remaining lines successfully.But, It is creating the device TNA1: with only (S:rwlp,O:RWLP,G:,W:)protection for any combination of "rwlp" for S, O,W & G.
Pls suggest, is it a account/process priviledge issue ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2005 04:48 AM
12-22-2005 04:48 AM
Re: LIB$SPAWN
When I am trying to run my main program in run prog_name/detached/proc=proc_name it is successfully setting the protection but when I am trying to use customised tool to start the process it is unable to set the protection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2005 06:08 AM
12-22-2005 06:08 AM
Re: LIB$SPAWN
I observe your are keep getting very good responses for all your questions from most of our forum senior members; they are spending their valuable timings to go thru your issues and compsing the suggestions.
But I found from your forum Profile:
I have assigned points to 83 of 172 responses to my questions
May be you please can find some time to do some assigning points?
Mind, I do NOT say you necessarily need to give lots of points. It is fully up to _YOU_ to decide how many. If you consider an answer is not deserving any points, you can also assign 0 ( = zero ) points, and then that answer will no longer be counted as unassigned.
Btw: I don't understand this command. Does it works for you?
$ set prot=(S:rwlp,O:RWLP,G:,W:)/dev TNA1:
Also what is the value you assigned for UIC argument of your $CREPRC service. Is it default value (same UIC of parent process) or difft UIC?
Archunan
Archie