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

Getting SOC7 abend while moving COMP-3 to PD


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Feb 10, 2009 6:08 pm
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
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 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 10
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
Search our Forums:

Back to Top