Working of Parameter Markers

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
gradkarthik
Participant
Posts: 28
Joined: Fri Jul 29, 2005 3:51 pm
Location: Arizona, USA

Working of Parameter Markers

Post by gradkarthik »

Hi
I have some doubts about the working of parameter markers. in one of my jobs i have a col with values like 0.69999999 which i want to round off to 0.7 and output to a sql server table.
I do this in the transformer by specifying the datatype for that col on output side as decimal (2,1).
the value gets rounded off to 0.7 which is seen in the log message on director but the sql returns an error msg as

Code: Select all

[DataStage][SQL Client]Parameter marker text size exceeds allocated space
while doing the insert.
I searched on the forum and found a post which says that if there n cols then there would be n parameter markers but doesnt explain how the parameter markers work.
my doubt is if DS is already rounding off the value in transformer stage, then SQL server should not give the error unless the rounding off is being done by the SQL database.
If anyone can point where i am going wrong..
Karthik
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Greetings to Arizona, gradkarthik (my home).

DataStage server doesn't perform an actual data conversion by just specifying the new column width in a transform, you need to do an explicit conversion on this column to convert it. I am not at a DS system right now, but I would use the FMT(In.Column,'R2') {please check the format function, I am not sure that this is a correct format}
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

OCONV(link.column, "MD20") will shift the decimal 0 places and round to 2 decimals. MD24 means shift 4 places and round to 2. MD00 means no shift and round up to no decimals.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
gradkarthik
Participant
Posts: 28
Joined: Fri Jul 29, 2005 3:51 pm
Location: Arizona, USA

Post by gradkarthik »

Hi to all,
thanks ArndW and KcBland for the suggestions. I was playing around with the job when i observed that if i ran the same job with just specifying decimal(2,1) on the output link and output the result to a flat file then without using oconv or fmt in the transformer, the value gets rounded off.

Its only when you write to a relational database table like Sql server when the parameter marker comes into the picture. I tried using the oconv and it worked fine.

But the doubt still remains of why when writing to flat file, DS rounds off values by just specifying resultant metadata while when writing to sql server, it explicitly asks for oconv.

Thanks for your time.
Karthik
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is this ODBC?

By default the maximum row size you can transfer via ODBC is 8192 bytes. You can change this for a particular DSN or globally by placing MAXFETCHBUFF directives in uvodbc.config file.

Similarly the default maximum number of columns is 400, and the configuration parameter is MAXFETCHCOLS.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gradkarthik
Participant
Posts: 28
Joined: Fri Jul 29, 2005 3:51 pm
Location: Arizona, USA

Post by gradkarthik »

Hi Ray,
I didnt understand what the MAXFETCHBUFF and maximum number of columns (MAXFETCHCOLS) have to do with the rounding of data in a particular column.

My main question now is how DS rounds off data by just specifying say, Decimal(2,1) on the output side in transformer stage for a particular col, when you are writing to a flat file.
whereas when you run the same job with only difference of writing to a sql server table via ODBC stage, gives the
[DataStage][SQL Client]Parameter marker text size exceeds allocated space error.

Karthik
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I addressed a possible cause of Parameter marker text size exceeds allocated space
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply