!********************************************************************
!*                                                                  *
!*  Program:  DCLMENU                                               *
!*                                                                  *
!*  Purpose:  Interface between DCL and menu subroutine.  Gets &    *
!*            puts DCL symbols.                                     *
!*                                                                  *
!*  Programmer:  Richard Snyder                                     *
!*               The KeTech Corporation                             *
!*                                                                  *
!********************************************************************
	character*60 	prompt_string(16)
	character 	symbol_name*10
	character 	code*2
	character 	name*8
	character 	code1*1
	character	menu_line*8
	integer*4 	no_choices
	data 		symbol_name	/'MENU_VALUE'/
	data 		menu_line	/'STRING'/
!
!	get the input stuff from dcl
!
	iret = lib$get_symbol('NUMBER_CHOICES',code)
	if (.not. iret) then
		icode = 0
		go to 100
	endif	
	read(code,'(i2)',err=33)no_choices
	go to 34
33	icode = 0
	go to 100
!
!	loop to pick up the strings
!
34	if (no_choices .gt. 15) then
		no_choices = no_choices/10
	endif
	do i=1,no_choices+1
		write (menu_line(7:8),'(i2.2)') i
		iret = lib$get_symbol(menu_line,prompt_string(i))
		if (.not. iret) then
			icode = 0
			go to 100
		endif
	enddo
!
	call menu (prompt_string,no_choices,icode)
!
100	if (icode .ge. 10) then
		write (code,'(i2)')icode
		iret = lib$set_symbol(symbol_name,code)
	else
		write (code1,'(i1)')icode
		iret = lib$set_symbol(symbol_name,code1)
	endif
!
	call sys$exit (%val(1))
!
	end
