Format
OPUT mvs_data_set_name | mvs_data_set_name(member_name)
'pathname'
BINARY | TEXT
CONVERT(character_conversion_table | YES | NO)
Description
You can use the OPUT command
to:
- Copy a member of an MVS™ partitioned
data set (PDS or PDSE) to a file
- Copy an MVS sequential data
set to a file
and convert the data from code page IBM-037 or ASCII to code
page IBM-1047.
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.
Parameters
- mvs_data_set_name | mvs_data_set_name(member_name)
- Specifies the name of an MVS sequential
data set or an MVS partitioned
data set member that is being copied.
- A fully qualified name that is enclosed in single quotation marks,
or an unqualified name (an unqualified name is not enclosed in single
quotation marks)
- Up to 44 characters long, with an additional 8 characters for
the member name
- Converted to uppercase characters by the system
- pathname
- Specifies the path name of the file to receive the data set member
that is being copied. The target file cannot be a directory. All directories
in the path name prior to the file name directory must already exist.
The path name is:
- A relative or absolute path name. A relative path name is relative
to the working directory of the TSO/E session (usually the HOME directory).
Therefore, you should usually specify an absolute path name.
- Up to 1023 characters long.
- Enclosed in single quotation marks.
- In uppercase or lowercase characters, which are not changed by
the system.
- BINARY | TEXT
- specifies that the data set being copied contains binary data
or text.
- BINARY
- Specifies that the data set being copied contains binary data.
This is the default for a data set of undefined record format.
- TEXT
- Specifies that the data set being copied contains text. This 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 is to be converted from IBM-037
or ASCII to EBCDIC Latin 1/Open Systems Interconnection code page
01047—that is, that the TO1047 part of the specified character conversion
table will be 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
- The system will perform conversion and use the default conversion
table (BPXFX000) in the system library concatenation. (BPXFX000 is
an alias; when shipped by IBM,
it points to BPXFX111.)
- NO
- Specifies no conversion. NO is the same as omitting the CONVERT
operand.
Usage notes
- If the specified file does not exist, OPUT 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 execute access; others have
nothing.
- If the specified file exists, the new data overwrites the existing
data. The mode of the file is unchanged.
- You can use OPUT to copy a program object from a PDSE to the file
system, and it will be executable there. If you have a load module
in a partitioned data set, however, you must first use the IEBCOPY
program to copy the load module from a partitioned data set to a PDSE
and then subsequently use OPUT to copy the module into the file system.
IEBCOPY converts load modules to a program object. See z/OS UNIX System Services User's Guide for a discussion of copying executable files.
- Data sets with spanned record lengths 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.
Return codes
- 0
- Processing successful.
- 12
- Processing unsuccessful. An error message has been issued.
Examples
- This command copies an MVS sequential
data set to a file, converting from code page IBM-037 to code page
1047.
- The unqualified name of the sequential data set is EMPLOYEE.DATA.
- The path name of the file is /u/admin/employee/data.
OPUT EMPLOYEE.DATA '/u/admin/employee/data' TEXT CONVERT(YES)
- This command copies an MVS sequential
data set to a file converting to code page 1047 using the conversion
table BPXFX000 in the user's library data set.
- The fully qualified name of the sequential data set is IBMUSR.EMPLOYEE.DATA.
- The path name of the file is /u/admin/employee/data.
OPUT 'IBMUSR.EMPLOYEE.DATA' '/u/admin/employee/data'
TEXT CONVERT(MY.LOADLIB(BPXFX000))
- This command copies a binary file from a PDSE to a file in the
file system.
- APPL.LOADLIB(PAYROLL) is the fully qualified name of the member
of the PDSE.
- bin/payroll is the path name of the file; the directory bin is
in the working directory.
- There is no code page conversion.
OPUT 'APPL.LOADLIB(PAYROLL)' '/bin/payroll' binary