How to execute a SQL Query using 4GL?

SOLVED

Hi,

I'm new in development for X3 and I need to execute a SQL Query using 4GL.

I found this link https://www.greytrix.com/blogs/sagex3/2013/11/22/executing-a-sql-query-using-4gl-language/ but I don't know where and how to create de function GETDBTYP and what I need to define.

Thank you

Helder Ferreira