Article 4831 of vmsnet.internals:
In article <3248CEBD.5DA1@westworld.com>, rdeeming@westworld.com writes...
#I can not find the object library that contains the snazzy routines that
#are prototyped in the header file exe_routines.h kept in the text
#library [syslib]sys$lib_c. Any help as to what the name of the library
#is, if it even exist, would be appreciated immensely.

/*
 * setusername()	- Change username for current process
 *
 * Ehud Gavron		15-OCT-1992
 * ACES Consulting Inc.
 * gavron@Aces.COM
 */

#define module_name SETUSERNAME
#define module_vers "1.0.0"

#ifdef __alpha
#pragma module module_name module_vers
#pragma nostandard
#else  /* __vax */
#module module_name module_vers
#endif /* __alpha */

globalref ctl$gl_pcb;
globalref ctl$t_username;
#ifdef __alpha
#pragma standard
#endif /* __alpha */

#include <descrip.h>
#include <jibdef.h>
#include <pcbdef.h>
#include <ssdef.h>

char namebuf[JIB$S_USERNAME];
struct dsc$descriptor_s newname;

#ifdef __alpha
main()
#else  /* __vax */
cmain()
#endif /* __alpha */
{
	int lib$get_foreign(),sys$cmkrnl(),setusername_k(),sys$exit();
	int ss_stat;
	int i;
	$DESCRIPTOR(prompt,"_Username: ");
	newname.dsc$a_pointer = (char *)&namebuf;
	newname.dsc$w_length  = sizeof(namebuf);
	newname.dsc$b_dtype   = DSC$K_DTYPE_T;
	newname.dsc$b_class   = DSC$K_CLASS_S;
	
	ss_stat = lib$get_foreign(&newname,&prompt,&newname.dsc$w_length,0);
	if (!(ss_stat &1)) sys$exit(ss_stat);

	for (i = newname.dsc$w_length; i < JIB$S_USERNAME; namebuf[i++]=' ');
	newname.dsc$w_length = JIB$S_USERNAME;

	(void) sys$cmkrnl(setusername_k,0);
}
int setusername_k()
{
	int strncpy();
	char *pcb,*jib,*p;
#ifdef DEBUG
	int ebreak();
	ebreak();
#endif
	pcb = (char *)ctl$gl_pcb;
	jib = (char *)(*(long *)(&pcb[PCB$L_JIB]));
	p = (char *)&jib[JIB$T_USERNAME];
	strncpy(p,newname.dsc$a_pointer,newname.dsc$w_length); 
	p = (char *)&ctl$t_username;
	strncpy(p,newname.dsc$a_pointer,newname.dsc$w_length);  
	return(SS$_NORMAL);
}

#ifndef __alpha
int strncpy(a,b,c)
char *a,*b;
int c;
{
	for (; c > 0; c--) {
	  *a++ = *b++;
	  }
}
#endif
	


# 
#tia
# 
#-- 
#---------------------------------------
#Rich Deeming
#rdeeming@westworld.com
#deeming@mag.aramark.com
#---------------------------------------


