>>-START---+-----------------------+----------------------------> '-stored_statement_name-' >-----+--------------------------+----------------------------->< | .--------------. | | V | | '-(-----parameter---+---)--' |
START is an ISQL command that causes a stored SQL statement or the current SQL statement to be processed.
The START command can be invoked by pressing PF2. The START command can be invoked by pressing PF2 (or PF14). Because you can reset your PF keys, you can assign the START function to any PF key.
Enclose a parameter in single quotation marks if it contains a blank. Any characters between the terminating single quotation mark and the next blank are ignored.
All placeholders in the SQL statement that do not have a corresponding parameter on the START command are replaced by null characters or are erased. Extra parameters on the START command are ignored.
The parameter can contain DBCS characters.
Assume you have the following SQL statement stored as SELPD:
select &1,&2,&3 - from emp_act - where actno = &4 - or emstdate = '&5'
You could type the START command as:
start selpd (empno actno emptime 90 '1982-06-01')
The resulting statement started is:
select empno,actno,emptime - from emp_act - where actno = 90 - or emstdate = '1982-06-01'
Notice that single quotation marks are needed around the &5 placeholder in the stored SQL statement because that placeholder stands for a character data item. Single quotation marks are not needed around &4 because &4 stands for a numeric data item. Single quotation marks are not needed for &1, &2, and &3 because they do not contain any blanks.
In a stored SQL statement, you can only use the ampersand (&) to create placeholders.
In the above example, the formatting information is not saved because placeholders are used in the SELECT clause.