p4 takes a new page on reaching the number of lines defined in the cycle definition. If you want to use a footer you need to deduct the number of lines in the footer from the space available in the pagelen defintion.
i.e. use the default PAGELEN=56
Header is 4 lines
p4 will print the header and 52 lines of data then take a new page
without changing the pagelength (and why should you - isn't it a constant) add in a footer of 2 lines and p4 will still take a new page after 52 lines then it will print the footer - like this:
PageLen=56
H=4 lines
then 52 lines of data then a new page
then Footer with 2 lines then next header starts
Therefore the page len needs adjusted to be the space minus the footer length
PageLen=54
H=4 lines
then 50 lines of data
then Footer with 2 lines then a new page
Does anyone remember if it used to be smarter and add the footer rows into the count like it does with the header - like this:
PageLen=56
H=4 lines
then 50 lines of data
then Footer with 2 lines then a new page
Its a long time ago but I used to write a LOT of complicated financial reports and I am sure footers used to be taken into account but since at least V7 they haef not been - can anyone test in an older version?