ELK Directives
ELK directives are special comments that allow the customization of the generation of the Web Service bridge programs when the
iscobol.compiler.servicebridge (boolean) is set to true. There are three syntaxes to specify an ELK directive.
Syntax 1:
$ELK directive-name [=directive-value] |
Syntax 2:
*(( ELK directive-name [=directive-value] )) |
The $ and the * must be in the comment area, that is column 7 in ANSI source format and column 1 in Terminal source format.
If the source code is written in Free format, ELK directives can appear at any column with the following syntax.
Syntax 3:
*>(( ELK directive-name [=directive-value] )) |
The directive must appear above the field or the file that you want to customize in the LINKAGE SECTION of the source code.
Note that no spaces are allowed between the comment symbol and the couple of parenthesis. If spaces are present, the directive is treated as a standard comment and doesn’t have effects.
ELK directives are ignored in Object and Factory methods. They can be used only in standard programs.
Defining multiple ELK directives in the same point
Multiple ELK directives can be distributed on multiple lines as follows
Fixed:
$ELK INPUT $ELK TYPE=long 03 fd1-field1 pic 9(5). |
Terminal:
*((ELK INPUT)) *((ELK TYPE=long)) 03 fd1-field1 pic 9(5). |
Free:
*>((ELK INPUT)) *>((ELK TYPE=long)) 03 fd1-field1 pic 9(5). |
or merged in a single line as follows:
Fixed:
$ELK INPUT, TYPE=long 03 fd1-field1 pic 9(5). |
Terminal:
*((ELK INPUT, TYPE=long)) 03 fd1-field1 pic 9(5). |
Free:
*>((ELK INPUT, TYPE=long)) 03 fd1-field1 pic 9(5). |
Splitting a ELK directive on multiple lines
A single ELK directive can be splitted on multiple lines by repeating the ELK delimiters on each line.
For example, the following snippets
Fixed:
$ELK TYPE= $ELK long 03 fd1-field1 pic 9(5). |
Terminal:
*((ELK TYPE=)) *((ELK long )) 03 fd1-field1 pic 9(5). |
Free:
*>(($ELK TYPE=)) *>((ELK long )) 03 fd1-field1 pic 9(5). |
are equivalent to
Fixed:
$ELK TYPE= long 03 fd1-field1 pic 9(5). |
Terminal:
*((ELK TYPE= long )) 03 fd1-field1 pic 9(5). |
Free:
*>((ELK TYPE= long )) 03 fd1-field1 pic 9(5). |