Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

BALTER statements

BALTER recognizes the following statements:

Statement

Default
value

Meaning

[SORTCORE IS nnn.]

150

Specifies size of sort area

EXECUTION IS {YES | NO}.

-

Starts/does not start restructuring phase

REPORT IS {YES | NO}.

-

Requests/suppresses logging

[FILL itemname OF recordname WITH value.]

-

Initializes the field itemname of recordname in all existing records with user-defined value, instead of zeros or blanks.

[FILLING IS nnn PERCENT
  [ IN SET NAME IS
    {setname,... |
    
*ALL[ EXCEPT setname,..]}].]  

-

Specifies table occupancy level
(Format 1)

[FILLING WITH POPULATION
  [ IN SET NAME IS
    {setname,... |
    
*ALL[ EXCEPT setname,..]}].]   

-

Specifies table occupancy level
(Format 2)

END.

-

Terminates entry of statement

Table 42: Statements for BALTER

The statements are described in detail in the following pages.

SORTCORE (Specifying the size of the sort area)

To sort elements (records/table rows), BALTER uses the BS2000 utility routine SORT. The SORTCORE statement allows you to specify the size of the main memory space required for the sort area of the SORT routine (see "ALLOC statement" in the "SORT (BS2000)" manual).

[SORTCORE IS nnn.]

nnn

You specify the size of the sort buffer memory space to be made available to the BS2000 SORT utility routine in 4-Kbyte units (see "ALLOC statement" in the "SORT (BS2000)" manual).
Default value:150

The sort data population is the same as that on which the size of work file 2 is based (see "System environment in the restructuring phase"). 

EXECUTION (Starting/not starting the restructuring phase)

The EXECUTION statement specifies whether BALTER is to carry out the analysis phase and analyze the changes made to the schema and the storage structure, or, in addition, to implement the restructuring phase and adapt stored data to the changes.

The EXECUTION statement must be specified.

EXECUTION IS {YES | NO}.

NO

YES

analysis phase only

analysis and restructuring phases

REPORT (Requesting/suppressing logging)

The REPORT statement specifies whether or not BALTER is to print out an analysis report (see section "Description of the analysis report (REPORT phase)").

The REPORT statement must be specified.

REPORT IS {YES | NO}.

YES

NO

BALTER prints out an analysis report

BALTER does not perform logging

FILL

The FILL statement can be used to initialize new items with a user-defined value, instead of zeros or blanks.

[FILL itemname OF recordname WITH value.]

Where itemname and recordname are identifiers of record and field in it. Itemname must denote a new field.

Value is:

  • [+,-]n[,n] — for numeric, where n — sequence of decimal digits (0-9), for separation integer and fractional parts comma(‘,’) is used;
  •  ‘Z’ — for alphanumeric, where Z — sequence of character symbols;
  • X’n’ — for all types, value is entered in hexadecimal representation, where n — even amount of hexadecimal digits (0-F).

Notes for binary types and unpacked:

value must only contain ‘+’, ‘-’, comma and digits from 0 to 9. ‘+’ and ‘-’ must precede the first digit. The digits aligned to the right. If there is no sign in value, it has a positive value. Value can contain no more than one comma.

Notes for database keys:

value must be entered only in binary format using hexadecimal representation.

Example 1:

Database has following structure (after restructuring):

...

RECORD NAME IS

EMPLOYEE.

01 ID1

TYPE IS DATABASE-KEY-LONG.

01 FIRSTNAME

TYPE IS CHARACTER 6.

01 SALARY

TYPE IS FIXED REAL DECIMAL 7,3.

01 DEBT

TYPE IS BINARY 31.



RECORD NAME IS

IMPORTANT-DATA.

01 ID2

TYPE IS DATABASE-KEY-LONG.

01 DATA

PICTURE IS X(200).

...

Command to start BALTER:

01

/START-UDS-BALTER

02

REPORT IS YES.

03

EXECUTION IS YES.

04

FILL FIRSTNAME OF EMPLOYEE WITH ‘JOHN’.

05

FILL SALARY OF EMPLOYEE WITH 1535,89.

06

FILL DEBT OF EMPLOYEE WITH -120000.

07

FILL DATA OF IMPORTANT-DATA WITH X’A1B2C3’.

08

END

Value is converted to the data type of the field itemname. If this is not possible, BALTER execution will be stopped.

Maximal length of entered value is 255 characters.

In case if value is long and total length of the FILL statement is more than 72 characters, you can enter a value as shown in the example 2 below.

BALTER reads 72 characters per line until it finds a closing quote.

Example 2:

FILL DATA OF IMPORTANT-DATA WITH 'DataDataDataDataDataDataDataDataDataDa
taDataDataDataDataDataDataDataDataDataDataDataDataDataDataDataDataDataDa
taData'


Example 3:

If DB has the same structure and we enter FILL statements like in the example 1, then all records will be filled with:

FIRSTNAME

‘JOHN  ’

SALARY

+1535,890

DEBT

-120 000

DATA

X’A1B2C3’

If invalid characters are entered in value or value can’t be converted to correspondent type, then BALTER execution will be stopped and error message occurs.

It is recommended to run BALTER with ”EXECUTION IS NO” statement at first and analyze error messages.

FILLING (Specifying the occupancy level of table pages)

The FILLING statement enables you to define the occupancy level of new tables.

Format 1

Specifies an occupancy level of the new tables in percent.

Format 2

Specifies a minimum size for new tables.
However, the minimum size actually used is limited by the number of table entries which fit onto a database page. Format 2 consequently only works for small tables, i.e. ones which fit onto a page.

Format 1

[FILLING IS nnn PERCENT
   [ IN SET NAME IS {setname,... | *ALL[ EXCEPT setname,..]}].]

Format 2

[FILLING WITH POPULATION
   [ IN SET NAME IS {setname,... | *ALL[ EXCEPT setname,..]}].]

nnn

Specifies to which percentage the new table pages are to be filled

nnn = 1 ... 100

POPULATION

Specifies that the POPULATION clause in the SSL is used to determine the size of new tables.

IN SET NAME IS ...

Specifies the sets in which the occupancy level specified for new tables applies.If IN SET NAME IS is omitted, FILLING applies to all new table pages. 

setname,...

The specified occupancy level applies to new table pages in the specified sets

*ALL

The specified occupancy level applies to all new table pages

*ALL EXCEPT setname,...

The specified occupancy level applies to all new table pages other than those in the sets listed after EXCEPT

  • Format 1 of the statement is effective for single-level tables and for level 0 of all multilevel tables which BALTER creates except lists.
    On level 1, tables are 95 % filled, and on every higher level one table entry is left free.

    If nnn is made too small, BALTER makes sure that there is room for at least one entry.

  • Format 2 of the statement is effective for single-level tables which BALTER creates, including lists.

  • If you do not specify FILLING, an entry on level 0 also remains free.

  • You can specify both formats simultaneously for the same set name. If required, more free table entries can occur than are specified with Format 1.

  • You can repeat the statements and consequently complement and correct preceding statements with the same format.
    The last entry therefore applies for each set name.