PDA

View Full Version : Bug Autocode?



mbui
04-23-2011, 01:26 AM
I made some additions to filemaintenancetemplate.html for my own extensions, like i did before.
Now when i generate a program with this, part of the HTML-code is just missing.
I analysed VVACFMNT and saw that the templatefile is placed in variable templateFileT via vvIfs_readFile which is defined as 65535 (64K).
The size of the template has grown to 82K while the size of the previous version was 63K (damn, didn't realize i added that much!).
This seemed to be the problem.

I changed the size to 99999 but the result stays the same.

Any help would be greatly appreciated.

Thanks in advance,

Martin Buitendijk

mbui
04-23-2011, 03:01 AM
I see now the problem lies in vvIFSReadfile which is maximized to 64K.

According to the API-documentation you can read line by line as well via this utility.
I'm going to try to change the retrieval of the template in VVACFMNT this way.

mbui
04-23-2011, 06:26 AM
When calling the api with READLINE it only returns the first line with APIStatus -1.
I debugged it and the problem seems to be in the statement where the Positionfile (C-Api) is called:

position=positionFile(inFileHandle:position-bytesRead:CURRENT);
bytesRead=65535
position = 7 (previously set by:
position=%scan(LF:readData);)
This returns -1 in position.

If i understand correctly the positionfile-api should place the cursor after position, like:

position=positionFile(inFileHandle:position+1:CURR ENT);
?

mbui
04-25-2011, 03:08 AM
The size of the template was definitely the problem.
I have split the template in 2 files, read them in 2 separate variables and concatenated these.
This workaround works, but isn't an elegant solution.
Every time i change the template now i have to split it up before i can use it.
I sure hope you can come up with a better one...

sean.lanktree
04-26-2011, 10:59 AM
Maybe try referencing the code used by procedure vvOut_file as this loops through an IFS (vvIfs_readFile) file using READMAX.