The DB2 stored procedure, DSNUTILS, limits the length of the statements in the utility files used with the LOAD utility


Bulk loading for DB2 under z/OS is performed through the use of the DSNUTILS DB2 stored procedure. DSNUTILS limits the length of the utility control statements to 32704. This behavior can limit the number of variables that can be bulk-loaded into DB2, depending on the length of the variables. An error similar to one of the following might occur if you exceed this limit:

SYSTEM COMPLETION CODE=0C4  REASON CODE=00000010                       
 TIME=15.32.26  SEQ=37713  CPU=0000  ASID=0059                         
 PSW AT TIME OF ERROR  478D1000   A254E59A  ILC 4  INTC 10             
   ACTIVE MODULE           ADDRESS=00000000_2254B000  OFFSET=0000359A  
   NAME=SASVM                                                          
Free buffer overwritten.                                                   
ERROR: VM 1335: The PCE address= 00000000  and MEMORY address=2324FBD8     
IEA995I SYMPTOM DUMP OUTPUT                                                
  USER COMPLETION CODE=1335                                                
 TIME=15.34.11  SEQ=37721  CPU=0000  ASID=0059                             
 PSW AT TIME OF ERROR  478D1000   A2023834  ILC 2  INTC 0D                 
   ACTIVE MODULE           ADDRESS=00000000_2201D000  OFFSET=00006834      
   NAME=SASHOST                                                            
ERROR: The SAS System stopped processing this step because of insufficient memory.
WARNING: The data set DB2LIB.STAGING may be incomplete.  When this step was stopped there were 0 observations and 442 variables.
ERROR: (ACCDB2M001E) SVC99 allocation error rc = 22280, reason = 0. Error allocating the DB2IN LOAD utility,
       dsn=SASTST.T123524.DB2IN.TESTBLF.R0441603. Step failed.  
ERROR: (ACCDB2M004E) Error trying to run the load utility. See the DB2PRINT data set for error messages.
ERROR: (ACCDB2M001E) SVC99 allocation error rc = -26868, reason = 0. Error allocating the DB2IN LOAD utility, dsn=X010852.T114611.DB2IN.X010852Z.DDNAME.H05. Step failed.


The workaround for this DB2 enforced limit is to remove the BULKLOAD=YES option from the LIBNAME statement or the BULKLOAD=YES data set option when referencing the DB2 table.