Device *REQUESTER not found while opening file

105 pts.
AS/400 jobs
AS/400 Subfiles
Trying to use a Workstn sfile in Batch.

If program is called the Sfile is loaded and allows user to update and then print the information in the subfile.

If program is called from batch I want to load the subfile (without displaying) and then print it. 

Can this be done or will I have to set up a work file to be used from batch.

Software/Hardware used:

Answer Wiki

Thanks. We'll let you know when a new response is added.

subfiles cannot be caused from a submitted (batch) job. they are for interactive jobs only.

if you want to replicate this, you need to set up an array with enough elements to hold the “subfile” records and then print the array elements.


Discuss This Question: 7  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • philpl1jb
    or use a work file as you proposed.
    54,090 pointsBadges:
  • TomLiotta
    Since there is no "*REQUESTER" device for a batch job, there is no possibility of opening a display file on that device. A batch job can only open a display file if it 'acquires' a device for the display file to communicate with. You batch program will have to find a display device that is not actively being used. You might use the List Configuration Descriptions (QDCLCFGD) API to list display devices with a status "*GE *VARYON". You could then loop through the list to retrieve the actual status with the Retrieve Configuration Status (QDCRCFGS) API. The actual status that you want will be (50) which corresponds to the "SIGNON DISPLAY" status that you see with the WRKCFGSTS command. When you find a device that you can use, you can 'acquire' it. You might use the ACQ op-code in RPG. Or you might use OVRDSPF mydspf DEV(&DEV) to override to the device in CL. Once that succeeds, you should be able to open your display file. Of course, if the device is connected to someone's desktop emulator session, the user will see the signon screen disappear and be replaced by your display file. If you issue any input statements, you might get input from anything that user types. Or the user might press <SysReq-2> and cancel the process. Overall, unless you can be very sure, you are probably better off using a disk file or some other method such as an array. You could store more in an array and be far more efficient than you ever could with a subfile. And a disk file has advantages over an array for many uses. Tom
    125,585 pointsBadges:
  • Splat
    Data queues look like an alternative to your use of subfiles.
    12,915 pointsBadges:
  • TomLiotta
    Data queues look like an alternative to your use of subfiles. A data queue might work well, as might a user queue, a message queue, a user index, a user space or a few other possibilities. If the program was an OPM HLL, the program associated space might even be directly used. Tom
    125,585 pointsBadges:
  • Samsara
    Tom (Old aquintence COMMON circa mid 90's security forum) About the SFL in batch. We have an old RPGIII program that uses the SFL as dynamic storage in batch, (never extfmt etc only write to SFL, Chain to SFL) but converting to ILE it blows up at runtime. What compile option am I missing? John Carr
    10 pointsBadges:
  • TomLiotta
    Hi, John (security forum -- what a group experience that was!), What compile option am I missing? Can you supply basic output from:
    DSPJOB OPTION(*OPNF)  ...and...
    ...from a running example of the RPG III version during a time when subfile activity is being done. And, of course, blows up at runtime implies an error message. What MsgID? Tom
    125,585 pointsBadges:
  • ankapanaidu will do any requested work which is possible to me for $5 | Steffanini
    [...] Device *REQUESTER not found while opening file [...]
    0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: