Highlighted
Absent Member.
Absent Member.
1018 views

[archive] Acu4GL for SQL Server

[Migrated content. Thread originally posted on 13 July 2005]

What would be nice for us is when Acu4GL was creating tables in SQL Server that it would check what version it was working with. If it is version 7.0 or greater rather than creating fields at "text" if the size is less than 8000 characters it could use the standard varchar.

We could create the table using a standard SQL script file but we have a number of tables with dynamic names only known at runtime so doing an open output is an easy way to create the table. I did have the idea of using SQL.acu to just do an "alter table" to change the column type but SQL Server does not allow text fields to be changed this way.
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Acu4GL for SQL Server

You could create a stored procedure thats creates the table and accepts a paramater for the table name. Then you would call this stored procedure with SQL.ACU passing the table name.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Acu4GL for SQL Server

Dan, that sounds like a good idea and may be the best way to do it for now.

The advantage of AcuCOBOL doing that for us would be that we would not have to maintain the SQL file as well as the COBOL file definitions. When I said we had a few tables with dynamic names I realy meant over 300 !!

The other idea I had was trying to parse the xfd and generate the create table automatically but the more I looked at it the harder it seemed. Lots of "WHEN" clauses and different keys etc.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Acu4GL for SQL Server

It also occurs to me that when a table is accessed by acu4gl it automatically looks for a stored procedure using tablename_fileio. For instance when a cobol start or read occurs on tableA then acu4gl will attempt to load and run stored procedure tableA_read. You can see this when you run a detailed trace file. Others I've seen in the trace file are tablename_insert, tablename_update, tablename_delete.
I'm just not sure if acu4gl does this for the create of a table, like tableA_create. You could try it. I don't think it does, but it might be a good enhancement request.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.