FIND:
   method findname $50 sysrc 8;
   name=findname;

      /*  Find the observation with the value entered  */
      /*  in NAME.                                     */
   sysrc=where(dsid,'NAME='|| quote(findname));

   call set(dsid);

      /*  Read the observation into the SCL data    */
      /*  vector and the class instance variables.  */
   sysrc=fetch(dsid);

       /*  If the read was not successful, blank out  */
       /*  the values in the SDV and the class        */
       /*  instance variables.                        */
   if (sysrc = %sysrc(_sweof)) or (sysrc > 0) then
      do;
         custnum = ' ';
         state = ' ';
         zipcode = ' ';
         city = ' ';
         phone = ' ';
         ord1dte = .;
      end;
   endmethod;

RENAME:
   method newname $50 sysrc 8;

      /*  Save the old name and assign the new name to  */
      /*  the NAME variable.                            */
   oldname=name;
   name = newname;
   call set(dsid);

      /*  Attempt to update the observation.  */
   sysrc = update(dsid);

      /*  If the observation can't be updated,  */
      /*  restore the old name.                 */
   if sysrc then
      name=oldname;
   endmethod;

_INIT_:
   method;
      /*  Call the inherited _INIT_ method.  */
   call super(_self_,'_INIT_');

      /*  Open the CUSTOMER data set in update mode.  */
   dsid=open('company.customer','U');
   endmethod;

_TERM_:
   method;
      /*  Close the data set.  */
   sysrc=close(dsid);

      /*  Call the inherited _TERM_ method  */
      /*  to delete the instance.           */
   call super(_self_,'_TERM_');
   endmethod;