ltannous
3rd January 2003, 23:57
I have a UNIX Script that we developed to execute our edi communications. I would like to create a session and add a button to a form so when the user selects this, he will activate the UNIX script. Currently, I have attached the shell program to a menu and the user can select that. How do I call the script with a button I added to the session form.

dnnslbrwn
4th January 2003, 00:26
The 3GL command SHELL could be used in the cont.process section.

eg:

cont.process:
on.choice:
ret = shell("rm $BSE/tmp/file", 0)


... where your shell command would be in place of the rm command above. If you don't care about output, I would leave the 0. If you don't even care about waiting until the process finishes, you could put SHELL_BACKGROUND as the second parameter instead.

Cheers,

-Dennis

Han Brinkman
4th January 2003, 19:31
look at:

http://www.baanboard.com/programmers_manual_baanerp_help_functions_starting_and_stopping_programs_run_baan_prog_run_prog

ltannous
5th January 2003, 08:18
How can I not get the terminal emulator to appear, but the messages that would appear on the terminal emulator appear on my session form??

Eg. the script I use in Unix is activating communication session, there are several messages that appear
Retreiving Messages From Geis
Processing Messages
Please Wait .....


Is this possible?

ssbaan
6th January 2003, 17:22
Itannous

Is the communication seesion sending it's messages to standard output or standard error in Unix? Standard output should be display on the screen is you are not executing the script in background. To send Unix standard error output to the screen
add 2>&1 to the end of the command line


2>&1 redirects standard error to standard out in Unix

ltannous
6th January 2003, 17:45
What if I run it as a background process, can I get the messages that are in the script to appear on my BaaN session Form?

I don't want to see the terminal emulator appear. I want to grab the messages and have them appear on the form, like a progression log.

dnnslbrwn
6th January 2003, 18:35
That would be hard. Easier would be to break you UNIX script into parts and after you execute each part, update a message on the screen. If you need input from the scripts, they could write to a file that you seq.read and what ever you read, you put on the form.

Cheers,

-Dennis

dnnslbrwn
7th January 2003, 00:42
Han,

I have not been exposed to V much as I seem to have stopped at IVc4.

I don't recognize run.prog.... is it a BAAN V command similar to shell? How does it differ? Looked at your link and it seems to also do something similar to zoom.to$

Is it a mix of the two? Do the old commands still exist?

Thanks.