What about plus signs in FDMEE Load Rules!?

When executing FDMEE load rules via batch keep the pluses in the rule names if you want. With this technique they can still be executed run.

What about plus signs in FDMEE Load Rules!?

Shortly after the last post I was asked "Hey Keith, that's great but does that mean I can't use plus?" After a couple of  quick test I confirmed that pluses always get converted to spaces.

First just try with the plus, maybe some magic will happen.

E:\Oracle\Middleware\user_projects\epmsystem1\FinancialDataQuality>E:/Oracle/Middleware/user_projects/epmsystem1/financialdataquality/loaddata.bat username -f:password 01+11Outlook Y Y STORE_DATA REPLACE N JUN2019 JUN2019 SYNC
Number of arguments: 12
Argument 0: loaddata
Argument 1: username
Argument 2: -f:password
Argument 3: 01+11Outlook
Argument 4: Y
Argument 5: Y
Argument 6: STORE_DATA
Argument 7: REPLACE
Argument 8: N
Argument 9: JUN2019
Argument 10: JUN2019
Argument 11: SYNC

EPMFDM-140149:Invalid data rule name 01 11Outlook specified.
Plus is converted to space

Okay, so we are going to have to do something, maybe the plus can be escaped like in python or other languages.

E:\Oracle\Middleware\user_projects\epmsystem1\FinancialDataQuality>E:/Oracle/Middleware/user_projects/epmsystem1/financialdataquality/loaddata.bat username -f:password 01\+11Outlook Y Y STORE_DATA REPLACE N JUN2019 JUN2019 SYNC
Number of arguments: 12
Argument 0: loaddata
Argument 1: username
Argument 2: -f:password
Argument 3: 01\+11Outlook
Argument 4: Y
Argument 5: Y
Argument 6: STORE_DATA
Argument 7: REPLACE
Argument 8: N
Argument 9: JUN2019
Argument 10: JUN2019
Argument 11: SYNC

EPMFDM-140149:Invalid data rule name 01\ 11Outlook specified.
Backslashes don't appear to escape the plus

So backslashes are out, maybe doubling up the plus will do something!?

E:\Oracle\Middleware\user_projects\epmsystem1\FinancialDataQuality>E:/Oracle/Middleware/user_projects/epmsystem1/financialdataquality/loaddata.bat username -f:password 01++11Outlook Y Y STORE_DATA REPLACE N JUN2019 JUN2019 SYNC
Number of arguments: 12
Argument 0: loaddata
Argument 1: username
Argument 2: -f:password
Argument 3: 01++11Outlook
Argument 4: Y
Argument 5: Y
Argument 6: STORE_DATA
Argument 7: REPLACE
Argument 8: N
Argument 9: JUN2019
Argument 10: JUN2019
Argument 11: SYNC

EPMFDM-140149:Invalid data rule name 01  11Outlook specified.
Double plus just becomes two spaces

So with all the more common methods eliminated it was time to get more creative. If FDMEE is treating plus signs like spaces in a URL then may it will do the same thing with plus signs. Using the HTML URL Encoding Reference from WC3Schools I was able to look up the code for a plus sign to be %2B.

E:\Oracle\Middleware\user_projects\epmsystem1\FinancialDataQuality>E:/Oracle/Middleware/user_projects/epmsystem1/financialdataquality/loaddata.bat username -f:password 01%2B11Outlook Y Y STORE_DATA REPLACE N JUN2019 JUN2019 SYNC
Number of arguments: 12
Argument 0: loaddata
Argument 1: username
Argument 2: -f:password
Argument 3: 01-f:passwordB11Outlook
Argument 4: Y
Argument 5: Y
Argument 6: STORE_DATA
Argument 7: REPLACE
Argument 8: N
Argument 9: JUN2019
Argument 10: JUN2019
Argument 11: SYNC

EPMFDM-140149:Invalid data rule name 01-f:passwordB11Outlook specified.
Something really strange happened there

Although that failed it got me thinking that it probably failed due to the way batch files treat percent (%) signs. I don't know if this is the only method but changing the percent to a double percent (%%) seems to have escaped the percent so that it seems to display in the arguments.

E:\Oracle\Middleware\user_projects\epmsystem1\FinancialDataQuality>E:/Oracle/Middleware/user_projects/epmsystem1/financialdataquality/loaddata.bat username -f:password 01%%2B11Outlook Y Y STORE_DATA REPLACE N JUN2019 JUN2019 SYNC
Number of arguments: 12
Argument 0: loaddata
Argument 1: username
Argument 2: -f:password
Argument 3: 01%2B11Outlook
Argument 4: Y
Argument 5: Y
Argument 6: STORE_DATA
Argument 7: REPLACE
Argument 8: N
Argument 9: JUN2019
Argument 10: JUN2019
Argument 11: SYNC

EPMFDM-140173:Rule execution completed successfully.
Success!

So quick recap, if you want to use spaces in load rules and execute them via command line replace the spaces with plus signs (+). Also if you want to have plus signs in a load rule and be able to execute them via command line replace the plus signs with %%2B.