RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Pass Array as a parameter Print E-mail
User Rating: / 1
PoorBest 
Written by Chamara Withanachchi   

This Sample code is posted by Scott Klement for System i


     H DFTACTGRP(*NO)

     D MyProc          PR
     D   Parm1                        3a   dim(10)

     D Array           s              3a   dim(10)
     D X               s             10i 0

      /free
           MyProc(Array);

           for x = 1 to %elem(Array);
             dsply Array(x);
           endfor;

           *inlr = *on;

      /end-free

     P MyProc          B
     D MyProc          PI
     D   Parm1                        3a   dim(10)
     D Y               s             10i 0
      /free
         for Y = 1 to %elem(Parm1);
            evalr parm1(Y) = %char(900+Y);
         endfor;
      /end-free
     P                 E 

User Comments

Please login or register to add comments

<Previous   Next>