Glen Marchesani wrote:
> ...
> I am currently calling an RPG program to do the actual
> call.  Here is the code
> 
> c                   call(e)   program
> c                   parm                    parm01
> c                   parm                    parm02
> c                   parm                    parm03
> .
> .
> .
> c                   parm                    parm98
> c                   parm                    parm99
> 
> where parm01..parm99 are based on pointers.  It is *UGLY
> but it works.

Ah, for my previous post, I forgot you were already using RPG.  With
your current setup, if you define parm01 etc as 1A, you could use this
prototype and select statement to do your calls.  If you rename the
parms you're passing to p01, p02, p99, you can cram more parms on each
line.

D pgm          pr          extpgm(program)
D   p1                 1a  options(*nopass)
D   p2                 1a  options(*nopass)
D   p3                 1a  options(*nopass)
D etc
D   p99                1a  options(*nopass)
 /free
    select;
      when numparms = 0;
        pgm(); 
      when numparms = 1;
        pgm(p01); 
      ... etc ...
      when numparms = 99;
        pgm(p01:p02:p03:p04:p05:p06:p07:p08:p09:p10
            ... etc ...
            p91:p92:p93:p94:p95:p96:p97:p98:p99);
      endsl;


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].