You can add additional syntax files (created by the below procedure) to the list by pressing Add button. Pressing Remove syntax file button will remove selected file from the list. The file will not be deleted from your disk. The list can be limited by entering filter text above.
The active syntax file is used for SDF syntax parsing, code completion and Insert SDF Commands action.
You can change the active file by selecting it and clicking Set active.
Since BS2IDE version 2.17 you can have defined multiple syntax files, but only one can be active at the time. |
On the first Wizard page a list of SDF commands is shown. The list can be limited by entering filter text above. Select a command and press Next or double click on a command to open the next wizard page with a tree containing all operands and their possible values. When selecting an operand or a operand value the corresponding syntax is added to the template preview. When checking the option Enable unique template variable names the unique syntax of selected variable will be added the to template preview.
By pressing Next the wizard attributes page is opened where the template name and the description is shown and can be modified.
Here you can decide whether to import the template directly to the SDF templates by enabling the check-box Import to SDF templates
or to create an XML file containing the template declaration by enabling the check-box create XML file and choosing
the Template folder destination directory where the created template files are written to by pressing Browse... button.
With pressing Finish button the actions requested
are performed.
This file can be imported in
Window > Preferences > BS2000 Remote IDE > SDF Procedure Editor > Templates.
Note: Usually the name of the XML file is built from the template name and the suffix
.xml . If the template name contain characters that are not allowed for Windows file names,
they are replaced by '_' (underscore). |
/SET-PROCEDURE-OPTIONS LOGG-ALLOWED=*PAR(CMD=*YES,DATA=*YES), - / DATA-ESCAPE-CHAR ='&&', - / IMPLICIT-DECLARATION = *NO /BEGIN-PARAM-DECLARATION / DECL-PARAM CHECK-INPUT-MODE(INIT='*BATCH') "*CURRENT / *DIALOG / *DIALOG-PROC / *BATCH / *BATCH-PROC / *NO" / "Determines the input mode for which the syntax is to be displayed." / " Only those syntax objects are displayed for the user which are permissible in the specified input mode." / DECL-PARAM FORM (INIT='*UNGUIDED') "Determines whether the syntax for guided or unguided dialog is to be output." / "*GUIDED / *UNGUIDED" / DECL-PARAM INF (INIT='*MAXIMUM') "Determines the scope of the output." / "MEDIUM = The output contains the command names, operands, preset operand values and alternative operand values" / "MAXIMUM = The output contains the command names, operands, preset and alternative operand values and help texts." / DECL-PARAM CHECK-PRIVILEGES(INIT='*YES') "Specifies if the objects defined without the privileges of the task must be displayed " / "*NO = Information is displayed on all commands, operands and operand values, regardless of the user's privileges." / DECL-PARAM OUT (INIT='BS2IDE.SDF-TEMPLATE.OUTPUT') "output file" /END-PARAM-DECLARATION / / MODIFY-MSG-ATTRIBUTES TASK-LANGUAGE=E "Currently on English is supported" / / WRTX '############################################################' / WRTX '# Syntax description of all active commands' / WRTX '# Information &(INF)' / WRTX '# CHECK-INPUT-MODE &(CHECK-INPUT-MODE)' / WRTX '# CHECK-PRIVILEGES &(CHECK-PRIVILEGES)' / WRTX '# FORM &(FORM)' / WRTX '# Output to &(OUT)' / WRTX '############################################################' / / DCV VARIABLE-NAME=LCMD,MULTIPLE-ELEMENTS=*LIST / &* LISTVAR for output of SH-CMD / DCV VARIABLE-NAME=CMD / DCV VARIABLE-NAME=ENTRY(TYPE=*STRUCTURE) / DCV VARIABLE-NAME=SDF-OPT(TYPE=*STRUCTURE),MULTIPLE-ELEMENTS=*LIST / DCV VARIABLE-NAME=CMD-CNTR(0,*INTEGER) / DCV VARIABLE-NAME=CMD-ERR(0,*INTEGER) / / &* two steps are necessary: / &* - first fetch all commands / &* - then output of the description of each command / / ASS-SYSOUT TO=*VARIABLE(VARIABLE-NAME=LCMD) / SHOW-CMD *ALL,CHECK-INPUT-MODE=&(CHECK-INPUT-MODE) / ASS-SYSOUT TO=*PRIMARY / &* SHV LCMD,LIST-INDEX=*YES / ASS-SYSOUT TO=&(OUT) / FOR CMD = *LIST(LCMD) / IF (SUBSTR(CMD,3,1) <> ' ') / CMD-CNTR = CMD-CNTR + 1 / CMD = TRIM('&(CMD)') / SHOW-CMD CMD-NAME=&(CMD),FORM=&(FORM),CHECK-INPUT-MODE=&(CHECK-INPUT-MODE),CHECK-PRIVILEGES=&(CHECK-PRIVILEGES),INF=&(INF);IF-CMD-ERR;WRTX '############ ERROR IN SHOW_CMD für &(CMD) ############';CMD-ERR=CMD-ERR+1;END-IF / END-IF / END-FOR / WRTX '# Summary: ###############################################' / WRTX '# Created on &HOST at &(DATE(FORMAT=*GERMAN)) &TIME userid &USER-ID' / WRTX '# Information &(INF)' / WRTX '# CHECK-INPUT-MODE &(CHECK-INPUT-MODE)' / WRTX '# CHECK-PRIVILEGES &(CHECK-PRIVILEGES)' / WRTX '# FORM &(FORM)' / WRTX '# Output to &(OUT)' / WRTX '# Commands processed: &(CMD-CNTR)' / WRTX '# Commands with errors: &(CMD-ERR)' / EXECUTE-CMD CMD=(SHOW-SDF-OPTIONS *ALL),STRUCTURE-OUTPUT=SDF-OPT,TEXT-OUTPUT=*NONE / WRTX '# Used Syntax files: ######################################' / FOR ENTRY = *LIST(SDF-OPT#.SF) / W-T '# &(FILL(STRING='&(ENTRY.TYPE)',LENGTH=10)) &(FILL(STRING='&(ENTRY.F-NAME)',LENGTH=54)) &(ENTRY.VERSION)' / END-FOR / WRTX '############################################################' / ASS-SYSOUT TO=*PRIMARY / WRTX '# Commands processed: &(CMD-CNTR)' / IF (CMD-ERR = 0 ) / WRTX '# Description of all commands successfully created' / ELSE / WRTX '# Commands with errors: &(CMD-ERR)' / END-IF /EXIT-PROC
Note: currently BS2IDE supports only a BS2000 syntax description file
with message language English.
Therefore set /MODIFY-MSG-ATTRIBUTES TASK-LANGUAGE=E Otherwise parsing of the syntax file causes error in building the operand tree. |