View previous topic :: View next topic
|
Author |
Message |
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
While a well defined problem is half solved, the definition of your problem is lacking much detail.....
Is the file open? |
|
Back to top |
|
|
sandeep1dimri
New User
Joined: 30 Oct 2006 Posts: 76
|
|
|
|
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 |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome and thanks for telling us the solution |
|
Back to top |
|
|
|