It was a UD question, but for those interested in UV try SYSTEM(9001): OBJPATH = SYSTEM(9001)<1,2> PGMNAME = OBJPATH[ '/', DCOUNT(OBJPATH,'/'), 1 ]
or alternate syntax: PGMNAME = FIELD( OBJPATH, '/', DCOUNT(OBJPATH,'/'), 1 ) Forward shash assumes Unix. It also assumes you don't have program names with slashes in them, such as an Accounts Receivable posting program, "A/R.POST", which UV gives to Unix as "A?\R.POST". In that case you have to contend with UV's Unix-to-Universe special character conversions. But that's a-whole-nother thread. cds -----Original Message----- > Is there a way to reference the name of a subroutine within the code > of said subroutine? > FIRST.FOUR.CHARS.OF.SUBR = name.of.subr[1,4] Try a field extract on SYSTEM(40) ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
