RECEIVE
Collects data sent to you with TRANSMIT, and puts it in a library.
Why it matters. When PROD has a problem, a copy of the job is sent to you. RECEIVE is how you pick it up and start work.
Syntax
RECEIVE [INDATASET(dsname)] [USERID(userid)] [DISPLAY | NODISPLAY] [NAMES | NONAMES] Reply to INMR906A with: DATASET(dsname) | DELETE | END | an empty line
- INDATASET(dsname)
- Read a transmitted file that you already hold in a dataset.
- USERID(userid)
- Receive data meant for another user. Only for operators.
- DATASET(dsname)
- A reply to the question: where to restore the data.
- (empty line)
- A reply: restore it under the default name.
- DELETE
- A reply: throw the data away without restoring it.
- END
- A reply: stop now and leave the data waiting.
- SPACE(primary,secondary)
- A reply: how much space to give a dataset that RECEIVE makes.
Try it RECEIVE
- 1
A copy of the PROD job library has been sent to you. Collect it.
RECEIVE - 2
Answer the question. Put it in your own DEV.JCL library.
DATASET('ZB0001.DEV.JCL')
Remember
- RECEIVE goes with TRANSMIT: one sends, one collects.
- INMR906A is a question. Answer it with DATASET('name').
- Choose your own library. Don't leave it to the default name.
The usual mistake
RECEIVE DATASET('ZB0001.DEV.JCL')
DATASET is not an operand of RECEIVE. It is a reply to the question RECEIVE asks first (INMR906A), and you type it on the next line. MF/OS takes no operands on RECEIVE at all.
RECEIVE, then at the prompt: DATASET('ZB0001.DEV.JCL')
On real z/OS
MF/OS takes no operands on RECEIVE and models the replies DATASET(name), an empty line, DELETE and END. After the last file, real RECEIVE also prints 'No more files remain for the RECEIVE command to process.', which MF/OS does not show.
Where can I practise RECEIVE?
Right here, at ZedBank. You take a junior job at a simulated bank and use RECEIVE in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.
- Partitioned datasetA dataset that works like a library or folder, holding many separately named members inside one dataset.
- MemberOne named item inside a partitioned dataset, such as a single program, job or copybook within a library.
- High-level qualifierThe first part of a dataset name, which usually identifies the owner and drives how security and storage rules apply.
- TSOTime Sharing Option: the interactive login environment on z/OS, where you get a command prompt and a session of your own.