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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Aug 15, 2012 9:32 pm
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 -

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Aug 15, 2012 9:42 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Aug 15, 2012 9:49 pm
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Aug 15, 2012 10:30 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 16, 2012 1:46 am
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

Moderator Emeritus


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

PostPosted: Thu Aug 16, 2012 8:21 am
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: 8797
Location: Welsh Wales

PostPosted: Thu Aug 16, 2012 10:24 am
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
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

Moderator Emeritus


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

PostPosted: Thu Aug 16, 2012 6:53 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts REORG to reduce segment size new DBD IMS DB/DC 2
No new posts Speed-up/reduce CPU use of code PL/I & Assembler 0
No new posts Reduce CPU Times for Join Sort SYNCSORT 12
No new posts How to reduce PDRB latch contention? IMS DB/DC 0
Search our Forums:

Back to Top