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
 
Getting SOC7 abend while moving COMP-3 to PD

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

New User


Joined: 17 Sep 2007
Posts: 9
Location: chennai

PostPosted: Tue Feb 10, 2009 1:08 pm    Post subject: Getting SOC7 abend while moving COMP-3 to PD
Reply with quote

Hi,

i want to move some COMP-3 fields from one file to another file's Packed decimal fields. while moving i got SOC7 abend. so defined WS variable with same length of COMP-3 fields.

moved COMP-3 to WS-XXX
moved WS-XXX to PD

No SOC7 now & values are moved well. but i m unable to see the correct values in my output file getting some values like this 'X'0CF6FC'. Please help me icon_sad.gif
Back to top
View user's profile Send private message

Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Tue Feb 10, 2009 2:50 pm    Post subject:
Reply with quote

Please provide the variable declarations.
Back to top
View user's profile Send private message
sivachandran M

New User


Joined: 17 Sep 2007
Posts: 9
Location: chennai

PostPosted: Tue Feb 10, 2009 4:59 pm    Post subject:
Reply with quote

ABCD-APPL-AS PIC S9(05) COMP-3.
WS-APPL-AS PIC 9(05) VALUE ZEROES.
CDEF-APPL-AS PIC S9(05) PACKED-DECIMAL.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8280
Location: Dubuque, Iowa, USA

PostPosted: Tue Feb 10, 2009 6:08 pm    Post subject:
Reply with quote

Quote:
i want to move some COMP-3 fields from one file to another file's Packed decimal fields. while moving i got SOC7 abend. so defined WS variable with same length of COMP-3 fields.

moved COMP-3 to WS-XXX
moved WS-XXX to PD

No SOC7 now & values are moved well. but i m unable to see the correct values in my output file getting some values like this 'X'0CF6FC'
Just out of curiosity, why do you think this is a solution to your problem? If you're getting a S0C7, then there is non-numeric data involved somewhere and just moving it to an intermediate field won't generally make it numeric.

Why not code up something like ...
Code:
IF  ABCD-APPL-AS NUMERIC
    MOVE ABCD-APPL-AS TO CDEF-APPL-AS
ELSE
    <handle non-numeric field -- error message or move zero>
END-IF
Back to top
View user's profile Send private message
sivachandran M

New User


Joined: 17 Sep 2007
Posts: 9
Location: chennai

PostPosted: Tue Feb 10, 2009 6:22 pm    Post subject:
Reply with quote

Thanks robert
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 Need help with 002-030 ABEND in TSO R... Terry Tallian TSO/ISPF 0 Sat Mar 17, 2018 1:13 am
No new posts Need help with ABEND RC=S806 RSN=4 an... chong.zhou All Other Mainframe Topics 3 Fri Feb 09, 2018 12:17 am
No new posts COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 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 Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm

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