All Forums Tools
Mohan Raj.R 1 post Joined 11/07
13 Nov 2007
FastExport - Unloading and matching with Cobol datatypes

Hi All,This is an issue i have, please help.The scenario is there is FIELD1 (SMALLINT) in a table which is unloaded (FastExport). This file is to be opened in COBOL and the same is matched to a field. The SMALLINT field is stored in the file as a packed field of length of 4 (Hex Value). But cobol requires it as a Packed field of 2 (Hex value).What mapping can we use to unload this SMALLINT field to match with the COBOL field?RegardsMohan R

Fred 1096 posts Joined 08/04
13 Nov 2007

SMALLINT will be exported as two-byte binary - COBOL S9(4) COMP - by default.If you want it to be packed decimal in the file, you can CAST to DECIMAL in the FastExport.

madhavi_kl 27 posts Joined 07/06
21 Feb 2008

Can any one guide me how can i load the S9(13)V9(02) COMP variable into Teradata table.How can i CAST that into DECIMAL variable so that i wont miss any data.Thank youMadhavi.

shubh 16 posts Joined 09/07
15 May 2008

Define the field as Decimal(15,2). On the input use the conversion:field (DECIMAL(15,2),FORMAT'9(13)V9(2)S') orCAST(:field AS DECIMAL(15,2) FORMAT '9(13)V9(2)S')Note that only the first one is valid for FastLoad.PIC S9(x)V9(y) means total digits = x+y Digits after decimal = y decimal(x,y) in teradata = PIC S9(m-n)V9(n) COMP -3Let me know if this helps.

Regards,
Shubhangi

You must sign in to leave a comment.