9750
HSD-API-Interfaces:
* HSD-DDE-Interface
* SNI-DDE ... zu 100% implementiert
* SAG: SAP Entire Connection ... zu 100% implementiert
* EHLL-API (IBM-Emu-Compatibel) ... zu 99% implementiert
* Treiber-API/HSDAPI (BAM_Open, ...) ... partial
Macro language for the HSD 9750 terminalemulation and HSDCOMMD:
statements:
label:
syntax: number:
number is a decimal integer number in the range of 0 - 32767.
empty statement:
syntax: ;
enter statement:
syntax: ENTER string
string can contain printable characters and/or names of BS2000
keys. BS2000 key names must be enclosed in double parenthesis,
like ((d�1)).
waitfor statement:
syntax: WAITFOR string [ , expression ]
The statements waits for the given string to appear on the BS2000
screen right before the cursor, or for timeout.
string can be empty -> waiting for a block from host, or timeout.
string can begin with \n -> matches the begin of a line.
This is the only place where \n will be interpreted.
expression gives the timeout in seconds.
If the control goes over a waitfor statement, the timeout is deleted
and the 'TIMEOUT' predefined variable is set to 0 if the waitfor
statemant has the given string encoutered. 'TIMEOUT' is set to 1
if the given timeout exhausted.
The statement
waitfor string,expression
is equivalent to the statments
settimer expression
waitfor string
movecursor statement:
syntax: MOVECURSOR expression[,expression]
Moves the cursor of the BS2000 screen to the given position.
If there is one expression, that means absolute position counted
from 0. If there is two expressions, they mean line and colunm
numbers, counted from 0.
The statement
movecursor exp1,exp2
is equivalent to the statment
movecursor 80*(exp1)+(exp2)
stop statement:
syntax: STOP
Processing of the macro ends. ( like after the last statement )
goto statement:
syntax: GOTO number
The number is a label number that must be in the same macro
defined.
message statement:
syntax: MESSAGE stringexpression
Writes the given stringexpression in a message box ( under WINDOWS )
or on the DOS screen ( under DOS ).
run statement:
syntax: RUN stringexpression [ , expression ]
Runs the program stringexpression with WinExec. The expression will be
the nCmdShow parameter of WinExec. The default value is 1 ( SW_SHOWNORMAL ).
if statement:
syntax: IF ( expression ) [ statement ]...
[ ELSEIF ( expression ) [ statement ]... ]...
[ ELSE [ statement ]... ]
ENDIF
The [ statement ]... after the first expression that evaluates
TRUE ( not 0 ) will be executed. If all expressions evaluate
0, the [ statement ]... after the ELSE ( if any ) will be executed.
The next statement to execute is that after the ENDIF.
settimer statement:
syntax: SETTIMER expression
Sets a timeout for the next waitfor statement. This means that
after the given time the control goes over the waitfor statement
even if the string ( that was waited for ) is not encountered.
expression gives the timeout in seconds.
show statement:
syntax: SHOW [ ON / OFF ]
Under WINDOWS this statement will be ignored.
Under DOS the BS2000 screen will be shown ( by SHOW or SHOW ON )
or hidden ( by SHOW OFF ).
session statement:
syntax: SESSION expression
Under WINDOWS this statement will be ignored
Under DOS the EMU session will be changed. Meaningful values
for the exression: 1 - 8
settitle statement:
syntax: SETTITLE stringexpression
Under WINDOWS replaces the window title
expressions:
Numbers, predefined variables ( CURSORPOS, TIMEOUT ) und functions
( SUBSTRING ) combined with operators und parentheses.
operators:
The following arithmetical and boolean operator are permitted:
! Boolean NOT ( unary )
* / % Arithmetical multiply, divide, modulo
+ - Arithmetical add, subtract
< > <= >= != == Arithmetical compare
&& Boolean AND
|| Boolean OR
The list above is in the decreasing order of precedence.
Implicit conversions between arithmetical and boolean values:
TRUE -> 1
FALSE -> 0
not 0 -> TRUE
0 -> FALSE
The arithmetical operations are calculated with integer ( 16 bit signed )
arithmetic.
predefined variables:
CURSORPOS
The absolut position of the cursor of the BS2000 screen.
0 <= CURSORPOS < 80*24
TIMEOUT
FALSE if the last waitfor statement has been passed because of the
arriving of the string that was waited for.
TRUE if the last waitfor statement has been passed because of timeout.
predefined function:
SUBSTRING ( stringexpression, stringexpression )
0 if the first stringexpression is not part of the second one.
Else gives the starting position ( counted from 1 ) of the first
stringexpression in the second one.
number:
Numbers are unsigned decimal integers, must be in the range of 0 - 32767.
stringexpression:
string:
Characters between single (') other double (") quotation marks.
SCREEN ( expression, expression )
Part of the BS2000 screen beginning in the position given by the
first expressoin, ending right before the position given by the
second expression.
Any number of white spaces, tabulators, newlines, and comments ( /* comment */ )
can be used outside of numbers, keywords, strings, and two-character operators.
Keywords and BS2000 key names ( enter statement ) can be spelled in UPPERCASE,
lowercase or mIxeD. Strings are case-sensitiv. ( WAITFOR, SUBSTRING )
--------------------------------------------------------------------------------
statement: number:
;
ENTER string
string can contain names of BS2000 keys too, in form of ((d�1))
WAITFOR string [ , exp ]
string can with \n begin
MOVECURSOR exp[,exp]
STOP
GOTO number
MESSAGE stringexp
RUN stringexp [ , exp ]
IF ( exp ) [ statement]... [ ELSEIF ( exp ) [ statement ]... ]...
[ ELSE [ statement ]... ] ENDIF
SETTIMER exp
SHOW [ ON / OFF ]
SESSION exp
SETTITLE stringexp
stringexp: string
SCREEN ( exp, exp )
exp: boolfactor [ || boolfactor ]...
boolfactor: boolterm [ && boolterm ]...
boolterm: intexp
intexp < / > / <= / >= / != / == intexp
intexp: factor [ + / - factor ]...
factor: term [ * / / / % term ]...
term: [ ! ] number
[ ! ] CURSORPOS
[ ! ] ( exp )
[ ! ] SUBSTRING ( stringexp, stringexp )
[ ! ] TIMEOUT
string: 'other characters'
"other characters"
number: decimal digits, value up to 32767
|