function status = mdssetdef(p)

% MDSSETDEF sets default node
%    MDSSETDEF(PATH) sets the default node location and returns the STATUS.

if nargin < 1, error('Specify the path.'), end
command = ['set default ' p];
stat = mdstcl(command);
if nargout
 status = stat;
elseif ~rem(stat,2)
 warning('Unsuccessful command')
 disp(command)
 disp(mdsdata('getmsg($1)',stat))
end
