Result Columns in a Stored Procedure

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
MukundShastri
Premium Member
Premium Member
Posts: 103
Joined: Tue Oct 14, 2003 4:07 am

Result Columns in a Stored Procedure

Post by MukundShastri »

How many number of result columns are to be mentioned in an odbc stage while calling a stored procedure ? can anybody throw light on this.

BackGround:
I am trying to call a simple stored procedure from an odbc stage.
My job looks like this:
odbcstage --> Tranformer ---> sequential file.

I am passing an input parameter in odbc stage as my procedure requires.
I am putting one dummy column char(4) in the odbc stage to receive result set of procedure. Also I am passing a dummy value to output sequential file. Basically my aim here is to run stored procedure from datastage.
With above set up - I am getting following error while running the job:
OdbcTest..Transformer_5: |SQL statement has incorrect number of result columns.|

Can anybody throw light upon this ....!!

Thanks

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

Post by ray.wurlod »

The same number of columns as are defined on the Columns grid on that link of the ODBC stage. When you import the Stored Procedure definition it is filed within the Table Definitions branch of the Repository, so you can see how many columns it expects to be in the Columns grid.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
MukundShastri
Premium Member
Premium Member
Posts: 103
Joined: Tue Oct 14, 2003 4:07 am

Post by MukundShastri »

When I import stored procedure metadata using import--table definations--stored procedure option from Manager, the columns are left blank in the metadata; only input parameter name comes in the parameter tab.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

One input parameter means you must deliver one column from the input link.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jman
Participant
Posts: 19
Joined: Mon Jan 10, 2005 12:45 pm

Post by jman »

ray.wurlod wrote:One input parameter means you must deliver one column from the input link. ...
When I import stored procedure metadata using import--table definations--stored procedure option from Manager, the columns are left blank in the metadata; and in the parameter tab I have the following:

ReturnValue | Integer | RETURN | ...
@base | Char | IN | ...

What i must to put in the column definition?

Thanks in advance !
Post Reply