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
 

 

STOP RUN without commit, sqlcode=00000010M

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
toughhou

New User


Joined: 21 Jan 2010
Posts: 5
Location: China

PostPosted: Sat Aug 13, 2011 3:26 pm    Post subject: STOP RUN without commit, sqlcode=00000010M
Reply with quote

Hi All, When I tried to run a dynamic sql statment program, I got some problems. Anyone can help with it?

B210-DELETE-CUST.
MOVE SPACE TO DEL-STMT-TEXT.
STRING 'DELETE FROM TOUGH.' TABLE-NAME
'WHERE INVNO= ''' INVNO ''''
DELIMITED BY SIZE
INTO DEL-STMT-TEXT.
DISPLAY 'SQL: ' DEL-STMT-TEXT.
EXEC SQL
EXECUTE IMMEDIATE :DEL-STMT
END-EXEC.

===========(1)=================
EXEC SQL
COMMIT
END-EXEC.
===========(1)=================
If the program stop run without commit(i mark (1) here) after execution of the above sql statment, the sqlcode=00000010M.Anyone can explain about why I should commit manually. I remember that the program can commit automatically.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Sat Aug 13, 2011 4:56 pm    Post subject:
Reply with quote

Here is the defintion of a -104 SQLCODE
Suggest you bookmark and use LookAt - z/OS message help
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Sat Aug 13, 2011 5:26 pm    Post subject:
Reply with quote

you don't show any code where you are checking the SQLCODE after invoking DB2 to process your SQL.

so, not sure what sql statement is receiving the -104.

relying on auto commit in batch is poor programming.

in cics, normally you use syncpoints and at task termination,
db2 is invoked for the commit.
Back to top
View user's profile Send private message
toughhou

New User


Joined: 21 Jan 2010
Posts: 5
Location: China

PostPosted: Sat Aug 13, 2011 8:00 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
you don't show any code where you are checking the SQLCODE after invoking DB2 to process your SQL.

so, not sure what sql statement is receiving the -104.

relying on auto commit in batch is poor programming.

in cics, normally you use syncpoints and at task termination,
db2 is invoked for the commit.



toughhou wrote:
Hi All, When I tried to run a dynamic sql statment program, I got some problems. Anyone can help with it?

B210-DELETE-CUST.
MOVE SPACE TO DEL-STMT-TEXT.
STRING 'DELETE FROM TOUGH.' TABLE-NAME
'WHERE INVNO= ''' INVNO ''''
DELIMITED BY SIZE
INTO DEL-STMT-TEXT.
DISPLAY 'SQL: ' DEL-STMT-TEXT.
EXEC SQL
EXECUTE IMMEDIATE :DEL-STMT
END-EXEC.

===========(1)=================
EXEC SQL
COMMIT
END-EXEC.
===========(1)=================
If the program stop run without commit(i mark (1) here) after execution of the above sql statment, the sqlcode=00000010M.Anyone can explain about why I should commit manually. I remember that the program can commit automatically.


Here you see, if I didn't code the commit which I marked between "===========(1)============", it will give a sqlcode of 00000010M. But you told me it's -104, why 00000010M stands for -104? Could you explain?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Sat Aug 13, 2011 8:21 pm    Post subject:
Reply with quote

Please refer to this Sticky which answers your question.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Sat Aug 13, 2011 8:25 pm    Post subject: Reply to: STOP RUN without commit, sqlcode=00000010M
Reply with quote

Quote:
why 00000010M stands for -104? Could you explain?

pretty basic concept

the sign zones generally used are C and F for positive numbers D for negatives

so
Code:
x'c0c1c2c3c4c5c6c7c8c9'
x'f0f1f2f3f4f5f6f7f8f9'

are the hex representations for positive signed zoned numbers
Code:
x'd0d1d2d3d4d5d6d7d8d9'

are the same for negative signed zoned numbers

up to you to understand the why !
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
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am
No new posts SQLCODE-000000080N priya91 DB2 1 Mon Feb 01, 2016 4:35 pm
No new posts Commit limit for Delete query through... mf_karthik DB2 10 Thu Dec 17, 2015 12:56 am
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


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