Format
OGETX hfs_directory | hfs_file_name
mvs_PDS_name | mvs_data_set_name(member_name)
ASIS
BINARY | TEXT
CONVERT(character_conversion_table | YES | NO)
LC
QUIET
SUFFIX(suffix)
Description
You can use the OGETX command
to:
- Copy files in a z/OS® UNIX system
directory to a member of an partitioned data set (PDS) or PDSE
- Copy an individual file to a sequential data set or member of
a partitioned data set
and convert the data from code page 1047 to code page IBM-037
or ASCII while it is being copied.
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 path name of the z/OS UNIX directory
or file name that is being copied to an MVS™ PDS
or PDSE. The files are copied into members of the PDS or PDSE.
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.
These limitations apply to
an MVS data set name:
- It can use uppercase alphabetic characters A through Z,
but not lowercase letters.
- It can use numeric characters 0 through 9,
and the special characters @, #, and $.
- It cannot begin with a numeric character.
- The member name cannot be more than 8 characters. If a file name
is longer than 8 characters or uses characters that are not allowed
in an MVS data set name, the
file is not copied.
The LC operand lets you copy z/OS UNIX system
file names that are lowercase, mixed case, or uppercase.
Single
quotation marks around the directory name or file name are optional.
- mvs_PDS_name | mvs_data_set_name(member_name)
- mvs_PDS_name specifies the name of an MVS PDS
or PDSE to receive the z/OS UNIX system
files that are being copied. mvs_data_set_name(member_name) specifies
the name of an MVS partitioned
data set member to receive the file that is being copied. The name
is:
- A fully qualified name that is enclosed in single quotation marks,
or an unqualified name
- Up to 44 characters long, with an additional 8 characters for
the member name
- Converted to uppercase letters
- ASIS
- Specifies that the _ character in path names not be translated
to the @ character in member 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 files in the directory being copied contains
binary data or text. For more information, see Note 7.
- BINARY
- Specifies that the files in the directory being copied contains
binary data.
When you specify BINARY, OGET operates without any
consideration for <newline> characters or the special characteristics
of DBCS data. For example, double-byte characters might be split
between MVS data set records,
or a “shift-out” state might span records.
- TEXT
- Specifies that the files in the directory being copied contains
text. This is the default.
If you are using a DBCS-supported terminal,
you should use TEXT. It is assumed that double-byte data in the file
system includes the <newline> character in order to delineate
line boundaries. Data within these lines that are delineated by <newline>
characters must begin and end in the “shift-in” state.
- CONVERT(character_conversion_table | YES | NO)
- Specifies that the data being copied is to be converted from code
page 1047 to code page IBM-237 or ASCII; that is, the FROM1047 part
of the specified character conversion table is used. This operand
is optional. If it is omitted, the system copies the data without
conversion.
Use this option for single-byte data only.
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 conversion 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.
Do not use the CONVERT parameter on files
containing double-byte data. double-byte data in the file system is
in code page 939. If conversion to a code page other than 939 is required,
you should use the iconv command.
- LC
- Specifies that the z/OS UNIX system
file names can be lowercase, uppercase, or mixed. If LC is not specified,
the z/OS UNIX system
file names must be uppercase. File names are converted to uppercase
member names.
- QUIET
- Turns off the echoing of the OGET command before a file is copied.
- SUFFIX(suffix)
- Specifies that files with the files created by (suffix) be copied
and the suffix be dropped from the z/OS UNIX system
file name when the PDS members are created.
A suffix is
an optional additional file identifier that is appended to the
file name following the first period (.).
It is typically used to identify the type of file.
Usage notes
- Avoid using OGETX with path names containing single quotation
marks or spaces.
- For text files, all <newline> characters are stripped during
the copy. Each line in the file ending with a <newline> character
is copied into a record of the MVS data
set. You cannot copy a text file to an MVS data
set in an undefined record format.
- For an MVS data set in
fixed record format: Any line longer than the record size is truncated.
If the line is shorter than the record size, the record is padded
with blanks.
- For an MVS data set in
variable record format: Any line is longer than the largest record
size is truncated; the record length is set accordingly. A change
in the record length also occurs if the line is short.
- For binary files, all data is preserved.
- For an MVS data set in
fixed record format: Data is cut into chunks of size equal to
the record length. Each chunk is put into one record. The last record
is padded with spaces or blanks.
- For an MVS data set in
variable record format: Data is cut into chunks of size equal
to the largest record length. Each chunk is put into one record.
The length of the last record is equal to the length of the data left.
- For an MVS data set in
undefined record format: Data is cut into chunks of size equal
to the block size. Each chunk is put into one record. The length
of the last record is equal to the length of the data left.
- Data sets with spanned records are not allowed.
- Before the copy, the OGET command for a file is echoed, unless
you specify the QUIET option. If you did not specify QUIET and if
the command is not echoed for a file, it has not met the copy criteria
and is not copied.
- If more than one file name is the same, the file is overwritten
on each subsequent copy. For example, if you specify a copy of Pgma and pgma and
use LC, the first file copied is overwritten. Or if you copy pgma.h and pgma.c and
specify SUFFIX, the first file copied is overwritten.
- If the target data set is a PDS with an undefined record
format, the files may be treated as load modules. A load module is
copied by link-editing it into the target library. For the program
to be able to execute, the entry point must be at the beginning of
the load module.
For OGETX to treat the file as a load module,
do not specify either TEXT nor BINARY.
- If the source for the copy is a file, the target can be specified
as a PDS. The member name used is the file name, which is in uppercase
and has had any suffixes removed. Any remaining characters in the
member name that are not valid in member names cause the copy to fail.
You do not have to specify a file as a target with a sequential data
set, or a directory as a target with a PDS. The ASIS option is not
affected.
Examples
- The following command copies the files in the z/OS UNIX system directory /usr/sbllib to
the MVS PDS named DATAFILE, removing
any suffixes appended to the z/OS UNIX system
files and accepting lowercase file names.
OGETX /usr/sbllib/ DATAFILE LC SUFFIX
The
members /usr/sbllib/program1.c, /usr/sbllib/list.prg,
and usr/sbllib/program2.c become DATAFILE(PROGRAM1), DATAFILE(LIST),
and DATAFILE(PROGRAM2).
- The following command copies the files with the suffix of c in
the z/OS UNIX system
directory /usr/sbllib to the MVS PDS
named DATAFILE, removing the .c suffix appended to the z/OS UNIX system
files and accepting lowercase file names.
OGETX /usr/sbllib/ DATAFILE LC SUFFIX(c)
The
members /usr/sbllib/program1.c, /usr/sbllib/list.prg,
and usr/sbllib/program2.c become DATAFILE(PROGRAM1) and DATAFILE(PROGRAM2).