EBCDIC date issue

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Akhobare
Participant
Posts: 17
Joined: Mon Aug 17, 2009 8:24 am
Location: Pune

EBCDIC date issue

Post by Akhobare »

Hi,

I am new to EBCDIC file format. I am reading EBCDIC file through Seq. file stage ( not CFF).

Below properties are set : I referred exisitng simple jobs from our repository.

character set : EBCDIC
byte order : big-endian
data format : binary
Recod Type : implicit , delimiter : none.

I have below expression in Transformer.

StringToDate((Lnk_read_from_source.STM_YR):'-':Lnk_read_from_source.STM_MO:'-':Lnk_read_from_source.STM_DAY),"%yyyy-%mm-%dd")

Now , this seems to be leading to below warning.

"Invalid date value in getInputFieldAsDate() for field '1' of input dataset '0'." and further failure in Teradata Mload.Records are going to first Error table.

Can any one help me to know issue?

I can guess , i may need to convert EBCDIC year/day/month fields to ASCII format. IF true , how? Unfortunately we don't have any existing routines in repository..

Thanks in advance. Early reply welcome.
Regards,
Akshay
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The stage is doing the conversion for you. Add a peek stage and verify the date format you are building, probably easier to debug if you build it in a stage variable and then convert the end result.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Re: EBCDIC date issue

Post by vivekgadwal »

I wonder if there is a space/spaces arriving within any one of the fields which is causing the tool to throw this error message :? . Please check and see if there is a need to add function to handle this.
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
vinodbp
Participant
Posts: 19
Joined: Thu Nov 29, 2007 12:29 am
Location: KOLKATA

Re: EBCDIC date issue

Post by vinodbp »

You need to convert EBCDIC year/day/month fields to ASCII format.

Try below option -

Dtx( seq( DateColomn[1,1]),2) : "-": Dtx( seq( DateColomn[2,1]),2) : "-":Dtx( seq( DateColomn[3,1]),2)

Thanks
Vinod





Akhobare wrote:Hi,

I am new to EBCDIC file format. I am reading EBCDIC file through Seq. file stage ( not CFF).

Below properties are set : I referred exisitng simple jobs from our repository.

character set : EBCDIC
byte order : big-endian
data format : binary
Recod Type : implicit , delimiter : none.

I have below expression in Transformer.

StringToDate((Lnk_read_from_source.STM_YR):'-':Lnk_read_from_source.STM_MO:'-':Lnk_read_from_source.STM_DAY),"%yyyy-%mm-%dd")

Now , this seems to be leading to below warning.

"Invalid date value in getInputFieldAsDate() for field '1' of input dataset '0'." and further failure in Teradata Mload.Records are going to first Error table.

Can any one help me to know issue?

I can guess , i may need to convert EBCDIC year/day/month fields to ASCII format. IF true , how? Unfortunately we don't have any existing routines in repository..

Thanks in advance. Early reply welcome.
vinodkumar.b.p
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

If the NLS is EBCDIC, it will convert the data to ASCII.

Also, dtx is to convert decimal to hex right? Will it convert EBCDIC to ASCII?
Arun
Post Reply