Operating System - OpenVMS
1828038 Members
2043 Online
109973 Solutions
New Discussion

Problem in activating UNIFACE on OpenVMS

 
Prasad Londhe
New Member

Problem in activating UNIFACE on OpenVMS

Hi,

I am facing problem in activating UNIFACE from another UNIFACE session on OpenVMS. The main UNIFACE session spawns a DCL script. This DCL script in turn activates a C program. The C program in turn activates another DCL script (using lib$spawn system service), and this second DCL script activates UNIFACE again.

To represent the flow:
UNIFACE (main session) >> DCL script (1st) >> C program >> DCL script (2nd) >> UNIFACE


Invoking UNIFACE (or any other simple command for that matter) through C is not successful if the C program is activated from the UNIFACE session. The pid of the spawned process is shown 0. However, if I activate the C program directly from command line, UNIFACE can be activated.

Can someone please explain what needs to be done to solve this?

Thanks in advance,

Best regards,
Prasad
3 REPLIES 3
John Abbott_2
Esteemed Contributor

Re: Problem in activating UNIFACE on OpenVMS

Did this previously work ?
Do you get an actual system generated error message back ? and if so can you post here ?
Is there anything in the accounting file ?
Also dir/sin in the directory the product runs under (look at files created, perhaps any .log .dmp files)
Using the two methods you decribe (one fails, one works) are you using the same uaf username, on the same system ?
Check the value of prclm in the uaf

Kind Regards
John.
Don't do what Donny Dont does
Malleka Ramachandran
Frequent Advisor

Re: Problem in activating UNIFACE on OpenVMS

In addition to what is posted in the response, I would suggest the following:

When you create a sub process the definition of input/output/error is important.

1UNIFACE (main session) >>
2 DCL script (1st) >>
3 C program >>
4 DCL script (2nd) >>
5.UNIFACE

Based on your above input, the steps 3 4 and 5 are done through a C program from the command line interface which you say is working "However, if I activate the C program directly from command line, UNIFACE can be activated."
Is this correct?
If you invoke the C program in step 3 using command line arguments, you may want to make sure that the same command line arguments are passed to step 3 when you start at step 1.

Since you mentioned PID, do you get a different PID when you invoke from the command line?
Also, when you say it works when you invoke the C program from a command line, do you still use another DCL script to invoke UNIFACE, as in step 4 above?

Regards,
Malleka

Volker Halle
Honored Contributor

Re: Problem in activating UNIFACE on OpenVMS

Prasad,

welcome to the OpenVMS ITRC forum.


The pid of the spawned process is shown 0.


This seems to indicate, that the SPAWN command (from the C program, assuming you're using LIB$SPAWN) was NOT successful. Do you check the return status of the LIB$SPAWN call: status = LIB$SPAWN(...) ?

Does the user's PRCLM (Subprocess quota) allow to create 2 subprocesses ?

Volker.