|
...
You could use a C module for your main procedure. A C main gets its
parameters as an array of pointers. You could use this C module as the
program-entry module for any program where you want the parameters as an
array. You just have to name the RPG procedure RPGMAIN (or whatever name
you use in the C module).
...
// RPG "main"
ctl-opt nomain;
dcl-proc RPGMAIN export;
dcl-pi *n;
argCount int(10) value;
argArr pointer dim(400) options(*varsize);
end-pi;
dcl-s i int(10);
for i = 1 to argCount;
if argArr(i) <> *null;
// do something
endif;
endfor;
end-proc;
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.