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



Hi,

There is an added WriteProtocolFile() which is not in the prior logic.
The WriteProtocolFile() is a procedure, that writes errors into a physical
file I normally catch via monitor including the procedure name where the
error occured and the time when the error occured. The error got correctly
written to the file.
I stepped through the procedure with the debugger and the file got not open,
but the WriteProtocolFile() got executed correctly and the write was
executed without error after.

The second version was one of the trials I did to get the program run and
the first (and last) version that run.
I'm sure I also tried to monitor the write or added an extention (E) to the
write.
... And if you have already wasted 2 days and additionally have an impatient
client who calls every 5 minutes to ask how it looks like ...

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von CRPence
Gesendet: Thursday, July 10, 2008 21:12
An: rpg400-l@xxxxxxxxxxxx
Betreff: Re: MCH3402 - and Built-In-Function %OPEN


BirgittaHauser wrote:

<<SNIP>>

If Not %Open(MyPrtF);
Open MyPrtF;
EndIf;
Write MyFormat;

I checked it by debugging my service program. The Open-Statement gets
not executed, but the WRITE fails.

Then I tried the following:
Always open the printer file and check %Error and %Status:

Open(E) MyPrtF;
If Not %Error or (%Error and %Status = 1215);
Close(E) MyPrtF;
OpenPrtFProcedure();
Else;
WriteProtocolFile(SDSMsgTxt)
EndIf;
Write MyPrtF;

Now the procedure gets executed, but instead of closing and reopening
the printerfile the ELSE-Branch is executed and I still get MCH3402,
but the write no longer fails. IMHO it seems to be a bug.

BTW now the client complains about the severity 40 error message of
MCH3402 in the joblog and I must remove it. (No idea how to
realize.)
<<SNIP>>

Not to contradict the appropriateness of avoiding the condition ever
arising, by proper use of ILE. Merely to offer a circumvention:

The logic in the first case can be modified to monitor for the
failure on the write, such that if it is the mch3402, then the file can
[safely] assumed to have been closed outside of the service program [by
rclrsc].

If Not %Open(MyPrtF); //
Open MyPrtF; //
EndIf;
Write MyFormat; // should fail if reclaim closed the prtf
monitor
call qmhrcvpm // ?? of exception msg to determine if mch3402
If mch3402 then do; // _assume_ origin of rclrsc closed file
call qmhrcvpm; // remove the escape message mch3402 by key
open myprtf;
write myformat;
end;
endmon

I do not understand the failure in the logic of the second case. Are
you suggesting the write gets the mch3402 and works? Not likely. There
is an added WriteProtocolFile() which is not in the prior logic. Is it
that function which gets the Write failure? If so is that a separate
procedure which is similarly not yet recoded to handle the same issue
where the file was /closed by reclaim resources/; i.e. does not monitor
for the failure on the first write after the open within the procedure?

Regards, Chuck

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.