View previous topic :: View next topic |
Author |
Message |
Venkata Ramana Reddy Beginner
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
|
Posted: Mon Mar 17, 2003 4:26 pm Post subject: Can B-37 lead to S0C4 ???? |
|
|
Hello All,
I just wanted to know if the SB-37 Error can lead to S0C4. _________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement. |
|
Back to top |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Tue Mar 18, 2003 8:48 am Post subject: |
|
|
Anything is possible. It would probably depend on what the pgm might be doing to try and recover from the error. Do you have a specific example?
Bill |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Mar 18, 2003 11:28 am Post subject: |
|
|
venkata Ramana Reddy,
I ran into this abend a few months back when we are trying to load a db2 table using load utility. Basically the db2 table LDS ran out of extents and was not able to allocate any more extents.The job abended with S0C4.
kolusu |
|
Back to top |
|
|
Anand_R Intermediate
Joined: 24 Dec 2002 Posts: 189 Topics: 60
|
Posted: Fri Dec 05, 2003 12:34 pm Post subject: |
|
|
Kolusu,
I have requirement to continue the program, if any space abends happened in one of the file. Basically I should not abend that program as that program is accessing the database, so if any abends happened due to one of the out put files, we need to run the restores for IDMS . Is there any way that either we can anticipate the space problem or after write statement, some thing to skip writing that record and continue the other logic. Please let me know if I am not clear..
Thanks
Anand |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Dec 05, 2003 1:13 pm Post subject: |
|
|
Anand,
Technically speaking you really cannot anticipate space abends, as they are dependent on many factors like DASD availability , ability to switch volumes etc... These factors vary from shop to shop.
But we can have a rough estimate for safe space limits. check this topic which discusses how to calculate space for a LRECL=ZZZ,FB and max NNNNN recs
http://www.mvsforums.com/helpboards/viewtopic.php?t=28
Now in your pgm you can simply stop writting records once you hit the max limit and continue with other logic.
Hope this helps...
cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Anand_R Intermediate
Joined: 24 Dec 2002 Posts: 189 Topics: 60
|
Posted: Fri Dec 05, 2003 1:25 pm Post subject: |
|
|
Kolusu,
Thanks for ur response back.
I have followed the below logic to acheive the same. I don't know whether I am right or wrong. Please guide me if I am wrong
1) I have added the file-status caluse.
2) After the write statement I am checking the file status, if it is not equal to zero, then simply I stop writing the records for the next record onwards. This way my program works fine(as expected, like continue with the other logic etc..)
Please let me know if I am wrong.
Thanks
Anand |
|
Back to top |
|
|
Anand_R Intermediate
Joined: 24 Dec 2002 Posts: 189 Topics: 60
|
Posted: Fri Dec 05, 2003 1:58 pm Post subject: |
|
|
Kolusu,
Can also clarify me abt extended file status in cobol. May be u can give me the link to that..
Thx
Anand |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Dec 05, 2003 2:04 pm Post subject: |
|
|
Anand,
That is not exactly what I meant.Let me take an example and explain it in detail.Let us assume that your output file lrecl is 500 and is a FB format dataset. So the optimum blocksize for this file on a 3390 type device is 27500. This will allow 55 records per block, or 110 records per track, or 1650 records per cylinder (cylinders are 15 tracks).
So in your JCl if you have allocated the space parameter as follows:
Code: |
SPACE=(CYL,(25,5),RLSE)
|
Usually the space is allocated as (primary qty + 15 * secondary qty). So ideally you should be able to have 25 + (5 * 15) = 100 cylinders
Now with 100 cylinders you can have 165,000 records in your output as each cylinder can have 1650 records. sO THE MAX limit for this file you can write only 165,000 records and if you exceed that limit you might encounter a space abend.
In your pgm you will have write paragraph as following
Code: |
6000-WRITE-OUTPUT.
WRITE OUTPUT-REC
ADD +1 TO OUTPUT-REC-COUNT
.
|
NOW ADD the following logic just before you call the write paragraph.use the max record as limit(MAX-WRITE-LIMIT) which is 165,000
Code: |
IF OUTPUT-REC-COUNT <= MAX-WRITE-LIMIT
PERFORM 6000-WRITE-OUTPUT
END-IF
|
Hope this helps...
cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Anand_R Intermediate
Joined: 24 Dec 2002 Posts: 189 Topics: 60
|
Posted: Fri Dec 05, 2003 2:17 pm Post subject: |
|
|
Thanks kolusu,
Now I am clear abt your explanation...Thanks a lot..
Anand |
|
Back to top |
|
|
|
|