As far as I can tell without the TCL interpreter here, it should work assuming a normal interpreter with a specific format. so it looks like the format has been renamed or does not exist as a command in the interpreter you are using?
Whatever you do, you really don't need a format for concatenating strings anyway
set fill_pin_name "$ top_cell $ encoded_name"
should so you need
source share