Debian Codegraph @

prim/proc/name.telescope

raw
1 ! @(#)name.telescope 19.1 (ESO-IPG) 02/25/03 14:08:55
2 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 !
4 ! procedure `name.telescope' to create keyword TLASILLA for each telescope
5 ! to be run each time MIDAS is installed for a specific telescope
6 ! K. Banse 950405
7 !
8 ! execute via @ name.telescope telescope_system_name
9 !
10 ! with telescope_system_name = insntt or ins2p2 or dfosc or ...
11 !
12 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13 !
14 define/param p1 ? C "Enter name of telescope system, e.g. insntt or ins2p2:"
15 define/local telescop/c/1/6 " " all
16 telescop = p1
17 !
18 branch telescop insntt,ins1p5,ins2p2,ins3p6,insdut,dfosc -
19 ok,ok,ok,ok,ok,ok
20 !
21 write/out {telescop} = invalid telescope system name
22 return/exit
23 !
24 ok:
25 $rm -f {telescop}.unix !delete any {telescop}.unix file
26 !
27 ! first, check, if keyword TLASILLA exists already
28 inputi = m$existk("tlasilla")
29 !
30 if inputi .eq. 1 then !YES, we have to set it correctly
31 $sed s/{tlasilla}/{telescop}/ $MID_MONIT/syskeys.unix >{telescop}.unix
32 !
33 else !NO, we have to append it
34 $cp $MID_MONIT/syskeys.unix {telescop}.unix
35 define/local oc/i/1/2 0,0
36 open/file {telescop}.unix append oc
37 if oc(1) .lt. 0 then
38 write/out Could not create {telescop}.unix - abort...
39 return/exit
40 endif
41 !
42 write/file {oc(1)} C SECT./TLASILLA
43 write/file {oc(1)} C char. keyword TLASILLA holds the name of the
44 write/file {oc(1)} C telescope computer in La Silla
45 write/file {oc(1)} C SECT./END_OF_KEY
46 write/file {oc(1)} TLASILLA/C/6
47 write/file {oc(1)} {telescop} x
48 close/file {oc(1)}
49 endif
50 !
51 $mv {telescop}.unix $MID_MONIT/syskeys.unix
52 write/out file syskeys.unix updated for telescope_system: {telescop}
53 write/out continue via `inmidas'
54 bye
55