CREATE—Create Data
The CREATE primary command creates a member of a partitioned data set, a sequential data set, or z/OS® UNIX file from the data you are editing.
If no options are specified with the CREATE command, the Edit/View - Create panel is displayed.
Syntax
- 1 If you don't specify the group of lines using labels, you must specify the group by using C or M line commands.
- member
- The name of the new member added to the partitioned data set currently being edited. If you are using a concatenated sequence of libraries, the member is always written to the first library in the sequence.
- labela, labelb
- Labels identifying the start and end of the group of lines which
are added to the new member.
For more information about using labels to identify a group of lines, see Labels and line ranges.
- dsname(member)
- The name of a different partitioned data set and new member name to be added to the partitioned data set. The data set name can be fully qualified or partially qualified.
- dsname
- The name of a different sequential data set to be added. The data set name can be fully qualified or partially qualified.
- pathname
- The path name for a z/OS UNIX regular file to be created. (Also, see Specifying z/OS UNIX pathnames with edit primary and macro commands.)
- ASCII, EBCDIC, UTF8
- When one of these keywords is supplied, if the data is using a different character set to that designated by the keyword, the data being saved in the external file is converted to the character set designated by the keyword.
Description
To create a member of a partitioned data set, a sequential data set, or a z/OS UNIX file:
- On the command line, type one of these commands:
CREATE member labela labelb CREATE (member) labela labelb CREATE dsname(member) labela labelb CREATE dsname labela labelb CREATE pathname labela labelb
The member operand is optional unless you specify a data set name. It represents the name of the member you want to create.
The labela and labelb operands specify the first and last lines in a group of lines used to create the new member, sequential data set, or z/OS UNIX file.
If you omit the labela and labelb operands, you must specify the lines by using either the C (copy) or M (move) line command. See the descriptions of these commands if you need more information about them.
If you omit the labela and labelb operands and do not enter one of the preceding line commands, a
CREATE Pending
message is displayed in the upper-right corner of the panel. - Press Enter. If you did not specify the name of the member, the
name of another partitioned data set along with the member name, or
the name of a z/OS UNIX file to be created, the Edit Create panel
appears (see Figure 2). Enter the member
name on this panel and press Enter again. If you used either a pair
of labels or a C line command, the data is copied from the member
that you are editing into the member that you are creating. If you
used the M line command, however, the data is removed from the member
that you are editing and placed in the member that you are creating.
If the data set specified does not exist, ISPF prompts you to see if the data set should be created. You can create the data set using the characteristics of the cataloged source data set as a model, or specify the characteristics for the new data set. You can suppress this function through the ISPF configuration table, causing any CREATE request for a nonexistent data set to fail.
See Creating and replacing data if you need more information about the CREATE command.
Examples
These steps show how you can create a new member when you omit the member name:
- Type
CREATE
on the command line and specify which lines you want to copy or move into the new data set or member. The example in Figure 1 uses the MM (block move) line command to move a block of lines from the data. - When you press Enter, the Edit/View Create panel (Figure 2) appears. Type the name of a new member and press Enter. If you type the name of a member that already exists, an error message appears and the CREATE fails. The name of the member created for this example is TODATA.
- Figure 3 shows the lines remaining in the original member after the specified lines were moved to the new member.
- Figure 4 shows the contents of the new member. The data is renumbered only if both number mode and autonum mode are on. A source listing of the data is also recorded in the ISPF list data set for eventual printing if autolist mode is on. In this example, the lines have retained their original line numbers.