mark_h
14th November 2006, 13:42
Just a heads up on something you might run into with SP20. I have a simple litte function server that takes input from a file and runs the reports to temporary file(using ASCIT append to file). Under SP20 it would work the first time, but then fail from then on - user would have to exit and re-enter the program. A basic summary of the program is like this:

(1) Open file
(2) Create temp file - set spool.fileout to temp file
(3) Read record
(4) Run report session appending to temp file
(5) Get next record until read file empty
(6) Close report session
(7) Download file to PC.

What I found was that the second time the user ran my session the variable spool.fileout was set to a new temp file, BUT the report session still had spool.fileout set to the original temp file.

Just something to keep in mind. I have since change my function server script to only use the first temp file name. Should work from here on out. I do not know why these global variables seem to stop working(had the same problem with SP19 and spool.pr.copies) or maybe I am not understanding something.

p.cole
6th February 2009, 01:38
Hi Mark,

I'm getting the same issue. Did you resolve this in later service packs? Was it fixed in a later standard program?

Phil

p.cole
6th February 2009, 03:04
To answer my own question, this hasn't changed in the latest version.

spool.fileout must be set before the first AFS call. Upon the first AFS call ttstpapiserv will be started, which imports spool.fileout. Any AFS sessions are started from ttstpapiserv which and therefore get the original spool.fileout. ttstpapiserv only exits at the end of the object that started AFS.

mark_h
9th February 2009, 14:28
Yep - still have the problem or I should say the same work arounds in place. We are on SP24.

Neal Matthews
2nd June 2011, 14:12
Hello Phil / Mark,

Just contemplating catching up on some (several) of my Service Packs. The way I understand it if I install SP19 I risk some of my afs programs not working correctly. I don't suppose you know whether this was fixed in a later standard program ? There are several mentions of AFS in the standard program details but I'm not sure that any of them are relevant. Are you still using your workarounds ?

Cheers Neal

p.cole
2nd June 2011, 18:47
Neal,

I don't think the functionality has changed in any later SPs.

Sorry
Phil

Neal Matthews
2nd June 2011, 19:34
Cheers Phil,

In respect of workarounds it is just a case of being careful in any code where spool.fileout is being used ?

Thanks Neal

mark_h
3rd June 2011, 15:15
Well - every service pack brings new challenges. :) The last one we did, which I think was SP28 - I did not have any changes in the API code I needed to make. BUT we did have one stop working - it had to do with generate or release outbound. The problem was the session itself(and no I do not recall specifically which session), Infor provided an update session and it solved the problem.

Neal Matthews
3rd June 2011, 16:59
Cheers Mark I guess the moral of the story is test your API's after SP install