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



Can this be done?  We have a program someone modified to not ever display a
screen in the program.  They still update the fields and update the subfiles
but they changed it to never do a exfmt so that they could run it without
user intervention.

But, the operating system doesn't know that you're never going to display a screen. You've opened a display file -- a file that's designed for screen i/o -- so it makes sure that there's a terminal allocated to the job.

Now we need to be able to run this same program in batch. But it says: CPF4103 Device *REQUESTER not found while opening file xxxxxx. Is there a way around this? Can I make the program think it's somehow running on a interactive display?

Sure. Even though the program's in batch, you can tell the display file to access a different terminal. For example, you could do:

  OVRDSPF FILE(myDspf) DEV(DSP01)

And DSP01 would handle the i/o for the display file. Of course, that terminal would have to be turned on, but not in use, for this to work.

Another alternative is to use TNAPI by Albert York. This is a tool that creates a telnet session that writes it's output to an RPG program. You can then control the session by sending input to the telnet session programatically, etc.

In that case, the batch job will be creating a separate interactive job to run the program.

HOWEVER, the correct fix is to eliminate the display file completely, since your program isn't using it anyway. It's trivial to replace subfile logic with a multiple-occurrence data structure.

That, in the long run, will be the best fix. It'll run faster, there'll be less that can go wrong, and the code will be much more intuitive for the next person who has to figure it out. Really, it's the way to go. It's just silly to use a display file when you have no interest in communicating with a display! :)

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.