Problems using File Pattern option with DataStage in Windows

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
MarbinPR
Participant
Posts: 5
Joined: Thu Nov 18, 2010 8:38 am
Location: Puerto Rico

Problems using File Pattern option with DataStage in Windows

Post by MarbinPR »

Hello all.

I got this situation in where I want to read two files with the same structure.

Test1.txt
Test2.txt

I'm using Job Parameters to define the fullpath.

In the Sequential File Stage in the File Pattern field I define the following:
#PathToFile#\Test*.txt

When I run the Parallel Job alone I got this errors.
CSV_PCP_IPA_MemberMonths_Read: Invalid filename specified: Invalid hostname: <hidden>.


If I change the Read Method of the Sequential File Stage to Specific File then define in the File box the following:
#PathToFile#\Test1.txt

Runs perfectly.

Any suggestion?
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Problems using File Pattern option with DataStage in Win

Post by SURA »

The problem is with the test file you created might be the reason is my guess . Try it again with another file having multiple columns.

Set proper delimiter
Use File pattern


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

Post by chulett »

From what I think I recall, you should separate the two portions of the file when using a pattern, so for the filename just put the path parameter there and then in the file pattern just the "pattern" itself - Test*.txt.
-craig

"You can never have too many knives" -- Logan Nine Fingers
MarbinPR
Participant
Posts: 5
Joined: Thu Nov 18, 2010 8:38 am
Location: Puerto Rico

Post by MarbinPR »

Chulett - There is no separate field for Path and other Pattern. Everything goes to the same place.

SURA - If I change the Read Method to Sequential File and define any of the files the job process it successfully. Meaning that there is no problem with the file structure.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Bummer, guess I was thinking it had a structure like the Folder stage. :(
-craig

"You can never have too many knives" -- Logan Nine Fingers
MarkB
Premium Member
Premium Member
Posts: 95
Joined: Fri Oct 27, 2006 9:13 am

Post by MarkB »

Just for fun, try specifying the file path instead of a parameter and see what happens.

I've tried it using #PARAMNAME#test*.txt, where the PARAMNAME parameter is set as type pathname, and as a regular path, like D:\MyPath\ - works both ways.

Is it possible you've defined your #PATHTOFILE# parameter as string instead of as pathname, and that is causing your issue? Just a thought.
MarbinPR
Participant
Posts: 5
Joined: Thu Nov 18, 2010 8:38 am
Location: Puerto Rico

Post by MarbinPR »

Yeah that was one of my previous test of specifying the whole path without using parameters. I also tried forward and back slashes (\, /) without success.
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

I don't have a sample that comes close to your situation, but I do have a question for our gurus: If the OS is Windows, does that mean that the DS runtime environment is running on a Windows server, or is it still on a Unix server?

That said, the times I've run into this sort of problem I've looked to the differences between Unix and DOS. Usually it's around the permitted characters. DOS allows spaces in directory and file names, Unix does not.

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

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

FranklinE wrote:I don't have a sample that comes close to your situation, but I do have a question for our gurus: If the OS is Windows, does that mean that the DS runtime environment is running on a Windows server, or is it still on a Unix server?
If you are talking about the choice of OS you have when creating a new post then yes, if you say "Windows" it's supposed to mean you have the DataStage "engine" installed on a Windows server rather than a UNIX server.
-craig

"You can never have too many knives" -- Logan Nine Fingers
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

Thanks, Craig. That means any advice I may offer here could be inaccurate. MarbinPR, please take note. :)
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
Post Reply