IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

error during compilation.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue Jul 03, 2012 11:59 am
Reply with quote

sorry, i posted in an old thread.. i should have started a new post.. but i couldn't find any option to delete / change the post.. icon_sad.gif

Code:

<<<< DCLGEN >>>>
01  G.                               
    10 A      PIC X(5).           
    10 B     PIC S9(9) USAGE COMP.
    10 C      PIC X(4).           
    10 D     PIC X(5).           
    10 E.                               
       49 E-LEN     PIC S9(4) USAGE COMP.
       49 E-TEXT    PIC X(32000).       

<<< PROCEDURE DIVISION >>>
MOVE 'XXXX'              TO A
MOVE 1                     TO B
MOVE 'YYY'                 TO C
MOVE 'ZZZ'                TO D
                                                       
EXEC SQL                                               
    SELECT e
      FROM TABLE
      INTO :E
    WHERE  NOTF_ORIG_INSTL   = :A
      AND  NOTF_MSG_SEQ_NUM  = :B
      AND  REQ_RESP_REAS     = :C
      AND  NOTF_MSG_TYP_CDE  = :D
END-EXEC                                               


Hi - I am trying to compile a program with above EXEC SQL, but getting a compilation error

Code:

DSNH104I DSNHPARS LINE 7197 COL 143  ILLEGAL SYMBOL ":". SOME SYMBOLS 
THAT MIGHT BE LEGAL ARE: <END-OF-STATEMENT> QUERYNO HAVING WHERE GROUP
ORDER INTERSECT                                                       


I tried lot of things but can't figure out where it is going wrong. I tried executing the SQL on SPUFI where it works fine. Could anyone please throw some light.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jul 03, 2012 12:11 pm
Reply with quote

Request moderator to have that as a new thread

Why dont you try

Code:
EXEC SQL                                               
    SELECT e
      INTO :E
      FROM TABLE
    WHERE  NOTF_ORIG_INSTL   = :A
      AND  NOTF_MSG_SEQ_NUM  = :B
      AND  REQ_RESP_REAS     = :C
      AND  NOTF_MSG_TYP_CDE  = :D
END-EXEC
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top