Sample Db2 for z/OS commands for allocating buffer pools

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15
Before running the createDatabase.sh script to configure your databases, you must allocate the required buffer pools.
Work with your Db2® for z/OS® database administrator to determine which buffer pools to use. For each buffer pool, you can define the buffer pool BPn with yyyyy pages by using the following DB2® command:
-ALTER BUFFERPOOL (BPn) VPSIZE(yyyyy)
For example:
-ALTER BUFFERPOOL (BP1) VPSIZE(20000)
You can also run the Db2 commands in a batch job, for example:
//JOBLIB  DD  DISP=SHR,DSN=db2hlq.SDSNLOAD
//STEP1   EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD  SYSOUT=*
//SYSPRINT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSTSIN  DD  *
  DSN SYSTEM(ssid)
  -ALTER BUFFERPOOL (BPn) VPSIZE(yyyyy)
  RUN PROGRAM(DSNTIAD)  PLAN(DSNTIAnn) -
       LIBRARY('db2hlq.RUNLIB.LOAD')
  END
//SYSIN    DD  *
GRANT USE OF BUFFERPOOL BPn TO PUBLIC ;
/*

If you are in data sharing mode, make sure that you define the cache XCF structures for the group buffer pools being used. For further information, see Cross-system coupling facility component of z/OS External link opens a new window or tab in the Db2 for z/OS documentation.