COBOL

COBOL File Status 35 at OPEN: Trace the Dataset Path Before Changing the Program

A COBOL `FILE STATUS` value of `35` at `OPEN` is often reported as “the program cannot find its file.” That description is too broad to support a safe fix. This guide shows how to separate a missing or unavailable DD allocation from an application assumption, and how to collect enough evidence before requesting a rerun.

InputValidationProcessingOutput
Original DBala learning flow — a visual summary of this article’s practical decision path.

A COBOL FILE STATUS value of 35 at OPEN is often reported as “the program cannot find its file.” That description is too broad to support a safe fix. This guide shows how to separate a missing or unavailable DD allocation from an application assumption, and how to collect enough evidence before requesting a rerun.

The examples use fictional dataset and program names. Exact runtime messages, catalog behavior, security controls, and file-status conventions vary by site; do not alter JCL, catalog entries, or production job parameters until the owning team has reviewed the evidence.

Symptom: the program stops during OPEN

Consider a daily batch program, PAYEDIT, that opens an inbound payment file. The job step ends early and the application report contains:

OPEN INPUT-PAYMENTS
COBOL FILE STATUS: 35

A tempting response is to resubmit the job or change the COBOL program to create an empty file. Either action can hide the real problem. An empty file may be a valid business input on some days, but it is not a substitute for the intended dataset. A rerun may also conflict with an upstream transfer that is still incomplete or with outputs already created by the first attempt.

In common COBOL implementations, status 35 during OPEN indicates that the runtime could not find or open the external file identified by the program's SELECT assignment. That is a useful starting point, not a complete diagnosis. The failing path can involve JCL allocation, a symbolic parameter, a GDG reference, a catalog issue, a migrated dataset, a security rule, or a mismatch between the DD name expected by the program and the DD name supplied by the job.

Evidence to capture before proposing a correction

Start with the exact failing execution, not a similarly named job from a prior day. Preserve the evidence allowed by local security and data-handling rules; do not place account data or file contents in broad support channels.

Job ID, job name, step name, PROCSTEP, and execution time
Program name and the source/load promotion level, if available
The COBOL SELECT statement and FILE STATUS field for the failing file
The DD name or environment variable resolved for that SELECT assignment
JES allocation messages and the resolved dataset name (mask sensitive values)
Whether the dataset is cataloged, available, or intentionally absent
GDG base name plus resolved absolute generation, when a GDG is involved
Upstream transfer/completion evidence and the expected business cycle
Completed steps, output datasets, database work, and external notifications

The last line matters. File status explains why the program did not open a file. It does not answer whether another step ran before the failure or whether the batch cycle is safe to repeat.

Diagnosis path: follow the name from COBOL to allocation

The quickest safe path is to trace the file identifier through each layer. Do not begin by assuming that the dataset in a ticket is the one the program attempted to open.

FILE STATUS 35 at OPEN
  |
  +-- Which COBOL SELECT file-name failed?
  |      +-- Confirm the DDNAME/assignment used by this runtime
  |
  +-- Did the executing step allocate that DDNAME?
  |      +-- no: inspect PROC, INCLUDE, overrides, and step JCL
  |      +-- yes: record the resolved DSN and DISP
  |
  +-- Is the resolved DSN the intended cycle's file?
  |      +-- no: correct the parameter or control path with owner approval
  |      +-- yes: check catalog, generation, availability, and access evidence
  |
  +-- Was the input expected to be optional or empty?
         +-- no: resolve upstream delivery/control failure before rerun
         +-- yes: use the approved empty-input design, not an invented file

### 1. Check the program contract, not just the file name

The COBOL SELECT entry tells the reviewer what the program expects the external file to be called. A simplified pattern is:

       SELECT INPUT-PAYMENTS ASSIGN TO PAYIN
           ORGANIZATION IS SEQUENTIAL
           FILE STATUS IS WS-PAYIN-STATUS.

FD INPUT-PAYMENTS.
01 PAYMENT-RECORD PIC X(180).

OPEN INPUT INPUT-PAYMENTS
IF WS-PAYIN-STATUS NOT = '00'
DISPLAY 'PAYIN OPEN STATUS=' WS-PAYIN-STATUS
MOVE 12 TO RETURN-CODE
END-IF
```

Here, PAYIN is an external assignment name, usually matched by a JCL DD statement such as //PAYIN DD .... It is not proof that the runtime will use a dataset named PAYIN. Some environments use compiler options, run-time configuration, or site conventions that alter assignment behavior. Review the active program and its deployment controls rather than copying an assignment rule from another application.

A useful code review question is whether the program reports the logical file name and status without exposing records. The program should stop before processing when a required input cannot be opened. It should not continue with an uncleared record area or convert the condition into a misleading “no payments received” message.

### 2. Inspect the JCL that actually executed

Locate PAYIN in the submitted job, expanded procedure, and any relevant override. Record the resolved DSN, DISP, and GDG notation. An in-stream override can quietly replace a PROC default, while a scheduler variable can change the date qualifier before the job reaches JES.

//PAYEDIT  EXEC PGM=PAYEDIT
//PAYIN    DD  DISP=SHR,
//             DSN=ACME.TEST.PAYMENTS.INBOUND(+1)
//SYSOUT   DD  SYSOUT=*

This sample is deliberately incomplete. A GDG relative reference such as (+1) or (0) must be interpreted in the context of the step and job flow; do not assume it identifies the expected absolute generation from its notation alone. The JES messages and allocation output are stronger evidence of what was selected at run time.

If PAYIN is absent, determine whether the missing DD is a JCL assembly error, an override that replaced a full DD statement, or a PROC interface mismatch. Changing the COBOL assignment to match an accidental DD name treats the symptom in the wrong layer. The job or procedure owner should correct the contract deliberately.

### 3. Distinguish absence from an upstream business problem

When the DD resolves to the expected dataset name, the next question is why the dataset was not usable. Check approved catalog and operations evidence for conditions such as a missing generation, a delayed transfer, an expired or migrated dataset, or access restrictions. Do not issue catalog, recall, delete, or allocation commands merely to see whether they help.

An expected empty business feed is different from an absent file. If the interface agreement says a zero-record file is delivered every day, the upstream process should create that file and its control information. If no feed is expected on a holiday, the application should have an approved control path that explicitly skips or handles that cycle. Creating a substitute empty dataset during support can make reconciliation appear clean while concealing a missed delivery.

Safe correction choices

| Confirmed finding | Safer correction direction | Do not assume |
|---|---|---|
| Required DD is missing from the executed step | Correct the JCL/PROC invocation through normal change control | The program's SELECT name is wrong |
| DD resolves to the wrong date or GDG generation | Correct the parameter, scheduler variable, or override at its owning layer | A relative generation means the intended file |
| Expected inbound file was never delivered | Engage the interface owner and validate cycle controls | An empty file permits normal processing |
| Dataset exists but access/availability evidence is abnormal | Use the responsible storage/security/operations path | Recreating or recataloging it is safe |
| File is truly optional by approved design | Use the documented optional-input branch and test it | Status 35 is equivalent to zero records |

A corrective change should retain the original evidence and name the owner of the controlling layer. If an upstream team retransmits a file, verify the file's cycle identifier, record layout version, count, and any supplied control total before it becomes input to a new run.

Before rerun: support checklist

Practical takeaway

Treat COBOL file status 35 as a request to trace an external-file contract, not as permission to manufacture input or edit the program. Follow the logical assignment through the executed JCL to the resolved dataset, establish why that path was unavailable, and assess restart effects before any rerun. That evidence-first approach fixes the owning layer and protects the batch cycle from a plausible but unsafe shortcut.

← Back to all articles