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
 

 

SOC7 Abend

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

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Wed Apr 16, 2008 3:33 pm    Post subject: SOC7 Abend
Reply with quote

I have a variable

Code:
01 WS-AN630-RECUR-REV   PIC X(8).


VALUE of this variable '+5000.00'. which is coming from a dataset.

Now I want to do some compute on the above variable so I moved to variable below
Code:
01 WS-AN630-RECUR-REV1  PIC S9(6)V99 COMP-3.


When I do the below compute its giving SOC7 Abend

Code:
COMPUTE WS-TI-BENMR-AMT =
    (WS-AN630-RECUR-REV1 * 1.15) / 100


How I have to decalre the File variable to do the computation correctly? Please advice..
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Apr 16, 2008 3:35 pm    Post subject:
Reply with quote

compute WS-AN630-RECUR-REV1 = numvalc(WS-AN630-RECUR-REV)
end-compute
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Wed Apr 16, 2008 3:44 pm    Post subject:
Reply with quote

Dick,
Code:
compute WS-AN630-RECUR-REV1 = numvalc(WS-AN630-RECUR-REV)


Is it NUMVAL?
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Wed Apr 16, 2008 3:44 pm    Post subject:
Reply with quote

If I use
Code:
compute WS-AN630-RECUR-REV1 = numvalc(WS-AN630-RECUR-REV)

I will be loosing Sign when its -ve then the output will not be having -sign.
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Wed Apr 16, 2008 3:45 pm    Post subject:
Reply with quote

Yes Its NUMVAL not NUMVALC
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Wed Apr 16, 2008 4:15 pm    Post subject:
Reply with quote

I have used
WS-TI-BENMR-AMT as
Code:
01 WS-TI-BENMR-AMT   PIC -9(5).99.


its working for both +ve and -ve Values
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: Wed Apr 16, 2008 8:09 pm    Post subject:
Reply with quote

shrivatsa wrote:
Yes Its NUMVAL not NUMVALC
I usually use NUMVAL-C also, it does the same as NUMVAL and also handles the occasional currency sign.......
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Apr 16, 2008 8:17 pm    Post subject:
Reply with quote

Quote:

01 WS-TI-BENMR-AMT PIC -9(5).99.


the above elementary field item is alphanumeric. there should be no surprise that you can move x to x.


the OP wanted a conversion move alphanumeric (numbers, decimal point, sign) to a numeric field. you can do that with numval /numval-c. A straight move will result in a soc7.
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 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
No new posts S213-14 ABEND explantion Apurva Mehta JCL & VSAM 5 Thu Jul 07, 2016 10:56 pm


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