Date Field load - Error

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
ds_search2008
Participant
Posts: 75
Joined: Thu Nov 27, 2008 10:12 am

Date Field load - Error

Post by ds_search2008 »

In my job

Input Column : Date_In
DataType : Date
Length : 10

Output column : Date_out
Data type : Date
length : 4

Its a one to one mapping from source to target. Target is a mainframe table in DB2. I am using a DB2 UDB API stage. When I tried to view the output from the target DB2 the following error message appears:

IAPAY..DB2_UDB_API_64: [IBM][CLI Driver][DB2] SQL0206N "DATE_OUT" is not valid in the context where it is used. SQLSTATE=42703

DSTAGE-DB2CLI-0027`:`SQLExecDirect: Error executing statement 'SELECT ....'. See following DB2 message for details.
IAPAY..DB2_UDB_API_64.DSLink1: DSP.Open GCI $DSP.Open error -100.

I tried but couldn't find a solution. Can anybody help me in fixing this error please?

Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The statement starts with "SELECT", so wouldn't that be your source DB2 stage? Do you use custom SQL in the stage and what is the SELECT statement?
ds_search2008
Participant
Posts: 75
Joined: Thu Nov 27, 2008 10:12 am

Post by ds_search2008 »

Thanks for your reply.

Source DB2 stage - Query Type
Generate SELECT clause from column list; ...

I can view the source data using View Data... option.

Input date is shown as : 14641 (2008-01-31)
Input column data type is Date and length is 4.

The same data type and length are defined in output DB2 mainframes table. I am unable to view the target data.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm really confused now. The output DB2 stage in DataStage does not allow a "view data" to be done. Is the error message from run time? What is your output SQL?
ds_search2008
Participant
Posts: 75
Joined: Thu Nov 27, 2008 10:12 am

Post by ds_search2008 »

The DB2UDB API target has view data option on Input tab --->view data button. I fixed this problem now. Thanks a lot.
Post Reply