× 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.




Use the external indicator keyword on your F-spec.  Use an external indicator, 
U1 - U8, and make sure it's off when the program runs.  If you ever want to run 
it interactively just turn on the switch prior to the call.

Used in this context the external switch tells the program to only open the 
file if the switch is turned on.  If the switch is off the file is not opened 
and any file operations are ignored during processing.  No other code changes 
are necessary.

In RPGIV syntax, you can just use the keyword USROPN on the F-spec.

I have written a batch program that allocated a terminal while running in batch. It was some short program, a long long time ago, but it worked. The gotcha I think was that the display file has to be something like either reserved for the same subsystem as the corresponding batch job, or, it had to be "up for grabs" by the subsystem, something like that. Which also means that it won't have the sign-on screen.

On the other hand, I made a change in one interactive program to run in batch programs, and to get it done quickly, just put the USROPN keyword on the display file, and then skipped over all the EXFMT and WRITE and READ opcodes. That includes the subfile processing, by the way, which may complicate things for quick adaptation.

However, by all means, if at all minimally possible, follow the general admonitions here and yank out the display file processing for this one.

-- Alan














As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.