Creating the Syntax Template
The syntax template specifies the command syntax to be generated by the custom dialog. It may consist of static text that is always generated and control identifiers that are replaced at run-time with the values of the associated custom dialog controls.
To build the syntax template for the Rasch Model Demo dialog:
- In the edit window of the Syntax Template pane, enter the static text shown in the figure below, up to and including the first equals sign (=).
- Position the cursor after the equals sign, select the Items target list control on the canvas,
right-click and select Add to syntax template. This action inserts the
identifier
%%Items%%
at the current cursor position.- At run time, the control identifier
%%Items%%
will be replaced with the syntax generated by the Items control, which was specified to be the list of variables transferred to the control. - If you choose to enter control identifiers manually, remember to include
the double percent signs (
%%
) before and after the identifier. - The edit window of the Syntax Template pane supports the auto-completion and color coding features of the Syntax Editor. See the topic Using the Syntax Editor for more information.
- At run time, the control identifier
- Enter the syntax for the
OPTIONS
subcommand shown in the figure.%%MissingValues%%
will be replaced at run time with the syntax associated with the selected radio button from the Missing Values control, eitherLISTWISE
orALLAVAILABLE
.Figure 1. Custom Dialog Builder showing syntax in the Syntax Template pane Note: The syntax generated at run-time automatically includes a command terminator (period) as the very last character if one is not present.
For example, the following user choices generate the displayed syntax:
- The variables item1 and item2 are transferred from the Variables control to the Items control.
- Use all available data is selected in the Missing Values radio group.
SPSSINC RASCH DEMO /VARIABLES ITEMS=item1 item2 /OPTIONS MISSING=ALLAVAILABLE.