As I pointed out earlier that if the view is beyond a certain point than it wont go beyond that point which ruins the purpose of this concept but thanks for the effort but the code did not work
Well, your problem is that your have a room and you want to divide them in smaller rooms, without making the different rooms in gamemaker.
To put it in a concrete example:
The big room is a floor fo a dungeon. The smaller divisions are the small rooms of the mentioned floor. When you walk in one room, you don't want the player to view what is in the room next to it.
Well you have 4 variables (BOUNDRARIES) that represent the small room. As Link has the focus, you update the viewport in the Link object, with the given pseudocode. When Link goes through a door to another room, you get a transition that shifts the viewport to the new room and update the 4 variables to the boundaries of the new room.
And if it is still not what you want, then you need to explain yourself better, but don't expect anyone to just give you the code ready to be copied into your game.