![sqltype variables used when dcl-s in rpg](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT4L03pi1i_Mb2FfZx06UhHPUmLXadO0Hox5uzQMrwlZT47L4lMiWtDcjnKCchZMJXIplPVO477bdGW7PEsswv8yhU-lPlMuNc9oB9ieOVCMEQUrTLQOeSCbRZenrYJDd-GNEGHKyWh4ty/s200/rpg.png)
I have written about defining RPG variables defined as SQL types in past posts, which made me curious about all there are. Having searched in IBM's Knowledge Center I was disappointed to find that there was no one page with all of this information upon. Which gave me idea to write this, a list of all SQL types available.
If I am defining variables as SQL types my source needs to be compiled as a SQLRPGLE, as the RPG SQL precompiler converts these SQL data types into more familiar RPG equivalents.
The syntax for these variable definitions is simple, it is just: