View previous topic :: View next topic
|
Author |
Message |
Ulhas
New User
Joined: 15 Apr 2010 Posts: 4 Location: Mumbai
|
|
|
|
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 |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I also assume that you really mean S0C7 abend |
|
Back to top |
|
|
Ulhas
New User
Joined: 15 Apr 2010 Posts: 4 Location: Mumbai
|
|
|
|
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 |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Ulhas
New User
Joined: 15 Apr 2010 Posts: 4 Location: Mumbai
|
|
|
|
Oh, i m srry, i mean to say i am getting regular abend S0C7.
& proper value means e.g. 00050.90 |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
Ulhas
New User
Joined: 15 Apr 2010 Posts: 4 Location: Mumbai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
ridgewalker58
New User
Joined: 26 Sep 2008 Posts: 51 Location: New York
|
|
|
|
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 |
|
|
|