ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Run query and do not print blank pages.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Run query and do not print blank pages.

    Just to let you know I'm not an AS/400 programmer. I'm posting this question so maybe I could redirect the answer to my co-worker that is an AS/400 programmer.

    I enter data in the AS/400 in a daily manner. I believe we use BLISS. I enter data in the production screen; if there's downtime then I will go to a different screen and enter the downtime hours. Now after me finishing entering the data I go to the option Print Edit List. It prints out the papers that contain the data that I inputted in. Here is my problem what if there is no downtime it will still print out the paper with a header that says Downtime Edit List. See what I'm saying its wasting paper, is there is a code of some sort to do not print out list if there is no data contains for that particular screen? The program runs as a query not RPG. Is there a way to fix this?

  • #2
    Re: Run query and do not print blank pages.

    the programmer could wrap the query in a program.
    then either copy the spooled file to a physical file and read it
    to determine if no records or run the qry twice the first time
    to output to a file that can be checked to see if records exist
    the second to print it *IF there are records in the file produced
    from query one.

    or use command RTVMBRD to get record number
    or use SQL to run the same query to see if records exist

    there are more but my fingers hurt!
    jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Run query and do not print blank pages.

      ...or change your default output queue to one that is not attached to a printer. Then it would be up to you to review the report files that are generated and determine which ones get printed and which ones don't. That way there are no programming changes to make.
      "Time passes, but sometimes it beats the <crap> out of you as it goes."

      Comment


      • #4
        Re: Run query and do not print blank pages.

        Originally posted by littlepd View Post
        ...or change your default output queue to one that is not attached to a printer. Then it would be up to you to review the report files that are generated and determine which ones get printed and which ones don't. That way there are no programming changes to make.

        Sorry I should've been more detailed. When I run the print option it goes to my OUTQ then I select all of them I think 15 in total and send it to a specific printer. I could go to each of them and check what ones are blank but that would take to much time.

        Originally posted by jamief
        ...the programmer could wrap the query in a program.
        then either copy the spooled file to a physical file and read it
        to determine if no records or run the qry twice the first time
        to output to a file that can be checked to see if records exist
        the second to print it *IF there are records in the file produced
        from query one.

        or use command RTVMBRD to get record number
        or use SQL to run the same query to see if records exist
        Thanks jamief the RPG programmer here was thinking along those lines. If there are any other tricks please let me know.

        Thank You!

        Comment

        Working...
        X