Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

MAINCODE( ) - Interrogate error code

&pagelevel(5)&pagelevel

Domain:     

Return codes

The MAINCODE function returns the value of the maincode of the current return code. The maincode contains a message code which can be used to output the contents of the message. Output of the message contents can be initiated with the HELP-MSG-INFORMATION command or with the builtin function MSG( ). If subcode1 is equal to zero, SDF-P does not report an error. In this case, a return code cannot be interpreted unless it has been saved with the SAVE-RETURNCODE command.

MAINCODE( ) or return codes in general cannot be interrogated outside of dialog blocks and procedures.

Format

MAINCODE( )                                                                                                                                                

MC( )


Result type

STRING (<string 7..7>)

Input parameters

None

Result

The value of the maincode is returned as the result in the form of a message code.