if (curfld() ne ' ') and (cmd=' ') then do;              
                                                            
         /* Name the field being clicked on and look up   */
         /* that field in the control data set.           */
      field=curfld();                                       
      rc=setkey(fields,'FIELD');                            
      if fetch(fields) ne %sysrc(_SWEOF) then do;           
                                                            
            /* If that field was in the control data set, */
            /* act accordingly (field is associated       */
            /* with VARNAME in the data set).             */
         varnum=varnum(pubskel,varname);                    
         vartype=vartype(pubskel,varnum);                   

            /* If the field was modified, or the          */
            /* field is such that modifications are       */
            /* not kept, then take some action.           */
         if not field('MODIFIED',field) or bksltrak='I'     
            then do;                                        

               /* Insert the current value of that        */
               /* field into a list.                      */
            templ=makelist();                               
            if vartype='C' then                             
               rc=setnitemc(templ,getvarc(pubskel,varnum),  
                           'VALUE');                        
            else                                            
               rc=setnitemn(templ,getvarn(pubskel,varnum),  
                           'VALUE');                        
                                                            
               /* Take whatever action is indicated by    */
               /* the value of HYPLOC in the control data */
               /* set for the observation corresponding   */
               /* to the field being clicked on.          */
            call method('hyprtext.scl',hyploc,templ);       
            rc=dellist(templ);                              
            end;                                            
         end;                                               
      end;                                                  
   return;