ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Is it Possible to Print an Overlay within a SCS data Stream?

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

  • Is it Possible to Print an Overlay within a SCS data Stream?

    I'm trying to print checks directly from my iSeries without having to use any type of forms software. My company's current solution uses a PC based solution that reads a spool file from the iseries and transforms it into checks using printer resident fonts to print the MICR line, secure digits, and signature.

    I figured out how to access and print the printer resident fonts by sending the PCL escape codes in my DDS by translating the codes into Hex and using the TRNSPY keyword.

    My next step is trying to format the check as needed, and there is a lot of static information that I figured I could use an overlay to print. This information is company name, address, etc. etc. So, I read up on how to create overlays, I installed the AFP printer driver on my PC, and using Word, I created an overlay document. I imported the overlay via iSeries Navigator.

    My question is, in order to use the overlay, do I have to change the data stream of my prtf to be an AFPDS stream? Will this prevent me from sending the PCL codes I need to send to use the printer resident fonts? When I tried to compile my prtf with an AFPDS data stream, I got warnings that the TRNSPY keyword may not work as I expect it to.

    Some more info you may need: I'm using an HP laser printer defined as a *SCS printer on the iSeries with HPT enabled.

    Any advice would be greatly appreciated.

    Thank you,
    Vincent

  • #2
    Re: Is it Possible to Print an Overlay within a SCS data Stream?

    Yes, It is.

    When an overlay is specified as a parm in the print file,
    i.e. ?Front side overlay (FRONTOVL)? on the CRTPRTF command,
    that file can be printed on a wide variety of printers, not just *AFPDS printers.

    Let us know if this works for you.

    Comment


    • #3
      Re: Is it Possible to Print an Overlay within a SCS data Stream?

      It didn't work. I got the overlay to print. However, the hexadecimal escape codes look like they were printed as literals. I will attach my code, maybe you can tell me what I am doing wrong. Thanks for any help you guys can give.

      DDS code:
      Code:
           A          R PCLSTART                                                      
           A* Regular Font                                                            
           A                                  2  1DFT(X'1B2830551B2873307031352E30306-
           A                                      8302E303076307333623430393954')    -
           A                                      TRNSPY                              
           A                                  3  1DFT('TESTING TESTING TESTING')      
           A* Print Signature                                                         
           A                                  9  1DFT(X'1B2830551B28733070312E3637683-
           A                                      5342E307630733062313936544142434445-
           A                                      ') TRNSPY                           
           A* Print Secure Digits                                                     
           A                                 10  1DFT(X'1B2830551B2873313236743170313-
           A                                      72E32387630623053') TRNSPY          
           A                                 11  1DFT('-/41AE')                       
           A* Print  MICR                                                             
           A                                 13  1DFT(X'1B2838551B28733070382E3131683-
           A                                      1312E3530763073336233363054') TRNSPY
           A                                 14  1DFT('C99999999C')                   
           A                                 15  1DFT('B123456789B')                  
           A                                 16  1DFT('6987654321C')                   
           A* Regular Font                                                            
           A                                 20  1DFT(X'1B2830551B2873307031352E30306-
           A                                      8302E303076307333623430393954')    -
           A                                      TRNSPY                              
           A                                 21  1DFT('END TESTING END TESTING')
      CL Code:
      Code:
                   PGM                                                                
                                                                                      
                   OVRPRTF    FILE(TESTPRT) DEV(SRPRT03) DEVTYPE(*AFPDS) +            
                                PAGESIZE(66 85) LPI(6) CPI(10) OVRFLW(63) +           
                                FRONTOVL(Z_VINNY/TSTOLY .2 .25) +                     
                                HOLD(*YES) SAVE(*YES)                                 
                                                                                      
                   CALL       PGM(Z_VINNY/TESTPRT)                                    
                                                                                      
                   DLTOVR     FILE(*ALL)                                              
                                                                                      
                   ENDPGM
      And the Cobol program just does a write to the print file.
      Last edited by VinnyV88; March 24, 2009, 12:17 PM.

      Comment


      • #4
        Re: Is it Possible to Print an Overlay within a SCS data Stream?

        OVRPRTF FILE(TESTPRT) DEV(SRPRT03) DEVTYPE(*AFPDS)
        What happens if you change the devicetype to DEVTYPE(*IPDS) ?

        Comment


        • #5
          Re: Is it Possible to Print an Overlay within a SCS data Stream?

          Originally posted by Marc_d View Post
          What happens if you change the devicetype to DEVTYPE(*IPDS) ?
          Thanks, but doesn't seem to be working. When I try to release the file, it goes right back to a held status... never seen that before.

          I think the problem is the hard coded hex font string isn't being sent correctly, i.e. the TRNSPY keyword isn't working.

          I was reading something last night about modifying a Workstation Customizing Object to create a font entry that will map my hex string to a font id. I can then reference the font id using the FONT keyword in my DDS. I am gonna try this now.

          I'll let you know how it goes.

          Thanks for the suggestions.

          Vincent

          Comment


          • #6
            Re: Is it Possible to Print an Overlay within a SCS data Stream?

            Originally posted by VinnyV88
            ...using Word, I created an overlay document. I imported the overlay via iSeries Navigator.
            I have 2 questions :

            1/ Have you printed the Word document as a print file, i.e. with .prn extension ?
            2/ Have you been using the binary mode while FTPing to the iSeries ?
            Philippe

            Comment


            • #7
              Re: Is it Possible to Print an Overlay within a SCS data Stream?

              Originally posted by Mercury View Post
              I have 2 questions :

              1/ Have you printed the Word document as a print file, i.e. with .prn extension ?
              2/ Have you been using the binary mode while FTPing to the iSeries ?
              1. I created the overlay using the AFP print driver.

              2. I did not FTP it to the iSeries. I used iSeries Navigator, browsed to import the overlay.

              This document is great tutorial with step by step directions on how to accomplish this: Creating AFP Resources Using the IBM AFP Printer Drivers

              Comment


              • #8
                Re: Is it Possible to Print an Overlay within a SCS data Stream?

                Originally posted by VinnyV88 View Post
                Thanks, but doesn't seem to be working. When I try to release the file, it goes right back to a held status... never seen that before.

                I think the problem is the hard coded hex font string isn't being sent correctly, i.e. the TRNSPY keyword isn't working.

                I was reading something last night about modifying a Workstation Customizing Object to create a font entry that will map my hex string to a font id. I can then reference the font id using the FONT keyword in my DDS. I am gonna try this now.

                I'll let you know how it goes.

                Thanks for the suggestions.

                Vincent
                I am extremely close but am extremely frustrated as well. I got the printer resident fonts to print (except for one, the micr font) together with the overlay. I modified the Workstation Customizing Object to embed the hex strings and associate it with a font id. This worked great as I was able to use the FONT keyword in my DDS and got rid of the TRNSPY keyword. However, I can't for the life of me figure out why the micr font won't print... It's driving me crazy. The only thing that is different is the micr font appears in the "Internal Scalable and Bitmapped Fonts" list and the other fonts (signature and secure digit) appear under the (PJL Resident Fonts) both of which are subsets under the "PCL Font List" I obtained from the printer itself. I don't think it should matter, cause I SUCCESSFULLY was able to print the micr font from the iSeries using hard coded hex strings, why wouldn't it work now like it's working for the other fonts? If anyone has any idea what I might be doing wrong, I'd really appreciate some assistance. Thank you...

                Vincent

                Comment

                Working...
                X