Hi,
The first thing to do would be to get in touch with Sophos support :
Sophos - Contact technical support
Sophos is installed on Solaris as a command line program , generally the configuration is done during install so you would just run the program to perform a scan , if the configuration is missing the error messages you get will be related to the path to library files (if this is the case you can either manually point to them or re-run the install to set the paths correctly)
For a script , I'm not sure your just asking how to run a scan ?
If so the answer is normally run sweep with the options you like or with --? or --help to list the options available
Or if you would like to set up a scheduled scan with a specific set of options ?
Then the answer to this is the same as the above but using cron to schedule the job.
If your looking for any other information then get in touch with Sophos (link above).