Previous Topic: Namemask ArgumentNext Topic: Usage Notes for OPSGETVL


Keywords for OPSGETVL

Example: OPSGETVL Code

Consider the following code sample:

globalx.0=1                                              
globalx.1='test1234567890abcdefghij'                     
globalx.2='abcdefghijklmnopqrvwxyz12345'                 
globalx.3='zyxwvrqponmlkjihgfedcba12345'                 
a = OPSGETVL('globalx.*')                                
if opsrc ^= 0 & opsrc ^= 8 then do                       
  say queued()                                           
  say 'opsrc='||opsrc                                    
  exit                                                   
end                                                      
if opsrc = 8 then                                        
  say 'Some variable names not returned due to MAX limit.'
say 'a =' a                                              
do i = 1 to a                                            
  say getvl.i                                            
end

When executed, the preceding code sample produces the following output:

a = 4   
GLOBALX.0
GLOBALX.1
GLOBALX.2
GLOBALX.3

Note: For more information about OPSGETVL keywords, see OPSGETVL Command Processor in the chapter “POI Command Processors.”