Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Adding info to spool file after it has been created

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

  • Adding info to spool file after it has been created

    You can use the CPYSPLF command to copy the spooled file data to a physical file. If you use the CTLCHAR(*PRTCTL) option on the output operation, you can then copy this file back into a spooled file by simply copying it to QPRINT and end up with your original spooled file. In between, you can go into the physical file and add information. The *PRTCTL option places special characters at the beginning of each line to determine page and line skips, and by decoding these you can determine where to add your changes. Joe

  • #2
    Adding info to spool file after it has been created

    Mike, Check out the PRTTXT parameter of the OVRPRTF command. That may help you too. It puts user defined data at each page footer in the printer file. I have never used it, but it seems that it will do what you are looking for. Hope this helps. Doug.

    Comment


    • #3
      Adding info to spool file after it has been created

      Joe, First, thanks for your reply earlier in the week. I really appreciate you guys taking time out of your day to help a fellow AS400 person along. I must be overlooking something basic on my end, but I cannot seem to get this to work. First I have created a physical file with a length of 200. (We have spool files ranging in width from 80 to 196, so I added 4 extra bytes to the length to accomodate for the print control characters.) Then I copied the spool file to the physical file with the print control characters being copied. Then simply executed the CPYF command trying to copy from the physical file to the file QPRINT. The result that I am getting looks just like the contents of the physical file, including the print control characters. It is not recognizing the control characters and using them to format the output. Is there some additional parameter on the CPYF command that needs to be used? I have promoted on most of the fields and tried various combinations, but have had no luck thus far. Thanks - Mike

      Comment


      • #4
        Adding info to spool file after it has been created

        Mike Ross wrote: > Then I copied the spool file to the physical file with the print > control characters being copied. > > Then simply executed the CPYF command trying to copy from the > physical file to the file QPRINT. Mike, This is what your commands should likely resemble: OvrPrtF file(qprint) pagesize(*n 198) ctlchar(*fcfc) CpyF fromfile(spool198) tofile(qprint) DltOvr qprint Bill

        Comment


        • #5
          Adding info to spool file after it has been created

          Thanks Bill, the OVRPRTF command was the trick. Mike

          Comment


          • #6
            Adding info to spool file after it has been created

            I would advice you to consider Infoprint Server for iSeries product. It's main focus is electronic distribution. Check this site first: http://www.printers.ibm.com/internet...erverhome_i_ww As IBM says it "Enables profiling of document/report recipients and delivers their output as they need it (hardcopy, e-mail, Web, and so on) using 'intelligent routing' functionality." One more thing - CPYSPLF would not help you in case of non plain text spool files and if I remember well empty lines will be skipped.

            Comment


            • #7
              Adding info to spool file after it has been created

              Help/Systems has a product that can do this kind of thing too. Robot/Reports can route reports. We don't use it, but we have some other products from them and like them a lot. However, it sounds like you already have a solution that will work for you and integrate with functions you already have. I'd stick with that unless you find it really isn't working out.

              Comment


              • #8
                Adding info to spool file after it has been created

                Is there any trick that will allow adding additional information to the actual spool file after it has already been produced. Situation...have over 100 reports that can currently get produced out of our application. The request that we are looking into, is for the user to be able to enter in some information like FAX#0123# and then have this information embedded into the top line of the report so that a special outq/device would intercept this information and send a fax for the report rather than printing it. Just looking for an easy way out rather than trying to modify every possible report in the system. We already have a screen in place for each report where the user can enter in an outq or email address. We were hoping to be able to tap into that screen and capture the FAX information, but we need a way to burn this information into the spoolfile. Any helpful tips would be appreciated. Thanks - Mike

                Comment


                • #9
                  Adding info to spool file after it has been created

                  I would utilize the spool file attribute USRDTA and not touch the content of the spool file; although spool file manipulation can be done, I would preserve the integrity of the spool file's contents. CHGSPLFA will allow this change to happen. Use CHGSPLFA on each spool file to assign FAX#123# (as appropriate). RTVSPLFA will allow the value to be returned inside of a CLP. Base routing upon the value returned. No sense making this task more difficult than is necessary.

                  Comment

                  Working...
                  X