Page 1 of 2

Modify stage error

Posted: Wed May 09, 2007 10:00 am
by reddy12
I am using modify stage to resolve the below warning
"TABLENAME: When checking operator: When binding output interface field "DATE" to field "DATE": Converting a nullable source to a non-nullable result;
a fatal runtime error could occur; use the modify operator to
specify a value to which the null should be converted".

I specified in properties specification=DATE:timestamp = handle_null(DATE," ").

Can anyone please help me? i am getting the below Error.

Modify_14: Error when checking operator: When binding output schema variable "outRec": When binding output interface field "DATE" to field "DATE": Bad literal for type timestamp: .

Posted: Wed May 09, 2007 11:12 am
by DSguru2B
" " is not a DATE in any book. Provide a meaningful default such as 9999-12-31 or 1900-01-01 etc.

Posted: Wed May 09, 2007 12:37 pm
by reddy12
I gave like this in modify stage.
DATE:timestamp = handle_null(SRC_DATE,"12/31/9999")

Again i got the following error message.

Modify_13: Error when checking operator: When binding output schema variable "outRec": When binding output interface field "SRC_DATE" to field "DATE": Bad literal for type timestamp: 12/31/9999.
DSguru2B wrote:" " is not a DATE in any book. Provide a meaningful default such as 9999-12-31 or 1900-01-01 etc.

Posted: Wed May 09, 2007 12:37 pm
by reddy12
I gave like this in modify stage.
DATE:timestamp = handle_null(SRC_DATE,"12/31/9999")

Again i got the following error message.give me idea

Modify_13: Error when checking operator: When binding output schema variable "outRec": When binding output interface field "SRC_DATE" to field "DATE": Bad literal for type timestamp: 12/31/9999.
DSguru2B wrote:" " is not a DATE in any book. Provide a meaningful default such as 9999-12-31 or 1900-01-01 etc.

Posted: Wed May 09, 2007 12:42 pm
by DSguru2B
Try giving '9999-12-31'

Posted: Wed May 09, 2007 2:00 pm
by reddy12
Hai I am getting the following error.i tried two dates. I am getting this error.please check this error.

actually there are two columns one is date field and another is varchar field.

main_program: Error parsing modify adapter: Error in binding: Expected ')', got: "-31"
Expected destination field selector, got: ")"; input:
DATE1 = handle_null(DATE1,12-31-9999)
;
COL= handle_null(COL," ")
;
Error parsing modify adapter: Error in binding: Expected ')', got: "-31"
Expected destination field selector, got: ")"; input:
DATE2 = handle_null(DATE2,12-31-9999)
;
COL= handle_null(COL," ")
;
DSguru2B wrote:Try giving '9999-12-31'

Posted: Wed May 09, 2007 2:00 pm
by reddy12
Hai I am getting the following error.i tried two dates. I am getting this error.please check this error.

actually there are two columns one is date field and another is varchar field.

main_program: Error parsing modify adapter: Error in binding: Expected ')', got: "-31"
Expected destination field selector, got: ")"; input:
DATE1 = handle_null(DATE1,12-31-9999)
;
COL= handle_null(COL," ")
;
Error parsing modify adapter: Error in binding: Expected ')', got: "-31"
Expected destination field selector, got: ")"; input:
DATE2 = handle_null(DATE2,12-31-9999)
;
COL= handle_null(COL," ")
;
DSguru2B wrote:Try giving '9999-12-31'

Posted: Wed May 09, 2007 2:10 pm
by DSguru2B
You have to specify the default value within quotes.

Code: Select all

DATE1=handle_null(DATE1,'9999-12-31') 

Posted: Wed May 09, 2007 3:06 pm
by reddy12
I specified same like you sent. But i am getting this error.

main_program: Error parsing modify adapter: Error in binding: Expected ')', got: "-12"
Expected destination field selector, got: ")"; input:
SRC_DATE = handle_null(SRC_DATE,9999-12-31)
;
DUMMYCOL= handle_null(DUMMYCOL," ")
;
Error parsing modify adapter: Error in binding: Expected ')', got: "-12"
Expected destination field selector, got: ")"; input:
RUN_DT = handle_null(RUN_DT,9999-12-31)
;
DUMMYCOL= handle_null(DUMMYCOL," ")
;
DSguru2B wrote:You have to specify the default value within quotes.

Code: Select all

DATE1=handle_null(DATE1,'9999-12-31') 

Posted: Wed May 09, 2007 3:07 pm
by reddy12
I spcified like this

SRC_DATE = handle_null(SRC_DATE,'9999-12-31')

RUN_DT = handle_null(RUN_DT,'9999-12-31')
reddy12 wrote:I specified same like you sent. But i am getting this error.

main_program: Error parsing modify adapter: Error in binding: Expected ')', got: "-12"
Expected destination field selector, got: ")"; input:
SRC_DATE = handle_null(SRC_DATE,9999-12-31)
;
DUMMYCOL= handle_null(DUMMYCOL," ")
;
Error parsing modify adapter: Error in binding: Expected ')', got: "-12"
Expected destination field selector, got: ")"; input:
RUN_DT = handle_null(RUN_DT,9999-12-31)
;
DUMMYCOL= handle_null(DUMMYCOL," ")
;
DSguru2B wrote:You have to specify the default value within quotes.

Code: Select all

DATE1=handle_null(DATE1,'9999-12-31') 

Posted: Wed May 09, 2007 8:49 pm
by ray.wurlod
What is your default date format string in DataStage?

Posted: Thu May 10, 2007 7:16 am
by reddy12
In oracle table the date is like this 5/1/2007(source)
I took datatype as timestamp in datastage

in my job without modify stage the job is running.but i am getting warningslike below:
When checking operator: When binding output interface field "DATE" to field "DATE": Converting a nullable source to a non-nullable result;
a fatal runtime error could occur; use the modify operator to
specify a value to which the null should be converted.

To resolve that warning i am using modify stage.from source one timestamp field and one varchar field are coming.after this i am getting error like i mentioned previous post.
ray.wurlod wrote:What is your default date format string in DataStage? ...

Posted: Thu May 10, 2007 5:10 pm
by ray.wurlod
To answer my question open the Administrator client, open the Parallel tab in your project properties, and determine the date, time and timestamp format strings recorded there. These are the defaults for your project. Chances are that the default date format is "%yyyy-%mm-%dd", which follows the ISO 8601 standard. Modify stage will use this format unless otherwise specified in square brackets.

Posted: Thu May 10, 2007 6:03 pm
by reddy12
time stamp is the default datatype
ray.wurlod wrote:To answer my question open the Administrator client, open the Parallel tab in your project properties, and determine the date, time and timestamp format strings recorded there. These are the defaults ...

Posted: Thu May 10, 2007 6:05 pm
by reddy12
Default timestamp is %yyyy-%mm-%dd %hh:%nn:%ss
ray.wurlod wrote:To answer my question open the Administrator client, open the Parallel tab in your project properties, and determine the date, time and timestamp format strings recorded there. These are the defaults ...