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 when binding DB2 COBOL Program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Error when binding DB2 COBOL Program
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: 1187
Location: Bangalore,India

PostPosted: Wed Feb 14, 2007 11:38 am    Post subject:
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    Post subject: Re: Error when binding DB2 COBOL Program
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: 1187
Location: Bangalore,India

PostPosted: Wed Feb 14, 2007 11:50 am    Post subject:
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    Post subject: Re: Error when binding DB2 COBOL Program
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: 1187
Location: Bangalore,India

PostPosted: Wed Feb 14, 2007 12:12 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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