How do you remove a folder with spaces in the name?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

benzzano
Participant
Posts: 12
Joined: Fri Nov 07, 2008 12:38 am

How do you remove a folder with spaces in the name?

Post by benzzano »

How do you remove a folder from the repository view in DataStage Director which no longer appears in DataStage Designer?

After renaming or deleting a folder in repository view of the DataStage Designer client, occasionally the folder will not be removed from the corresponding repository view of the DataStage Director client. In this situation, how do you remove the folder since Director does not have an option to delete it?

I used command line

Code: Select all

LIST DS_JOBS WITH NAME LIKE "...16 LCD..."
Result

Code: Select all

Job name.... \\\\Jobs\03
             DATAMART\16
             LCD\Sequencer
Description.
No..........
Category.... \Jobs\03 DATAMART\16
              LCD\Sequencer

Job name.... \\\\Jobs\03
             DATAMART\16
             LCD\Transform
Description.
No..........
Category.... \Jobs\03 DATAMART\16
              LCD\Transform


2 records listed.
I get Jobs name is
1. \\\\Jobs\03 DATAMART\16 LCD\Sequencer
2. \\\\Jobs\03 DATAMART\16 LCD\Transform

and I used comand line for delete jobs

Code: Select all

DELETE DS_JOBS \\\\Jobs\03 DATAMART\16 LCD\Sequencer
I get result
Record ID "\\\\Jobs\03" not found.
Record ID "DATAMART\16" not found.
Record ID "LCD\Sequencer" not found.

Please help me.

Best Regard ,
benzzano
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

I don't think it is possible. We have tried to resolve your current situation (and the other ones... folder in designer but not in director / job in designer but not in director). Administrators contacted IBM & no luck. We lived with that.
Kandy
_________________
Try and Try again…You will succeed atlast!!
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

I believe REINDEX will fix this
pandeeswaran
benzzano
Participant
Posts: 12
Joined: Fri Nov 07, 2008 12:38 am

Post by benzzano »

Kandy - Folder in Director but not in Designer.
benzzano
Participant
Posts: 12
Joined: Fri Nov 07, 2008 12:38 am

Post by benzzano »

pandeesh, REINDEX can't fixed.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You missed the quotes.

Code: Select all

DELETE DS_JOBS '\\\\Jobs\03 DATAMART\16 LCD\Sequencer' 
You can also use a Select List

Code: Select all

SELECT DS_JOBS WITH NAME LIKE "...16 LCD..."
DELETE DS_JOBS REQUIRE.SELECT
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
benzzano
Participant
Posts: 12
Joined: Fri Nov 07, 2008 12:38 am

Post by benzzano »

Thank you very much Ray.

Code: Select all

DELETE DS_JOBS '\\\\Jobs\03 DATAMART\16 LCD\Sequencer'
Record ID "'\\\\Jobs\03" not found.
Record ID "DATAMART\16" not found.
Record ID "LCD\Sequencer'" not found.
I get this result again.
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

tried to resolve your current situation (i.e. folder in director but not in designer)

and the other ones... (folder in designer but not in director / job in designer but not in director)

IBM could not resolve either case. If you find a way, share it.
Kandy
_________________
Try and Try again…You will succeed atlast!!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How about DataStage SQL?

Code: Select all

DELETE FROM DS_JOBS WHERE NAME = '\\\\Jobs\03 DATAMART\16 LCD\Sequencer';
Part of the problem is that the backslash character can also be treated as a quote character.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Obiwon666
Participant
Posts: 22
Joined: Wed Jan 17, 2007 5:34 am

Post by Obiwon666 »

Have you try DS.CHECKER command ?
Joshi
Premium Member
Premium Member
Posts: 17
Joined: Mon Aug 18, 2003 11:59 pm
Location: Germany

Post by Joshi »

I know this is 4 years old, but we just came across the same issue. The commands SELECT DS_JOBS and DELETE DS_JOBS work fine. The problems of benzzano are caused by the blanks in the folder names. We use folder names with "_" instead of blanks and the DELETE command works fine.

:idea: So the lesson learned is: Never use blanks in folder names. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Spaces like that can lead to madness, yes. :wink:

Andy, the original issue remains unsolved unless Ray's SQL is an answer to handling folder names with spaces in them. Anyone care to confirm / deny?
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

I found what I believe is a safe solution to fix this. I had same problem - developer created two folders with spaces in the names and we couldn't remove them.

After I emptied the folder, I decided the safest way to delete them was from the DataStage editor, which can delete the current record. That avoids using the DELETE command on DS_JOBS, which gives me the shakes just thinking about what happens if you screw it up. I use a SELECT list (Ray's suggestion) to limit the editor to the records that need to be removed.

Here's a session showing how to fix this. It shows me removing two empty folders that have spaces in the names. Note how I display the record to validate that I am removing the RIGHT folder.

If you delete a required entry you can really mess up DataStage, so do this at your own risk!

/opt/IBM/InformationServer/Server/DSEngine $ bin/uvsh
DataStage Command Language 11.3 Licensed Materials - Property of IBM
(c) Copyright IBM Corp. 1997, 2014 All Rights Reserved.
DSEngine logged on: Saturday, September 17, 2016 18:59

>LOGTO dstage

>LIST DS_JOBS WITH NAME LIKE "...INT 26..."
LIST DS_JOBS WITH NAME LIKE "...INT 26..." 19:00:59 09-17-16 PAGE 1

Job name.... \\\\Jobs\Manhattan\INT 26
Description.
No..........
Category.... \Jobs\Manhattan\INT 26

Job name.... \\\\Jobs\Manhattan\INT 26_INT 27_CAT
Description.
No..........
Category.... \Jobs\Manhattan\INT 26_INT 27_CAT

2 records listed.
>SELECT DS_JOBS WITH NAME LIKE "...INT 26..."

2 record(s) selected to SELECT list #0.
>>ED DS_JOBS

SELECTed record name = "\\\\Jobs\Manhattan\INT 26_INT 27_CAT".
3 lines long.

----: P
0001: NRO
0002:
0003: \Jobs\Manhattan\INT 26_INT 27_CAT
Bottom at line 3.
----: DELETE
You are about to DELETE the ENTIRE record from the file. OK (Y) ? Y
"\\\\Jobs\Manhattan\INT 26_INT 27_CAT" DELETEd from file "DS_JOBS".

SELECTed record name = "\\\\Jobs\Manhattan\INT 26".
3 lines long.

----: P
0001: NRO
0002:
0003: \Jobs\Manhattan\INT 26
Bottom at line 3.
----: DELETE
You are about to DELETE the ENTIRE record from the file. OK (Y) ? Y
"\\\\Jobs\Manhattan\INT 26" DELETEd from file "DS_JOBS".

File name = DS_JOBS
Record name =
>QUIT
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sweet. Go all Old Skool on it. :wink:

Makes me think of my adventures under the covers back in the day with Karen Powers leading the way after I'd trashed a project. Or two. :shock:
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Karen rescued us many a time as well, via several eCases!
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply