I tried this all out in FP 2.6 and came up with the following where N is the last item in stack (current program):
PROG(-1), PROG(0), & PROG(1) all return the name of the first program in stack
PROG(2) ... PROG(N) return the names of the 2nd thru Nth programs in the stack
SYS(16) returns current program name including extension (last program in stack), without the path
SYS(16,-1), SYS(16,0), & SYS(16,1) all return the full pathname of the running application
SYS(16,2) ... SYS(16,N) return the names of the 2nd thru Nth programs in the stack including extensions, but without the path
SYS(16)/SYS(16,X) NEVER returns the name of the first program in the stack
mmerlinn
"Political correctness is the BADGE of a COWARD!"