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 file name as prameter to RPG Program Print E-mail
User Rating: / 1
PoorBest 
Written by Chamara Withanachchi   
Pass file name as prameter to RPG Program
     FMYMAST    IF   E           K DISK    EXTFILE(paraFile)  
     F                                     UsrOpen
	 
     D openExample     PR                  EXTPGM('OPENEX')
     D  libName                      10a
     D  filName                      10a  
     
     D openExample     PI
     D  libName                      10a
     D  filName                      10a  
	 
     D paraFile        S             21A   	 
	 
      /free 
	  
          paraFlle = %Trim(libName) + '/' %Trim(filName);
          if Not %Open(MYMAST);
             open MYMAST;
	  endif;
		  
      /end-free

Programmer has the flexibility to pass any library/file name as long as they have the same record format.



User Comments

Please login or register to add comments

<Previous   Next>