Populating Contact and PhoneNumber
After importing an XML file containing the class definition for CSPTutorial.Contact or CSPTutorial.Contact and PhoneNumber, you can populate Caché with sample instances of the classes. Here's how:
Compile the classes. You can do this in Studio by clicking Build —> Compile.
Open the Terminal in the namespace in which you installed and compiled the classes. If the Terminal does not open in the correct namespace, use the ZN command to change namespaces. For example, if the terminal opens in the SAMPLES namespace and the classes are installed in USER do the following:
SAMPLES>ZN "USER" USER>
Populate Contact by invoking the Populate method. The single integer argument specifies the number of instances to create. Note that because of their parent-child relationship, you must populate Contact before you populate PhoneNumber.
USER>Do ##class(CSPTutorial.Contact).Populate(5) USER>
If you are also populating PhoneNumber, follow the same procedure:
USER>Do ##class(CSPTutorial.PhoneNumber).Populate(15) USER>