James H. Zisch - Computer Services

Support : Guides

 

SSI Controls

SSI Controls statements provide programmatic conditional and loop functions.

COUNTER

The SSI counter command. Provides for counter control within loop constructs.

Parameters:

name = the counter identifier
init = the init value
incr = the value to add to the counter
value = a flag

Syntax:

<!--#cpt name="cpt1" init="0" -->

Initialization: cpt1 = 0

<!--#cpt name="cpt1" incr="1" -->

cpt1 = cpt1 + 1

<!--#cpt name="cpt1" value="true" -->

display the current value of cpt1

IF

Provides routine conditional test logical control. Formats as a either a single condition or block statement with ELSE logic, terminating with an ENDIF statement.

Parameters:

name = the command identifier
command = a command name (jdbc, cpt)
var = a command identifier
equals = a string value

Syntax:

<!--#if name="if2" command="cpt" var="cpt1" equals="2" -->

ELSE

Provides routine conditional test logical control as alternative function for IF statements.

Parameters:

name = the if command identifier

Syntax:

<!--#else name="if2" -->

ENDIF

Parameters:

name = the if command identifier

Syntax:

<!--#endif name="if2" -->

LOOP

Parameters:

name = the command identifier

Syntax:

<!--#loop name="loop2" -->

ENDLOOP

Parameters:

name = the loop command identifier

Syntax:

<!--#endloop name="loop2" -->

EXITLOOP

Parameters:

name = the loop command identifier
command = a command name (jdbs, cpt)
var = a command identifier
equals = a string value

Syntax:

<!--#exitloop name="loop2" command="cpt" var="cpt1" equals="4" -->