Divided code segment for locations and offloading customer create main loop to each have their own main loop as follows:

1.) Create record and link for location - loop
2.) Create record and link for offloading customer - loop