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

S07 abend while moving value to a comp-3 fields second occur


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

New User


Joined: 15 Apr 2010
Posts: 4
Location: Mumbai

PostPosted: Thu Apr 15, 2010 11:11 am
Reply with quote

Hi there,
I have a declaration like this –
Code:
01 WS-A.                                                 
    05 WS-B                    OCCURS 15 INDEXED BY WS-I1.
    10 WS-C            OCCURS 15 INDEXED BY WS-I2.
       15 WS-C-1               PIC X(01).             
       15 FILLER                    PIC X(01) VALUE ';'.   
       15 WS-C-2           PIC X(01).             
       15 FILLER                    PIC X(01) VALUE ';'.   
       15 WS-C-3           PIC S9(5)V9(2) COMP-3.
       15 FILLER                   PIC X(01) VALUE ';'.


I am moving values to WS-C variables in an loop.
When I move value (e.g. 00033.60) to WS-C-3 (1,1) its moved properly.
But when moving proper value to WS-C-3 (1, 2), I am getting S07 Abend.

Not able to understand why.. I tried having all intermediate fields but still facing same issue. There must be some issue related to how this field is getting stored in second occurrence onwards. Kindly assist.
Looking forward to a prompt response.
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Thu Apr 15, 2010 11:54 am
Reply with quote

Hi,

Posting your actual code and error messages would help to understand your problem.

Please use the 'Code' tags for posting the code. Also, please use preview button before Submit.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 15, 2010 12:47 pm
Reply with quote

I also assume that you really mean S0C7 abend
Back to top
View user's profile Send private message
Ulhas

New User


Joined: 15 Apr 2010
Posts: 4
Location: Mumbai

PostPosted: Thu Apr 15, 2010 2:57 pm
Reply with quote

Hi there,
The declaration i mentioned is exactly from the module.
& i got S07 while debugging , thats how i located exact statement of abend.[/quote]
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Thu Apr 15, 2010 4:03 pm
Reply with quote

Ulhas wrote:
I am moving values to WS-C variables in an loop.
When I move value (e.g. 00033.60) to WS-C-3 (1,1) its moved properly.
But when moving proper value to WS-C-3 (1, 2), I am getting S07 Abend.


What is proper value?

Please post your COBOL code.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 15, 2010 4:16 pm
Reply with quote

As the correct terminolgy is oh so important in the IT industry, I tried to find an abend code S07 and have not yet found one.

Please post the actual sysout showing the actual abend. It will put my mind at rest.
Back to top
View user's profile Send private message
Ulhas

New User


Joined: 15 Apr 2010
Posts: 4
Location: Mumbai

PostPosted: Thu Apr 15, 2010 5:12 pm
Reply with quote

Oh, i m srry, i mean to say i am getting regular abend S0C7.

& proper value means e.g. 00050.90
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Apr 15, 2010 5:16 pm
Reply with quote

Quote:
I am moving values to WS-C variables in an loop.
When I move value (e.g. 00033.60) to WS-C-3 (1,1) its moved properly.
But when moving proper value to WS-C-3 (1, 2), I am getting S07 Abend.


loop? what loop is there if you are moving to literal sub-scripts?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Apr 15, 2010 5:24 pm
Reply with quote

Good question Dick......

Ulhas, are you saying that you have a data variable with "00050.90" in it? What is its PIC?
Back to top
View user's profile Send private message
Ulhas

New User


Joined: 15 Apr 2010
Posts: 4
Location: Mumbai

PostPosted: Thu Apr 15, 2010 5:41 pm
Reply with quote

Hi all,
I am moving S9(5)V9(2) COMP-3 to an another field with same declaration.
Its strange that first occurence gets populated properly but it abends while moving second occurence.

Hope this helps.
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: Thu Apr 15, 2010 5:53 pm
Reply with quote

Quote:
Its strange that first occurence gets populated properly but it abends while moving second occurence.
I really do not understand why you think this behavior is strange. Depending upon the precise code you are using, such behavior could be unusual, or it could be expected, or it could be anything in between. COBOL does not arbitrarily do things -- there always is a method involved. You may not understand what COBOL is doing with your code, but the abend indicates COBOL is not interpreting what you are attempting to do the same way you think it should happen. Unless you provide the precise code -- DATA DIVISION definitions for every variable and PROCEDURE DIVISION statements being used -- that is about all we can say about your problem.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Apr 15, 2010 5:54 pm
Reply with quote

Ulhas wrote:
Hi all,
I am moving S9(5)V9(2) COMP-3 to an another field with same declaration.
Its strange that first occurence gets populated properly but it abends while moving second occurence.

Hope this helps.


The problem wouldn't be with the receiving field it would be with the sending field!
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Apr 15, 2010 6:17 pm
Reply with quote

Ulhas wrote:
I am moving S9(5)V9(2) COMP-3 to an another field with same declaration.
How are populating the data in the from fields?
Back to top
View user's profile Send private message
ridgewalker58

New User


Joined: 26 Sep 2008
Posts: 51
Location: New York

PostPosted: Thu Apr 15, 2010 8:36 pm
Reply with quote

Pleaase try changing your instruction to:

move 1111.11 to your field name (1,1) AND
THEN
move 1111.11 to your field name (1,2)

If they both DO NOT give you your S0C7 abend

Then you have proven what the responders have been saying
"your problem is with your INPUT field"

If you are using a LOOP to fill up your ARRAY, I would assume that
your SENDING FIELD is also being referred to by a SUBSCRIPT or INDEX.
Have you actually looked at what your MOVE statement is pointing to when you are moving the SECOND occurence of your SENDING FIELD?
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 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