Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Getting SOC4 While doing move to a Group Variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Thu Jul 26, 2007 11:28 am    Post subject: Getting SOC4 While doing move to a Group Variable
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: 3158
Location: Tucson AZ

PostPosted: Thu Jul 26, 2007 11:36 am    Post subject:
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    Post subject:
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: 130
Location: Guntur

PostPosted: Thu Jul 26, 2007 11:56 am    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Thu Jul 26, 2007 12:44 pm    Post subject:
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: 130
Location: Guntur

PostPosted: Thu Jul 26, 2007 2:50 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Thu Jul 26, 2007 3:05 pm    Post subject:
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

Site Director


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

PostPosted: Fri Jul 27, 2007 3:18 am    Post subject:
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: 130
Location: Guntur

PostPosted: Fri Jul 27, 2007 9:53 am    Post subject:
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

Site Director


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

PostPosted: Fri Jul 27, 2007 7:21 pm    Post subject:
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    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 column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
This topic is locked: you cannot edit posts or make replies. Limit access to certain RACF group cvnlynn CLIST & REXX 5 Wed Aug 23, 2017 2:28 am
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us