Die Installation von Unibasic auf einem SuSE 6.x System
Voreinstellungen
Es sollte für die Nutzung von UB ein eigener Benutzer, z.B mit Yast, angelegt werden. Die Auswahl des HOME Verzeichnisses sollte etwas genauer getroffen werden, da dieses von der UB-Installation genutzt wird.
Das Verzeichnis /tmp sollte existieren
Download der Software von DCI ( Dynamic Concepts Inc. )
Installation
Zuerst die Installationsarchive ins Verzeichnis /tmp kopieren. Entpacken mit uncompress 6D* Nun beide Packete mit cpio -icv <Dateiname auspacken. Die Installation kann nun gestartet werden: ./ppinstall ausführen, und den Anweisungen des Programms folgen. ./ubinstall ausführen, und den Anweisungen des Programms folgen. Unibasic nutzt einen TERM Treiber, welcher vom Systemtreiber abweichen kann. Anpassungen Die Datei /usr/lib/magic beinhaltet praktisch die Dateiextensions für Linux. Fügt man folgende Einträge zu, werden Unibasic Files von Linux erkannt: 0 string SAVE uniBasic saved BASIC program 0 string SYST uniBasic system BASIC program 0 string INDX uniBasic indexed data file >20 short >0- record length = %d
0 string DATA uniBasic data file
>20 short >0- record length = %d
0 string ITEM uniBasic formatted item file
>20 short >0- record length = %d
0 short 0x62 uniBasic indexed key file
0 string CONT uniBasic contiguous file
>20 short >0- record length = %d
Tips
Backspace ist unter UB mit Linux im Termtreiber \177:4
Beispiel für ein .profile des UB Users:
LUST=:/home/user:/u/ub:/sbin:/u/ub/sys:/home/ub:/home/ub/sys
ALTCALL=:102=15:89=44:98=42:;export ALTCALL
MAXPORT=24
BASICMODE=IRIS
SPC5=65535
DATESEP=.
CURRENCY=$
GOSUBNEST=15;export GOSUBNEST
EUROUTPUT=0;export EUROUTPUT
WINDOWS=20
EUROPEAN=15
TERMINFO=/u/ub/sys
PREALLOCATE=32
ISAMFILES=150; export ISAMFILES
ALTCALL=:102=15:89=44:98=42:; export ALTCALL
LONGVARS=1; export LONGVARS
TERM=ansi; export TERM
PATH=$PATH” :/bin:/u/u/sys:/u/ub/:/u/ub/5:/u/ub/2:/home/user”
export MAXPORT LUST BASICMODE SPC5 DATESEP CURRENCY WINDOWS EUROPEAN PREALLOCATEPORT PORTS PATH TERMINFO
# use following line to automatically start UniBasic
exec unibasic
Beispiel für die Datei Errmessage, welche dir Fehlermeldungen des UB übersetzt ( Home Verzeichnis des UB Users) :
# The following are the BASIC error numbers and descriptions
# The format is “UniBasic message #:Optional IRIS error #:Message text”
# Group 1: Encoding syntax and command errors
0:No such error
1:Unrecognizable word
2:Format error
3:Incorrect parenthesis closure
4:Incorrect subscript closure
5:Line (stn) number is missing or invalid
7:IFs without ‘ENDIF’
8:’ELSE’ without ‘IF’
9:’ENDIF’ without ‘IF’
10:Too many variables defined, limit is 348
11:Statement not executable in keyboard mode
12:No program in partition
13:Non-existent lines referenced
15:Invalid character
16:Invalid speed or invalid command from your port
17:ENTER statement is illegal if not in a subprogram
18:The ENTER statement can only be executed once in a subprogram
19:Program has been corrupted – cannot execute
# Group 2: Syntax and program structure errors
20:Syntax error
21:Syntax error in DEFined function
22:No such line (stn) number
23:Variable not specified
24:User function not defined
25:Illegal function usage
26:’COM’ statement out of order
27:’FOR’ without a matching ‘NEXT’
28:’NEXT’ without a matching ‘FOR’
29:’RETURN’ without a prior ‘GOSUB’
30:Number/types of arguments do not match parameter list
31:’Function argument’ or ‘Statement Mode’ out of range
32:String expression not allowed here
33:Syntax error in ‘DATA’ statement or CRT control string
34:Formatted output overflows output string
35:Variable in CHAIN READ not passed by CHAIN WRITE
36:Variable from CHAIN WRITE not in this program
37:String expression must be used here
38:Variable in CHAIN READ already contains data
39:Variable in CHAIN WRITE contains no data
# Group 3: Complexity and limit errors
40:’FOR’ statements nested too deep
41:’GOSUB’ statement nested too deep
42:User DEFined functions nested too deep
43:Expression too complex for evaluation
45:Arithmetic error – (X/zero, overflow, LOG(0), or SQR -X)
46:User partition space exhausted
47:Execution prohibited from this account
48:Format string is invalid or too complex for evaluation
# Group 4: Array and string errors
50:Variable precision cannot be changed
51:Attempt to DIMension an existing simple variable
52:Variable name not DIMensioned
53:Array size exceeds initial DIMension
54:Subscript exceeds DIMension
55:Illegal subscript specified
56:Strings can have only one (1) DIMension
57:Parameter variable in ENTER statement has already been allocated
58:String or array variable has not been DIMensioned
59:A string may not be re-DIMensioned
# Group 5: Matrix errors
60:Same matrix on both sides of ‘MAT’ is illegal here
61:Matrices have different DIMensions
62:Matrix has zero DIMension; Argument is not a matrix
63:Matrix DIMensions are not compatible for this operation
64:Matrix is not square
65:Matrix cannot be INVerted – has zero DETerminant
# Group 6: File and I/O errors
70:Filename does not exist
71:Filename already exists; use ‘!’ to replace
72:File in use; cannot CREATE, DELETE, EOPEN or MODIFY
74:File is in use and locked
75:File is delete protected
76:Out of DATA
77:Extra INPUT numeric items; warning only
78:INPUT of wrong type or insufficient
79:DATA of wrong type (numeric/string)
80:Illegal pathname or filename
81:Illegal channel number specified (or ISAMFILES value too small)
82:Protected Directory or file system, access not granted
85:System is out of channels – notify Manager
86:Not a loadable program file – wrong revision, protected or corrupted
87:Selected channel is not open
88:Illegal record number (past end of file)
89:Assigned channel limit exceeded; too many OPEN files
90:File size is too large for system; cannot expand
91:File is Read-protected
92:File is Write-protected
93:Invalid parameter or syntax for command
95:No such logical unit/pack
96:Program is Re-SAVE/COPY protected
98:File system has no available disk space
100:Selected data record is locked
101:File is not Indexed or Mapped
102:Invalid or non-existent Index number selected
104:Invalid or unimplemented user CALL ID number
105:Parameter list overflow
106:Error detected in/by user CALL routine
107:Not enough parameters passed to user CALL
108:User call parameters out of order
110:C-Tree Index File error; print ERR(8) for details, or var DIM < key len 112:CRT X,Y coordinate out of range 114:CRT Type not selected for your port 120:No communication file ‘/tmp/comm.listx.y’ 121:Communication buffer is full 122:Illegal port number selected 131:Program Channel not OPEN; cannot resave until SAVE/PSAVE issued 132:Channel is already OPEN and in-use 133:Illegal item number selected 134:Data does not match item specification and cannot be converted 136:File is being built or deleted 138:Item number is not sequential 139:Subprogram file not found 140:Subprogram file is read protected 141:Subprogram file is not a BASIC program 142:Not a data file (can’t OPEN or replace) 144:Cannot cross ISAM record boundary 150:WINDOWS environment variable not defined or count exceeded 151:No open windows 152:Window tracking not enabled 156:Record Not Written to Formatted Item File 157:Data Read Error 158:Input Timed Out # Miscellaneous 254:ESCape has been pressed and no ESCape branching enabled 255:Security Failure - Grace or Demonstration period has expired Beispiel für eine TERM.ANSI base_x:1 base_y:1 max_x:80 max_y:25 pc_leadin:1 xy_order:1 xy_ascii:1 crt_type:8 crt_flags:0x150 rb:\7 lf:\12 cr:\15\12 mh:\33[1;1H mu:\33[A md:\33[B ml:\33[D mr:\33[C cs:\33[6l\33[2J\33[1;1H\33[1m cu:\33[6h\33[2J cl:\33[6h\33[K ce:\33[6h\33[J bp:\33[1o\33[0m ep:\33[1m\33[0o bd:\33[36m ed:\33[37m bb:\33[5m eb:\33[0;1m bu:\33[4m eu:\33[0;1m br:\33[0;7m er:\33[0;1m il:\33[L dl:\33[M ic:\33[@ dc:\33[P lk:\33[2h uk:\33[2l pi:_ re:\33[31m gr:\33[32m ye:\33[33m bl:\33[34m bk:\33[30m ma:\33[35m cy:\33[36m wh:\33[37m xx:\33[1m\33[0o\33[6l\33[2J\33[1:1H sd:ANSI PC monitor pc:\33[ pc1:; pc2:H # default input character processing \^B:13 \^C:14 \^D:7 \^E:12 \^H:22 \^J:15 \^M:15 \^O:9 \^Q:11 \^S:10 \^X:8 \^[:6 \^P:19 \177:4 # Graphic Zeichen G1:\332 G2:\277 G3:\300 G4:\331 G5:\304 BH:\304 G6:\263 BV:\263 G7:\264 G8:\303 G9:\301 G10:\302 G11:\305 \^L:3