I don't know any direct way of getting the command name from within awk. With GNU awk running on GNU/Linux you can use the process ID and ps to retrieve the command name as a workaround. For example:
cmdname.awk
#!/usr/bin/gawk -f
BEGIN {
"ps -p " PROCINFO["pid"] " -o comm=" | getline CMDNAME
print CMDNAME
}
Output:
cmdname.awk