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



Make the file USROPN and user MONITOR when you try to open the file. If you can't open the file, bail out of the program or do whatever else you would do.


Mark Walter
Business to Business Data Integration Specialist
Certified IBM System i Specialist
Paragon Consulting Services, Inc
mwalter@xxxxxxxxxxxxxxx
717-764-7909 ext. 126


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Porterfield, Sean
Sent: Tuesday, June 02, 2009 9:41 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: CPF4128 on implicit open

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

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.