ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Embed a hex char in spool file

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

  • Embed a hex char in spool file

    I need to imbed a hex "0D" in a spool file for a 3rd party barcode application

    Example POnumber = '12345'
    x = X'0D'
    newstring = PONumber + X

    But when I print newstring, i get the 5 chars and a blank. The X'0D' gets converted to X'40'

    Any way to work around this behavior ?

  • #2
    Re: Embed a hex char in spool file

    Hey Arrow:

    Look on the ovrprtf command:
    Unprintable character action:
    Replace character . . . . . . *NO, *YES
    Replacement character . . . . *BLANK 40-FE, *BLANK
    Best of Luck
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

    Comment


    • #3
      Re: Embed a hex char in spool file

      Nice job...I totally forgot about that..

      jamie
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: Embed a hex char in spool file

        Arrow,

        I'm trying to do the exact same thing. I'd love to know how you solved this.
        "Time passes, but sometimes it beats the <crap> out of you as it goes."

        Comment


        • #5
          Re: Embed a hex char in spool file

          I haven't yet. Seems it doesn't work on hex values less than X'40'

          Comment

          Working...
          X