Go Back > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor


As a Customer What would do to keep your ERP Implementation intact
Proactively define Business Process-- Take the Project Ownership
Handover everything to System Integrator from drawing BP till implementation of ERP
Hire more inhouse skilled & capable IT Resource to work directly with SI
Rely on SI Architects/Consultants
Total votes: 10

Baanboard at LinkedIn

Reference Content

Thread Tools Display Modes
Old 9th January 2021, 02:58
Altrev Altrev is offline
Join Date: Oct 2009
Posts: 31
Altrev is on a distinguished road
Baan: BaaB IV c4 - DB: Informix - OS: HP-UX 11
read exit value on rc.start
Baan: Baan IVc4
C/S: None/Unknown


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:
> rc.start 231245 705
On the rc.start the two parameters are reveived and set them as environment variables, then the session is executed:
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

On the BaaN session I read these variables:
	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
exit( str$(orno) )
How can I read this value on rc.start if the session is executed like:
ba6.2 kmpuro239m000 2>${BSE_TMP}/rc.startjoberrpotest2
I tried to set also an environment variable on BaaN session
	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

Reply With Quote
Old 11th January 2021, 16:44
günther günther is offline
Join Date: Jan 2002
Location: Ehingen, Germany
Posts: 616
günther is on a distinguished road
Baan: IVc4 - DB: Informix - OS: HP-UX
Hi Altrev,

we are doing it a bit different: 3rd argument is a file name (created by the shell script that calls ba6.2). Ht session does not "exit(0)" or "exit(1)"; instead it writes the desired result to the file. You get the idea?

Reply With Quote
Sponsored Links

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while opening opening purchase order naga ch Tools Administration & Installation 6 17th June 2016 23:42
Undocumented Functions & Variables george7a Tools Development 81 30th September 2015 12:35
Read file on network learner Tools Development 5 3rd March 2010 22:25
Save and Exit benito General Discussion & Chat 4 14th June 2002 10:28

All times are GMT +2. The time now is 08:25.

©2001-2020 - -