I was writing a sqlrpgle program since I had to write an SQL query to fetch data from a table into rpg variables and I was not sure how to map SQL data types field in SQL select statement with their equivalent ILE RPG data types.
How do we map all the SQL data types with their equivalent ILE RPG data types so that I can define the variables with exact mapping in the sqlrpgle program?
ILE RPG data types mapped to SQL data types: