Hi Guys,
Finally, the script which worked for me was the following. I was not able to use XDIM_PACKAGEBY for an unknown reason. Most probably due to lower ramp-up SP level.
As Vadim suggested, RUNLOGIC_PH will help to decrease the time this script currently takes to run.
//Selecting Base Members
*SELECT (%BASEMEMBERS%, [ID], DIMENSION, CALC = N)
//Looping through all Selected members
*FOR %VAR_ID% = %BASEMEMBERS%
*WHEN DIMENSION
*IS %VAR_ID%
*REC(FACTOR = 0.5, DIMENSION = MEMBER)
*ENDWHEN
*NEXT