/* REXX */                                                                      
trace n                                                                         
outdsn    = "kimu.test.vdata"                                                   
members   = 50                                                                  
lines     = 100                                                                 
orgs      = 3                                                                   
/* --------------------------- */                                               
recfm.1     = 'V B'                                                             
lrecl.1     = 2004                                                              
blksize.1   = 8008                                                              
maxlength.1 = 2000                                                              
minlength.1 = 100                                                               
/* --------------------------- */                                               
recfm.2     = 'F B'                                                             
lrecl.2     = 80                                                                
blksize.2   = 9040                                                              
maxlength.2 = 80                                                                
minlength.2 = 80                                                                
/* --------------------------- */                                               
recfm.3     = 'V B'                                                             
lrecl.3     = 32756                                                             
blksize.3   = 32760                                                             
maxlength.3 = 32752                                                             
minlength.3 = 10                                                                
/* --------------------------- */                                               
                                                                                
do mcntr = 1 to members                                                         
  line. = ''                                                                    
  ls    = random(1,lines)                                                       
  org   = random(1,orgs)                                                        
  do lcntr = 1 to ls                                                            
    wkMax = maxlength.org-(length(maxlength.org)+1)                             
    wkMin = minlength.org-(length(maxlength.org)+1)                             
    line.lcntr = copies('A',random(wkMin,wkMax))                                
    line.lcntr = right(length(line.lcntr),5) || ' ' || line.lcntr               
  end                                                                           
  mem_name = 'M' || right(mcntr,7,'0')                                          
 "alloc f(out) da('"outdsn"("mem_name")') old recfm("recfm.org") " ,            
 "      lrecl("lrecl.org") blksize("blksize.org")"                              
 "execio "lines" diskw out (finis stem line."                                   
 "free f(out)"                                                                  
end                                                                             
