Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

URL is truncated when used as parameter with OS-Command

« Go Back

Information

 
Article Number000029461
EnvironmentProduct: OpenEdge
Version: All Supported Versions
OS: All Supported Platforms
Question/Problem Description

URL  is  cut off at '&' ampersand when used in OS-COMMAND: 

OS-COMMAND NO-WAIT  VALUE("~"C:\Program Files\Internet Explorer\IEXPLORE.EXE~"http://domain?id=70389&Token=aaa%2Fkeee%2F%2Foooo%3D%3D&tab=2# ").

Browser opens up to http://domain?id=70389
 

Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
The "&" ampersand is a reserved command character in both Windows and *NIX systems, which is used  to separate multiple commands on one command line.
 
Resolution
The ampersand (&), pipe (|), and parentheses ( ) are special characters that must be preceded by the escape character (^) when passing them as arguments.

For example:

OS-COMMAND NO-WAIT  VALUE("~"C:\Program Files\Internet Explorer\IEXPLORE.EXE~"http://domain?id=70389^&^Token=aaa%2Fkeee%2F%2Foooo%3D%3D^&^tab=2").

Note that for Linux and UNIX systems the escape character may differ.  The single-quote worked to escape the ampersand character in a similar call on AIX:

For example:

OS-COMMAND SILENT VALUE("echo http://domain?id=70389'&'Token=aaa'&'%2Fkeee%2Fooo%3D%3D'&'tab=2#").
 
Workaround
Notes
References to Other Documentation:
 
Using multiple commands and conditional processing symbols
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true
Attachment 
Last Modified Date12/11/2015 2:03 PM