DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message

Group memberships:
Premium Members, Heartland Usergroup

Joined: 14 Apr 2011
Posts: 187

Points: 2663

Post Posted: Wed Apr 10, 2019 10:05 pm Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Windows

Currently I am deleting individual data sets using batch(bat) file using below code.It works well ..

C:\IBM\InformationServer\Server\PXEngine\bin\orchadmin rm datasetfolder\dataset1.ds
C:\IBM\InformationServer\Server\PXEngine\bin\orchadmin rm datasetfolder\dataset2.ds

Similarly ,I would like to delete all datasets in the folder ..I tried using wild card "*.ds" instead of filename it did not work.I tried several options with rm but none of them worked.

WARNING: could not delete datasetfolder\*.ds because it does not exist.

Please let me know what changes needed in the bat file


Premium Poster

since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42964
Location: Denver, CO
Points: 221565

Post Posted: Thu Apr 11, 2019 1:45 am Reply with quote    Back to top    

That command doesn't support wildcards. If you want to do some flavor of "all" I would assume you would need to loop through a list of names and call the command in an iterative fashion. Fairly straight forward with a UNIX script... DOS batch file? No clue.


Now I've got that feeling once again, I can't explain; you would not understand
this is now who I am. I have become comfortably numb.
Rate this response:  
Not yet rated

Group memberships:
Premium Members

Joined: 21 Mar 2016
Posts: 367

Points: 3806

Post Posted: Thu Apr 11, 2019 9:27 pm Reply with quote    Back to top    

this works on ours as a routine -- *.* style wildcards work just fine...
I don't know how much it needs to change for windows. Could be an OS problem though.. maybe unix allows *.ds and windows did not?

deffun GetEnvVariable(Arg1) calling "DSU.GetEnvVariable"
FullFileName=FilePath : '/' : DatasetFileName
MyCommand='export TMPDIR=':myTmpDir:'; export APT_CONFIG_FILE=':AptConfigValue:' ; ':appOrchDir:'/bin/orchadmin rm ':FullFileName
Call DSExecute(PlatForm,MyCommand,DSExecuteOutput,DSExecuteResultCode)
Call DSLogInfo(DSExecuteOutput,'OrchadminDeleteDataSet')
Ans = DSExecuteResultCode
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours