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: 1539
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 DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm


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