The individual output files for BOUTLOAD can be created using the following commands:
|
dbname
Name of the database to be processed.
nnnnn
5-digit record reference number with leading zeros.
mmmmm
5-digit area reference number with leading zeros; this specification is required if records are to be copied from only one realm.
SUPPORT
You can specify the size of the storage space by means of SPACE in the SUPPORT operand. This is only permitted for a disk.
linkname
A freely selectable link name must be specified if FILE-SEQUENCE=*NEW is set or BUFFER-LENGTH is changed. Only one TFT entry may then exist for the output file.
xxx
Default
for disk:*STD(SIZE=4)
for tape:
BUFFER-LENGTH depends on the length of the records: At least 4 PAM pages.
The value is rounded up to a whole multiple of the record length and a whole multiple of a a doubleword.
If output is to be on tape, an explicit number should be entered for BUFFER-LENGTH, rather than using standard blocks, since specifying standard blocks (STD) increases the size of the output file.
FILE-SEQUENCE=*NEW
permitted only for tape, if the same set of tapes is to be accessed in a series of BOUTLOAD runs.
The volume of data for output is calculated as follows:
number of records x reclength Bytes
The record length is calculated as follows
for records containing set information in a 2-Kbyte database:
reclength = record length as per SIA report - length of system information
+ 4 * (number of non-singular sets in which the record is a
member + 1)
+ 1 * (number of singular sets in which the record is a
member, except for MANDATORY AUTOMATIC members)
for records containing set information in a 4-Kbyte or 8-Kbyte database:
reclength = record length as per SIA report - length of system information
+ 8 * (number of non-singular sets in which the record is a
member + 1)
+ 1 * (number of singular sets in which the record is a
member, except for MANDATORY AUTOMATIC members)
for records not containing set information:
reclength = record length as per SIA report - length of system information
In the case of record types which are distributed to realms, five bytes for the area reference are added to the record length when the records are copied or extracted from multiple realms.
The records are always copied into one output file per record type. An origin from more than one realm is therefore required for the area reference to be specified.
The number of records can be obtained using the BSTATUS utility routine.
If the output files have not been previously created, they are created by BOUTLOAD on public disk. The size of each file is calculated by BOUTLOAD from the maximum number of DBTT entries for the corresponding record type.
For output files on tape it must be ensured that as many tape units are available as there are record types to be simultaneously unloaded, since BOUTLOAD copies the record types at the same time.
CSV output file
It is not obligatory to create the CSV output file. It is always created by the BOUTLOAD utility on a public disc.
The CSV output file name consists of the file name of the output file and the suffix ‘CSV’:
dbname.RECnnnnn[.mmmmm].CSV
dbname
Name of the database to be processed.
nnnnn
5-digit record reference number with leading zeros.
mmmmm
5-digit area reference number with leading zeros. This specification is required if records are to be copied from only one realm.
CSV
Suffix for CSV output file.
The records are always copied into one CSV output file per record type.
If CSV-OUTPUT = *YES is specified, the DBCOM must be available.
Creating the output record
If BOUTLOAD has also output the set information on account of the
SET-INFORMATION=YES statement, the output record is created with the following structure:
| Database Key | Item | Database keys of all owners | User part | Area ref. |
---------------+------+-----------------------------+-----------+------------
The record’s database key
A one-byte long item with the content
X’00’ = Member inserted
X’FF’ = Member not inserted
(for all singular sets in which the record is a member, except for MANDATORY AUTOMATIC members)The owners’ database keys are not singular sets in which the set is a member
If the record is not inserted in the set, the owner’s database key is set to High Value (X'FFFFFFFF' in the case of a 2-KB database, or X'FFFFFFFFFFFFFFFF' in the case of a 4/8-KB database)
User part
The five-byte area reference (realm reference) in the case of record types which are distributed to realms if their records are copied from multiple realms. The records are always copied into one output file per record type. An origin from more than one realm is therefore required for the area reference to be specified.
When BOUTLOAD outputs set information on the individual sets, the length of the database key values is specified in the BOUTLOAD log which contains the statements for a subsequent BINILOAD run (length “4” in the case of a 2-Kbyte database, length “8” in the case of a 4-Kbyte/8-Kbyte database).
Without any set information, the output record consists of the user part only.
CSV output data
The following example shows part of a data output to a CSV output file in a presentation mode similar to Microsoft EXCEL. In contrast, in a CSV file, the single values are separated by a semicolon (;).
|
|
|
| |||||||||
|
|
| ||||||||||
|
|
| ||||||||||
|
|
| ||||||||||
|
|
| ||||||||||
|
|
| ||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The header of the data output contains up to 6 rows, if a realm name was specified in COPY-RECORD:
The first row contains the name of the utility routine, the corresponding utility routine’s output format version, and the date and time of the CSV output creation.
The next rows contain database name, record name, and record reference. If a realm name was specified, the header also contains realm name and realm reference.
The header line of the record output can contain the following fields:
DB Key Ref, DB Key RSQ
Field names for the database key of the record
Member set-name
Field name for a one-byte long item with the following content:
Y Member inserted into the SYSTEM set set-name
N Member not inserted into the SYSTEM set set-name
(for all singular sets in which the record is a member, except for MANDATORY AUTOMATIC members)
Owner DB Key Ref set-name, Owner DB Key RSQ set-name
If the record is a member record, database keys of all owners are output additionally.
The item names according to the user schema
Area ref
In the case of a record type that is distributed to realms if its records are copied from multiple realms
If an item is part of a repetition group or a vector the index value is attached to the item name of such an element.
Items of the type DBKEY are output in the following format:
DB KEY REF and DB KEY RSQ.
BOUTLOAD converts binary and numeric data into a printable format as follows:
The decimal point is represented by the character "comma" (",").
Alphanumeric items of variable length are output according to the current length of the variable item.
Items of national type are converted to a user-defined character set, if it is possible.
To assign or get a user default character set, proceed as follows:
> | To assign a user default character set use the ADD-USER or MODIFY-USER commands. |
> | To get the user default character set, use the SHOW-USER-ATTRIBUTES command. |
For conversion from a national data type, the XHCS subsystem must be available in the system. If national characters cannot be converted due to an XHCS subsystem error, the warning 3935 is output, the output to this CSV file is terminated, and the CSV file is deleted.
3935 NATIONAL CHARACTERS CANNOT BE CONVERTED: XHCS RETURN CODE: returncode
If a record type contains a national data type, the corresponding CSV file is created with the CODED-CHARACTER-SET from the USER-ID.
If the CODED-CHARACTER-SET of the user cannot be determined, the warning 3936 is output, the CSV output for this record type is terminated, and the CSV file is deleted.
3936 USER CODED CHARACTER SET CANNOT BE DETERMINED: SRMUINFI RETURN CODE:
returncode
If a national character cannot be converted to a user-defined character set (because there is no equivalent), this national character is output as character "period" ("."). A warning message is output additionally:
3932 STRING CONVERSION WITH SUBSTITUTION BY DEFAULT CHARACTERS PERFORMED FOR
RECORD recordname.
A semicolon (";") is used to separate the individual values.
Alphanumeric values can contain some characters such as separators/delimiters (";"), new lines, or double quotes, which have special meanings in different system environments. All alphanumeric values are enclosed by double quotes so that these values can be processed correctly in other system environments. If a value contains embedded (double) quote characters, this double quote is represented by two (double) quote characters.