Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: S07 abend while moving value to a comp-3 fields second occur
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    Post subject: Reply to: S07 abend while moving value to a comp-3 fields se
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 15, 2010 12:47 pm    Post subject:
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    Post subject: Reply to: S07 abend while moving value to a comp-3 fields se
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    Post subject: Re: S07 abend while moving value to a comp-3 fields second o
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 15, 2010 4:16 pm    Post subject:
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    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Thu Apr 15, 2010 5:24 pm    Post subject:
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    Post subject:
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: 7904
Location: Bellevue, IA

PostPosted: Thu Apr 15, 2010 5:53 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Thu Apr 15, 2010 6:17 pm    Post subject:
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    Post subject: Reply to: S07 abend while moving value to a comp-3 fields se
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    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 IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Moving a PD to PD spoorni DFSORT/ICETOOL 8 Fri Oct 07, 2016 9:52 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us