! @(#)name.telescope 19.1 (ESO-IPG) 02/25/03 14:08:55 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! ! procedure `name.telescope' to create keyword TLASILLA for each telescope ! to be run each time MIDAS is installed for a specific telescope ! K. Banse 950405 ! ! execute via @ name.telescope telescope_system_name ! ! with telescope_system_name = insntt or ins2p2 or dfosc or ... ! ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! define/param p1 ? C "Enter name of telescope system, e.g. insntt or ins2p2:" define/local telescop/c/1/6 " " all telescop = p1 ! branch telescop insntt,ins1p5,ins2p2,ins3p6,insdut,dfosc - ok,ok,ok,ok,ok,ok ! write/out {telescop} = invalid telescope system name return/exit ! ok: $rm -f {telescop}.unix !delete any {telescop}.unix file ! ! first, check, if keyword TLASILLA exists already inputi = m$existk("tlasilla") ! if inputi .eq. 1 then !YES, we have to set it correctly $sed s/{tlasilla}/{telescop}/ $MID_MONIT/syskeys.unix >{telescop}.unix ! else !NO, we have to append it $cp $MID_MONIT/syskeys.unix {telescop}.unix define/local oc/i/1/2 0,0 open/file {telescop}.unix append oc if oc(1) .lt. 0 then write/out Could not create {telescop}.unix - abort... return/exit endif ! write/file {oc(1)} C SECT./TLASILLA write/file {oc(1)} C char. keyword TLASILLA holds the name of the write/file {oc(1)} C telescope computer in La Silla write/file {oc(1)} C SECT./END_OF_KEY write/file {oc(1)} TLASILLA/C/6 write/file {oc(1)} {telescop} x close/file {oc(1)} endif ! $mv {telescop}.unix $MID_MONIT/syskeys.unix write/out file syskeys.unix updated for telescope_system: {telescop} write/out continue via `inmidas' bye