Are there database options that will allow your SELECT query to continue processing? I know in several environments you can set a max delay on the database... if the query does not succeed within a specified amount of time, it will just return, generally with all of the results except that record.If it's not a configuration issue with the RPG program, then it certainly be too much of a hassle (and most likely not possible) for the RPG program to be changed so that it locks the row differently, so that's probably not an option.
Some row locks allow you to read the data while the row is locked, but I don't know enough about DB2 or the way that the RPG program is locking the row to definitively tell you what to do.