ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

EVAL statement

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

  • EVAL statement

    I need to send a single quote around an item number in a text format.

    Here is what I got:
    SRAINPT = 1234

    EVAL PL25IC = '"' +
    %subst(SRAINPT:1:4) + '"'
    This is a double quote.
    Does anyone know how to send a single quote in an eval statement.

    Thanks,

    DAC

    Results '1234'

  • #2
    Re: EVAL statement

    Hi Dac:

    Code:
    d   Quote         s              1A   inz('''')
    or you can just use the 4 single quotes in your eval...
    Code:
    EVAL PL25IC = '''' + %subst(SRAINPT:1:4) + ''''
    that is ' ' ' ' without the spaces

    Best of Luck
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

    Comment

    Working...
    X