z/OS Language Environment Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


FILETAG (C/C++ only)

z/OS Language Environment Customization
SA38-0685-00

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 files open with fopen() or freopen(), or upon the first I/O to a pipe created with popen().

Recommendation: To use the runtime option properly, be familiar with the concept of file tagging, automatic conversion, and the CCSID. See z/OS XL C/C++ Programming Guide for more information.

Non-CICS default
FILETAG=((NOAUTOCVT,NOAUTOTAG),OVR)
CICS® default
FILETAG is ignored under CICS.
AMODE 64 default
FILETAG=((NOAUTOCVT,NOAUTOTAG),OVR)
Read syntax diagramSkip visual syntax diagram
Syntax

                     .-NOAUTOCVT-.     .-NOAUTOTAG-.         
>>-FILETAG--=--(--(--+-AUTOCVT---+--,--+-AUTOTAG---+--)--,------>

   .-OVR----.      
>--+-NONOVR-+--)-----------------------------------------------><

NOAUTOCVT
Disables the following behavior:
AUTOCVT
Enables automatic text conversion for untagged files opened using fopen() or freopen(). The conversion for an untagged file will be 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 files applies only to files opened in text mode. An untagged file opened in binary mode is not converted automatically. You can control this 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 files that are automatically tagged by the AUTOTAG suboption. A 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 is also true:
  • Start of change The _BPXK_AUTOCVT environment variable value is set to ON. End of change
  • Start of change The _BPXK_AUTOCVT environment variable is unset and AUTOCVT(ON) was specified in the active BPXPRMxx member on your system. End of change

For more information about the _BPXK_AUTOCVT environment variable, see z/OS XL C/C++ Programming Guide.

NOAUTOTAG
Deactivates the automatic tagging of new or empty files.
AUTOTAG
Activates the automatic file tagging, on the first write, of new or empty files open with fopen(), freopen(), or popen().
OVR
Specifies that the option can be overridden.
NONOVR
Specifies that the option cannot be overridden.

z/OS® UNIX considerations

FILETAG applies to the enclave. Nested enclaves do not inherit the setting of this runtime option. Files that are opened in the nested enclave are not affected.

Usage notes

  • Avoid these 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 code page and 819 indicates the ASCII ISO8859-1 code page.
  • 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 whether the redirected streams are tagged. See z/OS UNIX System Services Command Reference for more information.
  • Automatic tagging for a file is done at first write by the LFS. 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 file fails if it cannot determine whether the file exists or if it cannot determine the size.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014