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



Group memberships:
Premium Members

Joined: 23 Sep 2002
Posts: 143
Location: USA
Points: 1932

Post Posted: Wed Apr 18, 2018 11:47 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
Additional info: Error: No such file or directory
I'm using a *.* file pattern in my input sequential stage to read in multiple files, but it errors if the file contains a quote like Mother'sDay2018.txt. The job aborts with this error...

Code:
Sequential_File_11,1: Unable to open /Mother'sDay2018.txt
/Mother'sDay2018.txt: No such file or directory.

Is there a workaround to make this work?
Renaming the files is not an option Wink
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 676
Location: Malvern, PA
Points: 6408

Post Posted: Wed Apr 18, 2018 12:32 pm Reply with quote    Back to top    

Single quote is a valid character in the file name, but it has a meaning and usage in DataStage. You can't work around that, so you have to change the file name.

I suggest a script which lists the names of the files you intend to read, parses the names for characters that cause you problems, copy those files to change their names, and use the copied files.

I require external sources of my data to conform with a naming standard that avoids this problem. I don't take "no" for an answer from them. You might not have that luxury, but renaming the files is the best choice.

_________________
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: http://www.dsxchange.com/viewtopic.php?t=143596 Using CFF FAQ: http://www.dsxchange.com/viewtopic.php?t=157872
Rate this response:  
Not yet rated
qt_ky



Group memberships:
Premium Members

Joined: 03 Aug 2011
Posts: 2741
Location: USA
Points: 20526

Post Posted: Wed Apr 18, 2018 2:06 pm Reply with quote    Back to top    

I would recommend contacting Support to request a patch. If there's not already a patch available for that, then there should be.

_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
Rate this response:  
Not yet rated
UCDI



Group memberships:
Premium Members

Joined: 21 Mar 2016
Posts: 314

Points: 3097

Post Posted: Thu Apr 19, 2018 7:45 am Reply with quote    Back to top    

what about:

run command:
copy offendingfilename to newfilename
proceed.
end of job: run command delete newfilename

The run command thing does not really care. It will gladly attempt to invoke the OS command with whatever rubbish you send it. I think it will work. If you have write permissions.

for slightly more effort, if the files are HUGE (gigs?) you may be able to make a link/shortcut type interface with a usable name.
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