Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Formatting the compiler database with BCREATE

The BCREATE utility routine is used to format the DBDIR and DBCOM realms of the compiler database.
BCREATE assigns to the DBDIR and DBCOM an Act-key-0 page (security information, creation date, etc.) and at least one FPA page (free place administration).

When required, BCREATE automatically extends the realms of the database being processed. For details, please refer to the "Database Operation" manual, Automatic realm extension by means of utility routines).

At startup BCREATE takes into account any assigned UDS/SQL pubset declaration (see the "Database Operation" manual, Pubset declaration job variable). Faulty assignment leads to the program aborting.

Figure 8: System environment for BCREATE

A UDS/SQL database can be optionally created with a 2-Kbyte, 4-Kbyte, or 8-Kbyte page format. In the 4-Kbyte and 8-Kbyte page formats, every database page is embedded in a page container (see the "Design and Definition" manual). This results in the following values for the database page length:

  • 2048 bytes for databases with a 2-Kbyte page format

  • 4000 bytes for databases with a 4-Kbyte page format (the page container is 4096 bytes)

  • 8096 bytes for databases with a 8-Kbyte page format (the page container is 8192 bytes) 

Statements for BCREATE

Statement

Default
value

Meaning

DATABASE-PAGE-LENGTH IS
   { 2KB | 4KB | 8KB }

4KB

Optional;
defines the page length for a new database:

  • 2KB
    The database is created with a 2-Kbyte page format

  • 4KB
    The database is created with a 4-Kbyte page format

  • 8KB
    The database is created with an 8-Kbyte page format

END

-

mandatory; terminates the statement input

Table 11: Statements for BCREATE

Command sequence to start BCREATE

It is assumed for the command sequence described here that UDS/SQL was installed with IMON (see section "START commands for the UDS/SQL programs").

01 /CREATE-FILE FILE-NAME=dbname.DBDIR ...

02 /CREATE-FILE FILE-NAME=dbname.DBCOM ...

03 /ADD-FILE-LINK LINK-NAME=DATABASE,FILE-NAME=dbname.DBDIR

04 /SELECT-PRODUCT-VERSION PRODUCT-NAME=UDS-SQL,VERSION=version,SCOPE=*TASK

05 /START-UDS-BCREATE

06 [DATABASE-PAGE-LENGTH IS {2/4/8}KB]

07 END

01/02

See section “Setting up DBDIR and DBCOM” in chapter "Setting up the compiler database".

04       

The specified version of BCREATE is selected.
It is generally recommended that you specify the version since it is possible for several UDS/SQL versions to be installed in parallel.

05

The UDS/SQL utility routine can also be started using the alias BCREATE.

06

The DATABASE-PAGE-LENGTH statement may be dropped only if the database is to be created with a 4-Kbyte page format.

07

The END statement is mandatory.


Example

/CREATE-FILE FILE-NAME=TRAVEL.DBDIR,SUPPORT=PUBLIC-DISK(SPACE= -
/      RELATIVE(PRIMARY-ALLOCATION=150,SECONDARY-ALLOCATION=50))
/CREATE-FILE FILE-NAME=TRAVEL.DBCOM,SUPPORT=PUBLIC-DISK(SPACE=RELATIVE -
/      (PRIMARY-ALLOCATION=550,SECONDARY-ALLOCATION=50))
/ADD-FILE-LINK LINK-NAME=DATABASE,FILE-NAME=TRAVEL.DBDIR
/SELECT-PRODUCT-VERSION PRODUCT-NAME=UDS-SQL,    VERSION=02.9B00 
/START-UDS-BCREATE
***** START        BCREATE      (UDS/SQL  V2.9  1801  )     2019-01-29   09:26:53
 +++++ WARNING: 1917 BLOCKLENGTH SET TO 4KB 
 * SCHEMAS AND SUBSCHEMAS WRITTEN TO DBDIR 
 * VERSION-RECORDS WRITTEN TO DBDIR 
 * DBCOM SUCCESSFULLY FORMATTED  
 * DBDIR SUCCESSFULLY FORMATTED 
 
 ***** DIAGNOSTIC SUMMARY OF BCREATE 
 
 +++++         1 WARNINGS 
              NO ERRORS  
              NO SYSTEM-ERRORS  
 
 ***** END OF DIAGNOSTIC SUMMARY 
 ***** NR OF DATABASE ACCESSES  :           69 
 ***** NORMAL END   BCREATE      (UDS/SQL  V2.9 1801  )     2019-01-29   09:26:53