ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Is it posible to read the printer file in the rpg program..?

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

  • Is it posible to read the printer file in the rpg program..?

    Hi,

    Is it posible to read the printer file in the rpg program..?
    please help me the ways to read values of printer file/report in the rpg program..

  • #2
    Re: Is it posible to read the printer file in the rpg program..?

    Printer file/report is an output file which is always written into. We cannot read from it.

    Do you actually need the data that is already written into the report or do you need any other information from the printer file?
    Regards,
    KR

    Comment


    • #3
      Re: Is it posible to read the printer file in the rpg program..?

      yes exactly..I need the data already written into that report into the program

      Comment


      • #4
        Re: Is it posible to read the printer file in the rpg program..?

        sorry into a new program

        Comment


        • #5
          Re: Is it posible to read the printer file in the rpg program..?

          You cannot directly read from a report/printer file though you can copy the corresponding spool file into a physical file and try retreiving the data from the physical file.

          You can use the command CPYSPLF.
          Regards,
          KR

          Comment


          • #6
            Re: Is it posible to read the printer file in the rpg program..?

            You can use spool file APIs (open, get, close); however, I've never tried accessing the spool file of the current job.

            Comment

            Working...
            X