Sekhar
Sekhar

Reputation: 699

Teradata FastExport Issue: Incorrect Export Column into Mainframe PS File

I’m trying to export data from a Teradata table into a Mainframe PS file using FastExport, but one of the columns contains a [C] value, and it’s not being exported correctly. Instead of square brackets I am getting a junk kind of data.

Teradata col contains the data like this: test [C] (12345)

After running the JCL I am getting the data like this : test ÝC" (12345)

What I've Tried: I assumed this was a character encoding issue, so I added SET SESSION CHARSET 'ASCII'; in the FastExport script.I also tried explicitly declaring FORMAT TEXT and setting the output to MODE RECORD. I tried to declare the .CHARSET before/after the EXPORT statement too.

My code:

.LOGTABLE TERADB.MY_LOG;

DATABASE TERADB;

/* Set character set explicitly */
/*.SET SESSION CHARSET 'ASCII'; */
.SET SESSION CHARSET 'ASCII';

/* Export data */
.BEGIN EXPORT;
.EXPORT OUTFILE FASTOUT 
    MODE RECORD 
    FORMAT TEXT;

SELECT 
    COL_1,
    COL_123 (FORMAT'X(250)') (CHAR(250))  /* Column contains [C] */
FROM TERADB.MyTable;

.END EXPORT;
.LOGOFF;

Even after setting the session charset to ASCII, the [C] value is still not being exported correctly, and I continue getting junk characters in the PS file.

Is there a specific charset or format option I should use to preserve these characters during FastExport?

Any help would be appreciated!

Upvotes: 0

Views: 42

Answers (0)

Related Questions