Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Riaan1 Absent Member.
Absent Member.
1834 views

CALL "pgm" USING BY DESCRIPTOR

Busy with ACUCOBOL conversion to Visual COBOL. Using the ACU2VCOB tool

First, I'm not a ACU expert. So please bear with me.

In the original ACUCOBOL source I got these statements

           CALL "LIB$GET_SYMBOL" USING BY DESCRIPTOR "USER_ID"
                                                     W5-USERNAME.

I do not find information on the DESCRIPTOR keyword. Neither in the helpfiles given with these tools and not in the Supportline.

Plus. what should this be changed to to be able to run under Visual COBOL? 

Lastly, is there a specific ACUCOBOL to Visual COBOL conversion discussion group in this forum?

0 Likes
2 Replies
lhebblethwaite Absent Member.
Absent Member.

RE: CALL "pgm" USING BY DESCRIPTOR

Riaan,

The DESCRIPTOR keyword is OpenVMS specific. It is an argument passing mechanism that has no equivalent in Windows or UNIX/Linux. The "LIB$GET_SYMBOL" is an OpenVMS standard runtime library call. Many OpenVMS system service calls require arguments to be passed by DESCRIPTOR. A descriptor is a small structure that encodes the location, length, and other attributes of the argument.

The company I work for, Transoft (now part of Advanced Computer Software in the UK), supply libraries that provide OpenVMS functionality on Windows and UNIX/Linux.

Another attribute of OpenVMS library calls is that they allow arguments to be omitted.

Using the Transoft libraries the call you mention would be changed to:

   CALL "LIB_GET_SYMBOL" USING

       CONTENT "USER_ID" *> Symbol name

       REFERENCE W5-USERNAME *> Buffer for result

       VALUE 0 *> Omitted argument

       VALUE 0 *> Omitted argument

       VALUE 7. *> Length of argument 1

Note that this call returns the value of a CLI symbol. CLI symbols have some similarity with environment variables, but cannot be completely replaced by environment variables.

I'll leave others to answer the ACUCOBOL to Visual COBOL conversion question.

Leigh.

0 Likes
Larry Hines Absent Member.
Absent Member.

RE: CALL "pgm" USING BY DESCRIPTOR

Hi Riaan,

I have sent an invitation to the ACUCOBOL-GT Modernization group separately.   Once you have joined the group you may download the latest version of the tool under the Files tab.

The tool does not address any ACUCOBOL features which are specifically designed for OpenVMS compatibility.   The tool focuses on modernizing the user interface elements of ACUCOBOL.    You'll need to either find a replacement library or rewrite the code retrieving the user name using pure Visual COBOL.

We hope that LIB$GET_SYMBOL was the only issue you had with the tool, but if there are other issues please post them to our group.

Thanks,

Larry Hines, PhD
Software Systems Developer, Sr. Principal
Micro Focus

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.