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



Seriously, I spend I don't know how much time trying to look into this myself, but after I hit send, I happen upon a website that fills me in.
I added "For read only" to the SQL statement and now the Open Cursor works in debug mode with UPDPROD(*NO).

Thanks,
Kurt Anderson

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Kurt Anderson
Sent: Wednesday, April 06, 2011 5:05 PM
To: 'Midrange Systems Technical Discussion' (midrange-l@xxxxxxxxxxxx)
Subject: SQL - opening a cursor over a production file while UpdProd(*No)

I have a Declare statement with the SQL Statement "Select * from CalTypTIDP." However, when I issue the Open Cursor over a production file while in debug mode, I get an error:
CPF4203 - Member CALTYPTIDP cannot be opened while UPDPROD(*NO).

What's happening is we have a file encapsulated service program that will "do everything" to a file (read, write, update, delete, etc). When running with native I/O, the service program would not open the file if in debug mode with UPDPROD(*NO) even if the caller was only ever going to read the file. What I'm shooting for is to let the service program open, but to monitor for any failed update/write/delete/etc I/O functions. I was not expecting an open cursor to fail when "for update" wasn't specified on the declared statement. The reason why I was looking for this type of functionality is that every new file encapsulated service program is requiring the programmer to copy data to their own library for testing when we've been using the live data for testing all along - which results in the data not always getting copied for a test. And I don't want to exacerbate the issue with more and more service programs that won't open a file in debug mode.

Can anyone offer any suggestions?

Thanks,
Kurt Anderson
Sr. Programmer/Analyst
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-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.