16.10 - Examples – twbertbl - Parallel Transporter

Teradata Parallel Transporter Reference

Product
Parallel Transporter
Release Number
16.10
Published
July 2017
Content Type
Programming Reference
Publication ID
B035-2436-077K
Language
English (United States)

Example 1

This example extracts the error information from the Load operator's acquisition phase error table. This example uses the sample schema for the Load operator job:

EMP_ID   VARCHAR(20),
EMP_NUM  VARCHAR(10)

This example will use this sample content for the Load operator's acquisition phase error table:

ErrorCode ErrorFieldName DataParcel
--------- -------------- ----------------------
2683      EMP_NUM        0003003130300300313238
  • Use the following twbertbl syntax example for commands on all platforms except z/OS:
    twbertbl -h <TdpId> -u <UserName> -t <ErrorTableName>
          -n <NumberOfLoadedColumns> -o <OutputFileName>
  • On z/OS, use the following syntax example inside a JCL:
    //TWBERTBL EXEC PGM=TWBERTBL,
    // PARAM='-h TDP0 -u MyUser -p MyPass -n 2 -t LoadOpErrTbl1
    //               -o DD:DATA'
  • After the extraction, the contents of the output file name will look like this, separated by a delimiter character:
    EMP_NUM|2683|100|128

    The first field in the output file name is the field name that caused each error.

    The second field is the Teradata Database error code for each error.

    The rest of the fields are the column values of the data records for each error.

Example 2

This example extracts the error information from the Update operator's acquisition phase error table.

This example will use this sample schema for the Update operator job:

EMP_ID   VARCHAR(20),
EMP_NUM  VARCHAR(10)

This example will use this sample content for the Update operator's acquisition phase error table:

ImportSeq DMLSeq SMTSeq ApplySeq SourceSeq
--------- ------ ------ -------- ---------
1         1      1      1        1

ErrorCode ErrorField HostData
--------- ---------- ----------------------
2683      EMP_NUM    0003003130300300313238
  • Use the following twbertbl syntax example for commands on all platforms except z/OS:
    twbertbl -h <TdpId> -u <UserName> -t <ErrorTableName>
          -n <NumberOfLoadedColumns> -o <OutputFileName>
  • On z/OS, use the following syntax example inside a JCL:
    //TWBERTBL EXEC PGM=TWBERTBL,
    // PARAM='-h TDP0 -u MyUser -p MyPass -n 2 -t UpdateOpErrTbl1
    //               -o DD:DATA'
  • After the extraction, the contents of the output file name will look like this, separated by a delimiter character:
    1|1|1|1|1|EMP_NUM|2683|100|128

    The first field in the output file name is the import sequence number that caused each error.

    The second field is the DML sequence number that caused each error.

    The third field is the statement sequence number that caused each error.

    The fourth field is the apply sequence number that caused each error.

    The fifth field is the row sequence number that caused each error.

    The sixth field is the Teradata Database error code for each error.

    The seventh field is the field name that caused each error.

    The rest of the fields are the column values of the data records for each error.

Example 3

This example extracts the error information from the Load operator's acquisition phase error table using Multi-byte character delimiter.

This example uses this sample schema for the Load operator job:

EMP_ID   VARCHAR(20),
EMP_NUM  VARCHAR(10)

This example will use this sample content for the Load operator's acquisition phase error table:

ErrorCode ErrorFieldName DataParcel
--------- -------------- ----------------------
2683      EMP_NUM        0003003130300300313238
  • Use the following twbertbl syntax example for commands on all platforms exceopt z/OS:
    twbertbl -h <TdpId> -u <UserName> -t <ErrorTableName>
          -n <NumberOfLoadedColumns> -o <OutputFileName> -d <Multi-byte
          characters delimiter>
  • On z/OS, use the following syntax example inside a JCL:
    //TWBERTBL EXEC PGM=TWBERTBL,
    // PARAM='-h TDP0 -u MyUser -p MyPass -n 2 -t UpdateOpErrTbl1
    // -o DD:DATA -d aaa'
  • After the extraction, the contents of the output file name will look like this, separated by multi-byte characters delimiter ‘aaa’:
    EMP_NUMaaa2683aaa100aaa128

    The first field in the output file name is the field name that caused each error.

    The second field is the Teradata Database error code for each error.

    The rest of the fields are the column values of the data records for each error.