console_slot_program_state_c

	status.i4.v = console_slot_program_state_c(console.i4.v, slot.i4.v,
						   state.i4.r
						   [,script_state.i4.r]
						   [,generic_name.i1a.r]
						   [,process_name.i1a.r])

	This routine returns state information for a program running in
	a console slot.  

	console		console number
	slot		console slot
			(PA_SLOT -> primary application PA,
			 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)
	state		returned state of program
			(0 -> waiting on PLD or OS to create process,
			 1 -> intype is processing initialization,
			 2 -> intype is or has processed a periodic interrupt)
	[script_state]	returned script state of program
			(0 -> no script replay (PLD clears during program load),
			 1 -> script replay in progress,
			 2 -> script replay done)
			(default is NULL)
	[generic_name]	returned null terminated generic process name
			(allow PROCESS_NAME_LEN + 1 characters)
			(default is NULL)
	[process_name]	returned null terminated current process name
			(allow PROCESS_NAME_LEN + 1 characters)
			(default is NULL)

	This function requires the following include files:

	cnsparam_h, clib_h

	Related functions:

	task_slot, chgpgm(_c)

	C/C++ usage:

	char	generic_name[PROCESS_NAME_LEN+1];
	char	process_name[PROCESS_NAME_LEN+1];
	int	status;
	int	console = CONSOLE_NUMBER;
	int	slot = PA_SLOT;
	int	state;
	int	script_state;

	status = console_slot_program_state_c(console,slot,&state,&script_state,
					      generic_name,process_name);