|
It almost sounds to me like the program is trying to open the printer file, not your code. Is the TICKET file specified as USROPN? Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 Tel: 709-576-8132 Email: rpower@xxxxxxxxxx Website: http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill Justin Houchin <justinh@xxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 06/16/2004 01:54 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: I/O operation was applied to closed file... Posting the code would not be a good idea, this is an ERP system that I have integrated a modification into. Has anyone seen a problem like this before? RPower@xxxxxxxxxx wrote: > Any way to see the code? Would you be able to paste it here? > > Ron Power > Programmer > Information Services > City Of St. John's, NL > P.O. Box 908 > St. John's, NL > A1C 5M2 > Tel: 709-576-8132 > Email: rpower@xxxxxxxxxx > Website: http://www.stjohns.ca/ > ___________________________________________________________________________ > Success is going from failure to failure without a loss of enthusiasm. - > Sir Winston Churchill > > > > > Justin Houchin <justinh@xxxxxxxxxxxxx> > Sent by: rpg400-l-bounces@xxxxxxxxxxxx > 06/16/2004 01:27 PM > Please respond to > RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> > > > To > RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> > cc > > Subject > Re: I/O operation was applied to closed file... > > > > > > > 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. >> > > -- > 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 OutBound email has been scanned for Viruses > -- > 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 OutBound email has been scanned for Viruses
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.