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



You can make the file USROPN then either Monitor the open of the file or
use Open(e) then check for %status. Not sure which status code you want.




--

Michael Schutte
Admin Professional



Try Bob Evans GRILLING SAUSAGE! This summerâs hottest destination is your
own backyard with Bob Evans Brats and Italian Sausage! For tasty recipes
using Bob Evans grilling sausage, visit http://www.BobEvans.com/Recipes



rpg400-l-bounces@xxxxxxxxxxxx wrote on 06/02/2009 09:41:04 AM:

CPF4128 Escape
Message . . . . : Not able to allocate objects needed for file

I have a program that runs every weeknight. Once a month, it will
crash because the monthend process does ALCOBJ *EXCL on one of the
files my program reads.

If I were in CL, I would likely do an appropriate ALCOBJ and MONMSG,
then do "something" (probably sleep for 5 minutes then try again) if
the file is allocated (i.e. not run my program that uses the file!)

My driver program is RPG, though.

I'm thinking I probably need to use CALLP(E) or MONITOR, probably in
the driver program. It seems to me the program actually attempting
the file open is not the right place to check for the error. I see
CALLP(E) sets %Status, and 00202 says Called program or procedure
failed (and a couple other statuses same but with halt indicators
on). Can I specifically see that the error is the one I'm looking
for and not something else?

Am I on the right track or is there an ALCOBJ equivalent in RPG? Or
perhaps I need to use the trick of getting messages from the joblog,
but that seems messier.


Sean Porterfield
Sr. Systems and Network Engineer
Beacon Roofing Supply
919-739-8126



This email is confidential, intended only for the named recipient(s)
above and may contain information that is privileged. If you have
received this message in error or are not the named recipient(s),
please notify the sender immediately and delete this email message
from your computer as any and all unauthorized distribution or use
of this message is strictly prohibited. Thank you.
--
This is the RPG programming on the IBM i / System i (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.