Reg. Sort command in Windows

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
Naveen
Premium Member
Premium Member
Posts: 15
Joined: Sat Jan 07, 2006 10:51 pm

Reg. Sort command in Windows

Post by Naveen »

Hi,

As we were using Sort stage in job for processing more than 10 lakh records. Its taking huge time(4-5 hours). Performance was very poor because of this.Our DS server is windows. pls provide the sort command for a delimited file in DOS. So that we ll try using this command in Before stage routine. Hope it ll increase the performance by using this command.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What is your source? Is it a flat file or a database?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Naveen
Premium Member
Premium Member
Posts: 15
Joined: Sat Jan 07, 2006 10:51 pm

Post by Naveen »

DSguru2B wrote:What is your source? Is it a flat file or a database?

It's flat file only..
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Check here.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Naveen
Premium Member
Premium Member
Posts: 15
Joined: Sat Jan 07, 2006 10:51 pm

Post by Naveen »

DSguru2B wrote:Check here.
Hi DSGURU,

In this link i didn't find any option for delimiter. I want to sort delimiter file in DOS. i have searched in google. Pls provide me the syntax of SORT command in DOS for a delimited file.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

All MS-DOS commands have help built-in. Open a command prompt in Windows - Start / Run / cmd - and then type the command followed by /?:

Code: Select all

sort /?
SORT [/R] [/+n] [/M kilobytes] [/L locale] [/REC recordbytes]
  [[drive1:][path1]filename1] [/T [drive2:][path2]]
  [/O [drive3:][path3]filename3]
  /+n                         Specifies the character number, n, to
                              begin each comparison.  /+3 indicates that
                              each comparison should begin at the 3rd
                              character in each line.  Lines with fewer
                              than n characters collate before other lines.
                              By default comparisons start at the first
                              character in each line.
<snip everything else>
You'll get all the options that exist for the command. You didn't find a delimiter option for sort because there isn't one. If you really want to use the DOS command, you'll need to convert your delimited file to fixed-width and then use the /+n option.

At that point, you might as well use the Sort stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Sort stage in server jobs is universally acknowledged to be horrible. I'd suggest getting a UNIX emulator for Windows, such as MKS Toolkit or Cygwin, and using the sort command therein.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Granted, but it's the only alternative that doesn't require an outlay of cash. :wink:

Curious, would the DOS sort command be any better? I doubt it, but have nothing to base that opinion on.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

With neither statistics nor knowledge of the internal sort algorithms available to me, I feel it would be unwise to offer an opinion.
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