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

Error when binding DB2 COBOL Program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ssowmya

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Wed Feb 14, 2007 11:35 am
Reply with quote

Hi

I receive the following error when I try to compile COBOL/DB2 program in Bind Step.

BIND PACKAGE(AP_BTCH_APPL) CURRENTDATA(NO) EXPLAIN(YES) QUALIFIER(DB2) VALIDAT
DSNX200I % BIND SQL ERROR
USING APPLBIND AUTHORITY
PLAN=(NOT APPLICABLE)
DBRM=TESTNEW1
STATEMENT=362
SQLCODE=-401
SQLSTATE=42818
TOKENS=
CSECT NAME=DSNXOBFC
RDS CODE=930
DSNT233I % UNSUCCESSFUL BIND FOR

Has any of you faced the same problem ? I actually double checked the problem and there is no case where I move values to inconsistent data type...Could some one please help me....
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Feb 14, 2007 11:38 am
Reply with quote

Hi ssowmya,


Would u mind to paste ur sql stmts?
Back to top
View user's profile Send private message
ssowmya

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Wed Feb 14, 2007 11:45 am
Reply with quote

The only SQL Statement in the program is

EXEC SQL
SELECT A5_MF_UNIT_PRC_A
INTO :C5-UNIT-PRICE
FROM T1BPQFSA50
WHERE A4_PMC_CO_PLT = :WS-BPQFSA50-COPLT AND
A4_MF_REQ_NO = :WS-BPQFSA50-REQNO AND
A5_MF_PART_NO = :WS-BPQFSA50-ITEM
END-EXEC.

I handle all SQL Codes.... icon_sad.gif
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Feb 14, 2007 11:50 am
Reply with quote

Hi Ssowmya,

Please paste ur host variable & column definition
Back to top
View user's profile Send private message
ssowmya

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Wed Feb 14, 2007 11:59 am
Reply with quote

Hi...Thanks very much for your quick response....

Host Variable:

05 WS-BPQFSA50-COPLT PIC X(04) VALUE ZEROS.
05 WS-BPQFSA50-PREFIX PIC X(02) VALUE SPACES.
05 WS-BPQFSA50-REQNO PIC X(06) VALUE ZEROS.
05 WS-BPQFSA50-ITEM PIC X(07) VALUE SPACES.

Table Defenition

A4_PMC_CO_PLT CHAR(4) NOT NULL,
A4_MF_PREFIX CHAR(2) NOT NULL,
A4_MF_REQ_NO INTEGER NOT NULL,
A5_MF_PART_NO INTEGER NOT NULL,

If I give numeric value for WS-BPQFSA50-REQNO and WS-BPQFSA50-ITEM, the program does not compile successfully...Hence I used X(06) & X(07) respectively....
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Feb 14, 2007 12:12 pm
Reply with quote

Hi There,

Declare WS-BPQFSA50-REQNO ,WS-BPQFSA50-ITEM as numeric & paste the compiler error
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts Error to read log with rexx CLIST & REXX 11
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Error when install DB2 DB2 2
Search our Forums:

Back to Top