Page 1 of 2

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

Posted: Tue Feb 07, 2012 9:56 pm
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

Posted: Tue Feb 07, 2012 10:02 pm
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.

Posted: Tue Feb 07, 2012 10:03 pm
by pandeesh
I believe REINDEX will fix this

Posted: Tue Feb 07, 2012 10:05 pm
by benzzano
Kandy - Folder in Director but not in Designer.

Posted: Tue Feb 07, 2012 10:06 pm
by benzzano
pandeesh, REINDEX can't fixed.

Posted: Tue Feb 07, 2012 10:31 pm
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

Posted: Tue Feb 07, 2012 10:36 pm
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.

Posted: Tue Feb 07, 2012 11:09 pm
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.

Posted: Wed Feb 08, 2012 2:53 am
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.

Posted: Wed Feb 08, 2012 9:46 am
by Obiwon666
Have you try DS.CHECKER command ?

Posted: Fri Apr 22, 2016 4:48 am
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:

Posted: Fri Apr 22, 2016 8:04 am
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?

Posted: Sat Sep 17, 2016 6:15 pm
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

Posted: Sun Sep 18, 2016 7:31 am
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:

Posted: Mon Sep 19, 2016 6:14 am
by qt_ky
Karen rescued us many a time as well, via several eCases!