i5_data_area_write error

General discussion on Zend Core for IBM System i
Post Reply
mlavinder
Posts: 87
Joined: Fri Apr 10, 2009 3:12 pm

i5_data_area_write error

Post by mlavinder » Tue Dec 08, 2009 9:41 pm

Updated to Zend Core 2.6.6 and now all of a sudden we are having an issue updating a data area. The function i5_data_area_write fails with the following message: CPF0006 Errors occurred in command. That tells me nothing. Any ideas on what to do? So far, no other commands seem to be failing, but this has me a little nervous.

Update (12/8/2009 4:33 EST):
Gave up trying to fix issue and wrote a CL program to set data area and called it from PHP. Still would like to know why this function started failing all of a sudden.

scottgcampbell
Posts: 187
Joined: Wed Apr 22, 2009 2:29 pm
Location: Edmonton, AB, Canada

Re: i5_data_area_write error

Post by scottgcampbell » Wed Dec 09, 2009 4:15 am

Post your code. That's the only way that anyone will have a chance of helping you.

Scott

mlavinder
Posts: 87
Joined: Fri Apr 10, 2009 3:12 pm

Re: i5_data_area_write error

Post by mlavinder » Wed Dec 09, 2009 3:14 pm

I believe I have figured this out. The CLI script in question processes a file and returns data to an RPG program using a data area. When I was developing this application originally, I had problems with i5_data_area_write working unless the value parameter had quotes around it. If I needed to set the data area to 100, I had to pass '100' into the function for it to work correctly. This most likely only applied to data areas that were character fields. I thought it was odd, but I dealt with it and moved on. It appears that after applying the update yesterday, i5_data_area_write behavior has changed. The quotes are not required anymore and using quotes actually causes the function to fail with an error.

Can anyone from Zend or Aura confirm that this explanation makes sense? Also, is there are any cases where the value parameter of i5_data_area_write still need to be wrapped in quotes?

segan1
Posts: 7
Joined: Thu Dec 10, 2009 9:22 pm

Re: i5_data_area_write error

Post by segan1 » Thu Dec 10, 2009 9:30 pm

We are having this same problem, exactly as described, after updating to 2.6.6. The value parameter is now automatically being wrapped in quotes where it wasn't before.

We are currently looking for a solution, but I am thinking we will have to update all of our php scripts that call i5_data_area_write() to stop wrapping the value parameter in quotes. We are still researching a quick fix though, as we have quite a few scripts that would need to be changed.

mlavinder
Posts: 87
Joined: Fri Apr 10, 2009 3:12 pm

Re: i5_data_area_write error

Post by mlavinder » Thu Dec 10, 2009 10:04 pm

You should be able to rollback the hotfix to your previous version.

GO ZENDCORE/ZCMENU
Option 2
Option 7

That was Zend's suggestion to me. They are looking into the issue.

segan1
Posts: 7
Joined: Thu Dec 10, 2009 9:22 pm

Re: i5_data_area_write error

Post by segan1 » Fri Dec 11, 2009 3:48 pm

Thanks. We will roll back if we have to.

Unfortunately, we installed the latest update in order to fix an issue with db2_connect(). According to the PHP manual, the i5_libl option isn't supported until ibm_db2 version 1.8.0. The update did give us the use of i5_libl, but broke the scripts that use i5 data areas. Hopefully, we can rollback just the single component that updated the i5 data area functions.

If not, then we already have all of our calls to i5_data_area_write() encapsulated in a class, and we will probably just update the class to account for the current situation.

Thanks again.

Post Reply