[SHARING] unnamed columns in stored procedures treated different in 7706M gen 813
Hi,
I was upgrading to 7706M gen 813 (same server version as 8.0.0.9, so this will probably apply there as well) and I noted some calls to DB2 stored procedures were not working anymore.
The error I got was: 0 ERROR AT OR NEAR LINE 3 IN PROCEDURE SQLOUT FOCEXEC * (FOC003) THE FIELDNAME IS NOT RECOGNIZED: 1
In this stored procedure I have several unnamed output columns. In previous WF versions (even upto 7706 gen 790 we were using) this produced the following fieldnames in SQLOUT:
So, the solution was not to refer to fieldnames 1, 3, 4 and 5, but to E01, E03, E04, E05 so it works in both version.
Maybe some of you also have stored procedures with unnamed columns in DB2 (maybe the same applies to other databases) and will also stumble into this.
Martin.This message has been edited. Last edited by: Martin vK,
WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
November 11, 2014, 08:53 AM
Tony A
Martin,
I would guess that it is to bring it in line with documentation on fieldname -
Syntax: How to Identify the Field Name FIELD[NAME] = field_name
where: field_name Is the name you are giving this field. It can be a maximum of 512 characters. Some restrictions apply to names longer than 12 characters, as described in Restrictions for Field Names. The name can include any combination of letters, digits, and underscores (_), and must contain at least one letter. Other characters are not recommended, and may cause problems in some operating environments or when resolving expressions.
It is recommended that you not use field names of the type Cn, En, and Xn (where n is any sequence of one or two digits) because these can be used to refer to report columns, HOLD file fields, and other special objects.
If you must use special characters because of a field report column title, consider using the TITLE attribute in the Master File to specify the title, as described in Alternative Report Column Titles: TITLE.
Personally I do not like any column name beginning with a digit and that would have bugged me all the time and so I would have named all columns in the stored proc - but then hindsight is a wonderful thing when viewed retrospectively
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10