10 pts.
 Can a Display File be used in an RPGLE program running in batch?
I would like to convert an interactive RPGLE program to run in batch mode and would like to keep from replacing the display file in the batch version. Like the interactive version, the batch version would have to write/update and read each of the 3 subfiles in the display file, but would use no WRITE’s or EXFMT’s to display data in the display file. Currently the batch program encounters the following error when opening the display file: "Error message CPF4103 appeared during OPEN for file NEW#BGWFT." We are on V5R4. Thank you, Tim

Software/Hardware used:
iSeries V5R4
ASKED: September 1, 2010  9:01 PM
UPDATED: September 2, 2010  12:54 PM

Answer Wiki:
Although display files are easy enough to use in batch programming, you can't open the file or put data into one until you <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books_web/c0925086643.htm#HDRZZACQ">ACQ (Acquire)</a> a device. The job retains its batch job type, but there is a real device that is in use. Technically, this may also be done with virtual display devices, using perhaps sockets-to-telnet or the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/vt1a.htm">Virtual Terminal APIs</a>, but I really doubt that you want to go that route. You'd be far better off replacing the subfiles with simple user indexes or work files in QTEMP. Tom
Last Wiki Answer Submitted:  September 2, 2010  1:18 am  by  TomLiotta   110,115 pts.
All Answer Wiki Contributors:  TomLiotta   110,115 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _