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.

Note: If you are editing a z/OS UNIX file and you issue the CREATE command to create a new z/OS UNIX file, the file permissions for the new file are set to the same values as the file permissions of the file you are currently editing. If you are editing a sequential data set or member and you issue the CREATE command to create a new z/OS UNIX file, the file permissions are set to 700 (rwx------).

Syntax

Read syntax diagramSkip visual syntax diagramCREATECREcreate_options
create_options
Read syntax diagramSkip visual syntax diagrammember( member)dsname( member)dsnamepathnamelabelalabelb1ASCIIEBCDICUTF8
Notes:
  • 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

Note: CREATE adds a new member to a partitioned data set only if a member of the same name does not already exist. Use REPLACE if the member already exists.

To create a member of a partitioned data set, a sequential data set, or a z/OS UNIX file:

  1. 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.

  2. 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:

  1. 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.
    Figure 1. Member before new member is created
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
     ───────────────────────────────────────────────────────────────────────────────
     EDIT       USERSID.TEST(FROMDATA) - 01.00                  Columns 00001 00072
     Command ===>                                                  Scroll ===> PAGE
     ****** ***************************** Top of Data ******************************
     ==MSG> -Warning- The UNDO command is not available until you change
     ==MSG>           your edit profile using the command RECOVERY ON.
     000100 This line will be left in this member
     000200 This line will be left in this member
     000300 +----------------+
     000400 | This is the    |
     000500 | material to    |
     000600 | be created in  |
     000700 | another member |
     000800 +----------------+
     000900 This line will be left in this member
     001000 This line will be left in this member
     ****** **************************** Bottom of Data ****************************
    
    
    
    
      F1=Help      F2=Split     F3=Exit      F5=Rfind     F6=Rchange   F7=Up
      F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
  2. 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 2. Edit/View Create panel (ISRECRA1)
       Menu  RefList  Utilities  Help
     ───────────────────────────────────────────────────────────────────────────────
                                    Edit/View - Create
     Command ===> _________________________________________________________________
                                                                        More:     +
     "Current" Data Set: PDFTDEV.USERSID.MSGGEN(FLMU00)
    
     To ISPF Library:
        Project . . . PROJ1   
        Group . . . . USERID  
        Type  . . . . CLIST   
        Member  . . .         
    
     To Other Sequential Data Set, Partitioned Data Set Member, or z/OS UNIX file:
        Name . . . . . TEST(TODATA)                                             +
        Volume Serial            (If not cataloged)
    
     Data Set Password  . .           (If password protected)
    
     Enter "/" to select option                      Data Conversion option
        Specify pack option for "CREATE" Data Set       1. EBCDIC                   
                                                        2. ASCII                    
                                                        3. UTF-8
    
     Press ENTER key to create. Enter END command to cancel create.
      F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap
      F10=Actions   F12=Cancel
  3. Figure 3 shows the lines remaining in the original member after the specified lines were moved to the new member.
    Figure 3. Member after new member has been created
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
     ───────────────────────────────────────────────────────────────────────────────
     EDIT       USERSID.TEST(FROMDATA) - 01.01                Member TODATA created
     Command ===>                                                  Scroll ===> PAGE
     ****** ***************************** Top of Data ******************************
     ==MSG> -Warning- The UNDO command is not available until you change
     ==MSG>           your edit profile using the command RECOVERY ON.
     000100 This line will be left in this member
     000200 This line will be left in this member
     000900 This line will be left in this member
     001000 This line will be left in this member
     ****** **************************** Bottom of Data ****************************
    
    
    
    
    
    
    
    
    
    
      F1=Help      F2=Split     F3=Exit      F5=Rfind     F6=Rchange   F7=Up
      F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
  4. 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.
    Figure 4. New member created
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
     ───────────────────────────────────────────────────────────────────────────────
     EDIT       USERSID.TEST(TODATA) - 01.00                    Columns 00001 00072
     Command ===>                                                  Scroll ===> PAGE
     ****** ***************************** Top of Data ******************************
     ==MSG> -Warning- The UNDO command is not available until you change
     ==MSG>           your edit profile using the command RECOVERY ON.
     000300 +----------------+
     000400 | This is the    |
     000500 | material to    |
     000600 | be created in  |
     000700 | another member |
     000800 +----------------+
     ****** **************************** Bottom of Data ****************************
    
    
    
    
    
    
    
    
      F1=Help      F2=Split     F3=Exit      F5=Rfind     F6=Rchange   F7=Up
      F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel