User login
|
|
Frontpage Sponsor
|
|
Poll
|
As a Customer What would do to keep your ERP Implementation intact Proactively define Business Process-- Take the Project Ownership 50% Handover everything to System Integrator from drawing BP till implementation of ERP 20% Hire more inhouse skilled & capable IT Resource to work directly with SI 30% Rely on SI Architects/Consultants 0% Total votes: 10 |
Baanboard at LinkedIn
|

|
|
|
 |

12th January 2021, 19:31
|
Member
|
|
Join Date: Mar 2003
Location: South Africa Cyprus Canada
Posts: 60
|
|
Baan: 4 or 5 -
DB: Oracle -
OS: Unix
|
activate() session in LN with Arguments
Baan: Other/Unknown C/S: None/Unknown
Hello,
I want to start exchange session "create import programs" via a script and pass it Exchange scheme from/to and Batch from/to. AFS is not an option because I want the session to actually startup in order to view the errors if any. start.session does not have option to add arguments but apparently wait.and.activate() and activate() do. I tried below code. The session starts but without arguments. How can these arguments be passed?
wait.and.activate( "daxch0227m000",
"MYXCH", "MYXCH", |exchange from / to
"MYBATCH", "MYBATCH", |batch from to
"1", |Debug y/n
"2", |profile y/n
"1" ) |display error y/n
FYI - the arguments were passed in order of sequence of form fields.
Thanks
__________________
Better to die on your feet than live on your knees
|

12th January 2021, 21:09
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,542
|
|
Baan: Baan 4C4 A&D1 -
DB: Oracle -
OS: Sun Solaris
|
I only recall seeing this a couple of times and the programs I saw used something like pdno.f = val(ARGV$(1)) to pull in the passed arguments. So what you could do is try like the source extender to add code to the program to import the variables. Hopefully someone else has a better solution or another way to activate an exchange scheme.
__________________
Mark
GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.
Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
|

14th January 2021, 15:24
|
 |
Guru
|
|
Join Date: Aug 2002
Location: Cologne, Germany
Posts: 462
|
|
Baan: all -
DB: all -
OS: Unix / Win2K
|
Hi,
please take a look at processes overview and synopsis functions
I wrote the following 3GL Script which starts a different session:
Code:
long g.processno
function main()
{
g.processno = act.and.sleep("tccom0401m000")
if g.processno > 0 then
put.var(g.processno, "emno.f", "dude")
put.var(g.processno, "emno.t", "dude")
reactivate(g.processno)
endif
}
and it seems to work (see below) .
Of course you have to know the name of the external variables used on your form.
In your case these would be: cxch.f, cxch.t, cbat.f, cbat.t, debug.yn, profile.yn and disp.error
__________________
May the force be with you!
Last edited by vahdani : 14th January 2021 at 15:51.
|

14th January 2021, 20:47
|
Member
|
|
Join Date: Mar 2003
Location: South Africa Cyprus Canada
Posts: 60
|
|
Baan: 4 or 5 -
DB: Oracle -
OS: Unix
|
This is fantastic Vahdani.
Thanks, I'll give it a try. Hope to finally blackbox exchange.
Cheers
__________________
Better to die on your feet than live on your knees
|

16th January 2021, 17:30
|
Member
|
|
Join Date: Mar 2003
Location: South Africa Cyprus Canada
Posts: 60
|
|
Baan: 4 or 5 -
DB: Oracle -
OS: Unix
|
Vahdani,
How would you have the program click the "Print" button? I kicked off session daxch0228m000 (tuxch0228m00 in B4) with corerct args, but the session does not continue the process. Activate() does this tho but without ARGS.
Any idea?
Quote:
Originally Posted by vahdani
Hi,
please take a look at processes overview and synopsis functions
I wrote the following 3GL Script which starts a different session:
Code:
long g.processno
function main()
{
g.processno = act.and.sleep("tccom0401m000")
if g.processno > 0 then
put.var(g.processno, "emno.f", "dude")
put.var(g.processno, "emno.t", "dude")
reactivate(g.processno)
endif
}
and it seems to work (see below) .
Of course you have to know the name of the external variables used on your form.
In your case these would be: cxch.f, cxch.t, cbat.f, cbat.t, debug.yn, profile.yn and disp.error
|
__________________
Better to die on your feet than live on your knees
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|