chgpgm(task.g.v, slot.i1.r, error.i2.r [,command_buffr.i1a.r]
	       [,sa_r50_task.i4.r] [,script_flag.i4.v]

	chgpgm_c(task.g.v, slot.i4.v, error.i2.r [,command_buffr.i1a.r]
		 [,sa_r50_task.i4.r] [,script_flag.i4.v]

	This routine causes a new application task to be loaded on the
	console system.  The task currently occupying the execution slot
	(if any) will be terminated (issued a termination request).

	task		PAGE_NAME_LEN ASCII characters describing the index
			page number of a primary application, or a longword
			containing the Rad50 description of a primary or
			secondary application (for example, "M007" or
			RAD50("PA4232") or RAD50("SA0020")
			for a primary and secondary request respectively)
	slot		slot to be run in
			(-PA_SLOT -> primary application PA
				     (absolutely positively),
			 +PA_SLOT -> primary application (PA, PB, PC, PD, or PE)
				     The determination of which primary app slot
				     is used depends on the whether or not the
				     caller is running in a primary
				     application slot (PA, PB, PC, PD, or PE).
				     - caller is not running in PA, PB, PC,
				       PD, or PE:
				       PA will be used (absolutely positively)
				     - caller is running in slot PA:
				       PA will be used
				     - caller is running in PB:
				       PB will be used
				     - caller is running in PC:
				       PC will be used
				     - caller is running in PD:
				       PD will be used
				     - caller is running in PE:
				       PE will be used
			 PB_SLOT -> primary application PB,
			 PC_SLOT -> primary application PC
			 PD_SLOT -> primary application PD
			 PE_SLOT -> primary application PE
			 SA_SLOT -> secondary application SA,
			 SB_SLOT -> secondary application SB,
			 SC_SLOT -> secondary application SC,
			 SD_SLOT -> secondary application SD,
			 SE_SLOT -> secondary application SE,
			 ALARM_SLOT -> reserved for alarm system,
			 UTIL_SLOT -> utility window,
			 NONUSER_SLOT -> background user process,
			 0 -> "Available" secondary application slot
			      (SA, SB, SC, SD, or SE) or
			       SB_SLOT if all slots are in use.)
			(A task may terminate itself and pass control to
			 another task by specifying its own slot (myslot).
			 The calling task will still receive a termination
			 request via intype.)
	error		error return:
			(OK -> success - request transmitted,
			 CLIB_CHGPGM_BADASLOT -> invalid slot number,
			 CLIB_CHGPGM_ENQLOCK -> sytem error, notify system 
						programmer (should never
						occur - error communicating
						with PLD),
			 CLIB_CHGPGM_BUFLOCK -> command line buffer is locked 
						by another user, try later)
	[command_buffr]	optional "command_buffer_length" byte buffer of data to
			be delivered to target program (it receives with a call
			to getcmd(_c)) (default is NULL which results in no
			command buffer being passed)  The caller may leave
			portions of this buffer unused/ uninitialized so long as
			the target program treats the buffer it receives in the
			same fashion.
	[sa_r50_task]	returned ACNET Rad50 taskname of connected
			secondary application.  Since multiple copies of a
			secondary application may be running and each must
			have a unique network taskname, the ACNET taskname
			is modified depending on what slot the application
			is run in.  Returns nothing for primary applications.
			(Note: This cannot be the same address as "task"!!!)
			(default is NULL)
	[script_flag]	flag that specifies that the command line buffer
			argument contains a script when TRUE.  The script
			will be played by intype.  When this argument has
			a value of TRUE and the command line buffer is
			provided, getcmd(_c) always returns FALSE.
			(default is FALSE)
	[command_buffer_length] command buffer length in bytes
			(default is CMD_LIN_SIZ)

	This function requires the following include files:

	cnsparam_h, clib_h, acnet_errors_h

	Related functions:

	acnet_chgpgm, getcmd(_c), putcmd, get_chgpgm_script,
	remote_program_check, remote_program_get_script,
	remote_program_get_method, intype, task_slot,

	C/C++ usage:

	char		command_buffer[CMD_LIN_SIZ];
	short		error;
	int		task;
	int		slot = PA_SLOT;
	int		sa_rad50_task;
	int		script_flag = FALSE;
	int		command_buffer_length = CMD_LIN_SIZ;

	chgpgm_c((void *) "D133",slot,&error,command_buffer,

	task = rad50("SA1082");
	slot = SA_SLOT;

	chgpgm_c((void *) &task,slot,&error,command_buffer,