182 WHOBJECT Chapter 3 * user to edit it. */ rc=preview(’clear’); rc=preview(’copy’,libref||’.’||entry); rc=preview(’edit’); if rc = 0 then do; /* * If the user modified the copy, save the * modifications back to the catalog entry and * update the metadata with the new contents. */ rc=preview(’save’,libref||’.’||entry); call send(i_api,’_UPDATE_METADATA_’,rc,l_note); end; /* if */ rc=preview(’clear’); Creating Notes To add a note to an object’s metadata, pass the metadata ID of the object to the _ADD_METADATA_ or _UPDATE_METADATA_ method. In the properties list for these methods, the NOTE property must contain the properties list that is expected by the WHNOTE type. If a note already exists for the object that is passed the _UPDATE_METADATA_ method, the contents of the existing note will be replaced with the contents of the new note. Note that _ADD_METADATA_ is not valid for the WHNOTE type. WHOBJECT Base metadata type for SAS/Warehouse Administrator objects Category: Object Types Parent “WHROOT” on page 226 Overview WHOBJECT is the base metadata type for SAS/Warehouse Administrator objects. You can view most of these objects in both the SAS/Warehouse Administrator Explorer and the Process Editor. You can view Types WHEFILE, WHODTTBL, and the children of WHTBLPRC only in the Process Editor. SAS/Warehouse Administrator Metadata Types WHOBJECT 183 Properties The following table lists all of the properties for WHOBJECT and indicates how you can use each property with metadata API methods. In the table, you can pass properties with a Ye s in the Add column to the _ADD_METADATA_ method. Use this method to add a new object. You can pass properties with a Ye s in the Update column to the _UPDATE_METADATA_ method. Use this method to update properties of an existing object. * Req indicates that the property is required; you must provide a value for this property when you use a given method. * Default indicates that the system will provide a default value for that property if you do not provide one. Properties with a Yes in the Read Method Expand Parm column are valid with the expand parameter of the _GET_METADATA_ method. This method enables you to get detailed metadata about a property and its associated objects through a single method call. Properties Type Add Method Update Method Read Method Expand Parm. Administrator L No No No Cvalue C No No No Desc C No No No Extended Attributes LNoNo Yes Group L No No No Icon C No No No Id C No No No Members L No No No Metadata Created C No No No Metadata Updated C No No No Name C No No No Note L No No Yes NValue N No No No Owner L No No No New properties for WHOBJECT are as follows: ADMINISTRATOR specifies an SCL list of general identifying information about the person who is the administrator of the object. The list must be of type WHPERSON or a subtype of WHPERSON. GROUP specifies an SCL list of general identifying information about the groups to which this object belongs. Note: If you pass the GROUP property to the _ADD_METADATA_ method, the object you add will only be added to the first group in the list. 184 WHODDTBL Chapter 3 ICON specifies the four-level catalog entry name (such as libref.catalog.entry.IMAGE)of the icon that is associated with this object. For more information about icons, see “Using Icon Information” on page 69. MEMBERS specifies an SCL list of general identifying information about the members of this object. This member list is closely related to the hierarchy that is depicted in the metadata views in SAS/Warehouse Administrator Explorer. OWNER specifies an SCL list of general identifying information about the person who owns the object. The list must be of type WHPERSON or a subtype of WHPERSON. Using WHOBJECT Add Update Delete No No No WHOBJECT is not used to read or write metadata in a repository. It is a template for all SAS/Warehouse Administrator Explorer objects. WHOBJECT is an independent type. WHODDTBL Metadata type for ODDs Category: Object Types—Explorer Parent “WHTABLE” on page 254 Overview WHODDTBL models the metadata for operational data definitions (ODD) in SAS/Warehouse Administrator. An ODD is a SAS data set, SAS view, SAS/ACCESS view descriptor, or SQL view descriptor that identifies an operational data source. In the SAS/Warehouse Administrator Explorer, to add an ODD to an environment: 1 Select the environment with the right mouse button. 2 Select Add Item ODD 3 Select the ODD with the right mouse button. 4 Enter the ODD information. Properties The following table lists all of the properties for WHODDTBL and indicates how you can use each property with metadata API methods. SAS/Warehouse Administrator Metadata Types WHODDTBL 185 In the table, you can pass properties with a Ye s in the Add column to the _ADD_METADATA_ method. Use this method to add a new object. You can pass properties with a Yes in the Update column to the _UPDATE_METADATA_ method. Use this method to update properties of an existing object. * Req indicates that the property is required; you must provide a value for this property when you use a given method. * Default indicates that the system will provide a default value for that property if you do not provide one. Properties with a Ye s in the Read Method Expand Parm column are valid with the expand parameter of the _GET_METADATA_ method. This method enables you to get detailed metadata about a property and its associated objects through a single method call. Note: A CREATING JOB property is required if the INPUT SOURCES property is also specified. Properties Type Add Method Update Method Read Method Expand Parm. Access Same As Physical N Yes Yes No Administrator L Yes Yes No Columns L Yes Yes Yes Creating Job L Yes (see Property Dependencies) Yes (see Property Dependencies) No Cvalue C Yes Yes No Desc C Yes Yes No Extended Attributes L Yes Yes Yes Group L Yes Yes No Host L Yes Yes No Icon C Yes Yes No Id C * Req * Req No Input Objects L No No No Input Sources L Yes (see Property Dependencies) Yes (see Property Dependencies) No Library L Yes Yes No Members L No No No Metadata Created C No No No Metadata Updated C No No No Name C * Default Yes No Note L Yes Yes Yes NValue N Yes Yes No Output Objects L No No No 186 WHODTTBL Chapter 3 Output Targets L * Req No No Owner L Yes Yes No Physical Storage L Yes Yes Yes Process L Yes Yes Yes Table Name C Yes Yes No Using Jobs L No No No Property Dependencies You must define a CREATING JOB property in order to add any INPUT SOURCES to a table. If a table does not have a CREATING JOB property, then you must specify one when you add an input source to the table. Using WHODDTBL Add Update Delete Ye s Ye s Ye s WHODDTBL is an independent type, like its parent, WHTABLE. To understand how all subtypes of WHTABLE relate to other types, see the models in “Relationships Among Metadata Types” on page 53. WHODTTBL Metadata type for ODTs (Data Files) Category: Object Types—Process Editor Parent “WHTABLE” on page 254 Overview WHODTTBL models the metadata for operational data tables (ODT) in SAS/Warehouse Administrator. An ODT is a SAS table that is an input to an operational data definition (ODD) in the Process Editor. In the Process Editor, the ODT is called a data file. Here is one way to add an ODT in SAS/Warehouse Administrator: 1 In the Explorer, select an ODD with the right mouse button. 2 Select Process from the pop-up menu. 3 In the Process Editor, select the ODD with the right mouse button. 4 Select Add Data File . type. WHOBJECT Base metadata type for SAS/Warehouse Administrator objects Category: Object Types Parent “WHROOT” on page 22 6 Overview WHOBJECT is the base metadata type for SAS/Warehouse Administrator objects. You. the SAS/Warehouse Administrator Explorer and the Process Editor. You can view Types WHEFILE, WHODTTBL, and the children of WHTBLPRC only in the Process Editor. SAS/Warehouse Administrator Metadata. each property with metadata API methods. SAS/Warehouse Administrator Metadata Types WHODDTBL 185 In the table, you can pass properties with a Ye s in the Add column to the _ADD _METADATA_ method.