If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Dividing the String with delimiter value in Framework manager

Started by jeeva, 13 Aug 2015 05:50:57 AM

Previous topic - Next topic

jeeva

Hi,

i need to divide the Account Number based on delimited value, and delimiter is different from one group to another and some of the groups contains delimited value as numbers(1-9). (here we call each part is one segment)

for this we are using database tables. it have some fields like delimiter value,how many segments(parts) needed for account number and length of the each segment. so based on these db tables we need to divide the account number.

we can easily divide the account number using substring function based on delimited value, but delimiter is vary from one to another.
is there any way to divide the account number using any regular expression in framework manager.

if yes, how can we write regular expression in framework manager. or else is there any other way.  please suggest me

Thanks,

cnu

Good if you can share some scenario along with your issue(the above said) and that would be helpful to others to analyze and share some views on this transition

bdbits

If all you have is database tables with the entire account number and a delimiter, you can probably get it done via SQL or perhaps calculated expressions. If you use calculated expressions, you should look into the split() macro function. Expect a lot of trial and error to get it working properly.

To be honest, if it was me and I had a choice, I would build a table at ETL time and separate them there. It is going to be a lot more efficient and simpler to maintain. I recognize you may not have that choice.

jeeva

Quote from: bdbits on 18 Aug 2015 01:40:04 PM
If all you have is database tables with the entire account number and a delimiter, you can probably get it done via SQL or perhaps calculated expressions. If you use calculated expressions, you should look into the split() macro function. Expect a lot of trial and error to get it working properly.


Hi bdbits,

substring and split functions not works for me. because in these functions, needs to specify the string pattern for divide the string.

my requirement is to divide the account number, based on delimited value. But, some of the customers can have Account number values that are the same as the segment delimiters. so we cant divide, based on delimited value.

here am thinking reg-expression can divide the account numbers based on specified pattern, but am not sure how to use these reg expressions in FM, and we are using Progress 9.1E Database.

if FM supports Reg expressions, please guide me to achieve my requirement  or is there any other way.

Thanks.


bdbits

If the delimiter can appear as a non-delimiting character in the account number, how can anyone figure out if the character in that position is a delimiter or part of the account?

If you think a regex will work, check into the substitute macro function. (In Report Studio, go to help and search for 'substitute'). If your database supports regex, it is possible to call those functions but I have no idea on Progress support for that, sorry.