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

VSAM Write error


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Mon Dec 06, 2010 5:00 pm
Reply with quote

Hi,

The VSAM file which am using is getting error while writing and abends with File status of 24. As file status 24 is meant for writing the file beyond its boundary, i checked the file attributes in LISTCAT and it has freespace.

This abend occurs when some other parallel jobs are running. When i re-ran this job once other job got completed, it ran fine. I like to know what esle could be the reason for it. I have given the LISTCAT entry details.

Code:

       REC-TOTAL------157633863*    SPLITS-CI--------5133783*
       REC-DELETED----235822166*    SPLITS-CA---------216139*
       REC-INSERTED---329090551*    FREESPACE-%CI---------14
       REC-UPDATED------------0*    FREESPACE-%CA---------10
       REC-RETRIEVED--334018593*    FREESPC-----140266774528*
       USER-DATA-SIZE----------------------------94902151432
     ALLOCATION                                             
       SPACE-TYPE------CYLINDER     HI-A-RBA----173861683200
IDCAMS  SYSTEM SERVICES                                     
       SPACE-PRI-----------2985     HI-U-RBA----171701452800
       SPACE-SEC-----------2985                             
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Dec 06, 2010 5:03 pm
Reply with quote

Quote:
As file status 24 is meant for writing the file beyond its boundary, i checked the file attributes in LISTCAT and it has freespace.
Why do you think the file having freespace would have anything to do with a file status 24?
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Mon Dec 06, 2010 5:07 pm
Reply with quote

Thats because if all the HI-A-RBA is being used up, and if we try to write, it could have caused file status 24.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon Dec 06, 2010 5:15 pm
Reply with quote

Your HURBA is not totally used, so there could be space. If your remove the FSPC with an ALTER what happens then?

And looking at your listcat i suggest to do a reorg for that dataset.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Dec 06, 2010 5:18 pm
Reply with quote

Quote:
HI-A-RBA----173861683200
HI-U-RBA----171701452800
You have not used all the free space at the end of the file.

How many disk packs is this file on?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon Dec 06, 2010 5:21 pm
Reply with quote

Quote:

Quote:
HI-A-RBA----173861683200
HI-U-RBA----171701452800
You have not used all the free space at the end of the file.


Are you repeating me Robert icon_eek.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Dec 06, 2010 5:23 pm
Reply with quote

No, Peter, you're just preceding me! icon_biggrin.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon Dec 06, 2010 5:27 pm
Reply with quote

Sorry Robert,

i forgot how fast i can be (sometimes). icon_smile.gif
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Mon Dec 06, 2010 6:58 pm
Reply with quote

Peter,

The file has a freespace allocation of (14 10) during the file creation. If i remove the FSPC with ALTER command, wont i get problem when i try to update/insert/delete records in this file? Also, i did a re-org to this file some 8 months back.

Robert,

I believe you are asking for the number of volumes that the file is on with the term 'disk pack is on'. The file is on 22 volumes. correct me if misunderstood ur question
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Dec 06, 2010 7:15 pm
Reply with quote

There's two limits that apply to VSAM extended addressability files -- 59 volumes and CI size times 4 GB. Since your data set is only on 22 volumes, it does not appear to be reaching either limit.

Freespace is only relevant when inserting records -- updates in place (unless the record length changes) won't impact the freespace, and deletes add to freespace (although it may not be usable freespace). If your file does not have freespace defined where an insert is done, the normal CI and CA split rules will apply.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Mon Dec 06, 2010 7:27 pm
Reply with quote

You may need to add more candidate volumes for the file to extend to if it has reached the full number assigned by it's Dataclas, or Volume parameter on the define. This is obviously a very large file at 161Gb going by the HURBA.

Enter the following in an IDCAMS job to add a further 5 candidates:

ALTER dsname VOLUMES(* * * * *)


It's impossible to tell from the portion of LISTCAT shown but is the FSPC(14 10) appropriate? The file obviously has huge numbers of inserts so the CI freespace is probably required, and perhaps a reorg needs to be done more regularly, but does 14% CI freespace allow for the MAXLRECL at least? Be helpful to see the LISTCAT page showing MIN/MAX LRECL's, KEYLEN.
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Wed Dec 08, 2010 5:56 pm
Reply with quote

This is the definition of that vsam file.
Code:

DEFINE CLUSTER                         -
 (NAME(File name)            -
 KEYS(47 0)                            -
 REUSE                                 -
 RECORDSIZE(159 2389)                  -
 SHAREOPTIONS(2 3)                     -
 CYL(4000 4000)                        -
 FREESPACE (14 10)                     -
 SPEED)                                -
DATA                                   -
 (NAME(File name.DATA)       -
 CISZ(4096))                           -
INDEX                                  -
 (NAME(File name.INDEX)      -
 CISZ(2048))                             
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Dec 08, 2010 6:15 pm
Reply with quote

1. Your index CI size is too small based on the key length and data CI size.

2. The data CI size is not very good considering the maximum record length.

3. These help explain why your file is 81% free space.

And these may explain the intermittent 24 file status codes.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Wed Dec 08, 2010 8:15 pm
Reply with quote

Data CICIZE would be better at 26624 for example as that would only waste 334bytes per CI for max recordsize, but two minlrecls could fit into that so not much waste at all. And if freespace was set to 9% it would allow for one maxlrecl record to fit comfortably in the 2396 bytes, or a fairly even number of lrecl 159's.

Data CICIZE at 12288 would also only waste 334bytes per CI for max recordsize. And if freespace was set to 20% it would allow for one maxlrecl record to fit comfortably in the 2457 bytes.

Using the 4096 byte Data CISIZE means you could be wasting up to 2245 bytes per CI for maxlrecl as only 1.7 maxlrecl can fit into 4096 wasting 1672 bytes and the 14% freespace provides 573 bytes which 2389 won't fit into, although two 159 lrecl's would.

Basically CISIZE can be any multiple of 512 so you find what fits your LRECL best for the Data CI and calculate what freespace will be as a percentage of the CISIZE in bytes. For the Index I think in these later releases of DFP IBM have finally made so it will provide an appropriate CISIZE by default to avoid the 'dead' unreferenced CI issue of the past.

NOTE: If the file is used by CICS you have to make sure there are buffer pools available for the changed CISIZE's first.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top