| Metadata API Class |
| Category: | Navigation Method |
| Syntax | |
| Parameters | |
| Details | |
| Examples | |
| Example 1: Returning a List of Entries for a Specific Type (Detail Tables) | |
| Example 2: Get All Tables Registered in Primary and Secondary Repositories | |
Syntax |
| CALL SEND(i_api, '_GET_METADATA_OBJECTS_', l_rc, reposid.typeid, l_objs, <search_secondary>, <include_subtypes>); |
| Parameter | Type | Description |
|---|---|---|
| i_api | Class | specifies the passed instance of METAAPI.CLASS. See Using the Metadata API Class. |
| l_rc | N | specifies the return codes for the method. A nonzero code indicates failure and means that l_rc is an error list identifier. For the error list format, see Error Codes. |
| reposid.typeid | C | specifies the passed reposid and typeid of metadata that is to be returned. For the general format of these IDs, see Identifying Metadata. |
| l_objs | L | spcifies the returned list of metadata objects. List format: id=name. |
| search_ secondary | N | specifies the passed indicator. Optional. Specifies whether the returned list should include any objects of the specified type from all active secondary repositories. |
| include_subtypes | N | specifies the passed indicator. Optional. Specifies whether the returned list should include subtypes. |
| Details |
specifies the passed indicator. Optional. Specifies whether the returned list should include any objects of the specified type from all active secondary repositories.
0 -- return objects from the passed repository only.
1 -- (default) if passed repository ID is that of the primary repository, then return all from the secondary repository, too. If passed repository ID is that of a secondary repository, this parameter is ignored.
specifies the passed indicator. Optional. Specifies whether the returned list should include subtypes.
0 -- return objects of the specified type only.
1 -- (default) return objects of the specified type and their subtypes, if any.
| Examples |
type=dw_repos_id||'.WHDETAIL'; call send(i_api,'_GET_METADATA_OBJECTS_',l_rc, type,l_objs); /* returns list: */ L_objs( A000000E.WHDETAIL.A000001L='Customer detail table' A000000E.WHDETAIL.A000002X='Product detail table' A000000E.WHDETAIL.A000003M='Customer detail table' A000000E.WHDETAIL.A000004H='Sales fact table' A000000E.WHDETAIL.A000005U='Oracle' A000000E.WHDETAIL.A000006Q='Sybase' A000000E.WHDETAIL.A000007L='Remote Detail Table' A000000E.WHDETAIL.A000008I='Suppliers' )[3]
/* * Get all Tables registered in Primary and * Secondary repositories * Primary Repos ID = A0000001 * Secondary Repos ID = A0000003 */ type=primary_repos_id||'.WHTABLE'; l_objs=makelist(); call send(i_api, '_GET_METADATA_OBJECTS_', l_rc, type, 1, 1); num_objs=listlen(l_objs); if l_rc = 0 then do; call putlist(l_objs); end; /* if */ else do; msg=getnitemc(l_rc,'MSG',1,1,'ERROR: _GET_METADATA_OBJECTS_ Failed.'); list_rc=dellist(l_rc); end; /* else */ l_objs=dellist(l_objs); /* returns list */ L_OBJS( A0000003.WHDETAIL.A0000069='Product detail table' A0000003.WHDETAIL.A00000QI='Sales fact table' A0000003.WHLDETL.A000004R='Customer detail' A0000003.WHSUMTBL.A00000TG='Monthly summary' A0000001.WHODDTBL.A0000049='Services' A0000001.WHODDTBL.A00000FP='Payment File' )
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.