× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



 >> Apparently, the printer file was closed, even though the program didn't
explicitly do it.

I would guess that the COBOL program is the root of the run unit - i.e. the
first COBOL program in the job.  Because of this the COBOL program will do a
STOP RUN when you return to the CL.  Hence the printer file is closed.

There are two ways to cure this.  In OPM COBOL the only way to cure it is to
have a COBOL "stub" _before_ the CL which does nothing but call the CL
program because your COBOL program is no longer the root of the run unit it
will no longer STOP RUN and close the file until you tell it to.

This approach will also work for ILE COBOL, but ILE offers an additional
option.  You can use "exit program and continue run unit" to return to the
CL - as the syntax implies, the run unit will be preserved even under
circumstances when the run unit would normally end.


Jon Paris



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.