View previous topic :: View next topic
|
Author |
Message |
Elixir
Active User
Joined: 08 Feb 2009 Posts: 116 Location: CHENNAI/NEW JERSEY - INDIA/USA
|
|
|
|
Hello,
I am facing an issue while moving Quotes (') to a variable in Eztrieve.
I tried "'", but is not working.
I know this is a basic question, tried looking into manual but could not find it.
Please let me know how to move it. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Please let us know how it is not working. Run time? Compile time? What message/evidence? |
|
Back to top |
|
|
Elixir
Active User
Joined: 08 Feb 2009 Posts: 116 Location: CHENNAI/NEW JERSEY - INDIA/USA
|
|
|
|
Bill Woodger wrote: |
Please let us know how it is not working. Run time? Compile time? What message/evidence? |
MOVE "'" TO WS-VA1
*******B132 APOSTROPHE NOT PRECEDED BY SPACE
*******B031 UNBALANCED APOSTROPHES
*******B082 NAME IS UNDEFINED - "
*******B036 NUMBER MUST BE POSITIVE INTEGER - " TO WS-VA1
*******B026 REQUIRED PARAMETER IS NOT CODED
MOVE "'" TO WS-VA2
*******B132 APOSTROPHE NOT PRECEDED BY SPACE
*******B031 UNBALANCED APOSTROPHES
*******B082 NAME IS UNDEFINED - "
*******B036 NUMBER MUST BE POSITIVE INTEGER - " TO WS-VA2
*******B026 REQUIRED PARAMETER IS NOT CODED
WS-VA1/2 is Alphanumeric |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Unless you can find a PARM option to change it, Easytrieve encloses literals in apostrophes (single quotation marks) and they must always "pair up".
This might give you what you want:
If not, try '''. Or you could define a hexadecimal value for a field to represent your apostrophe.
Code: |
W-APOST S 1 A VALUE X'7D'
WS-VA1 = W-APOST |
From your messages it would look like WS-VA1/2 are numeric, but it may be that you sorely confused the compiler.
I can't test these myself, as no access to Easytrieve. |
|
Back to top |
|
|
Elixir
Active User
Joined: 08 Feb 2009 Posts: 116 Location: CHENNAI/NEW JERSEY - INDIA/USA
|
|
|
|
Worked fine. Thanks! |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Which did you use? I know the X'' would work, but did you get some number of quotes to work and if so, how many? |
|
Back to top |
|
|
Elixir
Active User
Joined: 08 Feb 2009 Posts: 116 Location: CHENNAI/NEW JERSEY - INDIA/USA
|
|
|
|
Bill Woodger wrote: |
Which did you use? I know the X'' would work, but did you get some number of quotes to work and if so, how many? |
I used MOVE X'7D' to Variable ==> It moved Single Quotes (') into variable.
This was what I needed |
|
Back to top |
|
|
|