Unconfigured Ad Widget

Collapse

Total Pages returned by QUSRSPLA is invalid

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Guest.Visitor

    Total Pages returned by QUSRSPLA is invalid

    mef058 wrote: > I have a report that runs nightly and I only want to print the last > two pages. I run the report and put it on hold. I am using the > QUSRSPLA API to retrieve the total page count. I run the API, take > the total page count and subtract 1. Then use the CHGSPLA command to > change the Page Range to Print Starting Page parameter. The process > works, but the Total Page Count retrieved by the API is incorrect. > For example... I run the report and the API returns a total page > count of 76. The total pages shown on the Work with Spool File > display is 77. What am I missing? If it's always off by one, why not just subtract 2 instead? Bill
  • mfulmer@attglobal.net
    Junior Member
    • Dec 2024
    • 2

    #2
    Total Pages returned by QUSRSPLA is invalid

    Perhaps I didn't state the problem well enough. I print a report and use the QUSRSPLA API to retrieve the Spool File Attributes. One of those attributes is Total Pages. The QUSRSPLA API returns Total Pages = 76. I subtract 1 from 76 to load the Starting Page Range Parameter so that = 75. The Spool File actually contains 77 pages. So what I get is the last 3 pages of the report printed instead of the last 2. Like I said the process is working and printing the last 3 pages is no big deal. I just don't understand why the QUSRSPLA API is returning the wrong value for Total Pages.

    Comment

    • mfulmer@attglobal.net
      Junior Member
      • Dec 2024
      • 2

      #3
      Total Pages returned by QUSRSPLA is invalid

      I have a report that runs nightly and I only want to print the last two pages. I run the report and put it on hold. I am using the QUSRSPLA API to retrieve the total page count. I run the API, take the total page count and subtract 1. Then use the CHGSPLA command to change the Page Range to Print Starting Page parameter. The process works, but the Total Page Count retrieved by the API is incorrect. For example... I run the report and the API returns a total page count of 76. The total pages shown on the Work with Spool File display is 77. What am I missing?

      Comment

      • Guest.Visitor

        #4
        Total Pages returned by QUSRSPLA is invalid

        I wonder if it may be somehow zero based (pages 0 through 76 for a total of 77 pages) or something like that. I would think that a field for "total pages" should really be the total page count. I could understand something like a page number being zero based, but not a count field. Are you up to date with PTF's and CUMe package to rule out any PTF's that you may need?

        Comment

        Working...
        X