PERFORM 900-BUILD-TMP-FILE-NAME. MOVE WS-TMP-FILE TO WS-WORK-FILENAME.
OPEN OUTPUT WORK-FILE.
Did you ever figure this out? I am getting same error with same code.
I figured it out myself. After doing the bldsh, I no longer get the 09 009 on the work file open!
You have to do the bldsh to bind the workdef.
Usage: To build a COBOL program shell. Syntax: bldsh [-FT123AO] ProductLine SystemCode ProgramCode F - Force fListCols TRUE. T - enable READY TRACE. u - Build user exit program shell. 1 - Use 'c' bldrptpage Calls. 2 - [Default] Use 'COBOL' BLDRPTPAGE calls. Format Columns = 132 3 - Use 'COBOL' BLDRPTPAGE calls. Format Columns = 66 A - Build COBOL program shell in Stage Directory. O - Override Stage Compilation, compile runtime objects directly to Production