GETPRG

Updated August 2017

xcall GETPRG, prgnam {,sbxnam, svr'prgnam, svr'prgver, prgdir, sbxdir}

GETPRG.SBR returns the name and associated attributes for the current program and SBX routine, with some ATE client/server options.

Parameters

Parameter

Type

I/O

Description

prgnam

String

out

Returns program name; no extension, stripping of trailing spaces

sbxnam

String

in/out

If specified, it also returns the name of the current routine (if called from within a subroutine). Otherwise, set to "".

svr'prgnam

String

out

Applies only to subroutines running in the ATE client context (e.g. launched via AG_XFUNC); it returns the name of the program currently running on the server. Otherwise it will return a null string.

svr'prgver

String

out

Also only applies to the ATE client context, returning the version of the program currently running on the server. Example format: 1.2A(345)

prgdir

String

out

Returns the device:[p,pn] where the program (prgnam) was loaded from.  Example format:  DSK22:[123,456]. If the program was loaded directly from memory, it will return a null string.

sbxdir

String

out

Same as prgdir, but for the last called SBX.

 

History

2011 October, A-Shell 5.1.1136:  Add four parameters.