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

Getting SOC4 While doing move to a Group Variable


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

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Thu Jul 26, 2007 11:28 am
Reply with quote

Hi,

Can anybody help me out,

I am getting Soc4 abend while doing a move to group variable which is declared inside a record layout.

i have checked every thing like is there any mismatch in the dd statements from jcl,and the record length of that record layout is 80 bytes, if anybody wants more information please reply to this
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Thu Jul 26, 2007 11:36 am
Reply with quote

While a well defined problem is half solved, the definition of your problem is lacking much detail.....
Is the file open?
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Thu Jul 26, 2007 11:37 am
Reply with quote

Hi

can u post the GROUP varible declartation.

are other move to record layout varibles are fine?? If u have not checked plse chk it. May be that ur open statement is failing

Sandeep
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Thu Jul 26, 2007 11:56 am
Reply with quote

I am really very sorry,i will provide u the detail.

my output record layout :

Code:

fd Ofile2.
01 orec2.
     02  grp-id  pic x(8).
     02  gr-stats pic x(1).
     02  gr-cntry pic x(3).
     -----
     -----


i am performing write operation depending on two conditions

one is when gr-stats is 'T'(termination) and second one is
when effective date is current date.

for first one i am not getting any abend its working properly
and i am able to write record in output file as described above, But when i am trying to write record depending on second condition it is getting abended for the same output file as before it worked properly.



Code:

If (gr-stats = 't')
    perform wt-fil2 thru wt-exit2.
else
    if (gr-e-yy2 = '07')
        perform wt-fil2 thru wt-exit2.
    end-if
end-if.

wt-fil2.
      move grp-id to grp-id2.
      move gr-stats to gr-stats2.
      --------
      --------
      write orec2.
      if (f-status = '00')
           continue
      else
           display "write to file2 is failed"
           stop run.
wt-exit2.
       exit.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Thu Jul 26, 2007 12:44 pm
Reply with quote

Why are you moving from the output area?
Again, it sounds like the output file is closed....Can you prove that it is open?
Have you identified what statement is causing the abend?
Where is grp-id2 and gr-stats2, WS or another file?
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Thu Jul 26, 2007 2:50 pm
Reply with quote

Quote:

Why are you moving from the output area?
Again, it sounds like the output file is closed....Can you prove that it is open?
Have you identified what statement is causing the abend?
Where is grp-id2 and gr-stats2, WS or another file?



sorry that was not output area :

i will provide you the output record layout once again.

Code:

fd Ofile2.
01 orec2.
     02  grp-id2     pic x(8).
     02  gr-stats2   pic x(1).
     02  gr-cntry2  pic x(3).
     02  gr-eff-dt   pic  x(8).
     02  gr-lmt-dt   pic  x(8).



and the output file is opened properly and it was closed after calling that para wt-fil2.

i am getting abend when ever i am trying to move anything in the output record fields,or i am trying to initialize the record fields which was not the case in first condition as i told earlier.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Thu Jul 26, 2007 3:05 pm
Reply with quote

Sorry, but it still looks like the file is not open....
Suggestions:
Wrap displays around all opens and closes for that file.
Test and/or display the file status for that file after every open and close.

When a problem seems impossible, I've always found that I've overlooked something.....
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jul 27, 2007 3:18 am
Reply with quote

Hello,

It may help if you post more of your code.

I'm sure the file was opened at some point, but it may have been closed before you get to the move that causes the 0c4.
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Fri Jul 27, 2007 9:53 am
Reply with quote

Thanks to u all, The problem got resolved,

after opening the file i am not checking the file status and instead
i am trying to write into it,thats why that abend came.

i am getting file-status 90 while opening that file,i have created one more file and it is working fine.

once again thank u all for u r suggestions.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jul 27, 2007 7:21 pm
Reply with quote

You're welcome and thanks for telling us the 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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
Search our Forums:

Back to Top