Hi Deepak,
You have to use lgf (by design). In general, some scripts will generate different lgx each run depending on input variables:
*FOR %ENT%=%ENTITY_SET%
*XDIM_MEMBERSET ENTITY=%ENT%
...
*NEXT
Depending on number of entities selected by user the lines between *FOR and *NEXT will be copied in lgx with variable substitution.
Vadim