Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Movement of COMP-3 fields

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

New User


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

PostPosted: Thu Aug 06, 2009 11:25 am    Post subject: Movement of COMP-3 fields
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: 19
Location: Pune (India)

PostPosted: Thu Aug 06, 2009 11:34 am    Post subject: Reply to: Movement of COMP-3 fields
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    Post subject:
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 06, 2009 3:30 pm    Post subject: Reply to: Movement of COMP-3 fields
Reply with quote

The last position is the SIGN byte.

Please review the following Sticky -

http://ibmmainframes.com/viewtopic.php?t=40254

Bill
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: Thu Aug 06, 2009 8:03 pm    Post subject:
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 06, 2009 8:24 pm    Post subject: Reply to: Movement of COMP-3 fields
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    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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us