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

Compile warning for the SQL


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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: 792
Location: Chennai, India

PostPosted: Thu Jul 05, 2012 3:05 pm
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: 1788
Location: Bloomington, IL

PostPosted: Thu Jul 05, 2012 3:08 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts C Compile time time stamps Java & MQSeries 10
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Print out all lines with 'IBM' compil... CLIST & REXX 8
Search our Forums:

Back to Top