Is it possible to make $$FIRST = X and $$LIMIT = Y dynamic so that I can retrieve the next set of 2000 records and continue until all the records are obtained?
Yes, here is my SOP process.
1. Make a "count" call, where the query matches your final query
2. Create a variable, I call it maxResults usually
3. Place a repeater module that starts at 0, in the repeats put ciel({count}/{maxResults}), and then in steps, put maxResults
4. Place your "real" query, mapping i from the repeater into $$FIRST and maxResults into $$LIMIT
Note, I did all of that from memory so it may not be 100% on verbiage but the process is correct, if you can't figure it out let me know and I'll pull out my notes.
Edit: Corrected mistake in reply