How to: |
In ReportCaster, you can use an ampersand (&) and single quotation mark (') in the following fields:
The technique for using an Ampersand (&). Place a concatenation sign after the & and before the next character in the string. For example:
-SET &COMPANY='AT&|T'; -TYPE &COMPANY
The technique for using a Single quotation mark ('). When a value contains a ', use two single quotation marks (for example, O"Brien). Within a quoted string, two single quotation marks (") are interpreted as one single quotation mark.
Note: Although Information Builders recommends using this technique, you can also use the CTRAN subroutine to change one character to another.
CTRAN (inlen, infield, decfrm, decto, output)
where:
Is the integer that specifies the length in characters of the input string.
Is the alphanumeric input string.
Is the decimal value of the character to be translated.
Is the decimal value of the character to be used as a substitute for decfrm.
Is the resulting alphanumeric output string.
To use this subroutine, you must know the decimal value of the characters in internal machine representation. Printable EBCDIC or ASCII characters and their decimal values are listed in character charts.
You can use the following code to change a single quotation mark to a double quotation mark:
TABLE FILE TRAIN
PRINT TRAIN AND COMPUTE
ALT_MOD/A20 = CTRAN(20, MODEL, 39, 34, ALT_MOD);
BY COUNTRY
END
WebFOCUS |