Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > AFS/DDC/OLE: Function servers

User login

Frontpage Sponsor

Main

Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
29%
500 - 800 GB
3%
800 - 1200 GB
8%
1200 - 1500 GB
8%
1500 - 2000 GB
12%
> 2000 GB
22%
Total votes: 76

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 19th August 2019, 03:07
cherokee's Avatar
cherokee cherokee is offline
Guru
 
Join Date: Jan 2003
Location: Montreal, Canada
Posts: 306
cherokee is on a distinguished road
Baan: Baan IVc3 A&D - DB: Oracle - OS: IBM AIX
Cool AFS runs once second time fails

Hello all,

I have a stack of orders to be printed, I use an AFS, it prints the first order, when loops for the next order does not work, no error message on the error.message var.

Note: I have changed the sort order in the stack, to print bottom to top and it prints the first instance but not the next one(it only works the first time no matter what order I want to print), is not data related.

Code:
for i = 1 to reqs.index
                spool.device = <MY_ASCI_DEVICE>
                l.orno = pur.req.stack(1,i;9)
                spool.fileout = "c:\temp\"&logname$&"_req_"&strip$(shiftl$(l.orno))&".txt"
                stpapi.put.field("timrpc421m000","orno.f",str$(l.orno))
                stpapi.put.field("timrpc421m000","orno.t",str$(l.orno))
                stpapi.put.field("timrpc421m000","psdt.f",str$(l.utc.f))
                stpapi.put.field("timrpc421m000","psdt.t",str$(l.utc.t))
                stpapi.put.field("timrpc421m000","pfdt.f",str$(l.utc.f))
                stpapi.put.field("timrpc421m000","pfdt.t",str$(l.utc.t))
                stpapi.set.report("timrpc421m000","rtimrpc42111001",spool.device,error.message)  
                stpapi.print.report("timrpc421m000",error.message)
                stpapi.end.session("timrpc421m000")
        endfor
Any inputs are welcome.

Thanks in advance
__________________
Carlos Gonzalez CPIM,CSCP
Reply With Quote
  #2  
Old 19th August 2019, 12:39
andreas.toepper andreas.toepper is offline
Senior Member
 
Join Date: Jun 2004
Posts: 178
andreas.toepper is on a distinguished road
Baan: Baan4, LN6.1 - DB: MSSQL - OS: Linux&Windows
I'm using LN 10.2.1. When I did call a print session serveral times (i.e. in a loop) I had to "export" spool.device to the session controlled by AFS.

So I would try somethink like this:

stpapi.put.field("timrpc421m000", spool.fileout, "c:\temp\"&logname$&"_req_"&strip$(shiftl$(l.orno))&".txt")

This will set spool.fileout of the session timrpc421m000. You've set spool.fileout for your AFS session.
Reply With Quote
Sponsored Links
  #3  
Old 19th August 2019, 14:11
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,365
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Hmmm... - never tried it that way. I always exported(AFS session) and imported spool.fileout(baan session).
__________________
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.
Reply With Quote
  #4  
Old 19th August 2019, 14:12
cherokee's Avatar
cherokee cherokee is offline
Guru
 
Join Date: Jan 2003
Location: Montreal, Canada
Posts: 306
cherokee is on a distinguished road
Baan: Baan IVc3 A&D - DB: Oracle - OS: IBM AIX
Thumbs up

Thank you Andreas for your help, it did work, really appreciated. Just to add to your solution, spool.device has to between quotes. (compiles without quotes but does not work) So, as any other stpapi.put.field, it has to be "spool.device".

stpapi.put.field("timrpc421m000", "spool.fileout", "c:\temp\"&logname$&"_req_"&strip$(shiftl$(l.orno))&".txt")
__________________
Carlos Gonzalez CPIM,CSCP
Reply With Quote
Reply


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
Is there a way to write a function that is triggered every time a session/report runs tmannais Tools Development 9 25th February 2019 02:33
AFS waiting timed out (frozen) jp.aalders AFS/DDC/OLE: Function servers 4 20th December 2011 20:48
Baan Session Runs slower when runs First time baantechy Tools Development 6 15th November 2006 16:56
Maintain Outbound in AFS fails for Order Type: "Collect Order" FoxZapper AFS/DDC/OLE: Function servers 7 3rd November 2005 14:45
AFS fails when huge data is loaded arunprasath AFS/DDC/OLE: Function servers 9 5th December 2002 14:39


All times are GMT +2. The time now is 18:57.


©2001-2018 - Baanboard.com - Baanforums.com