Using 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

kdronam
Participant
Posts: 3
Joined: Wed Jul 24, 2002 2:07 pm

Using sort stage

Post by kdronam »

I'm new to DataStage.
Can you please suggest on how to use the sort stage.
I'm having trouble in getting it working.

I have a simple test in which I have a seq.file
passed to sort stage and output to a sorted seq. file

Error as following
sorttest..sort1: Internal Error: sort specification error, function create_sort_spec returned [Invalid column 'DSLink3.date' in sort specification]

tried different ways without the Link etc., still no good.

Thanks in advance.
cmueller
Participant
Posts: 46
Joined: Wed Oct 23, 2002 7:10 am

Post by cmueller »

The sort specification in the sort stage is case sensitive, check your input sequential stage, specifically 'DSLink3.date'.
Oancea
Participant
Posts: 2
Joined: Tue Jul 20, 2004 7:42 am

Re: Using sort stage

Post by Oancea »

kdronam wrote:Error as following
sorttest..sort1: Internal Error: sort specification error, function create_sort_spec returned [Invalid column 'DSLink3.date' in sort specification]
Sort specification has this format:
<ColumnName> <Order> [, <ColumnName> <Order>, ...]
where <Order> take 'ASC' or 'D' values (it's not case sensitive)
In your case, type: date asc
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Don't use link name in the sort spec, simply specify the column names.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi, This is an old link and I am getting the sam error and the solution mentioned in this post did not help.

sort..Sort_1: Internal Error: sort specification error, function create_sort_spec returned [DSTAGE-SORT-0059`:`Invalid sort specification]

In the sort specifications, i specify the column name and temp directory name. Other parmeters are default.

What else is required?

THanks
Ketfos
ketfos
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Hi,
What are your input columns and what you are specifying as keys in sort stage?
pandeeswaran
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

My source is the database. I do not want to use order by in database SQL.
That is why I using sort stage.

In Sort Specifications , I give the name of the column on which I want to sort.
In temporary directory, I give name of the Unix directory

In input columns, i chose all columns and specify a key column.
In output columns, i chose all columns and specify a key column.

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

Post by ray.wurlod »

Did you give the name of the column followed by a space then one of asc, ASC, desc or DESC ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

I did not give the name of the column followed by asc or desc.

After reading your email, i did give the name of column, followed by asc.

The job now runs correct.

Thanks Ray.

1. Where in the documentation I can see this syntax of sort to specify sort order?

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

Post by ray.wurlod »

My guess would be the Sort stage chapter in the Server Job Developer's Guide.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

I reading the Websphere Datastage Server Job Guide - 46desjd.pdf
The Chapter 4
mentions all the stages below expect SOrt Stage.
1. Folder
2. Seq File
3. hash File
4.Aggregator
5.Merge
6. Transformer
7. Link Collector and Partition
8.IPC
9. Command
10. Ftp

Ketfos
ketfos
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Ketfos,
I believe your problem gets resolved.
So can you please resolve this topic?

Thanks
pandeeswaran
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Where do I click to maark it resolved?
ketfos
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

You can find the button at the top of te page as mark topic:resolved .
pandeeswaran
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

I am not orignal author.

I have opened an old post which had the same error message but there was no clear resolution.

hence I cannot close the issue, athough my problem is resolved after inputs from Ray.

Ketfos
ketfos
Post Reply