Change Hashfile name

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
martin
Participant
Posts: 67
Joined: Fri Jul 30, 2004 7:19 am
Location: NewJersy

Change Hashfile name

Post by martin »

Hi Guys,

Can i change Hashfile name instead of deleting old and creating with new name, the way we can do in database sql.

Thanks
Martin
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If it is externally pathed then yes, do so at the O/S level. Account based ones? I don't believe so... but there may be a RENAME.FILE command lurking out there somewhere for all I know.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can effectively rename the file pointer with a "COPY FROM VOC <OriginalFileName>, <NewFileName> DELETING" but the physical files at a UNIX level will remain named the same - thus if you try to create the same file again you will get an error stating the files exist already.

Perhaps if you explain what your goal is there might be a better approach to solving your question.
martin
Participant
Posts: 67
Joined: Fri Jul 30, 2004 7:19 am
Location: NewJersy

Post by martin »

Chulett / ArndW

Hashfile we have created are not upto standard naming conventions, and we want replace old names with new meaningful names, Instead of runing DSjobs and creating new hashfile.
All our hashfile are created outside project area into external directory.

Thanks
Martin
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Martin,

in that case Craig's suggestion will work. Change your job references to the Hashed files and rename the objects from the OS (type 30 files you need to rename the directory, other static hashed files rename the file itself)
martin
Participant
Posts: 67
Joined: Fri Jul 30, 2004 7:19 am
Location: NewJersy

Post by martin »

At OS level I used mv <old hashfile name> <new hashfile name>
then i set Q pointer to external directory in DS Admin and ran query but it returnded error

Code: Select all

unable to open "/ascential/datastage/DEV/Test" file
Any Idea where i went worng.

Martin
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

CNAME is the TCL command to change a file name.
Mamu Kim
martin
Participant
Posts: 67
Joined: Fri Jul 30, 2004 7:19 am
Location: NewJersy

Post by martin »

Thanks......Kim Its working :)
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

kduke wrote:CNAME is the TCL command to change a file name.
I'm 100% certain I posted a thank you for your answer this morning but it seems to have gone the way of the dodo! So I'll repeat my thanks, I vaguely recalled that some command like that existed but my search in the VOC didn't locate it.

Thanks!
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

It is a Pick command not Prime. Sometimes it pays to be a Picky.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

CNAME (both syntaxes) definitely exists in Prime INFORMATION.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

A Full Wurlod just in time for the holidays.

Thanks Ray. :wink:
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Holidays?!! Luxury!!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What's a Holiday? Is that some new stage?
Post Reply