EDIT
Opens a dataset or member in the editor.
Also written E
Why it matters. It's how you write JCL, programs and notes: open it, change it, save it.
Syntax
{EDIT | E} dsname[/password] [NEW | OLD] [type] [EMODE | IMODE] [CAPS | ASIS] [NUM | NONUM]
EDIT 'dsname(member)'- dsname
- The dataset to edit. Quote it. A library member goes in brackets.
- NEW | OLD
- NEW makes the dataset as you edit it. OLD says it exists already.
- type
- The kind of data, such as TEXT, DATA, CNTL, CLIST or COBOL. It can come from the last part of the name.
- EMODE | IMODE
- Start in edit mode (the default for an old dataset) or input mode (the default for a new one).
- CAPS | ASIS
- Change typed text to capitals, or keep it as typed.
- NUM | NONUM
- Whether lines carry line numbers.
Try it EDIT
- 1
Open the member NOTES in your library ZB0001.DEV.JCL.
EDIT 'ZB0001.DEV.JCL(NOTES)' - 2
Now try to open a dataset that doesn't exist: ZB0001.DEV.CNTL.
EDIT 'ZB0001.DEV.CNTL(NOTES)'
Remember
- EDIT opens a dataset to change it.
- A member goes in brackets: 'DATASET(MEMBER)'.
- In MF/OS the dataset must exist. Use ALLOCATE to make one.
The usual mistake
EDIT ZBANK.DEV.JCL(PAY)
Without quotes, TSO adds your prefix to the front. It looks for ZB0001.ZBANK.DEV.JCL, which isn't there.
EDIT 'ZBANK.DEV.JCL(PAY)'
On real z/OS
Real TSO EDIT is a line editor driven by subcommands such as INPUT, LIST, SAVE and END, and it cannot edit a PDSE. MF/OS opens a full-screen editor in a tab instead, closer to ISPF option 2. NEW, the type operands and the modes are not modelled, and a dataset that does not exist is refused.
Where can I practise EDIT?
Right here, at ZedBank. You take a junior job at a simulated bank and use EDIT in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- ISPF editorThe full-screen text editor used to write and change JCL, COBOL, REXX and anything else held in a dataset.
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.
- MemberOne named item inside a partitioned dataset, such as a single program, job or copybook within a library.
- Partitioned datasetA dataset that works like a library or folder, holding many separately named members inside one dataset.
- TSOTime Sharing Option: the interactive login environment on z/OS, where you get a command prompt and a session of your own.