Setting on LR does not close any files. All setting on LR does is set on the LR indicator.
The RPG cycle will not not check to see if the LR indicator is on until it gets to the end of your C specs. Therefore, all your C specs will be processed before the LR indicator is checked and any files are closed.
A flow chart of the RPG cycle can be found at: