modify

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
ramesh_inform
Participant
Posts: 57
Joined: Mon Dec 03, 2007 12:43 am
Location: hyderabad

modify

Post by ramesh_inform »

smallint to string conversion in modify stage

Will the modify stage implicitly converts smallint to string ?or do we need to manually do it?

i dont find any smallint to string conversion function in parallel job developer's guide
ramesh.n.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

did you try, if modify stage implicitly converts smallint to string ?

have you created any job for it?
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

It does default conversion.

Your specification should be of the following format:

output_column=input_column
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

It does default conversion.
somehow it is not doing for me. i just tried reading a sequential file with a integer column---modify----dataset,

in dataset i defined the column as varchar, but when i see the metadata of the dataset in dataset management, it is still integer.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Delete the Data Set from Data Set Management utility then re-run the job. Do the same results obtain?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ramesh_inform
Participant
Posts: 57
Joined: Mon Dec 03, 2007 12:43 am
Location: hyderabad

Post by ramesh_inform »

i created a sample job

DB2--->modify------>sort------->DB2


i used the following transformation
REMARK_OCCR_NR : nullable string[5] = REMARK_OCCR_NR

job ran but with following warnings
modify: When checking operator: When binding output schema variable "outRec": When binding output interface field "REMARK_OCCR_NR" to field "REMARK_OCCR_NR": Implicit conversion from source type "int16" to result type "string[5]": Converting number to string. [api/interface_rep.C:6248]
Last edited by ramesh_inform on Wed Jul 02, 2008 9:34 pm, edited 1 time in total.
ramesh.n.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

So you learn that it DOES do implicit conversion in this case.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ramesh_inform
Participant
Posts: 57
Joined: Mon Dec 03, 2007 12:43 am
Location: hyderabad

Post by ramesh_inform »

yes
how to remove the warning?
ramesh.n.
OddJob
Participant
Posts: 163
Joined: Tue Feb 28, 2006 5:00 am
Location: Sheffield, UK

Post by OddJob »

The warning is DataStage saying...
'Look, it's implicit this conversion, please don't tell me how to do my job'

All you need for the Modify Specification is:
KEEP REMARK_OCCR_NR

The input is of type SmallInt (Int16), just set your output type to char[5] nullable.

I suspect you could do this in a copy stage if you don't have any explicit conversion requirements.
ramesh_inform
Participant
Posts: 57
Joined: Mon Dec 03, 2007 12:43 am
Location: hyderabad

Post by ramesh_inform »

oddjob,


yes i did the same
but iam getting junk values in the output
ramesh.n.
OddJob
Participant
Posts: 163
Joined: Tue Feb 28, 2006 5:00 am
Location: Sheffield, UK

Post by OddJob »

What 'junk' values do you get? Please give details of the input and output you're getting, along with details of input / out types and modify spec etc.

In my test job I had no issues (no consolation to you though, sorry).
Post Reply