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.

* build_ILEarglist()<br />

*/<br />

ILEarglist->arg1 = arg1;<br />

ILEarglist->arg2.s.addr = (address64_t)arg2;<br />

ILEarglist->arg3 = arg3;<br />

ILEarglist->arg4 = arg4;<br />

ILEarglist->arg5 = arg5;<br />

ILEarglist->arg6 = arg6;<br />

/*<br />

* Use a saved PID value to check if the ILEpointer<br />

* is set. ILE procedure pointers inherited by the<br />

* child process of a fork() are not usable because<br />

* they point to an ILE activation group in the parent<br />

* process<br />

*/<br />

if (getpid() != init_pid)<br />

do_init();<br />

/*<br />

* _ILECALL calls the ILE procedure. The stack may<br />

* be unwound, but no heap storage is orphaned if<br />

* an exception or signal occurs<br />

*/<br />

_ILECALL(ILEtarget, &ILEarglist->base, signature, result_type);<br />

if (ILEarglist->base.result.s_int32.r_int32 == 1)<br />

printf("The results of best_wrapper function is: %s\n", arg2);<br />

else if ( ILEarglist->base.result.s_int32.r_int32 == 0)<br />

printf("ILE received other than 1 or 2 for version.\n");<br />

else<br />

printf("The db file never opened.\n");<br />

return ILEarglist->base.result.s_int32.r_int32;<br />

}<br />

void main () {<br />

int version, result2;<br />

char dbText[ 25 ];<br />

double dblNumber = 5.999;<br />

char justChar = 'a';<br />

short shrtNumber = 3;<br />

aggregate agg;<br />

strcpy( dbText, "none" );<br />

}<br />

for (version = 1; version

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

Saved successfully!

Ooh no, something went wrong!