Previous Page | Next Page

Metadata API Class

_IS_SUBTYPE_OF_



Determines if one metadata type is a subtype of another
Category: Management Methods

Syntax
Parameters
Details
Example: Is WHOLPTBL a Subtype of WHTABLE?

Syntax

CALL SEND(i_api, '_IS_SUBTYPE_OF_', l_rc, type_id, super_type_id result);

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 the metadata type that might be a subtype of super_type_id. Type IDs are discussed in Identifying Metadata.
super_type_id C specifies the passed type ID of the metadata type that might be a supertype of type_id.
result C specifies the returned indicator. Indicates whether type_id is a subtype of super_type_id.


Details

result

specifies the returned indicator. Indicates whether type_id is a subtype of super_type_id.

0 -- type_id is not a subtype of super_type_id.

1 -- type_id is a subtype of super_type_id.


Example: Is WHOLPTBL a Subtype of WHTABLE?

type_id='WHOLPTBL';         
super_type_id='WHTABLE';
                     
call send(i_api,'_IS_SUBTYPE_OF_',l_rc,type_id,
    super_type_id,a_subtype);   
                       
if l_rc = 0 then do;  
                   
   if a_subtype then                     
           put type_id 'is a subtype of ' super_type_id;
   else                                
           put type_id 'is not a subtype of 'super_type_id;
                               
   end; /* if */               
                              
else do;                       
                                  
   msg=getnitemc(l_rc,'MSG',1,1,'ERROR: 
       _IS_SUBTYPE_OF_ Failed.');         
   list_rc=dellist(l_rc);        
                                   
   end; /* else */    
call send(i_api, '_GET_METADATA_OBJECTS_', l_rc, type, 1, 1);

   /*    Output to Log: */ 
WHOLPTBL is a subtype of WHTABLE
                

Previous Page | Next Page | Top of Page