/**********************************************************************/


   /* Example 1 */

PROC 0 SUBSYS()                                           
SET INSTMT=&STR(IS="%INC ''''MIS.PUBTK.SRC(START)'''';")  
SAS OPTIONS ( ' NONEWS SYSPARM="SYS=&SUBSYS" &INSTMT ' ) +
    SASAUTOS ('''SASMIS.GEN.MACROS''') +                  
    CONFIG ( ' ''MIS.GEN.SOURCE(CONFIG)'' ') 


/**********************************************************************/


   /* Example 2 */

modified=0;                                                 
                                                            
      /* In the PUBTRAK application, CHECK determines if  */
      /* the user modified any field and sets the         */
      /* value of MODIFIED accordingly                    */
   link check;                                              
                                                            
if modified then do;                                        
                                                            
      /* Assign appropriate values to the WHOTW and       */
      /* UPDTTW variables.                                */
   whotw=symget('sysjobid');                                
   updttw=today();                                          
end;                                                        
return;


/**********************************************************************/


   /* Example 3 */

   /* Get the current command.                         */
cmd=upcase(word(1));                                     
                                                            
   /* Execute any custom commands.                     */
if cmd='KEEP' then link keepvals;                        
else if cmd = 'RETRIEVE' then link retvals;              


/**********************************************************************/


keepvals:                                                   
                                                            
      /* Open a temporary data set containing all         */
      /* variables on the data set being edited with      */
      /* the FSEDIT procedure.                            */
   pubskel=open('work.pubskel','U');                        
   call set(pubskel);                                       
                                                            
      /* Get the second observation (the first is used    */
      /* for sending letters).                            */
   rc=fetchobs(pubskel,2,'NOSET');                          

      /* Push the current value of all variables          */ 
      /* into the observation.                            */ 
   if update(pubskel) then do;                               
                                                             
  

   end;                                                      
                                                             
      /* We no longer want the DSID to be set,            */ 
      /* so close and then reopen the data set.           */ 
   rc=close(pubskel);                                        
   pubskel=open('work.pubskel','U');                         
                                                             
      /* Again fetch the second observation ...           */ 
   rc=fetchobs(pubskel,2);                                   
                                                             
      /* ... for all variables.  VAR is an SCL list       */ 
      /* that contains character elements, each of        */ 
      /* which names a variable to be duplicated          */ 
   i=0;                                                      
   do while(i