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
 

 

getting abend 4038

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
sweta.ssm

New User


Joined: 28 Feb 2010
Posts: 3
Location: India

PostPosted: Mon Mar 22, 2010 12:10 am    Post subject: getting abend 4038
Reply with quote

Hi All,

I have a DB2 table for storing a 10 digit numeric data.. I have defined the datatype as DECIMAL(10,0) and the PIC clause is s9(10)V COMP-3. Am fetching the value from SELECT statement, using the value in my program and again incrementing the value by 1 and updating the same table with the incremented value. When I do this, am getting abend 4038. I see in CEDF that SQLCODE for select is zero and soon after executing this command, am getting abend.

If I delete the row in the table and leave the table with no rows at all, then am not getting any abend since SQLCODE is 100 for both select and update.

Not sure what exactly is causing abend 4038. Appreciate any suggestions.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8119
Location: East Dubuque, Illinois, USA

PostPosted: Mon Mar 22, 2010 12:27 am    Post subject:
Reply with quote

A 4038 abend is an LE abend code indicating that there is an unhandled error in the program. In other words, the 4038 just says something else didn't work -- you need to find out what and fix it. You may need to talk to your site support group for assistance.
Back to top
View user's profile Send private message
sweta.ssm

New User


Joined: 28 Feb 2010
Posts: 3
Location: India

PostPosted: Mon Mar 22, 2010 1:19 am    Post subject:
Reply with quote

Thanks for the reply..
I found that error is in MOVE statements where am trying to move between COMP-3 and numeric items...

01 WS-PR-COMP PIC S9(13)V COMP-3.
01 WS-PR REDEFINES WS-PR-COMP.
05 WS-DATA PIC --9.
05 WS-R-NUM PIC ---------9.


MOVE WS-COMMAREA-DATA TO WS-DATA
MOVE H-RN (from DB2 table which is comp-3) TO WS-R-NUM
MOVE WS-PR-COMP TO H-COM-VAR

The problem is with the last MOVE statement. I have SQLCODE -310 when I used H-COM-VAR (which is host variable defined as COMP-3 in the table) to insert into a table..

Cant we move NUMERIC DATA to COMP-3?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8119
Location: East Dubuque, Illinois, USA

PostPosted: Mon Mar 22, 2010 1:46 am    Post subject:
Reply with quote

You can move numeric data to a COMP-3 field -- since both are numeric. However, your redefine on the COMP-3 field shows a complete lack of understanding of the format COBOL uses to store COMP-3 variables internally. I strongly recommend you click on the manuals link at the top of the page, find the COBOL manuals, and read up on internal formats until you see why what you've done is completely wrong. Hint: your two 05 level variables are both USAGE DISPLAY which are redefined on a USAGE COMP-3 variable.
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: Mon Mar 22, 2010 2:34 am    Post subject:
Reply with quote

Hello,

With a redefinition like the one posted, what could it do if it did work?

After reading about how numerics are stored/used, you may want to diagram what is you are actrying to accomplish. Suggest also you speak with some senior or your team leader so they can explain what you have as data and what must be done with this data.

No only can the system not do what has been coded, it is not at all clear why this would be required icon_confused.gif
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1232
Location: Israel

PostPosted: Mon Mar 22, 2010 11:04 am    Post subject:
Reply with quote

Haven't you got a message at compile about the redefine field larger than the original field ?
Because it's a warning, can you ignore such message ??? NO!

WS-PR-COMP is 7 bytes long, WS-PR is 13 bytes, this should have ring a bell!

Remove the COMP-3 and replace the '-'s by '9's, maybe it will do what you want.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts C03 ABEND sjiraga PL/I & Assembler 1 Thu Jun 01, 2017 4:51 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm


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