Modify stage 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

reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Modify stage error

Post 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: .
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

" " is not a DATE in any book. Provide a meaningful default such as 9999-12-31 or 1900-01-01 etc.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post 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.
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post 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.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Try giving '9999-12-31'
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post 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'
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post 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'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You have to specify the default value within quotes.

Code: Select all

DATE1=handle_null(DATE1,'9999-12-31') 
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post 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') 
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post 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') 
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is your default date format string in DataStage?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post 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? ...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post 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 ...
reddy12
Participant
Posts: 99
Joined: Tue Aug 08, 2006 9:34 pm

Post 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 ...
Post Reply