A different solution to your problem would be to select against
qsys2/syscolumns. Lots of good info there. May also get you out of ODBC
hell.
SQL column names:
Select column_name
from qsys2/syscolumns
where table_name = 'SYSCOLUMNS'
and table_schema = 'QSYS2'
order by ordinal_position;
Native (10 char) names:
Select system_column_name
From qsys2/syscolumns
Where system_table_name = 'SYSCOLUMNS'
And system_table_schema = 'QSYS2'
Order by ordinal_position;
HTH,
Loyd
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Cyndi Bradberry
Sent: Tuesday, August 25, 2009 10:17 AM
To: WEB400@xxxxxxxxxxxx; MIDRANGE-L@xxxxxxxxxxxx
Subject: [WEB400] Question posted to both Web400 & Midrange
Hi, I figured out part of my problem with the php script. The files I
was trying to access are too Old !
The script from "The IBM I Programmer's Guide to PHP", page 246 simply
retrieves the library/file name and then lists the names of the columns
(fields).
...snip...
Some files however, would not share their column information. I wouldn't
even get the name of the file or the library ! In talking to another
programmer, he said that some files could not be accessed via ODBC. When
I tried the files he had problems with the same thing happened.
HOWEVER, if you copy the file to another library or even the same
library using a different name, it suddenly becomes visible to the php
script and to odbc. CPY and CRTDUPOBJ both seem to work, not rgzpfm or
chgpf. The files that are difficult are older files on our system,
generally created before 2000.
Is this something anyone else has come across ? Is there a PTF I should
be looking for ? We are on an 810 at V5R4.
As an Amazon Associate we earn from qualifying purchases.