The NoteBook of EricKong

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            611 Posts :: 1 Stories :: 190 Comments :: 0 Trackbacks
          Data set record formats
          數據集記錄根式
          z/OS concepts
          Z/OS的概念
          Traditional z/OS® data sets are record oriented, and have one of five possible formats.
          傳統意義上來說,Z/OS的數據集的都是面向記錄,有5種可能的格式。

          In normal usage, there are no byte stream files such as are found in PC and UNIX® systems. (z/OS UNIX has byte stream files, and byte stream functions exist in other specialized areas. These are not considered to be traditional data sets.)
          在一般的使用上,Z/OS是沒有像PC和Unix系統的上的字節流文件(Z/OS Unix有字節流文件,而這些字節流功能存在其他特定的功能區域,但是這些已經不是傳統意義上的數據集了,另當別論)

          In z/OS, there are no new line (NL) or carriage return and line feed (CR+LF) characters to denote the end of a record. Records are either fixed length or variable length in a given data set. When editing a data set with ISPF, for example, each line is a record.
          在Z/OS中,沒有新行符號(NL)或者(CR+LF) 等字符作為記錄的結束標志。在一個給定的數據集,記錄總是固定長度的或者是可變長度的。

          Traditional z/OS data sets have one of five record formats, as follows:
          傳統Z/OS有下面5中的記錄格式:

          F (Fixed)
          Fixed means that one physical block on disk is one logical record and all the blocks and records are the same size. This format is seldom used.
          F(固定)
                 在磁盤的上一個物理塊就是一個邏輯記錄,而且所有的塊和記錄都是同樣大小的,這種格式是很少用的了。

          FB (Fixed Blocked) 
          This format designation means that several logical records are combined into one physical block. This format can provide efficient space utilization and operation. This format is commonly used for fixed-length records.
          FB(定長 分塊)
              這種格式意味著幾個邏輯記錄組合成為一個物理塊,這種格式能夠提供高效的空間利用率和操作行,是一種經常被固定長度記錄使用的格式。

          V (Variable) 
          This format has one logical record as one physical block. A variable-length logical record consists of a record descriptor word (RDW) followed by the data. The record descriptor word is a 4-byte field describing the record. The first 2 bytes contain the length of the logical record (including the 4-byte RDW). The length can be from 4 to 32,760 bytes. All bits of the third and fourth bytes must be 0, because other values are used for spanned records. This format is seldom used.
          V(變長)
                這種格式中,一個邏輯的記錄作為一個物理塊,一個可變長度的邏輯記錄包含一個記錄描述符(RDW),它放置在在數據的前面。這個記錄描述符有4個字節,前兩個字節描述了邏輯記錄的長度(長度也包含了RDW的長度在內)。長度范圍可以是4字節到32760個字節,第三和第四個字節必須是0,因為其他值已經被跨越式的記錄使用,這種格式也是很少使用的。

          VB (Variable Blocked)
          This format places several variable-length logical records (each with an RDW) in one physical block. The software must place an additional Block Descriptor Word (BDW) at the beginning of the block, containing the total length of the block.
          VB(變長,分塊)
                 這種格式將多個可變長度的邏輯記錄(每一個都包含了RDW)放在一個物理塊里面。系統必須放置一個額外的塊描述符(BWD)在塊的開始部位,BDW它包含了這個塊全部長度。

          U (Undefined) 
          This format consists of variable-length physical records and blocks with no predefined structure. Although this format may appear attractive for many unusual applications, it is normally used only for executable modules.
          U(未定義)
                 這個格式包含了可變長度的記錄和沒有預先定義好格式的塊,這種格式對于那些不常用的應用程序是多么的吸引,但是一般來說,主要用于可執行模塊的存儲格式。

          We must stress the difference between a block and a record: a block is what is written on disk, while a record is a logical entity.
          我們這里需要強調一個塊和一個記錄的區別,一個塊是用于寫入磁盤,而一個記錄是一個邏輯實體。
          The terminology here is pervasive throughout z/OS literature. The key terms are:
          這些技術詞匯貫穿了Z/OS技術文化里面中,下面是關鍵的一些項目:
          Block Size (BLKSIZE) is the physical block size written on the disk for F and FB records. For V, VB, and U records, it is the maximum physical block size that can be used for the data set.

          塊大小(BLKSIZE),是指用于寫入F或者FB格式的物理塊的大小。而對于V,VB和U格式的記錄,BLKSIZE是數據集能夠使用的最大物理塊大小。
          Logical Record Size (LRECL) is the logical record size (for formats F and FB) or the maximum allowed logical record size (for formats V and VB) for the data set. Format U records have no LRECL.
          邏輯記錄格式大小(LRECL)是指一個邏輯記錄的大小(對于F和FB的格式)或是最大的可允許的邏輯記錄大小(對于V和VB格式的)數據集,對于格式U來說,是沒有LRECL可言的。

          Record Format (RECFM) is F, FB, V, VB, or U as just described.
          記錄格式(RECFM)F, FB, V, VB, or U,上面已經講過了
          These terms are known as data control block (DCB) characteristics, named for the control block where they may be defined in an assembly language program. The user is often expected to specify these parameters when creating a new data set. The type and length of a data set are defined by its record format (RECFM) and logical record length (LRECL). Fixed-length data sets have a RECFM of F, FB, FBS, and so on. Variable-length data sets have a RECFM of V, VB, VBS, and so on.

          這些項目就是我們知道的(DCB)數據控制塊,被命名的DCB常用于匯編程序,當我們需要創建新的數據集的時候,我們經常需要指明這些項目的數值。數據集的類型和長度由它的記錄格式(RECFM)和邏輯記錄長度(LRECL)來決定的。固定長度的數據集有記錄格式(RECFM)F, FB等等其他,可變長度的數據集有記錄格式(RECFM)V, VB, VBS,等等其他

          A data set with RECFM=FB and LRECL=25 is a fixed-length (FB) data set with a record length of 25 bytes (the B is for blocked). For an FB data set, the LRECL tells you the length of each record in the data set; all of the records are the same length. The first data byte of an FB record is in position 1. A record in an FB data set with LRECL=25 might look like this:
          Positions 1-3: Country Code = 'USA'
          Positions 4-5: State Code = 'CA'
          Positions 6-25: City = 'San Jose' padded with 12 blanks on the right
          使用了RECFM=FB and LRECL=25進行定義的數據集是一個固定長度的數據集,數據集的記錄長度為25個字節,B意味指分塊的,在一個FB格式的數據集中,LRECL項告訴了你這個數據集每個記錄的長度,他們長度都是一樣的,如上面的記錄。

          A data set with RECFM=VB and LRECL=25 is a variable-length (VB) data set with a maximum record length of 25 bytes. In a VB data set, the records can have different lengths. The first four bytes of each record contain the RDW, and the first two bytes of the RDW contain the length of that record (in binary). The first data byte of a VB record is in position 5, after the 4-byte RDW in positions 1-4. A record in a VB data set with LRECL=25 might look like this:
          定義為RECFM=VB and LRECL=25的數據集是一個可變長度的數據集,它最大的長度是25個字節,在一個定義為VB格式的數據集中,記錄可以有不同的才長度,前面的四個字節是記錄描述(RDW),前面兩個字節包含了記錄的長度(二進制表示),因此,可變長度的記錄的開始的數據位是5,定義為VB格式,LRECL=25的數據集的一條記錄會像下面這樣保存。
          Positions 1-2: Length in RDW = hex 0011 = decimal 17
          Positions 3-4: Zeros in RDW = hex 0000 = decimal 0
          Positions 5-7: Country Code = 'USA'
          Positions 8-9: State Code = 'CA'
          Positions 10-17: City = 'San Jose'
          Figure 1 shows the relationship between records and blocks for each of the five record formats.

          下面的圖展示了,在不同格式下,5個記錄和塊的關系
          Figure 1. Basic record formats 基本記錄格式
          posted on 2013-07-27 17:49 Eric_jiang 閱讀(359) 評論(0)  編輯  收藏 所屬分類: Mainframe
          主站蜘蛛池模板: 威信县| 辰溪县| 赫章县| 方正县| 福建省| 裕民县| 广水市| 泽库县| 东光县| 克山县| 普陀区| 恩平市| 陆河县| 板桥市| 溧水县| 通化市| 普陀区| 花莲县| 韩城市| 盐亭县| 巨野县| 沈阳市| 鸡泽县| 汝城县| 平邑县| 太谷县| 都江堰市| 施秉县| 福安市| 灵台县| 响水县| 渭南市| 东阳市| 苍梧县| 尼玛县| 门源| 乌拉特后旗| 台江县| 彰化县| 阿拉尔市| 福海县|