Format
OPUTX mvs_PDS_name | mvs_data_set-name(member_name)
hfs_directory | hfs_file_name
ASIS
BINARY | TEXT
CONVERT(character_conversion_table | YES | NO)
LC
MODE
QUIET
SUFFIX(suffix)
Description
You can use the OPUTX command
to:
- Copy members from an MVS™ partitioned
data set (PDS) or PDSE to a directory in the z/OS® UNIX file
system.
- Copy a sequential data set or member of a PDS to a file
and convert the data from code page IBM-037 or ASCII to code
page IBM-1047 while it is being copied.
Restriction: Do
not use the CONVERT option when copying files that contain double-byte
data. This option is used for single-byte data only, not for double-byte
data.
This
command uses the ISPF/PDF Edit facility.
Parameters
- hfs_directory | HFS_file_name
- Specifies the directory name or file name of a file in the z/OS UNIX file
system that is to receive the PDS members that are being copied. The
name can be up to 1023 characters long. Single quotes around the directory
name or file name are optional.
Use hfs_directory when
a PDS is specified. When a sequential data set or PDS member is specified,
then the file name must be used.
- mvs_PDS_name | mvs_data_set_name(member_name)
- Specifies the name of an MVS partitioned
data set or an MVS partitioned
data set member that is being copied into a z/OS UNIX file
system. The data set name is:
- A fully qualified name that is enclosed in single quotes, or an
unqualified name (an unqualified name is not enclosed in single quotes)
- Up to 44 characters long, with an additional 8 characters for
the member name
- Converted to uppercase letters
- ASIS
- Specifies that the @ character in member names not be translated
to the _ character in path names. (It is a common convention to use
@ symbols in PDS member names to correspond with the _ symbol in path
names.)
- BINARY | TEXT
- Specifies whether the data set being copied contains binary data
or text.
- BINARY
- Specifies that the data set being copied contains binary data.
BINARY is the default for a data set of undefined record format.
- TEXT
- Specifies that the data set being copied contains text. TEXT is
the default for a data set of fixed record format or variable record
format.
- CONVERT(character_conversion_table | YES | NO)
- Specifies that the data being copied be converted from code page
IBM-037 to EBCDIC Latin 1/Open Systems Interconnection code page 01047.
That is, the TO1047 part of the specified character conversion table
is used. This operand is optional. If this operand is omitted, the
system copies the data without conversion.
You can use this option
for single-byte data, but not for double-byte data.
Specify
the CONVERT value as one of the following:
- character_conversion_table
- Specify one of the following:
- data_set_name(member_name). Specifies the name of the partitioned
data set (PDS) and the name of the member that contains the character
conversion table.
- data_set_name. Specifies the name of the partitioned data
set (PDS) that contains the character conversion table. The table
is the FROM1047 part in member BPXFX000. (This is an alias; when shipped
by IBM®, it points to BPXFX111.)
- (member_name). Specifies the name of the conversion table
to be used. It is a member of a PDS. Because the data_set_name is
omitted, the standard library concatenation is searched for the table.
(The default library is SYS1.LINKLIB.)
The following list summarizes
what you can specify when you want to convert data to a different
code page when copying single-byte data:
- BPXFX100. Null character conversion table. Use this table if the
square brackets at your workstation are at the same code points as
the square brackets on code page 1047 (it is the default). Also use
it if you are using a DBCS terminal.
- BPXFX111. Specifies a non-APL conversion table to convert between
code pages IBM-037 and IBM-1047.
- BPXFX211. Specifies an APL conversion table to convert between
code pages IBM-037 and IBM-1047.
- BPXFX311. Specifies an ASCII-EBCDIC conversion table to convert
between code pages ISO8859-1 and IBM-1047.
- YES
- Specifies that the system is to perform conversation and use the
default conversion table (BPXFX000) in the standard library concatenation.
(BPXFX000 is an alias; when shipped by IBM,
it points to BPXFX111.)
- NO
- Specifies that conversion not be done. NO is the same as omitting
the CONVERT operand.
- LC
- Specifies that the member name be converted to a lowercase file
name.
- MODE
- Specifies the file mode for any members copied into the z/OS UNIX file
system. The mode can be specified as three or four octal digits. (The
digits can be separated by commas.) Invalid mode specifications are
ignored.
If the specified file does not exist, OPUTX creates a
new file. For a new text file, the mode (permission bits) is 600.
When the mode is 600, the user has read and write access; others have
none. For a new binary file, the mode (permission bits) is 700. When
the mode is 700, the user has read, write, and search access; others
have none.
- QUIET
- Turns off the echoing of the OPUTX command before the member or
data set is copied.
- SUFFIX(suffix)
- Specifies that a suffix specified by (suffix) be appended to the
member names in creating the file names for the z/OS UNIX system.
A suffix is an optional additional file identifier that is appended
to the file name following a period (.). It is typically
used to identify the type of file. For example, .c typically
indicates a C language source file and .h indicates a C language
header file. Suffixes can be any length and you can append as many
as you want, but the file name, including suffixes, cannot exceed
255 characters for z/OS UNIX.
Usage notes
- Avoid using OPUTX with path names containing quotes or spaces.
- If the specified file does not exist, OPUTX creates a new file.
For a new text file, the mode (permission bits) is 600. When the mode
is 600, the user has read and write access; others have nothing. For
a new binary file, the mode (permission bits) is 700. When the mode
is 700, the user has read, write, and search access; others have nothing.
- If the specified file exists, the new data overwrites the existing
data. The mode of the file is unchanged.
- Data sets with spanned records are not allowed.
- When you copy MVS data sets
to text files in the z/OS UNIX file system, a <newline>
character is appended to the end of each record. If trailing blanks
exist in the record, the <newline> character is appended after
the trailing blanks. MVS fixed
block data sets have a fixed record length, which means that trailing
blanks could exist up to the end of each record.
- When you copy MVS data sets
to binary files in the z/OS UNIX file system, the <newline>
character is not appended to the record.
- Before the copy, the OPUTX command for a data set or member is
echoed, unless you specify the QUIET option. If you did not specify
QUIET and if the command is not displayed, the data set or member
is not copied.
- If the source data set is a PDS with an undefined record format,
the members might be treated as load modules. A load module is copied
by link-editing it into the target file in the file hierarchy. For
the program to be able to run from the file hierarchy, the entry point
must be at the beginning of the load module.
For OPUTX to treat
the file as a load module, neither BINARY or TEXT can be specified.
- If the source for the copy is a sequential data set or a PDS member
and the target is a directory, the file name used is the last qualifier
of the data set name or the member name. You do not have to specify
a file as the target with a sequential data set, or a directory as
the target with a PDS. The LC and ASIS options are not affected.
Examples
The following command copies files
in a PDS into a directory in the z/OS UNIX file system and specifies that:
- The name of the partitioned data set (PDS) is DATAFILE
- The directory is /usr/sbllib
- The files are given a suffix of .c
OPUTX DATAFILE '/usr/sbllib/' LC SUFFIX(c)
Assuming
the PDS has members PROGRAM1, PROGRAM2, and PROGRAM3, these members
are copied as
/usr/sbllib/program1.c,
/usr/sbllib/program2.c,
and
/usr/sbllib/program3.c.