Get a apostrophe in a file

Hi all!

I tried to bring an " (apostrophe) with a WRITE statement into a WORK FILE.

But i failed. I did several ways but there was no way working.

Do anybody know how?? Or is it impossible?


On EBCDIC Systems use H’7F’ and on ASCII Systems use H’22’

Sascha Wiegandt

With NAT4 and above: Try the compiler directive OPTION TQMARK=OFF as in:

WRITE WORK FILE 'Hello, world, this "is" a test'

By default, this option is set to ON! (What a nonsense!) :?
Alternatively you can use COMPOPT to set this option globally. But what do you do, if someone else compiles the program without this setting?

I won’t follow the suggestion of Sascha, because you implement OS-dependency where not necessary.


Your hints worked great.


[quote="Wilfried B

Ah … in Wilfried sample is a little syntax error.

I used:


This acted well!


[quote=“Sascha Wiegandt”]
[quote="Wilfried B

I tried, but i have to disable V31COMP :wink: But the Onlinehelp from SPoD is very funny for the OPTIONS Statement :lol: And a ‘HELP OPTIONS’ at BS2 bring up that it only works with Natural Optimizer Compiler.

Oh, please forgive my carelessness. Most syntax expressions in Natural allow singular and plural (VALUE and VALUES for example). Why not this?

And, shame on me, this OPTIONS option will work on Open Systems from 6.2.2 on which I didn’t mention (isn’t this a mainframe forum?). In prior versions the documentation for OPTIONS really was a big joke.

I always get angry about extensions for one platform that are not available on other platforms, even if there is a semantical equivalent on both platforms (e.g. EXAMINE var FROM start TO end… vs. EXAMINE SUBSTR(var,start,end - start+1))