Wild card character not working

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
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Wild card character not working

Post by mallikharjuna »

hi,

Our datastage server is on windows. we are receiving 2 files, data file SRS_YYYYMMDD.csv(YYYYMMDD is year month and date) and control file SRS_YYYYMMDD_Control.csv.

I have to read both files in same job and check count match. the problem hear is wild character(?) is not working when i tried to read the file like SRS_????????.csv then it is not working, and if i am trying to use other wildcard character(*), reading both files in single source stage, could you please help how to read these 2 files separately in same job.

Thanks
MALLI
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That pattern does not match the Control file.

Any reason you can't use the asterisk?

I presume you have changed the Read Mode property of the Sequential File stage to "File Pattern".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
maypandh
Participant
Posts: 13
Joined: Mon Apr 18, 2016 8:37 am

Re: Wild card character not working

Post by maypandh »

Hi,

Read files with file name as SRS_*.csv and read method type as file pattern.
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Post by mallikharjuna »

i have given pattern for both data file and control file pattern like control file SRS_????????_Control.csv .but it is not working . if i use '*" both files are reading in same source. I have give SRS_*.csv then both files are reading in same source.
MALLI
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Can you be more specific about what "not working" means here? If you are getting an error, please post it. Both of those are perfectly valid DOS/Windows wildcard patterns that work just fine from a command line so not really sure why they wouldn't as a File Pattern.

SRS_????????.csv
SRS_????????_Control.csv

I've seen some old posts about wildcard pattern issues on a Windows server so you might want to involve your official support provider if you haven't done so yet.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Post by mallikharjuna »

hi,

I am not getting any error, job just hanging and not reading the files.
MALLI
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Involve support.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you read the files if you are explicitly naming them (that is, not using wildcards of any kind)? We also need to understand exactly what you are trying to achieve here - I'm presuming there are two Sequential File stages (possibly in two jobs) looking for files matching the given pattern.
Does the job abort after a minute or five, or hang for longer than that?
Is the file open by any other process? Are you using a controlling sequence with a Wait For File activity?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Post by mallikharjuna »

Hi,

i will receive monthly files , file names are not static. yyyymmdd change based on date of extract. and control file contains record count of source file, i am reading source file and aggregating for record count and checking with control file record count. if both counts are not matching then abort the process.we have created datastage job for this requirement.
MALLI
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

The multiple ? wildcard in file patterns works fine for me. My server is on AIX.

Contact Support.
Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Seems to be an issue specific to Windows from what I could find.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply