ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Validating file name

Post new topic  Reply to topic
 Validating file name « View previous topic :: View next topic » 
Author Message
chaitu
PostPosted: Wed Nov 04, 2015 9:44 am    Post subject: Validating file name Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi All,

My requirement is like to validate the file name with a file pattern like

REGEST_xxxxxx_DATE_FROM_TO_FYYMMDDHHMMSS.zip
example
9MAFE_AXM0101_240703_WMKK_ZPPP_F240702003432

i used the substring function and extract the values like reg...
now i am not understanding how to compare the in coming file name

suggestions please.

Regards.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Nov 04, 2015 9:50 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The incoming file name is in the logical message tree, in the part populated by the File Input node.

Comparisons are done in ESQL using the standard = comparison operator.

Your example doesn't match your pattern... ?
"_DATE_FROM_TO_" is not equal to "_240703_WMKK_ZPPP_" ?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
chaitu
PostPosted: Mon Nov 09, 2015 10:28 am    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi All,

my flow is like
filei/p>>compute>>fileo/p

i need to validate the file with naming convention given to the file and send it to fileo/p if it matches if it does'nt matches i need to through the exception.

can anyone please help me how to figure it out.

Regards.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 09, 2015 2:12 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

you'll need to look it up by verifying some pattern.. ie either you can do it with regular expression or you need to verify each item of the String against all possible values (DB lookup?)
Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
chaitu
PostPosted: Mon Nov 09, 2015 9:20 pm    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2014
Posts: 89

Hi All,

I need to do it with the pattern like

9MRTS_AXM0024_150707_VOTR_WMKK_F150707164015.zip

every file should come in same pattern but the values will change

like

9RTSM_AXM0036_150808_WMHY_CFKK_F150808164015.zip


Any suggestions please.
Back to top
View user's profile Send private message
timber
PostPosted: Tue Nov 10, 2015 3:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Use a Java method to validate the file name using a regular expression?

Please do not ask for help with that - all of the answers are available via Google or the Search button.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Validating file name
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.