H DFTACTGRP(*NO) BNDDIR('ERPGSDK')                                                             
      ****************************************************************                              
      * Prototypes                                                   *                              
      ****************************************************************                              
      /COPY QCOPYSRC,P.ERPGSDK                                                                      
      ****************************************************************                              
     D i               S              6  0                                                          
     D End             S              6  0 Inz(20)                                                  
      ****************************************************************                              
     C                   callp     #startup                                                         
      *                                                                                             
     C                   CallP     #setImmediate(*ON)                                               
     C                   CallP     #setWriteTo(W_STDFILE)                                           
      *                                                                                             
     C                   callp     #setPublic(*ON)                                                  
     C                   callP     #openOutFile('test2.test')                                       
      *                                                                                             
     C                   callp     #writeTemplate('stdhtmlheader.erpg')                             
      *                                                                                             
     C                   callp     #loadTemplate('loop1.erpg':'top')                                
     C                   CallP     #replaceData('/%end%/':%editc(End:'Z'))                          
     C                   CallP     #writeSection                                                    
      *                                                                                             
     C                   callp     #loadSection('count')                                            
      *                                                                                             
     C                   do        End           i                                                  
     C                   CallP     #replaceData('/%count%/':%editc(i:'Z'))                          
     C                   CallP     #writeSection                                                    
     C                   enddo                                                                      
      *                                                                                             
     C                   CallP     #writeThisSec('end')                                             
      *                                                                                             
     C                   CallP     #cleanup                                                         
     C                   eval      *INLR = *on