Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Percent as Escape Character No Longer Works
Topic Summary:
Created On: 05/09/2017 07:41 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 05/09/2017 07:41 PM
User is offline View Users Profile Print this message

Author Icon
EricJones
Expert (100-199)

Posts: 105
Joined: 11/11/2007

Escaping a percent character with another percent character does not function in v11.

If I use a SQL script with the percent character in it, doubling the percent characters fails and the task errors.
If I set a variable to a value that includes a literal percent character then the task fails with the error "Unhandled script error: Expecting an expression"


-------------------------


Thanks,

-Eric
 05/10/2017 02:08 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

Would it be possible to provide a sample that demonstrates what you have outlined?

-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 05/11/2017 09:41 AM
User is offline View Users Profile Print this message

Author Icon
EricJones
Expert (100-199)

Posts: 105
Joined: 11/11/2007

Will do.

-------------------------


Thanks,

-Eric
 05/11/2017 03:54 PM
User is offline View Users Profile Print this message

Author Icon
EricJones
Expert (100-199)

Posts: 105
Joined: 11/11/2007

Any SQL query in which a percent sign needs to be escaped will reveal the error and fail.

Setting up this same revealed another oddity/bug. A SQL query that happens to be executed inside of a LOOP...DATASET will also result in nothing even if it is just substituting an Automate task variable. But that same query with the same variable when executed outside of a LOOP...DATASET seems to substitute properly and successfully execute the query.


Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------


Thanks,

-Eric
 05/12/2017 07:19 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Eric,

I have reproduced the issue internally and it has been documented for correction. (#22627)

I apologize for the inconvenience and we will try to correct this for the upcoming 11.0.1 release.

-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 07/22/2017 09:24 AM
User is offline View Users Profile Print this message

Author Icon
GeoffEvelyn
Student (5-19 posts)

Posts: 20
Joined: 09/18/2015

Hi,

Can anyone please confirm the status?

This fails in simple URL constructions as well.

Try setting any variable to a URL with %20 in it (which is a space element) and it fails with the same error 'Unhandled script error: Expecting ')'

This is pretty fundamental as there are plenty more escape characters in URLs so its impossible to set these types of URL to a variable, or to an array element.

Please advise

Cheers

Geoff

 

 

 

 07/24/2017 12:10 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

I can confirm that bug 22627 has been corrected in 11.0.1.17. Please login to your account page and download the .exe to upgrade to the latest version.

-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 11/20/2017 02:18 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

I am also having a % sign issue. In fact, I have had several syntatical issues since migrating from 10 to 11; it has been quite painful so far.

I have a job in v10 that essentially parses a text file and reformats it. It builds a new file such as:

<acctNum>,<totalRowCount>,<Good>,<Bad>

The good and bad columns will have data such as: 95.0543%,4.9457%

In version 11, it's puking on the % now. I even added a step in the beginning of the job to replace all % with %%.

When the job runs with that, it will process the first encountered value, but then error on the 2nd occurrence.

It's a Looping build, so essentially the variable at runtime during the loop will look like this:

loop 1: loopRow=loopRow & <acctNum>

loop 2: loopRow=loopRow & <acctNum>,<totalLines>

loop 3: loopRow=loopRow & <acctNum>,<totalLines>,<Good%> (the double % in the parsed text gets replaced with the single %.

On the 4th loop, the line *should* look like:

loopRow=loopRow & <acctNum>,><totalLines>,<Good%>,<Bad%>

However it doesn't parse because the prior loopRow value already has a percent in it. I have been fighting this for a couple of days. Something has definitely changed with this in v11 because v10 has no issues with it.



-------------------------
<html />
 11/20/2017 03:44 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

I have created a case with sample files to illustrate the issue I am having.



-------------------------
<html />
 11/21/2017 09:38 AM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi James,

I see that you have a support case with us, we will work with you in the support case and update the thread once we have resolved the issue.

-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 11/27/2017 12:59 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Ricardo,

I got the update on the case but it was closed before I could respond. Even though a bug fix # has been assigned, can you suggest a work-around in the interim?



-------------------------
<html />
 11/29/2017 09:22 AM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 398
Joined: 03/17/2016

Hi James,

We spoke about this on our support session call.  I think we had an option or two you were going to test, but it seemed likely we were going to need to wait for the issue to be fixed.



-------------------------

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 11/29/2017 09:27 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Yes we spoke yesterday. In my particular case, I read in the contents of the file to a variable and before I began processing the data row-by-row I did a find-replace of all % symbols and replacing with the string " pct" (sans quotes). I specified the find for the % not by the character itself, but by Chr(37).

At the end of the task just prior to writing the variable data back out to a file, I did another find-replace to change all the " pct" back to a %Chr(37%, and it worked.



-------------------------
<html />
 11/30/2017 07:41 AM
User is offline View Users Profile Print this message

Author Icon
EricJones
Expert (100-199)

Posts: 105
Joined: 11/11/2007

Nice workaround...

-------------------------


Thanks,

-Eric
 11/30/2017 07:47 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Thanks Eric!



-------------------------
<html />
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1212 guests browsing this forum, which makes a total of 1212 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog