Previous Page | Next Page

Metadata API Class

_GET_SUBTYPES_



Returns all possible subtypes for a specified metadata type
Category: Management Methods

Syntax
Parameters
Details
Examples
Example 1: Get Subtypes--Unexpanded
Example 2: Get Subtypes--Expanded

Syntax

CALL SEND(i_api, '_GET_SUBTYPES_', l_rc, type_id, l_types, <expand>);

Parameters

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.
type_id C specifies the passed type ID of metadata to be returned. For the general format of this ID, see Identifying Metadata.
l_types L specifies the returned list of all possible subtypes for the specified type. List format: type_id=type_name.
expand N specifies the passed indicator. Optional. Specifies whether returned list will expand all possible subtypes of all subtype branches.


Details

expand

specifies the passed indicator. Optional. Specifies whether returned list will expand all possible subtypes of all subtype branches.

0 -- (default) return all subtypes unexpanded.

1 -- expand all possible subtypes of all subtype branches.


Examples


Example 1: Get Subtypes--Unexpanded

   /*                        
    *  Get all Immediate Subtypes of Tables 
    */                 
l_types=makelist(); 
                        
call send(i_api,'_GET_SUBTYPES_',l_rc,'WHTABLE',l_types,0);
                     
num_types=listlen(l_types);
                   
if l_rc = 0 then do;
                  
   call putlist(l_types);
              
   end; /* if */ 
      
else do;
      
   msg=getnitemc(l_rc,'MSG',1,1,'ERROR:
    _GET_SUBTYPES_ Failed.'); 
   list_rc=dellist(l_rc); 
                       
   end; /* else */    
                    
l_types=dellist(l_types);
 
    /* returns list */
 l_types(
  WHDETAIL='Detail Table'
  WHLDETL='Detail Logical Table'
  WHSUMTBL='Summary Table'
  WHODDTBL='Operational Data Definition'
  WHODTTBL='Operational Data Table'
  WHTBLPRC='Process Output Tables'
  WHDATTBL='Data Table' 
  WHOLPSTR='OLAP Structure'
  WHTBLPRC='Process Output Table' )[47]
 


Example 2: Get Subtypes--Expanded

   /*    
    *  Get all Subtypes of Tables 
    */    
l_types=makelist();
                
call send(i_api,'_GET_SUBTYPES_',l_rc,'WHTABLE',l_types,1);
                     
num_types=listlen(l_types);
                    
if l_rc = 0 then do;
                  
   call putlist(l_types);
         
   end; /* if */
          
else do;          
                                 
   msg=getnitemc(l_rc,'MSG',1,1,'ERROR: 
   _GET_SUBTYPES_ Failed.'); 
   list_rc=dellist(l_rc);  
                       
   end; /* else */      
                         
l_types=dellist(l_types);

    /* returns list */
 
 L_types(
 WHDETAIL='Detail Table'
 WHLDETL='Detail Logical Table'
 WHSUMTBL='Summary Table'
 WHODDTBL='Operational Data Definition'
 WHODTTBL='Operational Data Table'
 WHTBLPRC='Process Output Tables'
 WHDATTBL='Data Table'
 WHTBLMAP='Mapping Process Table'
 WHTBLUSR='User Exit Process Table'
 WHTBLXFR='Data Transfer Process Table'
 WHTBLREC='Record Selector Process Table'
 WHOLPSTR='OLAP Structure'
 WHGRPOLP='OLAP Group'
 WHOLPTBL='OLAP Table'
 WHOLPMDD='OLAP MDDB'
 )[47]

Previous Page | Next Page | Top of Page