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
 

 

SQLCODE -144

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
View previous topic :: :: View next topic  
Author Message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Mon May 11, 2009 3:34 pm    Post subject: SQLCODE -144
Reply with quote

Hi All,

I am getting an erro code of -144 for the below query.

EXEC SQL
SELECT POLICY_NBR
INTO :DCLPLCY-POLICY-NBR
FROM POLICY
WHERE :DCLPLCY-PROPOSAL-NBR = PROPOSAL-NBR-IN
END-EXEC


here i get PROPOSAL-NBR-IN from input file. I need to check if there is any policy number alreday present in POLICY table where proposal number in table equals proposal number in input file.

please help in debugging. if this requirement can be handled with more correct query plz post.

reason for -144 is INVALID SECTION NUMBER number
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon May 11, 2009 3:57 pm    Post subject:
Reply with quote

Do you not have access to the correct messages and codes reference manual so that you can see what the error is for yourself ?
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Mon May 11, 2009 3:58 pm    Post subject: Reply to: SQLCODE -144
Reply with quote

Hii

i changed the query as


MOVE PROPOSAL-NBR-IN TO DCLPLCY-PROPOSAL-NBR

EXEC SQL
SELECT POLICY_NBR
INTO :DCLPLCY-POLICY-NBR
FROM POLICY
WHERE PROPOSAL_NBR = :DCLPLCY-PROPOSAL-NBR
END-EXEC


still its giving the same -144 error.

pls help
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Mon May 11, 2009 4:02 pm    Post subject: Reply to: SQLCODE -144
Reply with quote

Hi expat

thanks for your post.

actually i am new to coding. i am coding this cobol-db2 program for the first time.

thats why i find this forum as a right place to share.
Back to top
View user's profile Send private message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Tue May 12, 2009 2:54 am    Post subject: Reply to: SQLCODE -144
Reply with quote

sm_2009, were there any warnings present at the time of bind/pre compilation. Did you ask your peers tht if they had previously faced such an issue.

WTH
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue May 12, 2009 3:11 am    Post subject:
Reply with quote

-144 INVALID SECTION NUMBER number
Explanation: One of the following:
1. The user attempted to execute an invalid section.
2. This release of DB2 does not support the SQL statement.
3. The section number in the call parameter list is one of these:
* Negative
* An invalid duplicate
* Greater than the maximum section number of the DBRM or package.

Additional diagnostic information is available at the above link.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 12, 2009 4:46 am    Post subject:
Reply with quote

Hello,

What happens if you run the query in spufi?
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Tue May 12, 2009 9:15 am    Post subject: Reply to: SQLCODE -144
Reply with quote

Hi Succor,

the bind return code is zero. i have tried to rebind also and there were no warning messages; rebind was successful.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 12, 2009 9:23 am    Post subject:
Reply with quote

Hello,

Which release of db2 are you using? On which operating system?
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Tue May 12, 2009 9:34 am    Post subject: Reply to: SQLCODE -144
Reply with quote

hi Dick

i ran the query in SPUFI, and it returned correct value.

for proposal number 145, policy number = 1, in POLICY table.

please note here that both Policy-nbr and proposal-nbr are the pimary keys in POLICY table.

---------+---------+---------+---------+---------+---------+---------+--
--SELECT (DAYS(CURRENT_DATE) - DAYS(CURRENT_DATE + 1 DAYS)) FROM
--SYSIBM.SYSDUMMY1
--GRANT ALL ON G30665.PRODUCT TO PUBLIC;
--GRANT ALL ON G30665.RATE TO PUBLIC;
--GRANT ALL ON G30665.MEMBER TO PUBLIC;
--GRANT ALL ON G30665.POLICY TO PUBLIC;
--GRANT EXECUTE ON PLAN G0665PG1 TO PUBLIC;
--GRANT EXECUTE ON PLAN G0665PG2 TO PUBLIC;
SELECT POLICY_NBR FROM POLICY
WHERE PROPOSAL_NBR = 145;
---------+---------+---------+---------+---------+---------+---------+--
POLICY_NBR
---------+---------+---------+---------+---------+---------+---------+--
1
DSNE610I NUMBER OF ROWS DISPLAYED IS 1
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 100
---------+---------+---------+---------+---------+---------+---------+--
---------+---------+---------+---------+---------+---------+---------+--
DSNE617I COMMIT PERFORMED, SQLCODE IS 0
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---------+--
DSNE601I SQL STATEMENTS ASSUMED TO BE BETWEEN COLUMNS 1 AND 72
DSNE620I NUMBER OF SQL STATEMENTS PROCESSED IS 1


please have a look and let me know if i am missing any thing here.

thanks
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Tue May 12, 2009 9:45 am    Post subject: Reply to: SQLCODE -144
Reply with quote

hey dick,

i have used sql query in one more program previously. it was working fine. Still do u think there is a possibility tht this query is not supported by the db2 version i am using.

thanks
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Tue May 12, 2009 9:49 am    Post subject: Reply to: SQLCODE -144
Reply with quote

The rebind parameters as shown in background for REBIND of the plan is -

DSNT252I -DSN1 DSNTBRB REBIND OPTIONS FOR PLAN G0665PG2
ACTION
OWNER G30665
VALIDATE RUN
ISOLATION RR
ACQUIRE USE
RELEASE COMMIT
EXPLAIN NO
DYNAMICRULES RUN
DSNT253I -DSN1 DSNTBRB REBIND OPTIONS FOR PLAN G0665PG2
NODEFER PREPARE
CACHESIZE 1024
QUALIFIER G30665
CURRENTSERVER
CURRENTDATA NO
DEGREE 1
SQLRULES DB2
DISCONNECT EXPLICIT
NOREOPT VARS
KEEPDYNAMIC NO
IMMEDWRITE NO
DBPROTOCOL DRDA
OPTHINT
ENCODING EBCDIC(00037)
PATH
DSNT200I -DSN1 REBIND FOR PLAN G0665PG2 SUCCESSFUL
***


Is there any thing i need to change here?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 12, 2009 9:51 am    Post subject:
Reply with quote

Hello,

Was the program that worked fine on the same db2 system? If you have multiple db2 environments, which ones work and which ones fail?

If you have one that works and one that does not, suggest you determine the difference(s) in the two. . .

Does the program that fails use the exact same compile/bind jcl as the onte that works?
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Tue May 12, 2009 10:31 am    Post subject: Reply to: SQLCODE -144
Reply with quote

All are in same DB2 environment.
yes,both use same compile/bind option available in DB2 panel.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 12, 2009 10:42 am    Post subject:
Reply with quote

Hello,

Is there a particular reason rebind is used (rather than bind)? What happens if bind is used?
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Tue May 12, 2009 10:47 am    Post subject: Reply to: SQLCODE -144
Reply with quote

No Bind for this is alreday done, so i am using Rebind option.

Do you mean to drop the first one and start with BIND again.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 12, 2009 12:33 pm    Post subject:
Reply with quote

Hello,

Quote:
Do you mean to drop the first one and start with BIND again.
No, just specify BIND.

I looked at our db2 compile and nothing uses a rebind. . . What we use is a bind with replace.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue May 12, 2009 3:06 pm    Post subject:
Reply with quote

My terminology sucks, so someone who knows, please translate my post:

My userid is ABCD. In Spufi all my FROM tables must be FROM qualifier.table, unless I am accessing a table that I created.

so in spufi,
Code:

SELECT POLICY_NBR FROM POLICY

is accessing a table, POLICY, that I created or ABCD.POLICY.

To access that in a pgm I would have to either
qualify my SQL
Code:

SELECT POLICY_NBR FROM ABCD.POLICY

or invoke the program with a PLAN which specifically mentions ABCD as the qualifier.
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 -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQLCODE-000000080N priya91 DB2 1 Mon Feb 01, 2016 4:35 pm
No new posts Need to understand SQLCODE = 12 rohanthengal DB2 3 Thu Nov 05, 2015 11:22 am
No new posts SQLCODE -922 in Batch-Cics program tr... kishpra CICS 2 Thu Sep 10, 2015 12:36 pm
No new posts SQLCODE -450 for stored procedure spoorni DB2 3 Fri Jan 16, 2015 2:45 am
No new posts -81 SQLCODE returned when Remote Stor... kameswaramanoj.Akella DB2 1 Wed Dec 03, 2014 5:36 am


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