Double-quote marks on output fields...

Anybody know how to write output in which the " is not transformed into a ’ :?:

Thanks for any responses.

Turn the parameter TQ to OFF

steve

It depends on the value of the compiler option TQMARK, how Natural interprets the " (double quotation mark). Issue the command COMPOPT in a command line and you will see your compiler options.

TQMARK=ON: Each double quotation mark within a text constant is output as a single apostrophe. This is the default value.

TQMARK=OFF: Double quotation marks within a text constant are not translated; they are output as double quotation marks.

If the compiler option should be applied to the whole program:

OPTIONS TQMARK=OFF                      
DEFINE DATA LOCAL                       
1 #STRING       (A10) INIT <'ABC"DEF'>  
END-DEFINE                              
*                                       
WRITE #STRING                           
*                                       
END                                     

Another possibilty is to translate the single apostrophe into a Double quotation mark:

DEFINE DATA LOCAL                        
1 #STRING       (A10) INIT <'ABC"DEF'>   
END-DEFINE                               
*                                        
WRITE #STRING                            
EXAMINE #STRING FOR H'7D' REPLACE H'7F'  
WRITE #STRING                            
*                                        
END                                      

If you want to output a text constant, you can set the compiler option to OFF and ON within the code:

OPTIONS TQMARK=OFF                                            
WRITE 'This is a textconstant with " (double quotation mark)' 
OPTIONS TQMARK=ON                                             
WRITE 'This is a textconstant with " (double quotation mark)' 
OPTIONS TQMARK=OFF                                            
WRITE 'This is a textconstant with " (double quotation mark)' 
END                                                           

Thanks to both of you, it really helped me out…and the bank will be happy too. :slight_smile: