Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to reduce CA-Splits...!!!

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
samimaktar

New User


Joined: 03 Aug 2009
Posts: 25
Location: Singapore

PostPosted: Wed Aug 15, 2012 9:29 pm    Post subject: How to reduce CA-Splits...!!!
Reply with quote

Hi Guys,
The below job is running in our system on daily basis. The file ABCD.XYZ.FILE.XFR.KSDS is loaded from other files (file1 to file6).


Code:
//STEP0050 EXEC PGM=IDCAMS                             
//SYSOUT   DD SYSOUT=4                                 
//SYSPRINT DD SYSOUT=*                                 
//SYSIN    DD *                                       
  DELETE ABCD.XYZ.FILE.XFR.KSDS PURGE CLUSTER     
  IF MAXCC = 8 THEN SET MAXCC = 0                     
DEFINE CLUSTER                                                        -                 
( NAME(ABCD.XYZ.FILE.XFR.KSDS)                              -                 
  DATACLAS(VSAME2)                                                 -                 
  INDEXED                                                                  -                 
  KEYS(26 0)                                                               -                 
  RECORDSIZE(1020 1020)                                          -                 
  REUSE                                                                     -                 
  SHAREOPTIONS(2 3)                                                -                 
  SPEED                                                                     -                 
)                                                                               -                 
  DATA  ( NAME(ABCD.XYZ.FILE.XFR.KSDS.DATA) )      -                 
  INDEX ( NAME(ABCD.XYZ.FILE.XFR.KSDS.INDEX)       -                 
   CONTROLINTERVALSIZE(4096) )                                       
//*
//STEP0060 EXEC PGM=IDCAMS                                             
//IN1      DD DISP=SHR,DSN=ABCD.XYZ.FILE1.KSDS                           
//IN2      DD DISP=SHR,DSN=ABCD.XYZ.FILE2.KSDS                           
//IN3      DD DISP=SHR,DSN=ABCD.XYZ.FILE3.KSDS                           
//IN4      DD DISP=SHR,DSN=ABCD.XYZ.FILE4.KSDS                           
//IN5      DD DISP=SHR,DSN=ABCD.XYZ.FILE5.KSDS                           
//IN6      DD DISP=SHR,DSN=ABCD.XYZ.FILE6.KSDS                           
//OUT1     DD DSN=ABCD.XYZ.FILE.XFR.KSDS,DISP=MOD                     
//SYSOUT   DD SYSOUT=4                                                 
//SYSPRINT DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//SYSIN    DD *                         
     REPRO INFILE(IN1) OUTFILE(OUT1)
     REPRO INFILE(IN2) OUTFILE(OUT1)
     REPRO INFILE(IN3) OUTFILE(OUT1)
     REPRO INFILE(IN4) OUTFILE(OUT1)
     REPRO INFILE(IN5) OUTFILE(OUT1)
     REPRO INFILE(IN6) OUTFILE(OUT1)
//*

Details of file ABCD.XYZ.FILE.XFR.KSDS --> KSDS File
Code:

STATISTICS                                                                     
  REC-TOTAL---------537344     SPLITS-CI--------------2     EXCPS--------------43807
  REC-DELETED------------0     SPLITS-CA------------688     EXTENTS----------------3
  REC-INSERTED------516331     FREESPACE-%CI----------0     SYSTEM-TIMESTAMP:   
  REC-UPDATED------------0     FREESPACE-%CA----------0          X'C9FF553FB8FE3
  REC-RETRIEVED-------1000     FREESPC---------20793344                         
ALLOCATION                                                                     
  SPACE-TYPE------CYLINDER     HI-A-RBA-------571084800                         
  SPACE-PRI------------276     HI-U-RBA-------571084800                         
  SPACE-SEC------------276   


Concern is high CA-Split as production has more than 10 times of this test data. Tried with different option, but it is also increasing the CA-Split.
With FREESPACE(04 15), CA-Splits is 828
With FREESPACE(10 20), CA-Splits is 977
Please advice what will be the FREESPACE value to reduce the CA-Splits.

Thanks in Advance.

With Regards,
Samim Aktar

Code'd
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Aug 15, 2012 9:32 pm    Post subject: Reply to: How to reduce CA-Splits...!!!
Reply with quote

Try a CISZ of 18432 at the DATA level and a CISZ of 2048 at the INDEX level and go from there.

Where are your CYL allocations?

You should also download and review VSAM Demystified -

www.redbooks.ibm.com/redbooks/pdfs/sg246105.pdf
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: Wed Aug 15, 2012 9:42 pm    Post subject:
Reply with quote

Hello,

What happens if you merge the 6 input files into a single file and then load the vsam?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Aug 15, 2012 9:49 pm    Post subject:
Reply with quote

What is the update pattern for the data set? It appears, based on what you've posted, that new records are clustered in the file, so once a CA split occurs more records are added at that point.

Since you're using the default 4096 CI size, don't bother with CI free space -- you'd have to either change the CI size or use a free space percentage of 25% to leave enough space for a record of 1020 bytes.

What is the concern with the high CA split count? If the data set is read randomly most of the time, there would be little (if any) impact on performance. Even for sequential access, since it looks like inserts are going in the file in clusters, there wouldn't be that much impact on performance with a batch of CA splits. With what you have posted so far, my inclination would be to leave it with FSPC(0 0) and let the splits happen. If all the splits are occurring due to the load, SORT THE DATA BEFORE THE REPRO!
Back to top
View user's profile Send private message
samimaktar

New User


Joined: 03 Aug 2009
Posts: 25
Location: Singapore

PostPosted: Wed Aug 15, 2012 9:55 pm    Post subject: Reply to: How to reduce CA-Splits...!!!
Reply with quote

My Apologies...Forgot to mention that all the below files are KSDS file

ABCD.XYZ.FILE1.KSDS
ABCD.XYZ.FILE2.KSDS
ABCD.XYZ.FILE3.KSDS
ABCD.XYZ.FILE4.KSDS
ABCD.XYZ.FILE5.KSDS
ABCD.XYZ.FILE6.KSDS
ABCD.XYZ.FILE.XFR.KSDS

@Bill: Thanks bill I will try the same.
@dick scherrer: As all the i/p files are KSDS, If I merge all of them into a single file means loading into a file. so the situation is same. Please correct me if I am wrong.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 15, 2012 10:13 pm    Post subject:
Reply with quote

come on guys,
say again what you just said,
maybe repetition is what is necessary.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Aug 15, 2012 10:30 pm    Post subject:
Reply with quote

Quote:
so the situation is same. Please correct me if I am wrong.
You are wrong. Unload them and sort the combined data into one data set, which is then loaded into your new VSAM file.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 15, 2012 10:34 pm    Post subject:
Reply with quote

you are causing splits with your initial load of the file,
which you should not do.

in order to not have any splits
(as dick scherrer already said, and you ignored with a bad assumption)

all data loaded to the file must be in sequential order.

if you load 1 file,
then load a second,
and any of the keys of the second are within the order of the first,
you are forcing an insert which will cause a split.

sort all files into one big sequential file and then load that file.
you only have half-a-million 1000-byte records.
it is a small vsam file.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Aug 16, 2012 1:46 am    Post subject: Reply to: How to reduce CA-Splits...!!!
Reply with quote

You really need to understand the statistics you showed.

You have 728 cylinders allocated to your dataset. Your CA is a cylinder. That means that 688 of your 728 were used as "splits".

Look at the CI splits. Hardly anything. Meaning, as has been said, each CA is being filled after the split has occurred.

Look at your "inserts". To load a KSDS, correctly, from empty, should be zero, yet yours shows a huge proportion of the data is inserted.

Look at the increasing number of splits when you specified freespace. The freespace is unused, so more space is needed, so the number of splits increases.

If you load in Key order exclusively, you'll not get one split.
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: Thu Aug 16, 2012 8:21 am    Post subject:
Reply with quote

Hello,

Quote:
@dick scherrer: As all the i/p files are KSDS, If I merge all of them into a single file means loading into a file. so the situation is same. Please correct me if I am wrong.
Yup, incorrect.

When you repro the individual vsam files into sequential files you need t othen Merge them into a single file. Do not simply concatenate them as one dd statement or you will be in the same situation.

Before loading anything into the "new" vsam file, you should delete/define it.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 16, 2012 10:24 am    Post subject:
Reply with quote

Can I ask what the worry is about actually having CA splits ?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 16, 2012 11:52 am    Post subject:
Reply with quote

expat wrote:
Can I ask what the worry is about actually having CA splits ?


having them is not the problem.

not understanding why they are there, is.
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: Thu Aug 16, 2012 6:53 pm    Post subject:
Reply with quote

Hello,

Quote:
Can I ask what the worry is about actually having CA splits ?
I seem to recall that once upon a time, there was a performance concern/issue.
Back to top
View user's profile Send private message
samimaktar

New User


Joined: 03 Aug 2009
Posts: 25
Location: Singapore

PostPosted: Thu Aug 16, 2012 9:57 pm    Post subject: Reply to: How to reduce CA-Splits...!!!
Reply with quote

Thanks to all of you for your valuable suggestion. I will try to merge all the ip files into a sequential file and then load into the VSAM file.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to reduce PDRB latch contention? Hooman24 IMS DB/DC 0 Sun Jun 22, 2014 8:53 pm
No new posts How to optimize DB2 SELECT query to r... sandip_mainframe DB2 3 Tue Jan 08, 2013 3:45 pm
No new posts Reduce length of RDW and write out -... ramsri JCL & VSAM 15 Mon Sep 24, 2012 4:32 pm
No new posts How can I reduce CPU usage in REXX pr... Mansik Kim CLIST & REXX 10 Mon Sep 03, 2012 8:01 pm
No new posts A checkpoint counter sets at 100,need... N.Kotivamsi IMS DB/DC 13 Wed Jul 25, 2012 8:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us