Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Printing Escape sequences from Spoolwizard

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

  • Printing Escape sequences from Spoolwizard

    Gary,
    First option to try would be to make sure you have specified the RplUnPrt(*No) option for the printer file. If that is done and it still doesn't work, search the forums for that keyword and look for a posting by me. This post will show how to program the transparency commands for this type of usage.
    Bill
    I am trying to print a signature from a printer cartridge on a HP laserjet 5/si. I set up the escape sequence in the calculation section for the field I want to print that signature. So far I cannot get this to print. The escape sequence just prints in it's place. I created a workstation control file and modified it with the page 37 to 437 table replacing the character I am using instead in the table with X'1B'. This did not work either. Any one else doing something similar? What else do I need to check for.

  • #2
    Printing Escape sequences from Spoolwizard

    I will try that thanks.

    Comment


    • #3
      Printing Escape sequences from Spoolwizard

      I probably forgot to mention that this is a forms creation software package so what is printing is a merged spooled file with the form specs. So will your suggestion apply?. I am using the logical not sign as my escape character and that character is printed with the ` instead along with the escape sequence itself.

      Comment


      • #4
        Printing Escape sequences from Spoolwizard

        If sending an escape sequence is what's required, then the transparency sequence will work. I've used it here mainly to control fonts.
        I probably forgot to mention that this is a forms creation software package so what is printing is a merged spooled file with the form specs. So will your suggestion apply?. I am using the logical not sign as my escape character and that character is printed with the ` instead along with the escape sequence itself.

        Comment


        • #5
          Printing Escape sequences from Spoolwizard

          And I still need to have the workstation customizing object translating the logical not sign to X'1B'?

          Comment


          • #6
            Printing Escape sequences from Spoolwizard

            And I still need to have the workstation customizing object translating the logical not sign to X'1B'?
            No, when using the transparency logic, you will feed everything "out of the ordinary" to the printer using the transparency logic. Please read the code and comments in post number 1.2 Transparency example
            The important thing to remember is that after the signal byte (X'03'), you then specify how many of the following bytes, the translator should ignore and pass on transparently to the printer. The kicker is that since everything is passed transparently, you must send it as it's ASCII code - not as EBCDIC.
            Bill

            Comment


            • #7
              Printing Escape sequences from Spoolwizard

              What if you are not using a compiled printer file will override prtf due. Second This transparency code is in your rpg code???. How do you encorporate this into my merge commands to merge the output with forms.

              Comment


              • #8
                Printing Escape sequences from Spoolwizard

                When talk about the number of bytes is the the number of characters in the escape sequence or the field. The second question is really the fact according to the producers of the product the escape sequences are entered in the product and not part of the actual printout. The rest of the part of that transparency code is what part of the escape sequence.

                Comment


                • #9
                  Printing Escape sequences from Spoolwizard

                  I think your first question is asking "What if the printer file is internally defined?" It still works, you just need a field defined to accept the transparency commands. It's just a character field large enough to handle all of the ASCII bytes.
                  I don't know anything about your merge commands, so I can't comment.
                  What if you are not using a compiled printer file will override prtf due. Second This transparency code is in your rpg code???. How do you encorporate this into my merge commands to merge the output with forms.

                  Comment


                  • #10
                    Printing Escape sequences from Spoolwizard

                    The number of bytes equates the number of bytes the emulation/translation software should send through un-translated. Remember, the emulation software will translate all of the EBCDIC information to ASCII before sending it to the printer. Since the translator doesn't normally know what to do with information below X'40', it defaults to translating it to X'20'. With the transparency command, you are telling the translator that you are now going to send a sequence of bytes of a specified length that it is not to touch at all (but the RplUnPrt option has to be set to (*NO) otherwise it will replace some of it with blanks).
                    So, to use my example I pointed you to:
                    D* cmd passthru, # bytes to follow, dbl high, 8lpi, filler D lResetPrtr C const(X'03091B77011B3020202020')
                    You can see the transparency code of 03. This is followed by 09 which tells the translator to pass through un-touched the next 9 bytes of information. The 1B is the escape code in ASCII, 7701 is double high, escape again and 30 is 8lpi. The 20's are ASCII spaces just in case I want to add some more commands, so the number of bytes to pass could have been 5 and the 20's left off.
                    The above example is in RPG4, but I think it easily translates back to RPG400 if needed. You may notice that the "field" with the codes is a literal field, it would be used by MOVEing it into another character field to be printed. It will not matter the length of the character field because you have told the translator how many bytes to pass untranslated.
                    Bill
                    When talk about the number of bytes is the the number of characters in the escape sequence or the field. The second question is really the fact according to the producers of the product the escape sequences are entered in the product and not part of the actual printout. The rest of the part of that transparency code is what part of the escape sequence.

                    Comment


                    • #11
                      Printing Escape sequences from Spoolwizard

                      So are you saying the escape sequence needs to be defined in your rpg program? Do you have to send that for every field you want printed like that. I still am not totally sure what needs to be done.

                      Comment


                      • #12
                        Printing Escape sequences from Spoolwizard

                        If you need them in RPG what happens if you are dealing with a field that is not in RPG code.

                        Comment


                        • #13
                          Printing Escape sequences from Spoolwizard

                          Gary,
                          This method is useful when you need to send a sequence of bytes to the printer that you do not want translated via the 400, but sent unaffected to the printer. It's that simple of a concept. Let me bring back a portion of your original post:
                          I set up the escape sequence in the calculation section for the field I want to print that signature. So far I cannot get this to print.
                          I am giving you exactly what you need to do to get around this problem. You already know the escape sequence you need to feed, I have given you the logic necessary to feed that sequence so that it will be processed correctly.
                          Bill
                          So are you saying the escape sequence needs to be defined in your rpg program? Do you have to send that for every field you want printed like that. I still am not totally sure what needs to be done.

                          Comment


                          • #14
                            Printing Escape sequences from Spoolwizard

                            So are you saying the escape sequence needs to be defined in your rpg program? Do you have to send that for every field you want printed like that. I still am not totally sure what needs to be done.

                            Comment


                            • #15
                              Printing Escape sequences from Spoolwizard

                              I am trying to print a signature from a printer cartridge on a HP laserjet 5/si. I set up the escape sequence in the calculation section for the field I want to print that signature. So far I cannot get this to print. The escape sequence just prints in it's place. I created a workstation control file and modified it with the page 37 to 437 table replacing the character I am using instead in the table with X'1B'. This did not work either. Any one else doing something similar? What else do I need to check for.

                              Comment

                              Working...
                              X