regarding sort stage

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
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

regarding sort stage

Post by avi21st »

Hi,
odbc----->sort----->odbc
iam using sort stage , in the properties tab of sort stage.
when i enter IN THE SORT SPECIFICATIONS I ENTERED---MGR ASC.

MGR-IS THE I/P COLUMN IN MY SOURCE TABLE.
in the target table i can see the data organised by itself, what i mean is that i thought if i enter MGR ASC- It only sorts that particular column only.
but it organises another column too.
b/f sort after sort
JOB MGR JOB MGR
SALESMA N 7902 MANAGER 7605
MANAGER 7605 SALESMAN 7902
i just want to know why does it sort another columns too,it because the inorder to maintain the meaningful data.
bz in the sort specifications i just entered --- mgr asc.
when i design
odbc--->aggregator---->odbc
CONNECTED the same ODBC to sort and then sequential file.
why isn't it tansfering the records to sort component.
it just transfering the records to aggregate component.
plz help me in analyzing.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

It will sort on column 'MGR' but other the rest of the columns are going to remain intact. Also, didnt get a clear picture of your second requirement.
Suggestion:
Get rid of the sort stage and put an order by MGR clause in the odbc stage. This way you will select sorted data.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

hi,
thanks very much.
my second query is.

source stage- odbc
iam connecting the same stage to aggregator and sort.
its transferring records to aggregator but not sort component.
why is that so happening.
i see that its performing aggregation and dumping in to target.
i want to sort the record and dump into sequential file.
to my suprise my source-ODBC is just transferring records to one i/p
its not transferring records to another i/p sort.
iam getting this error.
DataStage][SQL Client][ODBC][Oracle][ODBC][Ora]ORA-00903: invalid table name
where am i going wrong , plz help me.
cheers;
abhi
|
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Ok i get it now. Click on the odbc stage, from the dropdown on the outputs tab, choose the second link and add all the info for the second link again. It has nothing defined and hence your problems.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It sorts ROWS.
The sort key only serves to specify the basis of how to sort the rows.

This is true of every sorting mechanism, not just DataStage's.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

hi,
in order to eliminate sort component.
in the source stage- selection tab i have given ORDER BY MGR ASC.
iam getting error- MISSING EXPRESSION.
regarding the second query.
iam creating a link from odbc to sort and also loaded the metadata into sort component.
why doesn't it load records into sort.
plz hellp me , what should i specify in the selection tab of source stage.
plz help me.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Post the full error message. This is not the kind of message I would expect to see from a Sort stage. Examine the error message fully to determine which stage generates it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

That error message is from the odbc stage. I think you need to put ORDER BY clause in the bottom half and not the selections tab. Cant remember whats it called, and dont have access to DS at the moment.

As per your second query, do you have the dsn name, table name all properly set for the link going to the sort stage?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply