Re: ps -f
Posted in 1994
> Hello, all, and thanks for the responses. To follow up, I tried > all suggestions, and none worked. After going though three levels > of Informix support, they have acknowledged a bug, all the way > thru 5.03 that you cannot run ps in a SYSTEM call from a stored > procedure. Just about every other unix command is okay, but not > ps. You cant even put it in a shell script and invoke it. That's a shame. > Now for another question, to follow up. I need to create and use > a unique unix file name inside the stored procedure. We were trying > to append a process id to the file /tmp/Up_file to do this, but > cannot. We tried to use the gettimeofday command to use the longint > value of time down to microseconds, but you cannot pass a variable > back from c to the stored procedure. Any other ideas? The winner gets > a night in a bar at the next Informix User Conference. Two ways either pass in a unique number to the system call for creating the unique file name. This can be done by using an insert on a table with a serial attribute and use a trigger to get the value of the new row. Or generate a number <255 and >10? within the c program that when combined with the user name creates a unique file name. Then pass this value back as the return code to the stored procedure. Use values below 10? for error conditions. Cheers - Jim My opinions are my own. They may vary with time but they remain MINE! ---------------------------------------------------------------------- Name: Jim Gordon Company: DHL Systems Inc, Burlingame, CA, USA ----------------------------------------------------------------------