ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Reading Spool files Through SQL

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

  • Reading Spool files Through SQL

    Hi All,
    Is it possible to read or view any spool file using SQL Statement...
    Actually my .Net requires to retrieve the printer reports in spool file using SQL which is practically impossible as per my knowledge...

    Can you help me in this regard....

    Regards,

    Sajan

  • #2
    Re: Reading Spool files Through SQL

    kinda, you can copy the report to a physical file then sql the file.

    1) the destination file must exist. CRTPF FILE(QTEMP/MYSPOLL) RCDLEN(198)
    2) QSYS/CPYSPLF FILE(MYREPORT) TOFILE(QTEMP/MYSPOOL) JOB(JOBNUM/JOBUSER/JOBNAME)
    SPLNBR(*LAST)
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: Reading Spool files Through SQL

      Hi dead Man,
      Thank you very much for the time you spent to reply. Can we use this SQL through .Net using external stored procedures so that .Net team can get the details through calling the procedures.


      Regards,

      Sajan

      Comment


      • #4
        Re: Reading Spool files Through SQL

        I believe so, give it a try.
        Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

        Comment


        • #5
          Re: Reading Spool files Through SQL

          Originally posted by DeadManWalks View Post
          kinda, you can copy the report to a physical file then sql the file.

          1) the destination file must exist. CRTPF FILE(QTEMP/MYSPOLL) RCDLEN(198)
          2) QSYS/CPYSPLF FILE(MYREPORT) TOFILE(QTEMP/MYSPOOL) JOB(JOBNUM/JOBUSER/JOBNAME)
          SPLNBR(*LAST)

          Comment

          Working...
          X