If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > system Command in store procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-11-03, 10:27
junsong junsong is offline
Registered User
 
Join Date: Aug 2002
Posts: 2
Cool system Command in store procedure

I tried to use a store procedure to launch 4ge program and got the following error message:

-668 System command cannot be executed. A system call failed in the operating system. The following example shows a statement that might cause an error: SYSTEM
'hello';

-1 Not owner. An operating-system error code with the meaning shown was unexpectedly returned to the database server. Check the ownership and permissions of files and directories that are used in the current operation. Look for other operating-system error messages that might give more information.

I can launch 4ge program from command line without any problem, and the attribute for the 4ge program is :-rwxrwxrwx.

Any idea?
Reply With Quote
  #2 (permalink)  
Old 03-11-03, 10:32
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
The system command will be executed by the user who started the informix server.
ps -ef |grep oninit will show you that user.

Make sure your 4GL executable has execute permissions for this user.
__________________
rws
Reply With Quote
  #3 (permalink)  
Old 03-11-03, 10:40
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
woeps, sorry about that quick response...
Check the following file: system.txt
Attached Files
File Type: txt system.txt (20.8 KB, 336 views)
__________________
rws
Reply With Quote
  #4 (permalink)  
Old 03-11-03, 17:43
junsong junsong is offline
Registered User
 
Join Date: Aug 2002
Posts: 2
Thanks.
Finally, It looks like I solved the problem.
1. when the 4ge program is called by system comand, the environment is different.
some env variables are missing, for example, INFORMIXDIR, INFORMIXSERVER, and LIBPATH.
The command line should set those env variables.

2. Then, The store procedure should use the c shell script to launch the 4ge program. In the script file, redirect the error message to a file.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On