Feedback
Did this article resolve your question/issue?

   

Article

Cannot use top-only ABL statements in SpeedScript

Information

 
TitleCannot use top-only ABL statements in SpeedScript
URL Name000036155
Article Number000159303
EnvironmentProduct: OpenEdge
Version: All Supported Versions
OS: All Supported Platforms
Other: WebSpeed
Question/Problem Description

Cannot use top-only ABL statements in SpeedScript.
Cannot use ROUTINE-LEVEL error handling statement in SpeedScript.
Cannot use USING statement in SpeedScript.
Cannot use BLOCK-LEVEL error handling statement in SpeedScript.
 

Steps to Reproduce
Clarifying Information
Error MessageROUTINE-LEVEL ON ERROR statement must come before all executable or definitional statements. (14145)
BLOCK-LEVEL ON ERROR statement must come before all executable or definitional statements. (16743)
The USING statement must come before all other compilable statements. (13659)
Defect/Enhancement NumberDefect ADAS-11161/ PSC00250002 / OE00227519
Cause
SpeedScript is HTML code with embedded ABL statements.  In order to compile SpeedScript, the WebSpeed tools need to convert this into a compilable ABL program.  

When this conversion is being performed, the WebSpeed tool code inserts code above the first lines in the SpeedScript program into the converted file and this causes errors due to the fact that both ROUTINE-LEVEL and USING are required to be at the top of the program with no other compilable statements before them.
 
Resolution
None at this time.
Workaround
The attached program (e4gl-gen.p) is from the webtools folder in the WebSpeed installation.  To use this, create a directory higher in your PROPATH than the WebSpeed install named webtools and copy the program into that folder. Compile the procedure and generate the r-code. 

The program contains comments before and after each specific modification that was made for this feature.  The comments contain the word 'TopLineMods' to make it easier to locate the modifications.

In the first line of the HTML file add the entries in one line as follows:
 
USING Progress.Lang.*. ROUTINE-LEVEL ON ERROR UNDO, THROW. BLOCK-LEVEL ON ERROR UNDO, THROW.

or 
 
USING Progress.Lang.*.  USING  OpenEdge.Net.HTTP.*.

The following article contains links to the WebSpeed source code.  The provided code fix should be copied into the version of the program that you are using, then transplanted to the new installation upon upgrade to any new release.


 Where are the ADE - OpenEdge Development Tools Source Code Downloads?
 
Notes
Last Modified Date12/8/2020 12:55 AM
Attachment 
Files 1. e4gl-gen.p
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.