This page is intended for PASE providers learning how to call PASE from ILE.
If you know little about PASE see this link PASE In A Nutshell.
Q Can my ILE RPG/C *PGM load/call functions in PASE shared libraries (libc.a, libmy.a, etc.)?
Answer: Yes. Click here to run demo … {Run RPG CGI call PASE libmy.a -> accounts}
Download:
call qp2term > mkdir /home/callpase > cd /home/callpase -- unzip callpase-pase-1.0.zip FTP to /home/callpase -- > make -f mymake -- xlc compiler must be installed on your IBM i machine --
1. Unzip callpase-rpg-1.0.zip to callpase.savf 2. FTP callpase.savf to QGPL library (empty savf must exist already) > crtSAVF FILE(QGPL/CALLPASE) > clrSAVF FILE(QGPL/CALLPASE) 3. Install CALLPASE source code library on IBM i > RSTLIB SAVLIB(CALLPASE) DEV(*SAVF) SAVF(QGPL/CALLPASE) Note: if updating/replacing and you get "objects not restored," try options MBROPT(*ALL) ALWOBJDIF(*ALL) 4. Create RPG programs > ADDLIBLE CALLPASE > CRTCLPGM PGM(CALLPASE/CRTCALL) SRCFILE(CALLPASE/QCLSRC) > call crtcall
Bill of materials (view on-line):
Example callpase.rpgle *PGM is faced with many of the typical issues calling PASE
PASE function in libmy.a: int accounts(int max, account_t *find[])
This site url: http://myibmi/demo/callpase.pgm Apache directives (httpd.conf): # callpase demos ScriptAlias /demo/ /QSYS.LIB/CALLPASE.LIB/ <Directory /QSYS.LIB/CALLPASE.LIB/> AllowOverride None order allow,deny allow from all SetHandler cgi-script Options +ExecCGI </Directory> Single job run RPG CALLPASE and PASE libmy.a: :-------->xxxxxxx/QTMHHTTP/065182<----------: : : : |----------|---------| | : | |----------|---------| | PASE | | : | | OS/400 | | libmy.a->accounts | | : | | PGM-CALLPASE (RPG) | | | | : | | Qp2RunPase, | | | | : | | Qp2dlopen, | | | | : | | Qp2CallPase, etc. | ========================| : |======================== MI (OS/400) AIX/PASE SYSCALL | : |MI instructions privileged mode boundary| : |privileged mode boundary ========================| : |======================== | IBM i SLIC kernel, same for OS/400 + PASE | | (completely replaced AIX kernel /unix) | |---------------------------------------------------| | POWER PC hardware processor | |---------------------------------------------------| Notes: * PASE/AIX compiled binaries are NOT emulated * PASE/AIX Power PC processor supports both 32/64-bit binaries * PASE/ILE programs share same SLIC kernel, and also share same basic SLIC exception/signal processing * PASE/ILE memory for program run stack/heap/shared memory is acquired from same SLIC pools (teraspace) (however, PASE can ONLY see memory PASE acquired through it's own syscall APIs)
Tony “Ranger” Cairns - IBM i PHP / PASE