.TITLE SETUSER .IDENT \3.001\ .LIBRARY 'SYS$LIBRARY:LIB.MLB' $CLIDEF $JIBDEF $PCBDEF ; ; subroutine to set the USERNAME of the current process ; .PSECT $OWN$,NOEXE,2 NPARM = 0 NEWNAM = 4 USR_NAM_DSC: .LONG USR_NAM_END-USR_NAM,USR_NAM USR_NAM: .BLKB 12 USR_NAM_END: .EXTRN SYS$CMKRNL .PSECT $CODE$,NOWRT,2 .ENTRY SET_USER, ^M ;Save nothing MOVAB @NEWNAM(AP),R1 MOVC5 @NEWNAM(AP),@4(R1),#32,#12,USR_NAM CLRL -(SP) PUSHAB WRITE_NAME CALLS #2,@#SYS$CMKRNL RET .EXTRN CTL$T_USERNAME, SCH$GL_CURPCB .ENTRY WRITE_NAME, ^M MOVC5 USR_NAM_DSC,USR_NAM,#32,#12,- @#CTL$T_USERNAME MOVL @#SCH$GL_CURPCB,R0 MOVL PCB$L_JIB(R0),R1 MOVC5 USR_NAM_DSC,USR_NAM,#32,#12,- JIB$T_USERNAME(R1) MOVL #1,R0 RET .END