IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

S0C7 abend


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rini

New User


Joined: 16 May 2006
Posts: 6

PostPosted: Fri Dec 28, 2007 3:46 pm
Reply with quote

When i tried moving a variable with declaration 9(2).9(2) to a variable with declaration S9(2)V9(4) i m getting S0C7. is there any way to rectify. as of now i cant change the declaration of both the variables
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Fri Dec 28, 2007 4:03 pm
Reply with quote

Hi Rini,


You must have to check the value inside both the variables, Exped both the variables by using command PEEK, might be ur variables contain the garbage value which leads to SOC7.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Dec 28, 2007 4:08 pm
Reply with quote

9(2).9(2) is an edit mask x type REFERENCE Name = A

S9(2)V9(4) is a numeric display REFERENCE Name = B


COMPUTE B = FUNCTION NUMVAL(A)
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Fri Dec 28, 2007 4:20 pm
Reply with quote

It shouldn't give SOC7 value as both are numeric. Check the field values you are moving.

Regards,
KSK
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Fri Dec 28, 2007 5:25 pm
Reply with quote

KSK,

Wat u want to suggest its not obvious?
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Fri Dec 28, 2007 5:28 pm
Reply with quote

Vasanth,

Don't use obvious. Nothing is obvious. Some persons may not know some things. IF YOU KNOW, IGNORE IT.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Dec 28, 2007 5:45 pm
Reply with quote

ksk,

both fields are not numeric.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Fri Dec 28, 2007 5:54 pm
Reply with quote

Hi Dick,

Thanks for the response. Are both fields are not numeirc? If not, can I know which one is not Numeric?

KSK
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Dec 28, 2007 6:23 pm
Reply with quote

9(2).9(2) is an edit mask, it is x type, REFERENCE Name = A

S9(2)V9(4) is numeric display, REFERENCE Name = B


COMPUTE B = FUNCTION NUMVAL(A)
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri Dec 28, 2007 6:39 pm
Reply with quote

I think what we are saying is that the 9(2).9(2) is a character field containing a "." - so cannot be moved to a numeric field.
Back to top
View user's profile Send private message
rahul.banik

New User


Joined: 23 Jan 2007
Posts: 16
Location: Mysore

PostPosted: Fri Dec 28, 2007 7:31 pm
Reply with quote

hi rini,

This is a valid move.i've tested this with a valid numeric value and it's not giving any S0C7.I think ur variables contain some garbage value which leads to SOC7 error.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Dec 28, 2007 8:32 pm
Reply with quote

In recent COBOL Versions moves of num/ed fields are de-edited and converted as part of the move.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Mon Dec 31, 2007 1:26 pm
Reply with quote

Hi Dick/Phrzby,

I have tested with the above picture classes, it was not giving S0C7 error.

I declared the variables as shown below.

01 K PIC 9(2).9(2).
01 K1 PIC S9(2)V9(4) VALUE 0.

MOVE 1025 TO K.

Results were

K=25.00
K1=25000{


KSK
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Jan 01, 2008 11:38 pm
Reply with quote

Hi KSK,

Is it not obvious? icon_wink.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts ISAM and abend S03B JCL & VSAM 9
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
Search our Forums:

Back to Top