Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fast export issue to MVS

Status
Not open for further replies.

jones1

Programmer
Feb 5, 2003
6
US

Hi,

I am attempting a fast export of a decimal(18,0) field to a fixed file format MVS file. So, I want to put the field into character(18). This file will not be reloaded directly into teradata until other processing occurs.

if I select field from table the results is a mess.

if I select field (decimal(18,0)) from table the results are still a mess

if I select cast(field as character(18)) I get results but with a decimal point at the end (which I don't want)

if I select field (format 'Z(18)') I get junk

if I select cast(cast(field as integer) as character(18))
the data looks correct for really short field values, but an overflow error occurs on long values.

Any thoughts?
 
Very descriptive error messages ;-)

Are you shure about Char(18)? You'll loose the sign...

I don't think it's a mainframe problem:
--left aligned
cast((field (format 'Z(18)')) as char(18))

--right aligned
field (format 'Z(18)') (char(18))

Dieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top