I have gone across many example program’s source code and I observed that there is no space between the colon (:)
and the host variable
in embedded SQL within RPG programs on IBM i.
I am curious whether we can provide space between the colon and variable name when using the host variable in SQL queries in the embedded SQL programming in RPG/COBOL programs.
However, I did not get a chance to try this on any IBM i machine.
It works. You can provide space between the
colon(:)
and thehost variable
used in embedded SQL in the RPG program.Refer to the below snippet code where we have space in between the colon(:) and host variable l_name.