error using _variable in open cursor statement
Iwan AB <[email protected]> Sat, 12 Jun 2021 18:55:25 +0700
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAHJCSmKNw53XooAm603rSR12Wx7QuUPCbU3D3TVSTDcBOkRUBg@mail.gmail.com> |
Hi,
I try this example taken from
http://www.aubit.com/aubit4gldoc/manual/html/aubit_4gl_enhancements.html#PAUSE%20Screen%20Handling
Passing IDs to functions
module1.4gl:
DECLARE c1 CURSOR FOR SELECT * FROM systables
CALL open_cursor("module1:c1")
anymod.4gl:
FUNCTION open_cursor(p_cursor)
DEFINE p_cursor CHAR(20)
OPEN CURSOR _variable(p_cursor)
IF SQLCA.SQLCODE!=0 THEN
ERROR "There was some error opening the cursor!"
END IF
END FUNCTION
but compiling anymod.4gl, I got error like this
DATABASE testdb
FUNCTION open_cursor(p_cursor)
DEFINE p_cursor CHAR(20)
OPEN CURSOR _variable(p_cursor)
|________________________________^
| Error at line 5, character 34
| syntax error, unexpected '_variable' (_variable)
IF SQLCA.SQLCODE!=0 THEN
ERROR "There was some error opening the cursor!"
END IF
END FUNCTION
Regards,
Iwan
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss