H DFTACTGRP(*NO) BNDDIR('ERPGSDK')                                                             
      ****************************************************************                              
      * Prototypes                                                   *                              
      ****************************************************************                              
      /COPY QCOPYSRC,P.ERPGSDK                                                                      
      ****************************************************************                              
     D DftPath         S             64    INZ('/www/erpgsdk/catalog+                               
     D                                          /templates/')                                       
      *                                                                                             
      * Data read in from Web Page                                                                  
     D user            S             30                                                             
      *                                                                                             
      * Work variables                                                                              
      **********************************************************************                        
     C                   callp     #startup                                                         
      *                                                                                             
     C                   EXSR      $Input                                                           
     C                   callp     #setPath(DftPath)                                                
      *                                                                                             
     C                   if        (user <> ' ')                                                    
     C                   EXSR      $Main                                                            
     C                   else                                                                       
     C                   EXSR      $Signon                                                          
     C                   endif                                                                      
      *                                                                                             
     C                   callp     #Cleanup                                                         
      *                                                                                             
     C                   SETON                                        LR                            
      ****************************************************************                              
      * Main Display                                                 *                              
      ****************************************************************                              
     C     $Main         BEGSR                                                                      
      *                                                                                             
     C                   callp     #loadTemplate('cart.erpg')                                       
     C                   callp     #writeThisSec('first')                                           
      *                                                                                             
     C                   ENDSR                                                                      
      ****************************************************************                              
      * Redirect to Signon                                           *                              
      ****************************************************************                              
     C     $Signon       BEGSR                                                                      
      *                                                                                             
     C                   callp     #loadTemplate('redsignon.erpg')                                  
     C                   callp     #writeThisSec('first')                                           
      *                                                                                             
     C                   ENDSR                                                                      
      ****************************************************************                              
      * Read Input from web page                                     *                              
      ****************************************************************                              
     C     $Input        BEGSR                                                                      
      *                                                                                             
     C                   eval      user = #getCookie('user')                                        
      *                                                                                             
     C                   ENDSR