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
 

 

Experiencing SOC 7 when 1st move statement
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Wed Jun 27, 2007 7:09 pm    Post subject: Experiencing SOC 7 when 1st move statement
Reply with quote

Hi,

INITIALIZE I J.
PERFORM VARYING I FROM 1 BY 1 UNTIL I > 2
MOVE SPACES TO MEM-field1(I)
MOVE SPACES TO MEM-field2(I)
MOVE SPACES TO MEM-field3(I)
end-perform.

all mem-fields are PIC x().

I am experiencing SOC 7 when 1st move statement in perform is encountered.

Please help ....

Thanks & Regards,
Ranjit...
Back to top
View user's profile Send private message

prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Wed Jun 27, 2007 7:19 pm    Post subject:
Reply with quote

Can you provide the full code including the decalration of MEM-FIELD1/2/3. Are they all COBOL tables. why did you have subscript for all , I doubt you may have declared one table and want to use subscript to refer the three occurances.
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Wed Jun 27, 2007 7:26 pm    Post subject: Re: SOC 7
Reply with quote

Actually this is not the actual code.

Its a pretty big file rec.

Yes all these field are table elements.

The record layout is like :
01 OUT-REC.
02 SR-NUMBER PIC X(8).
02 BEFORE-AFTER OCCURS 2 TIMES.
05 MEM-DATA.
10 MEM-FIELD1 PIC X(4).
10 MEM-FIELD2 PIC X(9).
10 MEM-FIELD3 PIC X(10).

NO PROBLEM WHILE MOVING SPACES TO SR-NUMBER.

BUT GETTING SOC7 WHEN
MOVE SPACES TO MEM-FIELD1(I) IS ENCOUNTERED.

TRIED USING WS-REC SIMILAR TO OUT-REC BUT STILL GETTING SOC7 WHILE MOVING TO BEFORE-AFTER.

Please help.
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Wed Jun 27, 2007 7:32 pm    Post subject:
Reply with quote

Quote:
MOVE SPACES TO MEM-FIELD1(I) IS ENCOUNTERED.


How can you use this code? MEM-FIELD1 by itself is not a table but BEFORE-AFTER is. Since there is no occurance you are naturally getting S0C7. Instead move spaces to BEFORE-AFTER(I).
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Wed Jun 27, 2007 8:07 pm    Post subject:
Reply with quote

prasadvrk wrote:
Quote:
MOVE SPACES TO MEM-FIELD1(I) IS ENCOUNTERED.


How can you use this code? MEM-FIELD1 by itself is not a table but BEFORE-AFTER is. Since there is no occurance you are naturally getting S0C7. Instead move spaces to BEFORE-AFTER(I).

icon_sad.gif
MEM-FIELD1 is subordinate to an occurs therefore it must be subscripted or indexed when it is used.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Wed Jun 27, 2007 8:09 pm    Post subject:
Reply with quote

What is the definition of I?
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Thu Jun 28, 2007 11:03 am    Post subject:
Reply with quote

05 I PIC 9(03) VALUE ZEROS.

I dunno why its giving SOC 7 for moving spaces to an alphanumeric variable.

Please help.
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Thu Jun 28, 2007 12:22 pm    Post subject:
Reply with quote

Quote:
MEM-FIELD1 is subordinate to an occurs therefore it must be subscripted or indexed when it is used.


Sorry for missing out on that.
I strongly doubt that it has something to do with I and the subscripted item does not exist. Why don't you try displaying I.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 28, 2007 12:23 pm    Post subject:
Reply with quote

Hello,

How did you verify the 0c7 happens on the MOVE SPACES?

As an experiment, you might put a DISPLAY I immediately before the MOVE SPACES.

Post what happens then.

It may help if you post more of your code.
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Thu Jun 28, 2007 12:32 pm    Post subject:
Reply with quote

I am expediting the program. And it does give the SOC7 at that point.

Yeah I am keeping the I and it does gets value 001. I also tried using
I PIC s9(3). but no success.

I am really out of Ideas. Please do suggest something.


Thanks,
Ranjit
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 28, 2007 12:56 pm    Post subject:
Reply with quote

Hello,

How long is the source code? If we could see more/all of it, that may help. If you can post all of the source, someone may be able to load it on their machine and see if the same problem occurs.
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Thu Jun 28, 2007 1:02 pm    Post subject:
Reply with quote

Thanks Dick.

But I don't think I can post the actual code on the web.

The problem is weird though. I hope I find something soon.

I know that I am not able to give more information due to the shop restrctions but just let me know if you think of any possible solutions.

Thanks,
Ranjit
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 28, 2007 1:11 pm    Post subject:
Reply with quote

Hello,

Might it be possible to post the working-storage section?

Not being able to see the code does make trouble-shooting a bit more difficult icon_smile.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jun 28, 2007 2:39 pm    Post subject:
Reply with quote

I'm sure you have done this, but if you have a dump, look at the instruction in front of the address in the psw provided by the abend.
It should be a decimal instruction, what is it and where is it getting its data from?
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Thu Jun 28, 2007 3:07 pm    Post subject:
Reply with quote

This is the working storage section entries for the record.

Code:
 05  I                       PIC 9(03)  VALUE ZEROS.
 05  J                       PIC 9(03)  VALUE ZEROS.

01 WS-UPDATE.                                         
    02 WS-PLN-NUMBER           PIC X(8) VALUE SPACES.     
    02 WS-BEFORE-AFTER        OCCURS 2 TIMES.               
        05 WS-DEP-COUNT            PIC S9(3) VALUE ZEROS. 
        05 WS-COV-COUNT            PIC S9(3) VALUE ZEROS. 
        05 WS-MEM-DATA.                                   
           10 WS-MEM-DIV-NR        PIC X(4) VALUE SPACES. 
           10 WS-MEM-NR            PIC X(9) VALUE SPACES. 
           10 WS-MEM-EFF-DT        PIC X(10) VALUE SPACES.
           10 WS-MEM-UNIQUE-ID     PIC X(9) VALUE SPACES. 
           10 WS-MEM-STATUS        PIC X(1) VALUE SPACES. 
           10 WS-MEM-NAME          PIC X(30) VALUE SPACES.
           10 WS-MEM-ADDR-1        PIC X(30) VALUE SPACES.
           10 WS-MEM-ADDR-2        PIC X(30) VALUE SPACES.
           10 WS-MEM-ADDR-3        PIC X(30) VALUE SPACES.
           10 WS-MEM-CITY-AD       PIC X(19) VALUE SPACES.
           10 WS-MEM-ST-ABBR-CD    PIC X(2) VALUE SPACES. 
           10 WS-MEM-ZIP           PIC X(10) VALUE SPACES.
           10 WS-MEM-CNTRY-CD      PIC X(3) VALUE SPACES. 
           10 WS-MEM-CARD-BOOK-IND PIC X(1) VALUE SPACES. 
           10 WS-MEM-OPT-16        PIC X(1) VALUE SPACES.       
           10 WS-MEM-INS-CLASS     PIC X(4) VALUE SPACES.       
           10 WS-MEM-FAMILY-IND     PIC X(1) VALUE SPACES.     
           10 WS-MEM-TERM-REASON-CD PIC X(3) VALUE SPACES.     
           10 WS-MEM-TERM-DATE      PIC X(10) VALUE SPACES.     
           10 WS-MEM-COV-DATA OCCURS 1 TO 100 TIMES             
                                              DEPENDING ON WK-COV-COUNT.   
                15 WS-MEM-BTBN        PIC X(8) VALUE SPACES.     
            10 WS-MEM-DEP-DATA OCCURS 0 TO 20 TIMES             
                                              DEPENDING ON WK-DEP-COUNT.   
            15 WS-MEM-DEP-NAME    PIC X(30).                 


I am not able to initialize or move values to any of the WS-BEFORE-AFTER
variables.

For any of those variables I am getting SOC7.


THanks,

Ranjit...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 28, 2007 6:23 pm    Post subject:
Reply with quote

Hello,

When you execute the problem MOVE what values are in WK-COV-COUNT and WK-DEP-COUNT? There is no MOVE SPACES to WS-UPDATE is there?

I'll be on the road for a bit, but will check back in later to see what these values are. If they are not numeric, that could be a problem.
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Thu Jun 28, 2007 6:55 pm    Post subject:
Reply with quote

Thanks Dick, its solved.

This SOC 7 did su** my head for almost 2 days. Finally its over.

Thanks a lot.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 28, 2007 7:11 pm    Post subject:
Reply with quote

Good to hear it is solved icon_smile.gif

What was the cause and what was the fix?
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Fri Jun 29, 2007 2:37 pm    Post subject:
Reply with quote

WK-COV-COUNT and WK-DEP-COUNT was the problem. As we moved zeros to it at the begining and after moving values to the variable item it got solved.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jun 29, 2007 6:14 pm    Post subject:
Reply with quote

Thank you for posting your solution icon_smile.gif
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
This topic is locked: you cannot edit posts or make replies. Updating value of key using rewrite s... ParminderKumar COBOL Programming 4 Thu Aug 04, 2016 12:46 am


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