I updated the script by removing my. But it just updated the first row with correct Cocenter & Activity but Second Row it just updated the Costcenter but not the Activity. See below out file - first row is fine but second it should also update the Activity to A5854.
My output file is getting generated after running your script is below, Ideally it should check "C4000","A0000" in mapping file if its there then has to update both with "C4910","A5854" for all the rows/line. What your script is doing its just updating the first Row and from second its just updating C4000 to C4910 but not updating A0000 to A5854.
I dont have A4910 and A0000 combination in mapping file.
If you are ok then can i send you a webex please so that you can take look ?