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
 

 

Compile warning for the SQL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
CJT

New User


Joined: 02 Aug 2007
Posts: 83
Location: Here

PostPosted: Thu Jul 05, 2012 2:56 pm    Post subject: Compile warning for the SQL
Reply with quote

Hi,
Code:
select A.PROCESS_MONTH
      ,A.PROCESS_DAY
      ,A.PROCESS_YEAR
      ,A.ACCOUNT_ID
      ,B.ESTABLISH_DATE
      ,A.SHORTNAME
      ,CASE WHEN
         SUBSTR(A.SHORTNAME,1,1) = ''&''
         THEN ''CLOSED''
         ELSE ''OPEN''
       END AS ACCOUNT_STATUS
      ,A.NETWORTH
      ,B.PLAN_ID
      ,B.GXREF_NUMBER
      ,A.IRS_NUMBER
      ,A.IRS_CODE
      ,B.FIAG_IND
from CFP1DBO.T_CFHB_HIST_BAL A,
     CFP1DBO.T_CFBO_BUOWN_2012 B
where A.PROCESS_MONTH = ''05''
  and A.PROCESS_DAY = ''31''
  and A.PROCESS_YEAR = ''2012''
  and A.PROCESS_MONTH = B.PROCESS_MONTH
  and A.PROCESS_DAY   = B.PROCESS_DAY
  and A.PROCESS_YEAR  = B.PROCESS_YEAR
  and A.ACCOUNT_ID    = B.ACCOUNT_ID
  and (
          A.ACCOUNT_ID LIKE (''650%'')
       or A.ACCOUNT_ID LIKE (''651%'')
       or A.ACCOUNT_ID LIKE (''652%'')
       or A.ACCOUNT_ID LIKE (''653%'')
      )
  and B.FIAG_IND = ''Y''
  and B.PRODUCT_LEVEL_CD = ''16''
order by A.ACCOUNT_ID
This is cursor i decalred in my program . When i compiling the program i am getting warning like

DSNH206I DSNHANAL LINE 747 COL 7 STATEMENT REFERENCES COLUMN "B"."PLAN_ID",WHICH IS NOT DECLARED IN THE SPECIFIED TABLE(S)

DSNH206I DSNHANAL LINE 747 COL 7 STATEMENT REFERENCES COLUMN "B"."GXREF_NUMBER" WHICH IS NOT DECLARED IN THE SPECIFIED TABLE(S)
DSNH206I DSNHANAL LINE 747 COL 7 STATEMENT REFERENCES COLUMN "B"."FIAG_IND", WHICH IS NOT DECLARED IN THE SPECIFIED TABLE(S)
DSNH206I DSNHANAL LINE 747 COL 7 STATEMENT REFERENCES COLUMN "B"."PRODUCT_LEVEL_CD", WHICH IS NOT DECLARED IN THE SPECIFIED TABLE(S)
DSNH206I DSNHANAL LINE 747 COL 7 STATEMENT REFERENCES COLUMN "B"."ESTABLISH_DATE", WHICH IS NOT DECLARED IN THE SPECIFIED TABLE(S)

I declared corresponinding DCLGEN in my program but i am getting warning only for the table CFP1DBO.T_CFBO_BUOWN_2012

Some could tell me why i am getting like that?
Back to top
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Thu Jul 05, 2012 3:05 pm    Post subject:
Reply with quote

To confirm, please manually open DCLGEN data set from where it could have picked up for pre-compile and check if DECLARE TABLE statement with those columns for that table is present.

Does your pre-compile output has expanded source? If so, check for DECLARE TABLE statement with those column names in it.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1753
Location: Bloomington, IL

PostPosted: Thu Jul 05, 2012 3:08 pm    Post subject:
Reply with quote

Probably because these columns are not in the DECLARE TABLE statement for T_CFBO_BUOWN_2012.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts COBOL 5 Compile oerdgie COBOL Programming 3 Thu Oct 06, 2016 6:14 pm
No new posts compile and link program in 6.1 brigitte pruett COBOL Programming 3 Tue Aug 16, 2016 12:09 am
No new posts Compile COBOL in Mode 64 Bit Manshadi COBOL Programming 3 Sat Jan 10, 2015 1:28 pm


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