monica1
3rd January 2006, 20:02
We have a report (print invoices throught cisli.dll2002) that when it go to open the report with brp.open() it takes 10 minutes to open it. The same thing for brp.close()

We try with other report that have brp.open() and brp.close() and it works fine.

Where we can see something?

Thank you in advance,

günther
4th January 2006, 16:03
I took a report session and compiled session and report in debug mode.
rprt_open() --> immediately opens ttstsplopen dialog; enter a device and continue --> immediately opens the report; step by step shows that code in function main() is executed until r.main() is called --> now rprt_open() returns and session and report run in parallel.

=> For your symptoms, I could only imagine that the report does a long action in the before.program section.

=> I remember that on our system rprt_open() in general was very slow, because $BSE/tmp had *lots* of files. This is because tempnam() limits.

Günther

monica1
4th January 2006, 17:04
Can you explain me what is tempnam() ?

Thank you in advance,

günther
4th January 2006, 17:13
The baan tools itself seem to be written in `C´; tempnam() and/or tmpnam() are functions from the C Standard-Library that are internally used by the bshell etc to create a name for a temporary file.

monica1
4th January 2006, 17:18
oK thank you. We go to clear $BSE/tmp to try if this is the problem.

günther
4th January 2006, 17:20
But don't forget that you need these files to reprint reports!

monica1
4th January 2006, 17:22
Ah, ok. Then I'll wait until this night to clear it.
Thank you very much

monica1
4th January 2006, 19:50
We've deleted the tmp files and now it print quickly. But we need to know if the counter of tmp files is in some table.

tuple9i
5th January 2006, 16:36
Hi, thought I would put in my 2 cents.

I have a cleanup script that cleans up the %BSE%\tmp directory and removes temp files greater than 7 days old. That is arbitrary and could be changed to a smaller time period, but you have to be careful that you don't remove a temp file being used for a long running session (although I can't think of anything that should take longer than a day or so).

If you want the script, holler and I will post it - although it is probably on the site somewhere else. I can't believe that I am the only one who scripts solutions to admin functions :D

mark_h
5th January 2006, 19:57
Something else to run is ttaad3221m000 - This cleans out the device queue on 4c4, but I am not sure about Baan 5. I also do not know if this removes the temp files. Like tuple9i our UNIX admins clean out this tmp directory on a recurring basis. Then once in a blue moon I run ttaad3221 to clean out the device queue table.

bdittmar
6th January 2006, 09:43
oK thank you. We go to clear $BSE/tmp to try if this is the problem.

Hello monica1,

do it by cron like :

40 02 * * 1-6 find /daten/tmp -name "tmp*" -mtime +14 -exec rm -f {} \;
46 02 * * 1-6 find /daten/tmp -name "tmp*" -size 0c -exec rm -f {} \;

Regards