Re: ALTER of open VSAM cluster

2010-08-02 Thread John H Kington
Joel,

On 07/30/2010 08:57 AM, John H Kington wrote:
 David,


 Please see 2.5.3.2  Altering the Free Space Specification When Loading a 
 Data Set in
 z/OS V1R11 DFSMS Using Data Sets for a definitive answer.

 The manual does state the file needs to be closed for the new Freespace 
 values to take effect.

 Spot on. The freespace parameter is only used for loading the vsam file. If 
 anyone cares to read the section that David referenced, it discusses 
 loading a portion of the records, closing the file, altering the 
 freespace, loading more records and so forth. Freespace is not used in CI or 
 CA split processing.


Learned something new.  I was not aware that load process could be
trivially split into multiple REPRO steps with a change of freespace
before each.  It would only make sense in special cases where you know
some specific blocks of records are subject to update activity and
others are not.  Once the sequential load process is done,
adding/updating records that result in CI/CA splits proceeds without
regard to freespace.

Me too. It is wonderful what you can learn when you read the fine manual!

One thing that is still not clear to me from the wording of that
excerpt: can you at an arbitrary time in the life of a KSDS open the
data set for sequential output and append an ordered  block of
additional higher key records to the end of the file that are written
subject to the current freespace specification?  In other words is there
really such a thing as a load state for KSDS or is it just that when
multiple ordered records are being written with sequential output and
the keys start beyond the highest current key value that this is an
instance of loading the file?

I wish I still had access to a mainframe to observe and verify. I would
have sworn that you could only do a load in one shot and that you
were stuck using the same freespace parameters through-out the
entire vsam file. Kudos to IBM for a clear and interesting example.

Regards,
John

NOTICE:  The information contained in this electronic mail transmission is 
intended by Convergys Corporation for the use of the named individual or entity 
to which it is directed and may contain information that is privileged or 
otherwise confidential.  If you have received this electronic mail transmission 
in error, please delete it from your system without copying or forwarding it, 
and notify the sender of the error by reply email or by telephone (collect), so 
that the sender's address records can be corrected.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-08-02 Thread John H Kington
Frank,



Interesting comment on the original define.  We don't save our original 
defines; nor do we generally do a DELETE/DEFINE when we reload a file.  We 
always (except when not allowed; ie AIX) use REUSE.

It could be my paranoia, but think in terms of file deletion, accidental or 
otherwise. It would be handy to have the define somewhere instead of having to 
discover them.

Regards,
John

NOTICE:  The information contained in this electronic mail transmission is 
intended by Convergys Corporation for the use of the named individual or entity 
to which it is directed and may contain information that is privileged or 
otherwise confidential.  If you have received this electronic mail transmission 
in error, please delete it from your system without copying or forwarding it, 
and notify the sender of the error by reply email or by telephone (collect), so 
that the sender's address records can be corrected.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-08-01 Thread Frank Swarbrick
 On 7/29/2010 at 7:53 PM, in message 4c5230b4.2010...@acm.org, Joel C. 
 Ewing
jcew...@acm.org wrote:
 On 07/29/2010 06:26 PM, Thompson, Steve wrote:
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
 Behalf Of Frank Swarbrick
 Sent: Thursday, July 29, 2010 5:53 PM
 To: IBM-MAIN@bama.ua.edu 
 Subject: ALTER of open VSAM cluster
 
 It appears we can ALTER FREESPACE while a file is open to CICS (or
 anywhere else, I assume).  Is this an OK thing to do, so the next time
 the file is reloaded it will use the new freespace values?
 SNIP
 
 The ALTER modifies the definition info in the Catalog (as I recall). So
 the effect is rather immediate. What this will do is allow you to LOAD
 with x y for freespace, and then when running change to m n for
 freespace.
 
 So, let us say that you LOAD a KSDS with FREESPACE(0 0) that has 50 CYLs
 of data. Once the load is complete you ALTER it to FREESPACE(25 25). You
 know that the majority of the adds to the file will start in the last 2
 cylinders of data (as loaded) and go from there. So the CA/CI splits
 will start at that point.
 
 Regards,
 Steve Thompson
 ...
 Steve,
 If you are implying that changing FREESPACE of a loaded file will affect
 future adds at the high end of the key range, this is not true.
 Changing FREESPACE has no effect on a VSAM file already containing
 records.  FREESPACE is only used when the file is in a reset or initial
 empty state with no records and an initial file load is done.  I am also
 certain that if you could ALTER the VSAM catalog entry while the file is
 still OPEN for that initial load process, that the running program doing
 the load is at that point only using in-memory control blocks for the
 VSAM file with values that were derived at OPEN time, and only future
 OPENS would see any change.
 
 After that intial load, adding a record than doesn't fit in an existing
 CI results in a CI split with about half the CI records going to a new
 CI, and if there are no free CI's in that CA, a CA-split is first done
 to put about half of that CA's CI's in a new CA.  The FREESPACE is
 totally ignored in that process.  Even if all the future adds have
 ascending key values, the add logic is the same.
 
 Unless you define the VSAM file with REUSE and have an application that
 resets the file to empty and reloads all records at some later time
 without deleting and redefining the dataset, changing FREESPACE after
 initial load would have no effect.
 
 CI splits are relatively cheap, so using CI FREESPACE to minimize
 CI-splits after initial load has minimal benefit and in cases where a
 large percent of records must be read may actually reduce performance by
 requiring reading of more CIs to get the same data.  CA-splits are
 relatively expensive, so there may be special cases where CA-FREESPACE
 can improve update response consistency after an initial load.  But even
 with FREESPACE(0,0), if updates are clustered by key, performance will
 improve after the initial CI and CA splits from earlier updates
 introduce free space at the precise points in the file undergoing
 repeated changes.

Here are the details on the file in question.  I just did a CLO ENA in CICS to 
get update VSAM stats:

ATTRIBUTES  
   
  KEYLEN-9 AVGLRECL-250 
BUFSPACE---15872 CISIZE--7168  
  RKP0 MAXLRECL1900 
EXCPEXIT--(NULL) CI/CA105  
  SHROPTNS(2,3)  SPEED UNIQUE   NOERASE INDEXED   
NOWRITECHK NOIMBED   NOREPLICAT  
  UNORDERED  REUSE NONSPANNED   
   
STATISTICS  
   
  REC-TOTAL-791636 SPLITS-CI---8135 
EXCPS1125532   
  REC-DELETED0 SPLITS-CA228 
EXTENTS1   
  REC-INSERTED---9 FREESPACE-%CI--0 SYSTEM-TIMESTAMP:   
   
  REC-UPDATED---659805 FREESPACE-%CA--0  
X'C65CE0AD26274284'   
  REC-RETRIEVED2903925 FREESPC146055168 
   

The file is REUSE and is reloaded at the beginning of every business day.  (So 
as of the above stats it's been open about 24 hours.)  The end of each record 
is a transaction table that contains up to 20 transactions per day.  In other 
words, as the customer has new transactions the length of the record is 
extended to allow for this new record and then the record is rewritten.  
Updates are random (not clustered).

When we were on VSE I think we

Re: ALTER of open VSAM cluster

2010-08-01 Thread Frank Swarbrick
 On 7/30/2010 at 5:56 AM, in message
23b13969513a9846a621a4620543d4f977119da...@cdcmw12e.na.convergys.com, John H
Kington john.king...@convergys.com wrote:
 Frank,
 
 
It appears we can ALTER FREESPACE while a file is open to CICS (or anywhere 
 else, I assume).  Is this an OK thing to do, so the next time the file is 
 reloaded it will use the new freespace values?
 
 Altering the freespace parameters on a loaded vsam file will not have any 
 effect. If the vsam file has the REUSE attribute and you reload the file, the 
 new freespace parameters will be honored. Be sure to change the freespace 
 parameters on the original define in case you do a delete, define and reload 
 of the vsam file.

This is exactly what I want.

Interesting comment on the original define.  We don't save our original 
defines; nor do we generally do a DELETE/DEFINE when we reload a file.  We 
always (except when not allowed; ie AIX) use REUSE.

Thanks,
Frank

-- 

Frank Swarbrick
Applications Architect - Mainframe Applications Development
FirstBank Data Corporation - Lakewood, CO  USA
P: 303-235-1403




The information contained in this electronic communication and any document 
attached hereto or transmitted herewith is confidential and intended for the 
exclusive use of the individual or entity named above.  If the reader of this 
message is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, you are hereby notified that any 
examination, use, dissemination, distribution or copying of this communication 
or any part thereof is strictly prohibited.  If you have received this 
communication in error, please immediately notify the sender by reply e-mail 
and destroy this communication.  Thank you.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-08-01 Thread Frank Swarbrick
No wonder I couldn't find it.  I was looking under ALTER in DFSMS Access Method 
Services for Catalogs and could fine no mention of when it would take affect.

On 7/30/2010 at 7:52 AM, in message
cd22aa1aee707d489d9250d13e3862a1858765b...@nihmlbxcms02.nih.gov, O'Brien,
David W. (NIH/CIT) [C] obrie...@mail.nih.gov wrote:
 Please see 2.5.3.2  Altering the Free Space Specification When Loading a Data 
 Set in
 z/OS V1R11 DFSMS Using Data Sets for a definitive answer.
 
 The manual does state the file needs to be closed for the new Freespace 
 values to take effect.
 
 Thank You,
 Dave O'Brien
 NIH Contractor
 
 From: Thompson, Steve [steve_thomp...@stercomm.com] 
 Sent: Friday, July 30, 2010 9:41 AM
 To: IBM-MAIN@bama.ua.edu 
 Subject: Re: ALTER of open VSAM cluster
 
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
 Behalf Of Joel C. Ewing
 Sent: Thursday, July 29, 2010 8:54 PM
 To: IBM-MAIN@bama.ua.edu 
 Subject: Re: ALTER of open VSAM cluster
 SNIPPAGE
 ...
 Steve,
 If you are implying that changing FREESPACE of a loaded file will affect
 future adds at the high end of the key range, this is not true.
 Changing FREESPACE has no effect on a VSAM file already containing
 records.  FREESPACE is only used when the file is in a reset or initial
 empty state with no records and an initial file load is done.  I am also
 certain that if you could ALTER the VSAM catalog entry while the file is
 still OPEN for that initial load process, that the running program doing
 the load is at that point only using in-memory control blocks for the
 VSAM file with values that were derived at OPEN time, and only future
 OPENS would see any change.
 
 SNIP
 
 Unless something has changed since z/OS 1.1, and a third party product
 would give new behaviors -- even when not being directly invoked, that
 is exactly what we did at a certain insurance type company for their
 customer claims file. It was laid down with NO freespace. Then it was
 altered pretty much the way I said. The CICS system was brought up after
 the ALTER (which is why I said the catalog info was changed -- I didn't
 mean to imply an open file would get this behavior without an
 intervening close).
 
 Meanwhile, I was interpreting the original op's question on the basis of
 the alter being done for current operations, not later reloading the
 file. Yes, in that case the file must be defined with REUSE.
 
 SNIP
 
 Regards,
 Steve Thompson
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
 Search the archives at http://bama.ua.edu/archives/ibm-main.html 
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
 Search the archives at http://bama.ua.edu/archives/ibm-main.html

 

The information contained in this electronic communication and any document 
attached hereto or transmitted herewith is confidential and intended for the 
exclusive use of the individual or entity named above.  If the reader of this 
message is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, you are hereby notified that any 
examination, use, dissemination, distribution or copying of this communication 
or any part thereof is strictly prohibited.  If you have received this 
communication in error, please immediately notify the sender by reply e-mail 
and destroy this communication.  Thank you.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-31 Thread Ron Hawkins
All,

It seems we have several versions of how Freespace operates in a KSDS. I
recall that FreeSpace was maintained when records are inserted at the end of
file, but not SIS.

I found the following reference at
http://www.slideshare.net/danjodea/basic-vsam.;

When records are inserted between existing records and there's not
enough
free space, CI and maybe CA splits occur to fit the new record. If 
records are being inserted at the end of a file, free space is 
reserved as records are added (a resume load)

I also recall the ALTER FRSPC technique after loading a KSDS as valid
strategy, but I don't think I ever used it. However, if KSDS processing has
change then it may have to be relegated to the superseded bucket.

Ron

 -Original Message-
 From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
Behalf Of
 R.S.
 Sent: Friday, July 30, 2010 1:03 PM
 To: IBM-MAIN@bama.ua.edu
 Subject: Re: [IBM-MAIN] ALTER of open VSAM cluster
 
 W dniu 2010-07-30 19:57, Joel C. Ewing pisze:
  On 07/30/2010 08:57 AM, John H Kington wrote:
  David,
 
 
  Please see 2.5.3.2  Altering the Free Space Specification When Loading
a
 Data Set in
  z/OS V1R11 DFSMS Using Data Sets for a definitive answer.
 
  The manual does state the file needs to be closed for the new
Freespace
 values to take effect.
 
  Spot on. The freespace parameter is only used for loading the vsam
file. If
 anyone cares to read the section that David referenced, it discusses
loading a
 portion of the records, closing the file, altering the freespace, loading
more
 records and so forth. Freespace is not used in CI or CA split processing.
 
  Regards,
  John
 
  Learned something new.  I was not aware that load process could be
  trivially split into multiple REPRO steps with a change of freespace
  before each.  It would only make sense in special cases where you know
  some specific blocks of records are subject to update activity and
  others are not.
 
 Well, IMHO it's well known trick.
 (Well known? Are VSAMs well know? vbg)
 BTW: The reasons for such tricks changed over the years. Nowadays we
 shouldn't care if your VSAM *is already* fragmented (splitted CIs and
 CAs). Usually it doesn't affect performance, *except* the moment of
 split. THe same apply to disk space - reclamation of overallocated space
 is not an issue.
 
 
  Once the sequential load process is done,
  adding/updating records that result in CI/CA splits proceeds without
  regard to freespace.
 
 It depends on the process!
 
 
  One thing that is still not clear to me from the wording of that
  excerpt: can you at an arbitrary time in the life of a KSDS open the
  data set for sequential output and append an ordered  block of
  additional higher key records to the end of the file that are written
  subject to the current freespace specification?  In other words is there
  really such a thing as a load state for KSDS or is it just that when
  multiple ordered records are being written with sequential output and
  the keys start beyond the highest current key value that this is an
  instance of loading the file?
 Re-read your own statement. First load, change FSPC, second LOAD, and so
 on. More than one load is possible.
 What's impossible is SPEED vs RECOVERY processing. It's a choice for
 very first load only.
 
 
 
 --
 Radoslaw Skorupka
 Lodz, Poland
 
 
 --
 BRE Bank SA
 ul. Senatorska 18
 00-950 Warszawa
 www.brebank.pl
 
 Sd Rejonowy dla m. st. Warszawy
 XII Wydzia Gospodarczy Krajowego Rejestru Sdowego,
 nr rejestru przedsibiorców KRS 025237
 NIP: 526-021-50-88
 Wedug stanu na dzie 01.01.2009 r. kapita zakadowy BRE Banku SA (w
caoci
 wpacony) wynosi 118.763.528 zotych. W zwizku z realizacj warunkowego
 podwyszenia kapitau zakadowego, na podstawie uchway XXI WZ z dnia 16
marca
 2008r., oraz uchway XVI NWZ z dnia 27 padziernika 2008r., moe ulec
 podwyszeniu do kwoty 123.763.528 z. Akcje w podwyszonym kapitale
zakadowym
 BRE Banku SA bd w caoci opacone.
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
 Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-30 Thread John H Kington
Frank,


It appears we can ALTER FREESPACE while a file is open to CICS (or anywhere 
else, I assume).  Is this an OK thing to do, so the next time the file is 
reloaded it will use the new freespace values?

Altering the freespace parameters on a loaded vsam file will not have any 
effect. If the vsam file has the REUSE attribute and you reload the file, the 
new freespace parameters will be honored. Be sure to change the freespace 
parameters on the original define in case you do a delete, define and reload of 
the vsam file.

Regards,
John

NOTICE:  The information contained in this electronic mail transmission is 
intended by Convergys Corporation for the use of the named individual or entity 
to which it is directed and may contain information that is privileged or 
otherwise confidential.  If you have received this electronic mail transmission 
in error, please delete it from your system without copying or forwarding it, 
and notify the sender of the error by reply email or by telephone (collect), so 
that the sender's address records can be corrected.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-30 Thread O'Brien, David W. (NIH/CIT) [C]
Frank,

  Perhaps it would be helpful if you described what you were trying to 
accomplish by changing the Freespace after the initial load. Any change would 
only affect the CA/CI splits after the change.
If you then use Export/Import to re-org the file, the new Freespace values are 
honored.
Using Delete/Define/re-load without changing the original define parameters 
would revert Freespace back to the original values.

Thank You,
Dave O'Brien
NIH Contractor

From: John H Kington [john.king...@convergys.com]
Sent: Friday, July 30, 2010 7:56 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: ALTER of open VSAM cluster

Frank,


It appears we can ALTER FREESPACE while a file is open to CICS (or anywhere 
else, I assume).  Is this an OK thing to do, so the next time the file is 
reloaded it will use the new freespace values?

Altering the freespace parameters on a loaded vsam file will not have any 
effect. If the vsam file has the REUSE attribute and you reload the file, the 
new freespace parameters will be honored. Be sure to change the freespace 
parameters on the original define in case you do a delete, define and reload of 
the vsam file.

Regards,
John

NOTICE:  The information contained in this electronic mail transmission is 
intended by Convergys Corporation for the use of the named individual or entity 
to which it is directed and may contain information that is privileged or 
otherwise confidential.  If you have received this electronic mail transmission 
in error, please delete it from your system without copying or forwarding it, 
and notify the sender of the error by reply email or by telephone (collect), so 
that the sender's address records can be corrected.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-30 Thread Thompson, Steve
-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
Behalf Of Joel C. Ewing
Sent: Thursday, July 29, 2010 8:54 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: ALTER of open VSAM cluster
SNIPPAGE
...
Steve,
If you are implying that changing FREESPACE of a loaded file will affect
future adds at the high end of the key range, this is not true.
Changing FREESPACE has no effect on a VSAM file already containing
records.  FREESPACE is only used when the file is in a reset or initial
empty state with no records and an initial file load is done.  I am also
certain that if you could ALTER the VSAM catalog entry while the file is
still OPEN for that initial load process, that the running program doing
the load is at that point only using in-memory control blocks for the
VSAM file with values that were derived at OPEN time, and only future
OPENS would see any change.

SNIP

Unless something has changed since z/OS 1.1, and a third party product
would give new behaviors -- even when not being directly invoked, that
is exactly what we did at a certain insurance type company for their
customer claims file. It was laid down with NO freespace. Then it was
altered pretty much the way I said. The CICS system was brought up after
the ALTER (which is why I said the catalog info was changed -- I didn't
mean to imply an open file would get this behavior without an
intervening close).

Meanwhile, I was interpreting the original op's question on the basis of
the alter being done for current operations, not later reloading the
file. Yes, in that case the file must be defined with REUSE.

SNIP

Regards,
Steve Thompson

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-30 Thread O'Brien, David W. (NIH/CIT) [C]
Please see 2.5.3.2  Altering the Free Space Specification When Loading a Data 
Set in
z/OS V1R11 DFSMS Using Data Sets for a definitive answer.

The manual does state the file needs to be closed for the new Freespace values 
to take effect.

Thank You,
Dave O'Brien
NIH Contractor

From: Thompson, Steve [steve_thomp...@stercomm.com]
Sent: Friday, July 30, 2010 9:41 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: ALTER of open VSAM cluster

-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
Behalf Of Joel C. Ewing
Sent: Thursday, July 29, 2010 8:54 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: ALTER of open VSAM cluster
SNIPPAGE
...
Steve,
If you are implying that changing FREESPACE of a loaded file will affect
future adds at the high end of the key range, this is not true.
Changing FREESPACE has no effect on a VSAM file already containing
records.  FREESPACE is only used when the file is in a reset or initial
empty state with no records and an initial file load is done.  I am also
certain that if you could ALTER the VSAM catalog entry while the file is
still OPEN for that initial load process, that the running program doing
the load is at that point only using in-memory control blocks for the
VSAM file with values that were derived at OPEN time, and only future
OPENS would see any change.

SNIP

Unless something has changed since z/OS 1.1, and a third party product
would give new behaviors -- even when not being directly invoked, that
is exactly what we did at a certain insurance type company for their
customer claims file. It was laid down with NO freespace. Then it was
altered pretty much the way I said. The CICS system was brought up after
the ALTER (which is why I said the catalog info was changed -- I didn't
mean to imply an open file would get this behavior without an
intervening close).

Meanwhile, I was interpreting the original op's question on the basis of
the alter being done for current operations, not later reloading the
file. Yes, in that case the file must be defined with REUSE.

SNIP

Regards,
Steve Thompson

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-30 Thread Thompson, Steve
-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
Behalf Of Thompson, Steve
Sent: Friday, July 30, 2010 8:42 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: ALTER of open VSAM cluster

-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
Behalf Of Joel C. Ewing
Sent: Thursday, July 29, 2010 8:54 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: ALTER of open VSAM cluster
SNIPPAGE
...
Steve,
If you are implying that changing FREESPACE of a loaded file will affect
future adds at the high end of the key range, this is not true.
Changing FREESPACE has no effect on a VSAM file already containing
records.  FREESPACE is only used when the file is in a reset or initial
empty state with no records and an initial file load is done.  I am also
certain that if you could ALTER the VSAM catalog entry while the file is
still OPEN for that initial load process, that the running program doing
the load is at that point only using in-memory control blocks for the
VSAM file with values that were derived at OPEN time, and only future
OPENS would see any change.

SNIP

Unless something has changed since z/OS 1.1, and a third party product
would give new behaviors -- even when not being directly invoked, that
is exactly what we did at a certain insurance type company for their
customer claims file. It was laid down with NO freespace. Then it was
altered pretty much the way I said. The CICS system was brought up after
the ALTER (which is why I said the catalog info was changed -- I didn't
mean to imply an open file would get this behavior without an
intervening close).

Meanwhile, I was interpreting the original op's question on the basis of
the alter being done for current operations, not later reloading the
file. Yes, in that case the file must be defined with REUSE.

SNIP

Well, I went back to my trusty IDCAMS manual from z/OS 1.7 to capture a
little tid-bit from the ALTER command and its FREESPACE write-up. And
here is what I found, that somehow I had not ever seen before.

If the FREESPACE is altered after the data set has been loaded, and
sequential insert processing is used, the allocation of free space is
not honored.

So, if any one wants my address, I'm in the process of another helping
of humble pie with a side of crow. And I imagine a few more helpings
might be on the way.

I sure hope those guys that set that up at that company read this little
tid-bit, because we all were under the impression that we had solved a
performance problem with this. It sure seemed that way anyhow.

Regards,
Steve Thompson

Ps. Nothing like crow for breakfast.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-30 Thread John H Kington
David,


Please see 2.5.3.2  Altering the Free Space Specification When Loading a Data 
Set in
z/OS V1R11 DFSMS Using Data Sets for a definitive answer.

The manual does state the file needs to be closed for the new Freespace values 
to take effect.

Spot on. The freespace parameter is only used for loading the vsam file. If 
anyone cares to read the section that David referenced, it discusses loading a 
portion of the records, closing the file, altering the freespace, loading more 
records and so forth. Freespace is not used in CI or CA split processing.

Regards,
John

NOTICE:  The information contained in this electronic mail transmission is 
intended by Convergys Corporation for the use of the named individual or entity 
to which it is directed and may contain information that is privileged or 
otherwise confidential.  If you have received this electronic mail transmission 
in error, please delete it from your system without copying or forwarding it, 
and notify the sender of the error by reply email or by telephone (collect), so 
that the sender's address records can be corrected.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-30 Thread Joel C. Ewing
On 07/30/2010 08:57 AM, John H Kington wrote:
 David,
 
 
 Please see 2.5.3.2  Altering the Free Space Specification When Loading a 
 Data Set in
 z/OS V1R11 DFSMS Using Data Sets for a definitive answer.

 The manual does state the file needs to be closed for the new Freespace 
 values to take effect.
 
 Spot on. The freespace parameter is only used for loading the vsam file. If 
 anyone cares to read the section that David referenced, it discusses loading 
 a portion of the records, closing the file, altering the freespace, loading 
 more records and so forth. Freespace is not used in CI or CA split processing.
 
 Regards,
 John

Learned something new.  I was not aware that load process could be
trivially split into multiple REPRO steps with a change of freespace
before each.  It would only make sense in special cases where you know
some specific blocks of records are subject to update activity and
others are not.  Once the sequential load process is done,
adding/updating records that result in CI/CA splits proceeds without
regard to freespace.

One thing that is still not clear to me from the wording of that
excerpt: can you at an arbitrary time in the life of a KSDS open the
data set for sequential output and append an ordered  block of
additional higher key records to the end of the file that are written
subject to the current freespace specification?  In other words is there
really such a thing as a load state for KSDS or is it just that when
multiple ordered records are being written with sequential output and
the keys start beyond the highest current key value that this is an
instance of loading the file?

-- 
Joel C. Ewing, Fort Smith, ARjcew...@acm.org

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-30 Thread R.S.

W dniu 2010-07-30 19:57, Joel C. Ewing pisze:

On 07/30/2010 08:57 AM, John H Kington wrote:

David,



Please see 2.5.3.2  Altering the Free Space Specification When Loading a Data 
Set in
z/OS V1R11 DFSMS Using Data Sets for a definitive answer.

The manual does state the file needs to be closed for the new Freespace values 
to take effect.


Spot on. The freespace parameter is only used for loading the vsam file. If 
anyone cares to read the section that David referenced, it discusses loading a 
portion of the records, closing the file, altering the freespace, loading more 
records and so forth. Freespace is not used in CI or CA split processing.

Regards,
John


Learned something new.  I was not aware that load process could be
trivially split into multiple REPRO steps with a change of freespace
before each.  It would only make sense in special cases where you know
some specific blocks of records are subject to update activity and
others are not.


Well, IMHO it's well known trick.
(Well known? Are VSAMs well know? vbg)
BTW: The reasons for such tricks changed over the years. Nowadays we 
shouldn't care if your VSAM *is already* fragmented (splitted CIs and 
CAs). Usually it doesn't affect performance, *except* the moment of 
split. THe same apply to disk space - reclamation of overallocated space 
is not an issue.




Once the sequential load process is done,
adding/updating records that result in CI/CA splits proceeds without
regard to freespace.


It depends on the process!



One thing that is still not clear to me from the wording of that
excerpt: can you at an arbitrary time in the life of a KSDS open the
data set for sequential output and append an ordered  block of
additional higher key records to the end of the file that are written
subject to the current freespace specification?  In other words is there
really such a thing as a load state for KSDS or is it just that when
multiple ordered records are being written with sequential output and
the keys start beyond the highest current key value that this is an
instance of loading the file?
Re-read your own statement. First load, change FSPC, second LOAD, and so 
on. More than one load is possible.
What's impossible is SPEED vs RECOVERY processing. It's a choice for 
very first load only.




--
Radoslaw Skorupka
Lodz, Poland


--
BRE Bank SA
ul. Senatorska 18
00-950 Warszawa
www.brebank.pl

Sd Rejonowy dla m. st. Warszawy 
XII Wydzia Gospodarczy Krajowego Rejestru Sdowego, 
nr rejestru przedsibiorców KRS 025237

NIP: 526-021-50-88
Wedug stanu na dzie 01.01.2009 r. kapita zakadowy BRE Banku SA (w caoci 
wpacony) wynosi 118.763.528 zotych. W zwizku z realizacj warunkowego 
podwyszenia kapitau zakadowego, na podstawie uchway XXI WZ z dnia 16 marca 
2008r., oraz uchway XVI NWZ z dnia 27 padziernika 2008r., moe ulec 
podwyszeniu do kwoty 123.763.528 z. Akcje w podwyszonym kapitale zakadowym 
BRE Banku SA bd w caoci opacone.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


ALTER of open VSAM cluster

2010-07-29 Thread Frank Swarbrick
It appears we can ALTER FREESPACE while a file is open to CICS (or anywhere 
else, I assume).  Is this an OK thing to do, so the next time the file is 
reloaded it will use the new freespace values?
-- 

Frank Swarbrick
Applications Architect - Mainframe Applications Development
FirstBank Data Corporation - Lakewood, CO  USA
P: 303-235-1403


 

The information contained in this electronic communication and any document 
attached hereto or transmitted herewith is confidential and intended for the 
exclusive use of the individual or entity named above.  If the reader of this 
message is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, you are hereby notified that any 
examination, use, dissemination, distribution or copying of this communication 
or any part thereof is strictly prohibited.  If you have received this 
communication in error, please immediately notify the sender by reply e-mail 
and destroy this communication.  Thank you.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-29 Thread Thompson, Steve
-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
Behalf Of Frank Swarbrick
Sent: Thursday, July 29, 2010 5:53 PM
To: IBM-MAIN@bama.ua.edu
Subject: ALTER of open VSAM cluster

It appears we can ALTER FREESPACE while a file is open to CICS (or
anywhere else, I assume).  Is this an OK thing to do, so the next time
the file is reloaded it will use the new freespace values?
SNIP

The ALTER modifies the definition info in the Catalog (as I recall). So
the effect is rather immediate. What this will do is allow you to LOAD
with x y for freespace, and then when running change to m n for
freespace.

So, let us say that you LOAD a KSDS with FREESPACE(0 0) that has 50 CYLs
of data. Once the load is complete you ALTER it to FREESPACE(25 25). You
know that the majority of the adds to the file will start in the last 2
cylinders of data (as loaded) and go from there. So the CA/CI splits
will start at that point.

Regards,
Steve Thompson

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: ALTER of open VSAM cluster

2010-07-29 Thread Joel C. Ewing
On 07/29/2010 06:26 PM, Thompson, Steve wrote:
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
 Behalf Of Frank Swarbrick
 Sent: Thursday, July 29, 2010 5:53 PM
 To: IBM-MAIN@bama.ua.edu
 Subject: ALTER of open VSAM cluster
 
 It appears we can ALTER FREESPACE while a file is open to CICS (or
 anywhere else, I assume).  Is this an OK thing to do, so the next time
 the file is reloaded it will use the new freespace values?
 SNIP
 
 The ALTER modifies the definition info in the Catalog (as I recall). So
 the effect is rather immediate. What this will do is allow you to LOAD
 with x y for freespace, and then when running change to m n for
 freespace.
 
 So, let us say that you LOAD a KSDS with FREESPACE(0 0) that has 50 CYLs
 of data. Once the load is complete you ALTER it to FREESPACE(25 25). You
 know that the majority of the adds to the file will start in the last 2
 cylinders of data (as loaded) and go from there. So the CA/CI splits
 will start at that point.
 
 Regards,
 Steve Thompson
...
Steve,
If you are implying that changing FREESPACE of a loaded file will affect
future adds at the high end of the key range, this is not true.
Changing FREESPACE has no effect on a VSAM file already containing
records.  FREESPACE is only used when the file is in a reset or initial
empty state with no records and an initial file load is done.  I am also
certain that if you could ALTER the VSAM catalog entry while the file is
still OPEN for that initial load process, that the running program doing
the load is at that point only using in-memory control blocks for the
VSAM file with values that were derived at OPEN time, and only future
OPENS would see any change.

After that intial load, adding a record than doesn't fit in an existing
CI results in a CI split with about half the CI records going to a new
CI, and if there are no free CI's in that CA, a CA-split is first done
to put about half of that CA's CI's in a new CA.  The FREESPACE is
totally ignored in that process.  Even if all the future adds have
ascending key values, the add logic is the same.

Unless you define the VSAM file with REUSE and have an application that
resets the file to empty and reloads all records at some later time
without deleting and redefining the dataset, changing FREESPACE after
initial load would have no effect.

CI splits are relatively cheap, so using CI FREESPACE to minimize
CI-splits after initial load has minimal benefit and in cases where a
large percent of records must be read may actually reduce performance by
requiring reading of more CIs to get the same data.  CA-splits are
relatively expensive, so there may be special cases where CA-FREESPACE
can improve update response consistency after an initial load.  But even
with FREESPACE(0,0), if updates are clustered by key, performance will
improve after the initial CI and CA splits from earlier updates
introduce free space at the precise points in the file undergoing
repeated changes.

-- 
Joel C. Ewing, Fort Smith, ARjcew...@acm.org

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html