INIT:
customer=instance(loadclass('MASTER.TOOLS.CUSTOMER'));
call notify('newname','_gray_');
return;
NAME:
call send(customer,'FIND',name,sysrc);
call putlist(customer,'',1);
link update;
if (sysrc = %sysrc(_sweof)) or (sysrc > 0) then
do;
call notify('newname','_gray_');
_msg_='No customer found with that name.';
end;
else
call notify('newname','_ungray_');
return;
UPDATE:
name = getnitemc(customer,'NAME');
custnum = getnitemc(customer,'CUSTNUM');
city = getnitemc(customer,'CITY');
state = getnitemc(customer,'STATE');
zipcode = getnitemc(customer,'ZIPCODE');
phone = getnitemc(customer,'PHONE');
ord1dte = getnitemn(customer,'ORD1DTE');
return;
NEWNAME:
call send(customer,'RENAME',newname,sysrc);
link update;
call putlist(customer,'',1);
if sysrc then
_msg_ =
'The customer could not be updated at this time.';
newname = ' ';
return;
TERM:
call send(customer,'_TERM_');
return;