SETLPTR 0,0 (AREV32)
At 09 FEB 2023 12:39:29PM Donald Bakke wrote:
We are converting an Arev 3.12 application to AREV32 and are seeing calls to SETLPTR 0,0. I know what SETLPTR does but 0,0 is causing a bug in AREV32 when the output is going to a DOS file. The report and column headings are repeated for each row. For instance:
SETLPTR 0,0 PDISK C:\TEMP\TEST.TXT LIST 10 VOC COLHEAD 'MY HEADER' (PE) PDISK PRNProduces the following:
Page 1 09:35:06 09 FEB 2023 MY HEADER...... MAT_REQ_RPT Page 1 09:35:06 09 FEB 2023 MY HEADER...... RECEIVE_RAW_DAT Page 1 09:35:06 09 FEB 2023 MY HEADER...... TEST Page 1 09:35:06 09 FEB 2023 MY HEADER...... VENDOR_INV_C_WP Page 1 09:35:06 09 FEB 2023 MY HEADER...... LISTDICT Page 1 09:35:06 09 FEB 2023 MY HEADER...... SOFTKEY_PROGRAM Page 1 09:35:06 09 FEB 2023 MY HEADER...... INDEX_TIME Page 1 09:35:06 09 FEB 2023 MY HEADER...... COMMISSION_RATE Page 1 09:35:06 09 FEB 2023 MY HEADER...... COMPILEBASIC Page 1 09:35:06 09 FEB 2023 MY HEADER...... CHECK_BATCH_POS Page 1 09:35:06 09 FEB 2023 MY HEADER...... Page 1 09:35:06 09 FEB 2023 MY HEADER...... 10 Rows Processed
At 14 FEB 2023 01:20AM Robert Heard wrote:
Hi Don,
My limited understanding of SETLPTR is simply to specify printer dimensions in COLUMNS,ROWS.
So what does 0,0 mean? What is it's intention? Possibly "limitless"?
What does the printer routine do when column width exceeded?
What printer do when row limit exceeded? Maybe start new page?
Have you tried using SETLPTR ,0 ? Maybe you do not want any page separators? Don't know if this would do, but you could try to see what happens (I am about to try now).
I also tried ,-1 but neither worked. It printed as though there was only 1 line per page.
Then tried ,99999. That nearly worked, but for fact that now it padded out the print file to 99,999 line! Ouch.
Me thinks you want a command or printer option that indicates to turn off pagination. I think there is something like this in Universe.
So you are running an R/List sentence? Do you want column headers? Checking my notes…
Only thing found was the R/List format modifier "NOPAGE", which only applies to output to the screen.
Any chance you could capture the R/List sentence using (X) and then modify the program to PRINT the lines of the report? But don't know this would be any different to what is in the captured R/List sentence.
What I use:
1) Issue the PDISK command
2) PRINTER ON
3) Build a dynamic string @RM delimited, to a nominated buffer "line" count
4) Then PRINT each of the "lines" (using FIELD(array_name, @RM, num), where num goes from 1 to buffer line count.
5) PRINTER OFF
6) EXECUTE "PDISK PRN"
This method does not do any pagination.
Robert
At 14 FEB 2023 01:05PM Donald Bakke wrote:
Hi Robert,
Thanks for the response. I'm rather certain those values are intended for no pagination. I can easily write code to work around this but that isn't the point. As stated, we are doing a migration. We would like to not have to rewrite code that has been working just fine in ARev 3.x. Thus, I'm hoping this can be spotted and easily fixed via a patch.