Douglas Friedel wrote a script to split a dataset and runs gmakes/gfiddle on its parts. There are currently some issues with using these old BIMA g-routines. This will be looked into
The basic procedure is to get a dataset with two sidebands. Depending on your correllator setting you can use the line= and select= keywords in gmakes to get those:
gmakes vis=cal1 out=gvis1 line=wide,2,1,3,3 gfiddle vis=gvis1 out=gvis2 device=/xs nxy=5 fit=poly,0,2 clip=10 gapply vis=cal1 out=gcal1 gvis=gvis2
after which you can check the gain and phase corrected calibrator for any more problems.
Now these gains can be applied to the source, after which it can be mapped.
gapply vis=src out=gsrc gvis=gvis2