Reputation: 1
I'm a php developer trying to learn about the IBM i.
Is there a way to connect to the IBM i to list/view objects/members without using an odbc connection/sql?
I've considered using ftp, but seems too hacky for what I'm doing.
Any input is helpful.
Thanks!
Upvotes: 0
Views: 408
Reputation: 1259
No mention of what FTP would do for you, but per list/view objects/members, I suppose the implication is the ability to perform a dir or ls? If so, then just map a network drive, and use whatever is a preferred directory navigation tool.
Upvotes: 0
Reputation: 23783
without ODBC connection/sql
Says to me you're looking for a "native" interface to the OS & DB.
In that case, you have two choices
Option 2 is available in two flavors:
Take a look at the Connecting to your system section of the IBM Infocenter.
Upvotes: 2
Reputation: 523
Paul Bastide's comment is correct with using http://php.net/manual/en/function.db2-connect.php. By combining it with the system catalogs you can get any file/table and member related information. For example to get all the source members in a source file:
SELECT sys_mname
FROM syspartitionstat
WHERE sys_tname = 'QRPGLESRC'
AND sys_dname = 'SOURCELIB'
For none database related objects you will have to wrap a system API in a SQL Stored Procedure or get an AS400 developer to write you a SOAP/REST service to get the information you need.
Upvotes: 3