IBM PASE for I
Total Page:16
File Type:pdf, Size:1020Kb
IBM i 7.3 Programming IBM PASE for i IBM Note Before using this information and the product it supports, read the information in “Notices” on page 67. This edition applies to IBM i 7.3 (product number 5770-SS1) and to all subsequent releases and modifications until otherwise indicated in new editions. This version does not run on all reduced instruction set computer (RISC) models nor does it run on CISC models. This document may contain references to Licensed Internal Code. Licensed Internal Code is Machine Code and is licensed to you under the terms of the IBM License Agreement for Machine Code. © Copyright International Business Machines Corporation 2000, 2013. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents IBM PASE for i....................................................................................................... 1 What's new for IBM i 7.3..............................................................................................................................1 PDF file for IBM PASE for i........................................................................................................................... 1 IBM PASE for i overview...............................................................................................................................2 IBM PASE for i concepts......................................................................................................................... 2 IBM PASE for i as a useful option for application development............................................................3 Installing IBM PASE for i.............................................................................................................................. 4 Planning for IBM PASE for i..........................................................................................................................5 Preparing programs to run in IBM PASE for i.............................................................................................. 7 Analyzing program compatibility with IBM PASE for i...........................................................................7 Compiling your AIX source.....................................................................................................................7 Installing AIX compilers on IBM i.....................................................................................................9 Installing the AIX compilers from the installation media........................................................ 10 PTF update instructions............................................................................................................ 11 Copying the IBM PASE for i program to your system.......................................................................... 12 Case sensitivity............................................................................................................................... 12 Line-terminating characters in integrated file system files...........................................................13 Transferring files............................................................................................................................. 13 Customizing IBM PASE for i programs to use IBM i functions............................................................ 14 Copying header files....................................................................................................................... 15 Copying export files........................................................................................................................ 16 IBM PASE for i APIs for accessing IBM i functions........................................................................ 17 Using IBM PASE for i programs in the IBM i environment........................................................................ 17 Running IBM PASE for i programs and procedures.............................................................................17 Running an IBM PASE for i program with QP2SHELL().................................................................. 18 Running an IBM PASE for i program with QP2TERM()................................................................... 18 Running an IBM PASE for i program from within IBM i programs................................................. 19 Examples: Running an IBM PASE for i program from within IBM i programs..........................19 Calling an IBM PASE for i procedure from within IBM i programs.................................................20 Example 1: Calling an IBM PASE for i procedure from within IBM i programs........................20 Example 2: An IBM i ILE program that uses pointer arguments in a call to an IBM PASE for i procedure......................................................................................................................21 Using IBM PASE for i native methods from Java............................................................................25 Working with environment variables..............................................................................................26 Calling IBM i programs and procedures from your IBM PASE for i programs.................................... 26 Calling ILE procedures....................................................................................................................27 Examples: Calling ILE procedures............................................................................................ 28 Calling IBM i programs from IBM PASE for i.................................................................................. 33 Example: Calling IBM i programs from IBM PASE for i.............................................................33 Running IBM i commands from IBM PASE for i............................................................................. 35 Example: Running IBM i commands from IBM PASE for i .......................................................35 How IBM PASE for i programs interact with IBM i...............................................................................36 Communications............................................................................................................................. 36 Database......................................................................................................................................... 36 Example: Calling Db2 for i CLI functions in an PASE for i program..........................................38 Data encoding................................................................................................................................. 42 File systems.................................................................................................................................... 43 Globalization................................................................................................................................... 44 Message services............................................................................................................................45 Printing output from IBM PASE for i applications.......................................................................... 46 Pseudo-terminal (PTY)................................................................................................................... 46 iii Security........................................................................................................................................... 47 Work management..........................................................................................................................48 Debugging your IBM PASE for i programs.................................................................................................48 Optimizing performance............................................................................................................................ 49 IBM PASE for i shells and utilities............................................................................................................. 49 IBM PASE for i commands....................................................................................................................50 IBM PASE for i system utility................................................................................................................60 IBM PASE for i qsh, qsh_inout, and qsh_out commands..............................................................63 Examples: IBM PASE for i.......................................................................................................................... 64 Related information................................................................................................................................... 64 Notices................................................................................................................67 Programming interface information.......................................................................................................... 68 Trademarks................................................................................................................................................ 68 Terms and conditions.................................................................................................................................69 iv IBM PASE for i With IBM® Portable Application Solutions Environment for i (PASE for i), you can port IBM AIX® applications