21.02.2013 Views

System i: Programming i5/OS PASE - IBM

System i: Programming i5/OS PASE - IBM

System i: Programming i5/OS PASE - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Related tasks<br />

“Customizing <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> programs to use <strong>i5</strong>/<strong>OS</strong> functions” on page 17<br />

If you want your AIX application to take advantage of <strong>i5</strong>/<strong>OS</strong> functions that are not directly supported by<br />

system-supplied <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> shared libraries, you need to perform some additional steps to prepare your<br />

application.<br />

Communications<br />

<strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> is generally compatible with AIX and Linux in sockets communications.<br />

<strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> supports the same syntax as AIX for sockets communications. This cannot match other<br />

operating systems, such as Linux, in every detail.<br />

<strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> sockets support is comparable to the AIX implementation of sockets, but <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> uses<br />

the <strong>i5</strong>/<strong>OS</strong> implementation of sockets (instead of the AIX kernel implementation of sockets), and this<br />

forces some minor differences from AIX behavior.<br />

The <strong>i5</strong>/<strong>OS</strong> implementation of sockets supports both UNIX 98 and Berkeley Software Distributions (BSD)<br />

sockets. In most cases, <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> resolves differences in these styles by adopting the behavior of the<br />

AIX implementation.<br />

In addition, the user profile for a running application must have the *I<strong>OS</strong>YSCFG special authority to<br />

specify the level parameter as IPPROTO_IP and the option_value parameter as IP_OPTIONS on socket<br />

APIs.<br />

Related information<br />

Socket programming<br />

Berkeley Software Distributions compatibility<br />

UNIX 98 compatibility<br />

Database<br />

<strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> supports the DB2 for <strong>i5</strong>/<strong>OS</strong> call level interfaces (CLIs). DB2 CLIs on AIX and <strong>i5</strong>/<strong>OS</strong> are not<br />

exact subsets of each other, so there are minor differences in a few interfaces. Some APIs in one<br />

implementation might not exist in another.<br />

Because of this, you should consider the following points:<br />

v Code can be generated, but not tested, on AIX itself. Instead, you must test your code across platforms<br />

within <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong>.<br />

v You must compile with the <strong>i5</strong>/<strong>OS</strong> version of header file sqlcli.h. A program compiled using the AIX<br />

version of this header file will not run in <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong>.<br />

<strong>i5</strong>/<strong>OS</strong> is an EBCDIC-encoded system by default, while AIX is based on ASCII. This difference often<br />

requires data conversions between the <strong>i5</strong>/<strong>OS</strong> database (DB2 for <strong>i5</strong>/<strong>OS</strong>) and the <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> application.<br />

In the <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> implementation of DB2 CLIs, <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> system-provided library routines<br />

automatically perform data conversions from ASCII to Extended Binary Coded Decimal Interchange Code<br />

(EBCDIC) and back for character data. The conversions are made based on the tagged CCSID of the data<br />

being accessed and the ASCII CCSID under which the <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> program is running. If the database is<br />

tagged, or if it is tagged with a CCSID of 65535, no automatic conversion takes place. It is left to the<br />

application to understand the encoding format of the data and to do any necessary conversion.<br />

Working with CCSIDs<br />

When you use the Qp2RunPase() API, you must explicitly specify the <strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> CCSID.<br />

<strong>i5</strong>/<strong>OS</strong> <strong>PASE</strong> 41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!