Convert Decimal to Signed Numeric value
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Convert Decimal to Signed Numeric value Expand / Collapse
Author
Message
Posted 5/14/2009 7:35:03 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/15/2009 3:58:26 PM
Posts: 2, Visits: 3
Teradata Table structure:
CREATE SET TABLE Table1,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
field1 SMALLINT NOT NULL,
field2 DECIMAL(15,2) NOT NULL,
field3 DECIMAL(15,2) NOT NULL),
UNIQUE PRIMARY INDEX IXCSL1 ( field1 );

Record in Teradata

field1 | field2 | field3
1 | -123456789.31 | 56745111.78

Mainframe file Layout:

01 field2 PIC -(12)9.
01 field3 PIC -(12)9.

Output mainframe file for the Teradata records should look like

field1 | field2
blankspaceblankspace-123456789 | blankspaceblankspaceblankspaceblankspace56745112


I am trying to extract records from Teradata to Mainframe using BTEQ XPORT.

I have used various combinations of cast, format; I can think of. But I am not getting the desired result.


Any help will be appreciated.
Post #15428
Posted 5/15/2009 12:46:05 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: PAC and SFT Members
Last Login: 9/9/2009 4:34:06 PM
Posts: 407, Visits: 889
Use "Teradata style" cast:

field1 (FORMAT '-(12)9') (CHAR(13))
Post #15436
Posted 5/15/2009 3:59:06 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/15/2009 3:58:26 PM
Posts: 2, Visits: 3
Wowowo.. It worked!!! Thank you so much!!
Post #15446
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 3:39pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.078. 7 queries. Compression Disabled.