Post #1
0 votes
Jordan
Reputation
12
Posts: 32
Joined: May 2, 2026, 11:10 AM
Posted: Aug 3, 2026, 10:36 AM
I can READ. Writing feels scarier. OPEN OUTPUT then WRITE? What goes wrong if the DD is missing?
I can READ. Writing feels scarier. OPEN OUTPUT then WRITE? What goes wrong if the DD is missing?
OPEN OUTPUT OUT-FILE
MOVE stuff TO out-record
WRITE out-record
...
CLOSE OUT-FILE
Missing DD → bad file status (35/96 depending). Always check status after OPEN and WRITE.
OPEN OUTPUT on an existing dataset can wipe it depending on DISP. Know what your JCL is doing.
For a new file use DISP=(NEW,CATLG,DELETE) with SPACE and DCB that match the FD.
You must be signed in to reply to this thread