Example 4 (PL/I: 64-bit DLL)

The following is an example of a 64-bit PL/I program calling HFZSNAP as a DLL.
*PROCESS LIMITS(EXTNAME(8)),LP(64);                           
 HFZSPLI2: PROC                 OPTIONS(MAIN) ;               
    HFZSNPD     External Entry Options(asm),                  
    plist_pointer  pointer,                                   
    1 snap_list based(plist_pointer),                         
    3 args_list(3) pointer(32),                               
      3 Work        Char(4),                                  
      3 Work140     Char(140),                                
      3 Work1402    Char(140),                                
    lastargflag bit(1) based;                                 
  plist_pointer = alloc31(stg(snap_list));                    
  Work ='0002';                                               
  Work140 = 'User Title Data';                                
  Work1402 = 'Datasets(HFZHIST(MY.HIST))';                    
  args_list(1) = addr(work);                                  
  args_list(2) = addr(work140);                               
  args_list(3) = addr(work1402);                              
  addr( args_list(3 ))->lastargflag = '1'b;                   
  Call HFZSNPD(args_list);                                    
  Call plifree(plist_pointer);                                
 End HFZSPLI2;                                                

This example is provided as sample job HFZVPLS2 in data set HFZ.SHFZSAM1.