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



I tried using the FEOD command, my printer file now will not ouput any
spool files.  I am still puzzled that the program will execute one time
correctly, but when you feed it another work order number, it never
makes it past the *ENTRY  PLIST command before sending the message to
QSYSOPR, it has even hit the code to OPEN or even write to the printer
file.  The program does just use the RETRN command and does not seton
the LR indicator.  And there is no *INZSR subroutine.  Any ideas?

Thanks,
Justin

CWilt@xxxxxxxxxxxx wrote:

> It might.  Assuming the problem has something to do with an error in
> where/how the file is being opened and/or closed.
> 
> If you use FEOD you can/must get rid of the open and closes along with the
> USROPN if you are using it.
> 
> Charles
> 
> 
> 
>>-----Original Message-----
>>From: Justin Houchin [mailto:justinh@xxxxxxxxxxxxx]
>>Sent: Monday, June 14, 2004 10:29 AM
>>To: RPG programming on the AS400 / iSeries
>>Subject: Re: I/O operation was applied to closed file...
>>
>>
>>Is this going to fix my problem?
>>
>>CWilt@xxxxxxxxxxxx wrote:
>>
>>
>>>Justin,
>>>
>>>Why close the file?
>>>
>>>Try using the FEOD op-code to end the current printer file 
>>
>>and start a new
>>
>>>one.
>>>
>>>It will be easier and perform better.
>>>
>>>HTH,
>>>Charles
>>>
>>>
>>>
>>>>-----Original Message-----
>>>>From: Justin Houchin [mailto:justinh@xxxxxxxxxxxxx]
>>>>Sent: Monday, June 14, 2004 8:59 AM
>>>>To: rpg400-l@xxxxxxxxxxxx
>>>>Subject: I/O operation was applied to closed file...
>>>>
>>>>
>>>>Hi Everyone,
>>>>    I have a program that writes to two printer files.  The 
>>>>first file 
>>>>QSYSPRT gets opened, written, and closed.  The second printer file 
>>>>TICKET, gets opened, written, and closed after the QSYSPRT 
>>
>>file.  The 
>>
>>>>program this code runs in is a asynchronous job that reads 
>>
>>a message 
>>
>>>>queue, so the job never ends.  History: The program will 
>>>>receive a work 
>>>>order number from the message queue and print some paperwork using 
>>>>QSYSPRT and TICKET printer files. The problem: When I first 
>>
>>start the 
>>
>>>>job and send a work order number to the message queue, the 
>>>>program picks 
>>>>up the number and prints the paperwork perfectly, if I send 
>>>>another work 
>>>>order number to the message queue the program sends a 
>>
>>message to the 
>>
>>>>QSYSOPR message queue that the program tried to write to a 
>>>>closed file 
>>>>TICKET.  I have double checked the code and I feel the 
>>
>>TICKET file is 
>>
>>>>being closed after the first work order is printed.  I 
>>>>created a debug 
>>>>breakpoint at the start of the program.  The program breaks at the 
>>>>beginning of the program when the first work order is read. 
>>
>> But when 
>>
>>>>the second work order is read, the program does not break and 
>>>>a message 
>>>>is sent to QSYSOPR.  I am stumped. Any help would highly be 
>>>>appreciated.
>>>>
>>>>Justin
>>>>--
>>>>This is the RPG programming on the AS400 / iSeries (RPG400-L) 
>>>>mailing list
>>>>To post a message email: RPG400-L@xxxxxxxxxxxx
>>>>To subscribe, unsubscribe, or change list options,
>>>>visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
>>>>or email: RPG400-L-request@xxxxxxxxxxxx
>>>>Before posting, please take a moment to review the archives
>>>>at http://archive.midrange.com/rpg400-l.
>>>>
>>>
>>>--
>>>This is the RPG programming on the AS400 / iSeries 
>>
>>(RPG400-L) mailing list
>>
>>>To post a message email: RPG400-L@xxxxxxxxxxxx
>>>To subscribe, unsubscribe, or change list options,
>>>visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
>>>or email: RPG400-L-request@xxxxxxxxxxxx
>>>Before posting, please take a moment to review the archives
>>>at http://archive.midrange.com/rpg400-l.
>>>
>>
>>--
>>This is the RPG programming on the AS400 / iSeries (RPG400-L) 
>>mailing list
>>To post a message email: RPG400-L@xxxxxxxxxxxx
>>To subscribe, unsubscribe, or change list options,
>>visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
>>or email: RPG400-L-request@xxxxxxxxxxxx
>>Before posting, please take a moment to review the archives
>>at http://archive.midrange.com/rpg400-l.
>>
> 
> --
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.