How to get relative optimality gap after the solve statement in GAMS

Hi there,
I want to extract and display the relative optimality gap of the solution found by the solver in GAMS after the solve statement. How do I do that
Note that this is different from specifying optcr before the solve statement

After the solve you have access to modelname.objest (dual bound) and the objective value modelname.objval now you can calculate the relative gap yourself using your favorite formula. Note that different solvers use different formulas to determine the gap: https://www.gams.com/latest/docs/UG_GamsCall.html#GAMSAOoptcr

Hope this helps,
-Michael