Debian Codegraph @

stdred/optopus/proc/createtemp.prg

raw
1 ! @(#)createtemp.prg 19.1 (ES0-DMD) 02/25/03 14:27:37
2 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 !.IDENTIFICATION: createtemp.PRG
4 !.PURPOSE: Create input table to TEMPL program, still running on the HP.
5 !.USE: @s temptab [inp_tab] [out_file] [fmt_file]
6 !.AUTHOR: A. Gemmo, Padova Department of Astronomy
7 !.VERSION: 910723 AG Creation
8 !------------------------------------------------------------------------------
9 DEFINE/PARAM P1 opto3.tbl T "Enter input table [Default=opto3.tbl]: "
10 DEFINE/PARAM P2 ? C "Enter output file: "
11 DEFINE/PARAM P3 templ.fmt C "Enter format file [Default=templ.fmt]: "
12 !
13 WRITE/KEYW INPUTFI/C/1/50 'P1'
14 WRITE/KEYW OUTPUTF/C/1/50 'P2'
15 WRITE/KEYW INPUTC/C/1/80 'P3'
16 !
17 COPY/TABLE 'P1' templ.tbl
18 !
19 ! re-arranging table columns before printing
20 !
21 CREATE/COLUMN templ.tbl :X1 " " I8 I
22 CREATE/COLUMN templ.tbl :Y1 " " I8 I
23 CREATE/COLUMN templ.tbl :DUMMY " " I8 I
24 CREATE/COLUMN templ.tbl :IDENT1 " " A8 C
25 CREATE/COLUMN templ.tbl :Z1 " " I8 I
26 CREATE/COLUMN templ.tbl :NUMBER1 " " I8 I
27 !
28 COMPUTE/TABLE templ.tbl :X1 = :X*1
29 COMPUTE/TABLE templ.tbl :Y1 = :Y*1
30 COMPUTE/TABLE templ.tbl :DUMMY = SEQ*0
31 COPY/TT templ.tbl :IDENT templ.tbl :IDENT1
32 COMPUTE/TABLE templ.tbl :Z1 = :Z*1
33 COMPUTE/TABLE templ.tbl :NUMBER1 = :NUMBER*1
34 !
35 ! deleting 'old' columns
36 !
37 DELETE/COLUMN templ.tbl :IDENT
38 DELETE/COLUMN templ.tbl :TYPE
39 DELETE/COLUMN templ.tbl :X
40 DELETE/COLUMN templ.tbl :Y
41 DELETE/COLUMN templ.tbl :Z
42 DELETE/COLUMN templ.tbl :NUMBER
43 !
44 ! printing ascii file
45 !
46 ASSIGN/PRINT FILE 'P2'
47 PRINT/TABLE templ.tbl 'P3'
48 DELETE/TABLE templ.tbl NO