Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

error during compilation.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Program SQL giving error during compilation.
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

Moderator


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

PostPosted: Tue Jul 03, 2012 12:11 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts IDMS/DC-COBOL program - SNAP error wh... rakeshsekar1987 IDMS/ADSO 5 Tue Sep 13, 2016 8:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us