Allocating, copying and moving: options 3.2 and 3.3
Option 3.2 creates (allocates), renames, catalogs and deletes datasets. Option 3.3 copies or moves data and members between them. Get the record format and record length right when you allocate, and always read the target name twice before you press Enter.
3.2: the Data Set Utility
| Option | Action |
|---|---|
| A | Allocate a new dataset |
| R | Rename |
| D | Delete (the data is gone) |
| C / U | Catalog / uncatalog |
| S | Short information |
| blank | Full information: attributes, space, dates |
The allocation fields that matter
Allocate New Data Set Command ===> Data Set Name . . . : VSAHA1.TEST.JCL Space units . . . . . TRKS (BLKS, TRKS, CYLS, KB, MB...) Primary quantity . . . 15 Secondary quantity . . 15 Directory blocks . . . 0 (0 for a PDSE or sequential dataset) Record format . . . . FB Record length . . . . 80 Block size . . . . . . 0 (0 = let the system choose) Data set name type . . LIBRARY (LIBRARY = PDSE, PDS, or blank = sequential)
Space units / quantitiesRecord format FBRecord length 80Block size 0Data set name typeISPF usually carries the attributes of the last dataset you looked at into the allocation panel. A quick way to allocate 'one like that one' is to display the existing dataset's information first, then allocate the new name and adjust only what differs.
3.3: Move/Copy
- C copies and leaves the source as it was. M moves, which means copy and then delete the source.
- You give a From dataset (and optionally member names or a pattern), press Enter, then give a To dataset.
- With a library you get a member list: put S beside the members you want, or use
*for all of them. - A Replace like-named members option decides whether members with the same name in the target get overwritten.
In 3.2, which option letter allocates a new dataset?
Show a hint
Think of the first letter of the action.
Show the solution
A (Allocate).
Examples are for learning. Run commands and jobs only on a system you are authorised to use, such as a training or test system, and never on production without approval.
Common mistakes
A library allocated with LRECL 133 cannot hold 80-byte JCL cleanly. Delete it and reallocate. You cannot change LRECL in place.
Move deletes the source after copying. If you only want a copy, use C.
It overwrites same-named members in the target without asking. Switch it on only when you mean it.
What you will see at work
- Most sites have naming standards and storage rules (SMS) that fill in some allocation values for you. Follow your team's template.
- You will usually only be allowed to create datasets under your own user ID or a project qualifier.
- Before a risky edit, copy the member to your own library with 3.3. That is your undo.
Key terms
Check your understanding.
Take this lesson's quiz and save your progress. Free.