User Tools

Site Tools


gethostname

Get Hostname


**FREE

ctl-opt dftactgrp(*no) actgrp(*caller);


dcl-pr gethostname int(10) extproc('gethostname');
  name pointer value;
  length int(10) value;
end-pr;


main();
*inlr = *on;


dcl-proc main;
  dcl-s name char(50);
  dcl-s rc int(10);

  rc = gethostname(%addr(name) : %size(name));
  dsply %char(rc);

  name = %str(%addr(name));
  dsply name;

end-proc;

gethostname.txt · Last modified: 2019/03/18 10:37 by mihael