Fastload from a mainframe (usage comp - format)

Database

Fastload from a mainframe (usage comp - format)

How to fastload a USAGE COMP from mainframe to Teradata?

An USAGE COMP-3 can be defined as Decimal(12,2) or something like that in the DEFINE section.
Signed fields can be loaded by using a FORMAT in the INSERT part (like Format '9999V99S').

I tried a lot of things, but fastload is rejecting the records.

Any suggestion?

2 REPLIES

Re: Fastload from a mainframe (usage comp - format)

I assume you are referring the COMP data type in IBM COBOL, which is a signed binary integer in twos-complement form. It may be 16, 32 or 64 bits wide. In Teradata, it should be declared as BIGINT (64 bits), INTEGER (32 bits) or SMALLINT (16 bits) depending on the width.

Re: Fastload from a mainframe (usage comp - format)

Thanks for this information but I'm not sure.

The definition on mainframe is:

10 RMGLV026-AORG-CD PIC X(5).
10 RMGLV026-GLIN-AMT PIC S9(11)V9(2) USAGE COMP.
10 RMGLV026-GLIN-AH-SEC-CD PIC X(12).

The second field is given problems during fastload.
This amount is a decimal field (11 positions before and 2 positions after the decimal point, with a virtual decimal point). Total number of bytes: 8 bytes.

Example (HEX display):
......ûÙ = EBCDIC
000000DF > Hexadecimal: 000000000006DBFD
000006BD