S413: OPEN couldn't get the volume ready
An S413 abend means OPEN couldn't get the right volume ready for a tape or disk data set. The device may be busy, the DD statement may name no volume, or the tape couldn't be positioned. Message IEC145I gives the return code, such as 413-04 or 413-18.
Other names for this code
Also written as 413, S413-04, S413-18, S413-1C, abend 413, system abend 413, 413-18, 413-04, IEC145I 413.
What it means
When a program opens a data set on tape or disk, OPEN first has to make sure the right volume is mounted on a device the step can use. For tape it also has to position the tape at the right file. If any of that fails, OPEN issues message IEC145I and ends the step with system completion code 413. The return code after the dash says which part failed.
These are the ones you'll meet most often.
413-04means no usable device was available for the volume. The volume might be in use elsewhere, permanently resident or reserved. Another DCB in the same step may already have the tape drive open, or the device type may not suit the data set organization. It can also follow an earlier abend on the same device in the same step.413-18means the data set was opened for input, but the DD statement gave no volume serial. OPEN has nothing to mount.413-1Cmeans the volume sequence number on the DD statement is higher than the number of volumes the data set has.413-34means a tape DD asked for file 2 or later with LABEL=(n), but gave no volume serial.413-08,413-0Cand413-10are I/O errors while positioning a tape, reading its label or writing a tape mark.413-20is the disk version, an error reading the volume label or the VTOC.
Other return codes cover tape density and recording mode conflicts, tape library problems and installation exits. IEC145I in IBM's MVS System Messages lists them all for your release.
Common causes
- An input DD gives no volume serial, so OPEN has nothing to mount. This can happen when a DD copied from an output step is left as DISP=NEW and the program then opens it for input (413-18).
- The volume is busy with another job, or the step opens a second data set on a tape drive that still has one open (413-04).
- The DD statement asks for a volume sequence number, as in
VOL=(,,3), that's higher than the number of volumes in the data set (413-1C). - A DD for a later file on a multi-file tape codes LABEL=(2) or higher but has no volume serial from VOL=SER or the catalog (413-34).
- A damaged tape, a dirty drive or a bad label stops OPEN positioning the tape or reading the label (413-08, 413-0C).
- The DCB asks for a density or recording mode the allocated drive doesn't support (413-24, 413-40).
How to find the problem
- Find IEC145I in the job log (JESMSGLG or JESYSMSG in SDSF). It looks like
IEC145I 413-18,. Note the return code, the DD name and the volume serial if there is one.IFG0194A, jobname, stepname, ddname,... - Check the DD statement in the expanded JCL listing. Look at DISP, UNIT, VOL=SER, the volume sequence number and LABEL.
- For a cataloged data set, run
LISTCAT ENTRIES('dsname') ALLor use ISPF option 3.4 to see which volumes the data set really has. - For 413-04, check whether the device is online and who has it with a DISPLAY command such as
D U,,,0B41,1, and look for other allocation or mount messages for the same volume. - For I/O errors, look in the system log for IOS000I or other I/O error messages just before IEC145I. They name the drive and the error.
How to fix it
- For 413-18, give the DD statement the right DSN with DISP=OLD or SHR so the catalog supplies the volume, or code VOL=SER if the data set isn't cataloged.
- For 413-04, don't open two data sets on one tape drive at the same time. Close the first before opening the second, or give the second DD its own unit. If another job held the volume, rerun when it's free.
- For 413-1C and 413-34, correct the volume sequence number or add the volume serial the tape file needs.
- For I/O errors, rerun on a different drive. If the error follows the tape, have it checked or copied to a new volume.
- For density or recording mode conflicts, remove the hard-coded value from the DCB or the DD statement, or ask for a unit that supports it.
What it looks like
IEC145I 413-04,IFG0194A,PAYRUN01,STEP020,TAPEOUT,0B41,PR4417,PROD.PAYROLL.HIST IEA995I SYMPTOM DUMP OUTPUT SYSTEM COMPLETION CODE=413 REASON CODE=00000004 IEF450I PAYRUN01 STEP020 - ABEND=S413 U0000 REASON=00000004
IBM documentation
IBM z/OS: 413. Use the documentation for your installed release.
Related codes
Questions
Why do I get 413-18 when the data set exists?
Because OPEN only sees what the DD statement gave it. A DD coded as a new data set carries no volume serial, even if a data set with that name exists. Change it to DISP=OLD or SHR so the catalog supplies the volume.
Is S413 a JCL error?
The cause is often in the JCL, but it isn't reported as a JCL error. The step starts and runs, and the abend comes when the program opens the file. So the fix is usually in the DD statement even though the program abended.
What is the difference between S413 and S213?
S413 means OPEN couldn't get the volume ready or positioned. S213 means the volume was there but the data set wasn't found on it, which message IEC143I reports.