function GetNames(lpcAlias,lpcIntoCursor,lpcCondition) select Upper(name) as Name ; from (lpcAlias) ; where &lpcCondition ; into cursor (pcIntoCursor) endfunc>In my code, I have situations where I would pass the alias name as a parameter. The reason is that I would create a temparary table based on a predefined structure, the table name is generated from sys(2015), in othercases, I would open a table "again" using a diffent alias. So macros are very helpful, for example:
>function GetNames(lpcAlias,lpcIntoCursor,lpcCondition) > select (Upper(&lpcAlias..name)) as Name ; > from &lpcAlias ; > where &lpcCondition ; > into cursor &pcIntoCursor >endfunc && GetNames >