Skip to Content
0
Former Member
Dec 05, 2008 at 04:14 AM

Failed using exec and wait_for_file functions in Unix for DS X3.1

108 Views

Hi,

Unix version --> 11.23 running of HP-UXIA64

DS version --> Data Services X3.1

I able to run exec and wait_for_file fuctions in my local Windows environment using cmd.exe to move files or copy files around folders.

A) However, I failed to run Unix command using exec function to get any similar results, the test script that i wrote in DS is like this:

(1) DS Scripts:

==========

$G_Var1 = exec('/usr/bin/sh', 'pwd', 8);

Print('**** Unix result: \[$G_Var1\] ****');

log returns as such:

==================

PRINTFN 5/12/2008 11:56:35 AM **** Unix result: 1: pwd: invalid multibyte character ****

(2) DS Scripts:

==========

$G_Var1 = exec('', '/usr/bin/sh pwd', 8);

Print('**** Unix result: \[$G_Var1\] ****');

log returns as such:

==================

PRINTFN 5/12/2008 11:59:10 AM **** Unix result: 0: **** (--> although 0 but can't see any return pwd result)

I have tried several versions such as using just sh instead of full path /usr/bin/sh, but also can't work.

B) For the wait_for_file function, the script is:

wait_for_file('/source/data/dummy.txt', 0, 0, 1, $G_Path_Filename);

print('**** Source file and path is = \[$G_Path_Filename\] ****');

(--> nothing return for the global variable)

Please advice and thank you. 😊