|
To be independent of the environment escaping of the CLP strings is
possible for the critical punctuation characters on EBCDIC systems.
See list below:
------------------------------------------------------------------------
! = &EXC; - Exclamation mark
$ = &DLR; - Dollar sign
# = &HSH; - Hashtag (number sign)
@ = &ATS; - At sign
[ = &SBO; - Square bracket open
\\ = &BSL; - Backslash
] = &SBC; - Square bracket close
^ = &CRT; - Caret (circumflex)
` = &GRV; - Grave accent
{ = &CBO; - Curly bracket open
| = &VBR; - Vertical bar
} = &CBC; - Curly bracket close
~ = &TLD; - Tilde
------------------------------------------------------------------------
A escape sequence starts with the ampersand (&) followed be 3 character
and is terminated with semicolon (;). If such a sequence in the string
required then the ampersand must be typed twice (&&). To mark a part or
the of whole string in a certain CCSID the syntax below can be used:
------------------------------------------------------------------------
&nnnnnn<.....>
------------------------------------------------------------------------
Such a replacement sequence starts also with an ampersand (&) followed
by 1 to 6 digits (nnnnnn) and a open angle brace (<). Till to the
corresponding close angle brace (>) the whole string is converted form
the provided CCSID (nnnnnn) to the local character set used to interpret
the command. If the CCSID not supported (unknown) 1047 is assumed. To
determine the corresponding close angel brace (>) the opens and closes
are counted and if the start level achieved the corresponding close is
used. To exclude '>' or '<' from counting it must be typed twice. A
CCSID based conversion can only be defined on one level. A recursive/
hierarchical handling is not supported.
The partial CCSID conversion are mainly useful for application
programming interfaces. At compile time the CCSID for literals must be
defined. This CCSID could be differ from the system CCSID (local
character set) of variable parameter. In such a case a application can
mark the literal part in the CCSID used for literals at compile time,
and the variable part could be conform to the CCSID defined over the
LANG variable. See the C example below:
------------------------------------------------------------------------
snprintf(acCmd,sizeof(acCmd),"&1047<get.file='>%s&1047<'>",pcFilename);
------------------------------------------------------------------------
C-Code are normally in 1047 and if no literal conversion defined then
the literals also in 1047. The file name is a parameter in local
character set. In Cobol the default code page for literals is 1140. |
|