Hi,
I'm executing a BaaN session on Unix using the rc.start and providing two parameters as well.
When execting it on Unix is like:
On the rc.start the two parameters are reveived and set them as environment variables, then the session is executed:
Code:
REQUI_ID=$1 ;export REQUI_ID
CMPNY_ID=$2 ;export CMPNY_ID
PO_ID=0 ;export PO_ID
ba6.2 kmpuro239m000 2>${BSE_TMP}/rc.startjoberrpotest2
${ECHO} $PO_ID
On the BaaN session I read these variables:
Code:
req_id = getenv$("REQUI_ID")
comp_id = getenv$("CMPNY_ID")
Then process is executed as expected, but at the end when the session is closed I need to return a value
How can I read this value on rc.start if the session is executed like:
Code:
ba6.2 kmpuro239m000 2>${BSE_TMP}/rc.startjoberrpotest2
I tried to set also an environment variable on BaaN session
Code:
ret = setenv("PO_ID",str$(orno))
but it does not work, I read other threads that this is because is executed in a different shell and when the command is executed the additional shell is closed so the variable is lost, this is why you see at the end of the rc.start the $ECHO
Thanks