The third argument to metadata_newobj is the name, or more exactly the value of the name attribute of the new object.
Now look at your code.
rc=metadata_newobj("Login", add_uri, Name="TestObject");
The third argument is Name="TestObject", which is a logical evaluation whose result if false, which is numeric 0, which is auto-cast to the string "0", which becomes the new object's name.
The correct code would be
rc=metadata_newobj("Login", add_uri, "TestObject");
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.