Bogdan
27th February 2002, 12:56
Hi,
How can I retrieve the name of the temporary report file name?
Or, is there a baan function for transfering files from UNIX server to WIN client ?
Best regards,
Bogdan
mark_h
27th February 2002, 14:47
The server2client function transfers files from the server to the client. Will look around to see if I can find something about the temp report filename. I know in the report r.datafile$ is the temp file holding the data, just not sure about the temp report file name.
Mark
mark_h
27th February 2002, 16:04
Sorry to say I could not find a variable that has the tmp file name in it, but I do know you could look the report up on ttaad320 using the user name and spool id. This would give you the temp file used for the report.
Good Luck!
Mark
shah_bs
27th February 2002, 17:08
The question is why would you ever want to know the temporary file name?
In any case, if you can put the program script in debug mode and keep stepping through till you have executed rprt_send() (or brp.ready() )at least once (by which time something should be written to the temporary file), you can use the L command in the debugger and wade through the data names. You should hit the temporary report filename in there. (Unfortunately, I never wanted to know what it was, so I cannot say what the name would begin or end with. Usually, these datanames begin with a 'g.' [The temporary report file name itself would begin with 'tmp' and an eight or nine digit number].)
I still think we can suggest a different (better) solution if you can tell why you need to know this internal detail.
mark_h
27th February 2002, 18:43
I did not think about putting the script in debug mode - I used a report I was working on and used the "L" command. It turns out that the variable g.tmp.file has the temp file name in it, but it was only available in the session script.
Mark
NPRao
27th February 2002, 21:13
Hi Mark,
I tried to use r.datafile$ and I got compilation error. Can you please post a sample code.
Thanks!
Bogdan
27th February 2002, 21:48
Hi,
Yep, I found the answer. Thanks a lot. Why I need it? I need to transfer file(s) from server (AIX) to client(WIN) and I don't want to use FTP or RCP or something like this.(for excel import; my ttstpconv does not recognise "ascii:excel %s".
But I searched this EXCELENT board and I found a small program(tuddcconv2.zip (http://www.baanboard.com/baanboard/attachment.php?s=&postid=2293) ) posted by .mark_h (here (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=513) ). I didn't know that server2client() it'a a BaaN tools function (I thought it's some win utility) but later I re-read that thread and .....
Anyway, where I can find some docs about BaaN tools functions(syntax, usage, etc.)? I don't think bic_info6.1 is very helpfull on this.
Thank you all again
Best regards,
Bogdan
mark_h
27th February 2002, 22:18
Bogdan said:
Anyway, where I can find some docs about BaaN tools functions(syntax, usage, etc.)? I don't think bic_info6.1
I do not think there is any. This has been asked for before and nobody has posted an answer. And I do agree sometimes the bic_info6.1 is not to helpful.
and
NPRao2000 said:
I tried to use r.datafile$ and I got compilation error. Can you please post a sample code.
As far as I know r.datafile$ is only available in the report script. Since we do not own source adding extra sort fields not available in the source script can be hard. Here is one example of using the r.datafile$. This adds the planner code to a Baan report and makes it a sort field. Also the funny character in the concat$ and sort is ctrl-B or STX character.
Mark
declaration:
table ttipgc001
long l,r.o,first
after.receive.data:
if(first=0) then
r.o = seq.open (r.datafile$ & ".tmp","w")
r.reccount = 0
while e = 0
select tipgc001.cplb
from tipgc001
where tipgc001._index1 = {:tisfc001.ccot.a,:tisfc001.mitm}
selectdo
endselect
l = seq.puts(concat$("",
tipgc001.cplb,
tisfc001.pdno,
tisfc001.ccot.a,
tisfc001.mitm,
error.message,r.reccount),r.o)
r.reccount = r.reccount + 1
r.read.seq.file()
endwhile
l = seq.flush (r.o)
l = seq.close (r.lfn)
l = seq.close (r.o)
l = run.baan.prog( "sort","-t +0n -1 +1n -2 " & r.datafile$ & ".tmp -o " & r.datafile$ & ".tmp", RP_WAIT)
r.lfn = seq.open (r.datafile$ & ".tmp" ,"a+")
r.read.seq.file()
first = 1
endif
shah_bs
28th February 2002, 04:16
server2client() and related functions are documented in the BAAN ERP Tools 'hlp' file. I guess one would have to order it from BAAN?