IBM Support

PM53294: Function invocation in a return does not pass out parameter

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Abstract: Attempts to invoke a function in a return statement
    fails to pass any out parameters
    Problem: Environment:
    Rational Business developer 8.0.1.2
    Windows
    
    You write EGL code like the following:
    
        function main()
            someData string;
            result boolean =
    getResponseThroughFacadeComplex(someData);
            writestdout('Complex: ' + someData);
                   result =
    getResponseThroughFacadeSimple(someData);
            writestdout('Simple: ' + someData);
        end
    
        function getResponseThroughFacadeComplex(someData string
    out) returns(boolean)
            return(returnSomeData(someData));
        end
    
        // Function Declarations
        function getResponseThroughFacadeSimple(someData string out)
    returns(boolean)
            result boolean = returnSomeData(someData);
            return(result);
        end
    
        function returnSomeData(someData string out)
    returns(boolean)
            someData = 'TestLocalService.returnSomeData';
            return(true);
        end
    
    The output is as follows:
    
    Complex:
    Simple: TestLocalService.returnSomeData
    
    
    
    Local fix:
    If a function has out parameters, do not invoke the function in
    a return statement, such as in:
    
           return(returnSomeData(someData));
    
    but invoke the function first in a separate statement:
    
            result boolean = returnSomeData(someData);
            return(result);
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    An OUT parameter is being assigned a value from a function
    invocation. The OUT parameter return value was being
    assigned before the function invocation.
    

Problem conclusion

  • Changed the code to assign the OUT parameters after the
    function invocation.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM53294

  • Reported component name

    RATL BUS DEV

  • Reported component ID

    5724S5000

  • Reported release

    801

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-12-01

  • Closed date

    2012-01-27

  • Last modified date

    2012-01-27

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    RATL BUS DEV

  • Fixed component ID

    5724S5000

Applicable component levels

  • R801 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMQ79","label":"Rational Business Developer"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.1","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
27 January 2012