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?

  • 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.

  • 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,