Shell commands changed for UNIX03

z/OS® UNIX is UNIX95 conformant, with extensions to commands using formats (such as uppercase option letters) to avoid conflicts with subsequent UNIX standards. The specification of new options and changed command behavior by SUSv3 (also known as UNIX03) has resulted in conflicts with IBM's extensions.

The _UNIX03 shell variable was introduced in z/OS 1.8 as a means of controlling whether certain shell commands behave according to Single UNIX Specifications, version 3 (SUSv3). _UNIX03=YES is only needed when an option or behavior conflicts with an existing z/OS implementation, and the SUSv3 behavior is desired. Additional command changes introduced in z/OS 1.9 have behavior conflicts controlled by the _UNIX03 variable. If _UNIX03 is not set (or set to "NO"), the z/OS 1.9 commands will maintain compatibility with prior releases.

Therefore, system programmers should make sure that _UNIX03 is not set in system-wide profiles (or setup scripts), including:
  • /etc/profile
  • /etc/csh.cshrc
  • /etc/csh.login
  • /etc/rc

Users who want the SUSv3 conformant behavior can set _UNIX03=YES in their own profile files, or in specific scripts or command invocations where it is needed.

Table 1 lists the commands that were changed for UNIX03. (It is not a complete list of changes to shell commands.) For more detail, see the specific command description.

Table 1. UNIX shell commands and _UNIX03
Command z/OS release introduced Affected option or behavior _UNIX03 =YES _UNIX03 is unset or not YES
awk 1.9

Stricter rules on a
command-line argument
being treated as a variable
assignment  

Handling of break or
continue statements outside
of a loop

No effect




Displays error and halts
processing

No effect




Displays warning, exits
current pattern
or function, and
continues processing

bc 1.9

/usr/lib/lib.b
improved cos() and sin()
performance

No effect No effect
cp 1.8

Options added or changed:
-H | L | P
-W seqparms

-P specifies symbolic
link handling

-P params specifies
sequential data set
parameters

cksum 1.10 Output and diagnostic messages Output defaults to space-separated:
cksum bytecount filename

If a filename operand is not specified, the path name and its leading white space is omitted.

If a read error occurs, the checksum for that file is not displayed and a diagnostic message is sent to stderr.

Output defaults to tab-separated:
cksum   bytecount   filename

If a file operand is not specified, the path name and its leading tab is omitted.

If a read error occurs, cksum attempts to display the available checksum to standard output and marks the output line with FSUM6199 [read error].

ed 1.9

Minor changes in
subcommands
c, i, g, G, v, V,
l (lowercase L), s

c and i subcommands:
accept address 0 as 1

g, G, v, V subcommands:
unmark changed lines


l (lowercase L) subcommand
writes $ as \$


s subcommand: % without
prior s subcommand
is an error

c and i subcommands:
reject address 0

g, G, v, V subcommands:
leave lines marked


l (lowercase L), subcommand
does not escape $ characters


s subcommand: % without
prior s subcommand
is accepted

file 1.9

Options added or changed:
-d -M -i

New magic file format


-h handling of link
to a nonexistent file

-m magic tested before
/etc/magic

magic file (byte, short,
long) format are signed

-h is the default



Output separator char
is a space

-m magic tested
instead of /etc/magic

magic file (byte, short,
long) format are unsigned

-h is not the default
(The default is to follow
symbolic links)

Output separator char is a
tab

mailx 1.9

Default command-mode
subcommand

Followup
command-mode subcommand


Honors the TZ environment
variable

Use tilde (~) as the escape
character when escape
variable is unset

Default subcommand is
next

Followup overrides
the record variable

Default subcommand is
print

Followup does not
override the record variable

od 1.9

Output of signed single-byte
values

No effect No effect
pax 1.8

Options added or changed:
-H
-x pax  (new format)

-o keyword=value
    (new keywords)




pax -r restore of access
permission bits, when
neither -p p  or  -p e
is specified




-o multiple
keyword/value pairs must
be separated by commas
(with white space allowed
before a keyword)

Files are restored with
permissions 0666
modified by umask.




-o multiple keyword/value
pairs may be separated
by commas or spaces



Files are restored with
saved permissions
modified by umask.

sed 1.9

Subcommand preceded by !


s subcommand with w
specified


y subcommand with \n
in a specified set of
characters

One or more !
characters are allowed

w and file must be
separated by blanks


\n is treated as a
newline

Only one ! character is
allowed

wfile is allowed or may be
separated by blanks


\n is treated as a character
‘n’

sum 1.10 Output and diagnostic messages Output defaults to space-separated:
checksum bytecount filename
If a filename operand is not specified, the path name and its leading white space is omitted.

When a read error occurs, the checksum for that file is not displayed and a diagnostic message is sent to stderr.

Output defaults to tab-separated:
checksum   bytecount   filename
If a file operand is not specified, the path name and its leading tab is omitted.

When a read error occurs, sum attempts to display the available checksum to stdout and marks the output line with FSUM6199 [read error].

tr 1.9

Option added:
-C

-c complements the
set of binary values in
binary order

-c complements the set of
characters in LC_COLLATE
order  (like the new -C
behavior)

uudecode 1.9

Option added:
-o outfile

/dev/stdout

No effect No effect
uuencode 1.9

Option added:
-m

/dev/stdout

No effect No effect