How to Change group and Unmask it to 027 in Linux?

I want to propose a change to the run script environment. This would change the effective group of the wsadmin account to prodview with a umask of 027 before running our services. In linux this can be accomplished by the following

#!/bin/ksh
#
# Original shell
#
newgrp prodview << NEWGRPTERM
#
# New shell
#
umask 027
#
# Now we can run the service and we should have a group of prodview and new files create should have group read.
# 
{run service}
NEWGRPTERM
#
# Original shell
#

What is your question, exactly?