REPORT:  
   *** Items of Errorlst or warninglst list were added before ***;  
   *** An item in list looks like : "The program ae.sas does not exist." ***;  
 
   *** Title ***;  
   titlelst = makelist();  
   *** Subject ***;  
   subjectlst = makelist();  
   *** Content of subject ***;  
   contentlst = makelist();  
 
   if listlen(errorlst) > 0 or listlen(warninglst) > 0 then do;  
      do i =1 to listlen(errorlst);  
         sign = 'error';  
         error = getitemc(errorlst, i);  
         error = sign||' | '||error;  
         rc = insertc(titlelst, error, -1);  
      end;  
      do i =1 to listlen(warninglst);  
         sign = 'warning';  
         warning = getitemc(warninglst, i);  
         warning = sign||' | '||warning;  
         rc = insertc(titlelst, warning, -1);  
      end;  
   end;  
   else do;  
      wsign= 'ok'; *** three kind of signs: ok, warning, error ***;  
      wtitle = 'Note - Program submitted and versioned successfully.';  
      wtitle = wsign||' | '||wtitle; *** ex: ok | note: successful ***;  

      *** This contains the list of subject will be printed in report ***;  
      *** Subject list must have the same length with content list ***;  
      rc = insertc(titlelst, wtitle, -1);  
      subjectlst = makelist();  
      rc = insertc(subjectlst, 'Source Path', -1);  
      rc = insertc(subjectlst, 'SAS Program', -1);  
      rc = insertc(subjectlst, 'Date/Time', -1);  
      rc = insertc(subjectlst, 'User', -1);  
  
      rc = insertc(contentlst, sourcepath, -1);  
 
      *** programs ***;  
      do i = 1 to listlen(prolst);  
         temp = getitemc(prolst, i);  
         prostr = prostr||temp||'<br/>';  
      end;  
      curdatetime = put(curdate,datetime13.);  

      rc = insertc(contentlst, prostr, -1);  
      rc = insertc(contentlst, curdatetime, -1);  
      rc = insertc(contentlst, usrname, -1);  
   end; 
   *** Show the dialog ***; 
   call display('Wreportdialog.scl', titlelst, subjectlst, contentlst, 'header text', 'footer text');  
 
   if contentlst ne . then rc = dellist(contentlst);  
   if titlelst ne . then rc = dellist(titlelst);  
   if subjectlst ne . then rc = dellist(subjectlst);  
   if errorlst ne . then rc = dellist(errorlst);  
   if warninglst ne . then rc = dellist(warninglst);  
RETURN;