!*************************** AMUS Program Label ****************************** ! Filename: GETUSR.BAS Date: 01/04/89 ! Category: UTIL Hash Code: 134-210-344-344 Version: 1.0A(100) ! Initials: CALD/AM Name: STEPHEN CALDWELL ! Company: Telephone #: ! Related Files: ! Min. Op. Sys.: AMOS32 1.0D Expertise Level: BEG ! Special: ! Description: Displays current user name from job control block. ! ! !***************************************************************************** program GETUSR,1.0A(100) map1 USRNAM,S,20 START: JCB = (65536 * word(1052)) + (word(1054)) X = JCB + 211 ! Actual offset = 212 ! but look below! We start for I = 1 to 20 ! at one with our loop. USRNAM[I;1] = chr$(byte(X+I)) ! Check byte by byte and ! get ASCII value translated. next I ? "Current user name is ";USRNAM ! Note: Strip your own spaces. END