<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    The NoteBook of EricKong

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      611 Posts :: 1 Stories :: 190 Comments :: 0 Trackbacks

    A KSDS file stores logical records of a file in fixed length blocks called Control Intervals(CI). In a KSDS Data file, a Control Interval holds several logical records. The logical records within each control-interval are always kept sorted by key-field. 

    A KSDS File could have thousands of Control Intervals.
    In a Control Interval, records can be of any size or length. We do not distinguish in particular between fixed-length and variable-length records. However, as a rule, all Control Intervals in KSDS file are exactly equal in size(length).

    When a new KSDS file is created, you must specify the size of the Control Intervals in the file. By default, the
    Control Intervals(CI) in a KSDS File assume a size= 4k(4096) bytes. However, the size of Control Intervals in KSDS Files can lie in the range of 512 bytes <= Control Intervals Size <= 32k

    When you create a new KSDS File, the control intervals in it are empty. As you load data into the KSDS file, the Control Intervals are populated with information.

    What follows from hereon, shall give you a picture of how Control Intervals look like in Memory.

    Control Interval (Very idealistic – Simplified) 
    Assume that, Control Intervals are 4096 bytes long. A logical record(Employee record) spans 1024 bytes. Then,

    No. of records per CI = 4096/1024 = 4 records/CI

    Thus, in this example, the Control Interval is completely full(no room for new records).

     

    Control Interval often contains some empty/free space(Close to real model) :
    Assume that, Control Intervals are 4096 bytes long. The first logical record = 1000 bytes, the second logical record = 1500 bytes, the third logical record= 1,300 bytes.

    Logical Record 1 + Logical Record 2 + Logical Record 3
    = 1000 + 500 + 1300 = 2800 bytes.

    Thus, the remaining space = 4096 – 2800 = 1,296 bytes is left free. This free-space can be used to accommodate a new logical record. Thus, Control Intervals may also have free-space.

    New logical records can be added to a Control Interval, by using the free-space in the Control Interval(CI).


    Image153[1]
    VSAM Control Interval

    Image152[1]
    Control Interval showing addition of record with key 30

    Let's look at the recipe followed by VSAM, to add a new logical record to a KSDS File.

    1. VSAM goes through a full-index search to locate the Control Interval(CI) in the KSDS Data file, in which the new record must be placed.
    (This search is exactly the same as that used to randomly retrieve a record).
    2. After the index search locates the Control Interval(CI), that Control Interval(CI) is loaded into memory. VSAM then searches through the logical records in the Control Interval to determine, where the new record should go.(Recall, that a KSDS file stores all data records in increasing order of the key).
    3. The new record is then inserted into the Control Interval(CI), in key sequence, re-arranging the other records, as necessary.
    4. The updated Control Interval(CI) is now written back to its original location on the Disk.

    Control Interval also contains extra Information(Real Model)

    VSAM treats all the logical records, as if they were variable-length(even if, they are fixed-length). VSAM keeps track of the length of Logical records in a Control Interval, by using special Record-definition Field(RDF), at the end of each Control Interval. This special field that holds the length information for each logical record is 3 bytes long.

    Moreover, VSAM also keeps track of the amount of the free-space and its location, within a Control Interval. This meta-information is stored in a special Control Interval-definition Field(CIDF), at the end of each Control Interval. This special field that holds [amount,location] of the free-space for a Control Interval is 4 bytes long.

     


    Control Area(CA) :
    A Control Area(CA) is a group of related Control Intervals. 

    KSDS Files are organised as Control Areas(CA) which in turn contain hundred’s of fixed-length Control Intervals(CI) filled with logical records, free-space and Control information.

    posted on 2011-12-21 15:22 Eric_jiang 閱讀(235) 評論(0)  編輯  收藏 所屬分類: Mainframe
    主站蜘蛛池模板: 成人五级毛片免费播放| 免费A级毛片在线播放| 精品亚洲成α人无码成α在线观看 | 日韩吃奶摸下AA片免费观看| 亚洲AV无码乱码国产麻豆穿越 | 亚洲午夜久久久影院| 亚洲AV无码乱码在线观看富二代 | 免费人成视网站在线观看不卡| 久久久久精品国产亚洲AV无码| 久草视频免费在线| 亚洲国产精品综合久久20| 国产在线jyzzjyzz免费麻豆| 亚洲一级免费视频| 天天摸天天碰成人免费视频| 亚洲伊人久久大香线蕉AV| 麻豆国产精品入口免费观看| 美女被爆羞羞网站免费| 120秒男女动态视频免费| 亚洲首页在线观看| 久久免费精品一区二区| 91亚洲精品视频| 免费观看成人毛片a片2008| 爱情岛论坛亚洲品质自拍视频网站| 免费一级做a爰片久久毛片潮喷| 人妖系列免费网站观看| 亚洲精品高清国产一线久久| 6080午夜一级毛片免费看 | 日本免费网站观看| 免费视频成人国产精品网站| 亚洲一区精品无码| 无码国产精品一区二区免费式直播| 亚洲精品无码久久久久APP | 最刺激黄a大片免费网站| 亚洲首页国产精品丝袜| 亚洲乱人伦中文字幕无码| 五月天婷亚洲天综合网精品偷| 中文字幕无码毛片免费看| 亚洲制服在线观看| 亚洲午夜福利精品无码| 高清免费久久午夜精品 | 嫩草影院在线免费观看|