Derivation: FILE
TAGging
FILETAG controls automatic text conversion and
automatic file tagging for z/OS® UNIX files. It activates the automatic
file tagging, on the first write, of new or empty z/OS UNIX file system
files open with fopen() or freopen(), or upon the first I/O to a pipe
created with popen(). You should be familiar with the concept of file
tagging, automatic conversion, and the program and file CCSIDs to
use the runtime option properly. See z/OS XL C/C++ Programming Guide for
more information.
The default value for non-CICS applications
is FILETAG(NOAUTOCVT,NOAUTOTAG).
FILETAG is ignored under CICS®.
The default value for
AMODE 64 applications is FILETAG(NOAUTOCVT,NOAUTOTAG).
Syntax
.-NOAUTOCVT-. .-NOAUTOTAG-.
>>-FILETAG--(--+-----------+--,--+-----------+--)--------------><
'-AUTOCVT---' '-AUTOTAG---'
- NOAUTOCVT
- Disables automatic text conversion.
- AUTOCVT
- Enables automatic text conversion for untagged UNIX file
system files opened using fopen() or freopen().
The conversion for an untagged file is from the program CCSID to the
EBCDIC CCSID as specified by the _BPXK_CCSIDS environment variable.
If the environment variable is unset, a default CCSID
pair is used. See z/OS XL C/C++ Programming Guide for
more information about the _BPXK_CCSIDS environment variable.
Restriction: Automatic conversion for untagged UNIX files can only take place between
IBM-1047 and ISO8859-1 code sets. Other CCSID pairs are not supported.
By default, automatic conversion for untagged UNIX file
system files applies only to files opened in text mode. An untagged
file opened in binary mode is not converted automatically. You can
control the tagging by using the _EDC_AUTOCVT_BINARY environment variable.
For more information about the _EDC_AUTOCVT_BINARY environment variable,
see z/OS XL C/C++ Programming Guide.
This
suboption also indicates that the standard streams should be enabled
for automatic text conversion to the EBCDIC IBM-1047 code page when
they refer to an untagged terminal file (tty).
This suboption
does not affect untagged UNIX file system files that are
automatically tagged by the AUTOTAG suboption. A UNIX file
system file that is automatically tagged is already enabled for automatic
text conversion.
Requirement: The automatic text conversion
is performed only if one of the following situations is also true:
- The _BPXK_AUTOCVT environment variable value is set
to ON.
- The _BPXK_AUTOCVT environment variable is unset and
AUTOCVT(ON) was specified in the active BPXPRMxx member on
your system.
For more information about the _BPXK_AUTOCVT environment
variable, see z/OS XL C/C++ Programming Guide.
- NOAUTOTAG
- Disables the automatic tagging of new or empty z/OS UNIX files.
- AUTOTAG
- Enables automatic file tagging, on the first write, of new or
empty z/OS UNIX files opened with fopen(), freopen(),
or popen().
Usage notes
- Avoid the following situations:
- Setting this runtime option at the system or region
levels.
- Setting this runtime option using _CEE_RUNOPTS in a default profile
for the UNIX shell users.
- Exporting _CEE_RUNOPTS that specifies this runtime option. It
can cause unexpected behaviors for the unknowing user or application.
- The application programmer should define this runtime option with
the assumption that the application is coded to behave based on the
option's setting.
- The application programmer should specify this runtime option
at compile time using #pragma runopts or at bind using a CEEUOPT
CSECT that has been previously created.
- The application user should not override this runtime option
because it can change the expected behavior of the application.
- The default CCSID pair is (1047,819), where 1047 indicates the
EBCDIC IBM-1047 codepage and 819 indicates the ASCII ISO8859-1 codepage.
- Automatic text conversion is enabled for the standard streams
only when the application has been exec()ed, for
example, when the UNIX shell gives control to a program
entered on the command line, and the standard stream file descriptors
are already open, untagged, and associated with a tty.
- For the UNIX shell-owned standard streams that are redirected
at program execution time, the shell includes added environment variables
that control if the redirected streams are tagged. See z/OS UNIX System Services Command Reference for
more information.
- Automatic tagging for a z/OS UNIX file is done by the system
at first write. The CCSID used for the tag is the program CCSID of
the current thread. Both text and binary files are tagged.
- When FILETAG(,AUTOTAG) is in effect, fopoen() or freopen() of
a z/OS UNIX file fails if it cannot determine if the
file exists or if it cannot determine the size.