Previous Topic: &SETLENG

Next Topic: &SUBSTR


&STR

The &STR built-in function is used to assign data to a variable. If an &CONTROL DBCS, DBCSN, or DBCSP option is in effect, and the data ends with a DBCS string that does not contain a shift in character to identify the end of the DBCS string, the &STR function adds a shift in character to the end of the data before assignment takes place. This is useful for avoiding syntax errors that occur due to processing incomplete DBCS strings.

Example: &STR

&A contains the value <.A.B.C 
&CONTROL DBCS 
&A = &STR &A

results in

&A = <.A.B.C>