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

Movement of COMP-3 fields


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

New User


Joined: 12 Jan 2007
Posts: 18
Location: Pune (India)

PostPosted: Thu Aug 06, 2009 11:25 am
Reply with quote

Hi,

I have two fields A and B, both are COMP-3 S9(17)

A is being moved to B.

Some Displays of A and B after the program execution

A=0000000000020920C
B=00000000000209203

A=0000000000000187M
B=0000000000000187M

A=0000000000000900}
B=0000000000000900}

The field is being used as an input in some other program which is giving the SOC7 error.

Please advice.
Back to top
View user's profile Send private message
dilipbiradar

New User


Joined: 12 Jan 2007
Posts: 18
Location: Pune (India)

PostPosted: Thu Aug 06, 2009 11:34 am
Reply with quote

Beg your pardon........

The A field is PIC S9(17) only..not the COMP-3
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Thu Aug 06, 2009 1:02 pm
Reply with quote

Hi Dilip,

As per you post, it looks like you are having a loop which is processing each record. Most probably one of these records might be having corrupt data for this field which is causing the SOC7 abend.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 06, 2009 3:30 pm
Reply with quote

The last position is the SIGN byte.

Please review the following Sticky -

ibmmainframes.com/viewtopic.php?t=40254

Bill
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Aug 06, 2009 8:03 pm
Reply with quote

Hello,

In the program that does the "move", suggest you code an IF to check if the A value is numeric before doing the move. . .

A decision needs to be made on what action to take if the value is not numeric (abend the code, issue an error, etc).
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 06, 2009 8:24 pm
Reply with quote

Adding to Dick's suggestion, if the field is display-numeric signed but the data has an 'F' zone in the last-byte, instead of a 'C' or a 'D', the numeric check will fail because the translate-table being used to validate the display-numeric signed-field doesn't consider an 'F' zone as a valid sign for a display-numeric signed-field.

This is also true vice-versa, if you had a 'C' or 'D' zone in the last-byte of an unsigned display-numeric field, the numeric test will fail as well, because the translate-table is expecting an 'F' zone in the last-byte.

Just my .02 cents....

Bill
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 COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
Search our Forums:

Back to Top