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 » File name validation

Post new topic  This topic is locked: you cannot edit posts or make replies.
 File name validation « View previous topic :: View next topic » 
Author Message
prasad.gh789
PostPosted: Thu Aug 28, 2014 9:57 am    Post subject: File name validation Reply with quote

Novice

Joined: 06 Aug 2014
Posts: 20

File name:

File Name : Pic100007_P012_L03_F0_XEX_D2000_03_10_T23_10_14_N00000024.jpg

There is file name pattern validation required for these Picture Files . Please find below the validation logic.

- Starts with 'Pic'
- Followed by 6 characters
- Followed by '_'
- Followed by 'P'
- Followed by 3 characters
- Followed by '_'
- Followed by 'L'
- Followed by 2 characters
- Followed by '_'
- Followed by 2 characters
- Followed by '_'
- Followed by 3 characters
- Followed by '_'
- Followed by 'D'
- Followed by 4 digits
- Followed by '_'
- Followed by 2 digits
- Followed by '_'
- Followed by 2 digits
- Followed by '_'
- Followed by 'T'
- Followed by 2 digits
- Followed by '_'
- Followed by 2 digits
- Followed by '_'
- Followed by 2 digits
- Followed by '_'
- Followed by 'N'
- Followed by 8 digits
- Followed by '.'
- Followed by 'jpeg'

let me know esql for this validation?

Example:DECLARE file_name = SUBSTRING(LocalEnvironment.File.Name BEFORE '.');
IF LENGTH(file_name)='19' THEN
DECLARE tollstation_table = SUBSTRING(file_name FROM 1 FOR 3 );
IF tollstation_table ='TST' THEN
DECLARE identifier = CAST(SUBSTRING(file_name FROM 4 FOR 6) AS INTEGER );
i know simple validation like this but above file contains some fixed char's like pic,_p,_L,_D(alphabets) , character values(varies file to file) and digits(0 to 9).
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 28, 2014 10:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac55151_.htm
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  This topic is locked: you cannot edit posts or make replies. Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » File name validation
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.