-
Notifications
You must be signed in to change notification settings - Fork 0
ExportBlock
An ExportBlock represents the output data of a single EXPORT statement. It captures a variety of information like the record name, columns, and the actual data.
These blocks are made of a mix between standard ASCII and encoded sections using the standard encoding scheme.
An export block is made up of the following broad sections:
- Export Statement
- Record Metadata*
- Column List
- Data Rows
This is a standard ASCII section that contains the original EXPORT statement. This can span multiple lines and is ended once a / is seen on its own line.
Here is an example:
EXPORT PSOPRDEFN.PSOPRDEFN WHERE
OPRID IN ('VP1')
Immediately following the export statement is a encoded blob of binary information. This section represents a lot of metadata about the record. There are a lot of pieces to it so it is documented separately here
The encoded information is wrapped by lines with just a / on them, for example:
/ A(E)B(AA)A(N)B(AA)A(G)B(AAAAAA)A(P)B(AA)A(S)B(AAAAAAAAAAAAAAAAAAAAAAAA) B(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) B(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)A(P)B(AA)A(S)B(AA) ... /
After the record metadata there is an regular ASCII section that denotes the columns of the table. The general format for this is COLUMN_NAME:TYPE(SIZE)~~~
The columns are appended such that no line exceeds 70 characters.
Example:
EMPLID:CHAR(11)~~~NAME_TYPE:CHAR(3)~~~NAME_USAGE:CHAR(10)~~~ SAE_TARGET_ID:CHAR(50)~~~SAE_LIS_NAME_TYPE:CHAR(4)~~~ SAE_LIS_NAME_LNAME:CHAR(30)~~~COUNTRY_NM_FORMAT:CHAR(3)~~~ NAME:CHAR(50)~~~NAME_INITIALS:CHAR(6)~~~NAME_PREFIX:CHAR(4)~~~
The data rows section is wrapped in / lines similar to the Record Metadata. Between these lines there are zero to many Rows.
Each row consists of a comma separated list of values, where each value represents 1 column of data from the row. Each specific column value is encoded.
An example row would be:
A(000000019),A(0001),A(000115),A(000001086),A( ),A( ), //
This example shows a single row of data, that has 6 columns.
note: The column values themselves are encoded, this does not include the commas between columns, they should be printed out normally.