lsatenstein
22nd January 2005, 23:02
I had a requirement to convert a lot of data to text, following many formats. In fact the table was tisfc001.

I created a format list to sprintf$, and then preceded to list the fields, corresponding to the format. (I restricted the listing to 25 fields for the 25 format strings).

I found substantial errors in the sprintf$() output. Finally, I chopped my list down to a smaller format list (10 fields) with 10 entries, and it worked just fine.

Is there a document somewhere which lists the limits to sprintf$().
Also, how would one put an end-of-line character into the output of sprintf$
I tried \n in the format string, but that did not work.

Les.

csecgn
24th January 2005, 13:40
I'm not shure that I understood you rigth, but if I'm rigth you've tried to convert one record to a string? If yes, try concat. It works fine and you can call a function (for example sprintf) for every field/part.

Regards
csecgn

günther
24th January 2005, 14:04
Although originally concerning OLE automatisation, the following line might be interesting:

The maximum size of the ReturnValue string is 4Kb (bshell limit).


Günther

NPRao
24th January 2005, 21:49
Try to add chr$(10) to the string.

Also refer to the link-

seq.puts() (http://www.baanboard.com/baanboard/showthread.php?t=10514&highlight=notepad)

lsatenstein
25th January 2005, 02:24
I was wondering if anyone know the limitation to the number of arguments that sprintf$() can accept. I tried with 25, but got wrong results. When I did 10 field conversions at a time, it worked just fine.

To answer another persons comments about max block size, at no time was any block over 200 characters.

Thanks

Hitesh Shah
27th January 2005, 17:13
Theoretically the function limit is 255 . But I take ur expereince as guide for using sprintf$ function.

If u r on support and approach SSA support, u can get the clear info and update us on the real limit.