Focal Point
Method for determining the extension of a file.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/3847091306

May 03, 2011, 12:59 PM
Chuck
Method for determining the extension of a file.
Hi everyone,

Is there a common method for determining the extension of a file for use in a process flow or route? What I would like to do is be able to pass in several types of files to a process flow (e.g. filename.ex1, filename2.ex2, filename3.xml, etc.), determine and store the extension of a file in a runtime variable, and then have a Decision Switch object use that variable to route the file/document down the correct path in the process flow. Any suggestions for how to accomplish this would be appreciated. Thanks in advance for your help.


iWay Service Manager 5.6
WebFOCUS 7.6.7
Windows, All Outputs
May 04, 2011, 05:45 AM
AdeH
Hi,
What kind of listener are you using?
Have you tried puttting a QAAgent at the start of the pflow, and seeing if the file extension is available as a system SREG?
Regards,
AdeH


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
May 04, 2011, 05:53 AM
AdeH
If you have a file listener, then the system SREG extension should be populated and available when the pflow picks up the document. Similarly, SREG basename will contain the file name without extension, and SREG filename contains basename.extension

HTH


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
May 04, 2011, 09:12 AM
Chuck
Thanks, AdeH! SREG(extension) works great as the value of a runtime variable in my Decision Switch object. Is there a list of these types of SREG's available somewhere? I've looked through the user guides, but didn't see anything. I'll also have to do some research on how to use the QA Agent, like you suggested. Thanks, again.
May 04, 2011, 10:41 AM
Igor Y
If you don't have an sreg, try
_token('filename', '\\.', _count('filename',all,'\\.') )


iWay Service Manager (6.0.1 - patch.62627)
DMC Version 7 Release 7
May 05, 2011, 04:22 AM
AdeH
Hi Chuck,
Search for 'file listener special registers' in Infocentre, they are detailed there.

AdeH


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
May 05, 2011, 09:03 AM
Chuck
Thanks, AdeH. I have been looking for a good resource/reference for the iWay tools. I haven't found much information on the Web, though. It's not like Java where you can do a quick Google search to answer your own question or figure out how to make something work, so I really appreciate your feedback.