Using special characters
Under TSO
When z/OS® UNIX file
names contain the special characters
- blank
- backslash
- double quotation mark
\) must precede these characters.Note: Under
TSO, a backslash
\ must precede special characters
in file names and options.Two backslashes must precede
suboptions that contain these special characters:
- left parenthesis
( - right parenthesis
) - comma
- backslash
- blank
- double quotation mark
- less than
< - greater than
>
For example:
def(errno=\\(*__errno\\(\\)\\))Under the z/OS UNIX System Services shell
The z/OS UNIX System Services shell imposes its own parsing rules. The c89 utility escapes special compiler and runtime characters as needed to invoke the compiler, so you need only be concerned with shell parsing rules.
While the c89 utility uses compiler options, which have parentheses, xlc uses the -q syntax, which does not use parentheses and is more convenient for shell invocation.
See c89 — Compiler invocation using host environment variables and xlc — Compiler invocation using a customizable configuration file for more information.
Under z/OS batch
When
invoking the compiler directly (not through a cataloged procedure),
you should type a single quotation mark (') within a string as two
single quotation marks (''), as follows:
//COMPILE EXEC PGM=CCNDRVR,PARM='OPTFILE(''USERID.OPTS'')'If
you are using the same string to pass a parameter to a JCL PROC, use
four single quotation marks (''''), as follows:
//COMPILE EXEC CBCC,CPARM='OPTFILE(''''USERID.OPTS'''')'Special
characters in z/OS UNIX file names that are referenced
in DD cards do not need a preceding backslash. For example, the special
character blank in the file name
obj 1.o does not
need a preceding backslash when it is used in a DD card:
//SYSLIN DD PATH='u/user1/obj 1.o'A
backslash must precede special characters in z/OS UNIX file
names that are referenced in the PARM statement. The special characters
are: backslash, blank, and double quotation mark. For example, a
backslash precedes the special character blank in the file name
obj
1.o, when used in the PARM keyword: //STEP1 EXEC PGM=CCNDRVR,PARM='OBJ(/u/user1/obj\ 1.o)'