.ENTRY SETACCOUNT ^M<> $PCBDEF $JIBDEF ; ; This routine sets the CTL$T_ACCOUNT field and the ; JIB$T_ACCOUNT field of the Job Information Block (JIB) to ; the value provided as the input parameter. The parameter is ; the addresse of a string descriptor for the account. ; A standard VMS status is returned in R0. ; CMKRNL privilige is required. ; $CMKRNL_S ROUTIN=10$,ARGLST=(AP) RET 10$: .WORD ^M ; ; check access rights ; IFNORD #4,@4(AP),20$ ; CHECK ACCESS RIGHTS MOVL 4(AP),R6 IFNORD (R6),@4(R6),20$ ; ; change the JIB ; NOTE: R4 CONTAINS THE ADDRESS OF THE PCB ; MOVL PCB$L_JIB(R4),R2 ; PUT THE ADDRESS OF THE JIB IN R2 MOVC5 (R6),@4(R6),#^A\ \, - ; MOVE IT #JIB$S_ACCOUNT, - JIB$T_ACCOUNT(R2) ; ; move the account ; MOVC5 (R6),@4(R6),#^A\ \, - ; MOVE IT #8,@#CTL$T_ACCOUNT ; ; return status ; MOVZWL #SS$_NORMAL,R0 RET 20$: MOVZWL #SS$_ACCVIO,R0 ; NO ACCESS RET .END