Guest User

Untitled

a guest
Nov 23rd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. /************************************************************
  2. Author Adam Bullock
  3. 13Dec2013
  4. ************************************************************/
  5.  
  6. options
  7. metaserver="localhost"
  8. metaport=8561
  9. metauser="sasadm@saspw"
  10. metapass="xxxxxxx";
  11.  
  12. data tcpip;
  13. keep name port host protocol service;
  14.  
  15. length port host protocol objid service uri name $255;
  16. nobj=0;
  17. n=1;
  18. do while (nobj >= 0);
  19. nobj=metadata_getnobj("omsobj:TCPIPConnection?@Name='Connection URI' or @Name='External URI'",n,uri);
  20.  
  21. if (nobj >= 0) then do;
  22. rc=metadata_getattr(uri,"Name",name);
  23. if trim(name)='Connection URI' then name="Internal URI";
  24.  
  25. rc=metadata_getattr(uri,"CommunicationProtocol",protocol);
  26. rc=metadata_getattr(uri,"HostName",host);
  27. rc=metadata_getattr(uri,"Port",port);
  28. rc=metadata_getattr(uri,"Service",service);
  29. *call cats(protocol,'://',host,':',port,service);
  30. put name protocol"://"host":"port service;
  31. output;
  32. end ;
  33. n = n + 1;
  34. end;
  35. run;
  36.  
  37. proc sort data=tcpip out=sorted;
  38. by service;
  39. run;
  40.  
  41. proc print data=sorted;
  42. var name protocol port host service;
  43. title 'Internal and External Connections (except SASThemes)';
  44. title2 'Listed by Service';
  45. run;
Add Comment
Please, Sign In to add comment