My simple program is to display a subfile (self extended subfile) with employee# and name, and a 'position to name:' on subfile control record to start display from this name and forward.
What is wrong with my codings here? Thank you in advance.
D SELECT1 S 500A INZ('SELECT EMPNO, EMPNAME FROM EMP ORDER BY EMPNAME WHERE EMPNAME >= POSITIONTONAME')
C/EXEC SQL
C+ PREPARE SEL FROM :SELECT1
C/END-EXEC
C*
C*
C/EXEC SQL
C+ DECLARE C1 SCROLL CURSOR FOR SEL
C/END-EXEC
*
C/EXEC SQL
C+ OPEN C1
C/END-EXEC