VC 2.1 Before Advancing issue
I need some help in figuring out why the use of “Before Advancing” is
working differently in Visual Cobol vs Net Express 3.1.
I looked in the documentation and the online community, but did not find anything.
I found the project “BeforePositioning” under Net Express 3.1 and used that
to test under Visual Cobol 2.1. I got the same results with the sample program
OSVSBA.CBL program that I was having with our programs. Starting with Page 2 the
before advancing stays on the same line instead of being on the next line.
I have attached the code and sample report.
Is there something I need to add for VC?
If you view the .dat files with Notepad you can get a better picture of what is happening. If you use Word then you get the actual Page Breaks.
I believe that the problem you are seeing is that Notepad itself does not recognize the X"0C" form feed character that is embedded in the file when an after/before advancing page is done in Visual COBOL so it will not be displayed as formatted in the editor itself.
If you look at the file in a hex editor (I use UltraEdit) then it clearly shows the existance of the X"0C" character embedded in the print line so I do not believe that this has anything to do with Visual COBOL as it appears to be doing exactly what it should be doing.
Some text editors like Word or in my case UltraEdit will recognize the X"0C" and will format the report accordingly but Notepad does not.
If I go ahead and print your attached file to my printer then the form feeds are being recognized and the printed page looks correct.
I do not believe that this behavior has changed between Net Express 3.1 and Visual COBOL so perhaps something else has changed on your system such as the OS or type of printer being used?