Has IBM lost control of its CCSID's?

Having just spent a whole day trying to get to the bottom of a problem with the PHP/HTTP servers on my system I decided to look at just how certain activities action the CCSID of a file. I was surprised at just how many CCSID’s used in the file generation on the IBM ‘i’…

The tests were carried out on the i515 which is running V6R1, I have just finished installing PHP and setting up the ZendFramework after many hours of debug trying to find out why even after managing to get the PHP pages to work, I had more problems when I started to build the Framwork pages. I now have a fully function PHP installation with the Framework in play but not sure why it started working really! So I decided to do a few tests to understand why the pages would not work out of the box, after all they worked before I was just re implementing them.

First test I did was to create a brand new WebServer using the IBM HTTPAdmin process. It creates the directory structure and an initial index.html which is where all of the problems I have seen before originated from. This resulted in a CCSID of 13488 for the index.html, changing the extension to .php and adding a few lines of code to display the php info resulted in no php information being displayed but when looking at the source generated I found that Mozilla would show the text with no problems displayed but IE showed a space between every character (actually it was a hex code which was not interpreted until I copied it to an editor which allowed me to see them). I changed the CCSID to 1252 but it still had the same result? Eventually I deleted the entire content and rewrote it back which resulted in the page being displayed with all of the PHP info. This told me that the CCSID of the text in the file was different to the CCSID of the file object?

Next I decided to try the IBM WDS RSE IDE which should should have been consistent with the HTTPAdmin process, or so I thought? This resulted in a page being created with a CCSID of 850? Again the same rules about changing it existed as previously.

Navigator for i (IBM Systems Navigator) resulted in a CCSID of 1252, I simply dragged the file from my desktop to the IFS. The file had been created on the desktop using Notepad previously. The page displayed correctly in PHP and normal HTTP html form.

As I expect to use Zend Studio I created the next file directly through the file manager in Studio. It resulted in a CCSID of 819 for the file. After some investigation I found out that because I was using SSHD it was going through the PASE environment, checking the PASE Environment shows a CCSID of 819 so at least that ties up. Well not really but it made the most sense so far.

I wanted to see what would happen if I copied source files from the QIBM libraries to the IFS, they result in a CCSID of 37, checking the QCCSID value which is set to 37 this also seemed to make some kind of sense?

Finally I thought I would try to use the i Access send file to host! That was a bad mistake! Below is the resulting screen which shows the command APVAFILE PUT WWW TESTSERVER/HTDOCS/DSKUTIL.C TEXT ASCII CRLF SRC LRECL 80 (thats part of it) being entered in the 5250 session! I think this is a bug which I will pass into IBM to see why it would do this? It did not stop me from entering the information to send it to the IFS?

Strange behaviour?

Strange behaviour?

So as you can see IBM or its vendors have no consistency when it comes to the CCSID they generate the files at in the IFS! If anyone has any insight as to why this is happening and how I can add the consistency back it would be appreciated.

Chris…