Search code examples
ibm-midrangerpglerpg

Compiler directive not recognized


I get this error when start coding the C sheet of this RPGLE program :

Compiler directive not recognized; directive ignored

This is my code, in the last six lines I get the error.

HDatedit(*ymd) datfmt(*iso)                            
FQPRINT    O    F  132        PRINTER OFLIND(*INOV)    
DWCLICLA          S              5  0                  
DWCLINOM          S             45                     
DWCLICEL          S             15                     
DWCLISEX          S              1                     
DWCLIEMAIL        S             30                     
DWCLIESTD         S              1                     
DWCLIDEP          S              2  0                  
C*                                                     
C                   EXCEPT    CABECERA                 
C                   EXCEPT    linea                    
C*                                                     
C/EXEC SQL                                             
C+  DECLARE C1 CURSOR FOR                              
C+    SELECT CLICLAV, CLINOM, CLICEL, CLISEX, CLIEMAIL 
C+     FROM CLIENTES      
C+      ORDER BY CLICLAV  
C/end-exec                

I'm using PUB400.com (V7r5) to learn RPGLE.


Solution

  • You need to use CRTSQLRPGI to compile source with EXEC SQL. The source member type should be SQLRPGLE, not RPGLE.