Wild card character not working
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 81
- Joined: Thu Nov 30, 2006 7:46 am
- Location: india
Wild card character not working
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
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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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".
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: Wild card character not working
Hi,
Read files with file name as SRS_*.csv and read method type as file pattern.
Read files with file name as SRS_*.csv and read method type as file pattern.
-
- Participant
- Posts: 81
- Joined: Thu Nov 30, 2006 7:46 am
- Location: india
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.
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
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 81
- Joined: Thu Nov 30, 2006 7:46 am
- Location: india
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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?
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 81
- Joined: Thu Nov 30, 2006 7:46 am
- Location: india
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.
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