IBM Support

PM56587: Return codes are not working as documented.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When running the rhapsody.exe from the command-line, return
    codes are not being provided/generated as documented. So there
    exists an error in the documentation stating this works or a
    defect because there is no explanation as to how to retrieve the
    return code.
    
    Based on the two following links I tried to run a script from
    the command line and then get the return codes to verify that
    the script ran successfully.
    http://publib.boulder.ibm.com/infocenter/rhaphlp/v7r6/topic/com.
    ibm.rhp.api.doc/topics/rhp_r_ext_return_codes.html?resultof=%22%
    72%65%74%75%72%6e%22%20%22%63%6f%64%65%73%22%20%22%63%6f%64%65%2
    2%20
    
    http://publib.boulder.ibm.com/infocenter/rhaphlp/v7r6/topic/com.
    ibm.rhp.api.doc/topics/rhp_c_ext_cmdl_interface.html?resultof=%2
    2%72%65%74%75%72%6e%22%20%22%63%6f%64%65%73%22%20%22%63%6f%64%65
    %22%20
    
    I ran the following command from a dos window:
    Rhapsody.exe -hiddenui -f .\script.txt
    
    Where script.txt is:
    setlog .\log.txt
    open .\pmr14726.rpy
    setcomponent tmpCompname
    setconfiguration tmpconfname
    exit
    
    tmpCompname  - does not exist in the model
    tmpconfname  - does not exist in the model
    
    
    Although there are errors reported in the log file no return
    codes are produced. After running the script I ran the following
    from the command line:
    echo %errorlevel%
    
    This returned a 0 (meaning success)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Return codes for Rhapsody.exe do not work as documented.
    

Problem conclusion

  • Fixed in version 8.0.1. When running Rhapsody from the
    command line, any new command resets the return code (error
    level). You can use "cmd=getcommandresult" to see the error
    code from the last command carried out. In this case, there
    was a defect in that the command "exit" was also resetting
    the error code. Now, the returned error code will show the
    error code of the last operation in the script.
    Note: There is an issue regarding the accuracy of "echo
    %errorlevel%" in Windows.
    Check the error code like this :
    ------------- launcher.bat --------------------
    @echo off
    rhapsody -hiddenui -f l:\temp\script.txt
    @if "%ERRORLEVEL%" == "0" goto good
    
    :fail
        echo Execution Failed
        echo return value = %ERRORLEVEL%
        goto end
    
    :good
        echo Execution succeeded
        echo Return value = %ERRORLEVEL%
        goto end
    
    :end
    -----------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM56587

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    760

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-01-24

  • Closed date

    2012-11-27

  • Last modified date

    2012-11-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

    TLOGIC RHAPSODY

  • Fixed component ID

    5724V74RP

Applicable component levels

  • R760 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.6","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
27 November 2012