Comparing RPG and SQL Functionality
July 22, 2009 Hey, Mike
Is there a book on how RPG operation codes and built-in functions translate to SQL? I’m trying to leverage my RPG coding skills to write logic in a DB2 stored procedure. That is, I know exactly what to do in RPG, but I don’t know the SQL equivalent. To determine the length of a city name, I would use RPG code like this: Eval CityLength = %Len(%Trim(City)) How would I do the same in a stored procedure SET statement? I have used the following to find a field length, but my field is an input parameter to the stored procedure. |