The NoteBook of EricKong

            BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
            611 Posts :: 1 Stories :: 190 Comments :: 0 Trackbacks
          Data set record formats
          數(shù)據(jù)集記錄根式
          z/OS concepts
          Z/OS的概念
          Traditional z/OS® data sets are record oriented, and have one of five possible formats.
          傳統(tǒng)意義上來說,Z/OS的數(shù)據(jù)集的都是面向記錄,有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系統(tǒng)的上的字節(jié)流文件(Z/OS Unix有字節(jié)流文件,而這些字節(jié)流功能存在其他特定的功能區(qū)域,但是這些已經(jīng)不是傳統(tǒng)意義上的數(shù)據(jù)集了,另當(dāng)別論)

          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中,沒有新行符號(hào)(NL)或者(CR+LF) 等字符作為記錄的結(jié)束標(biāo)志。在一個(gè)給定的數(shù)據(jù)集,記錄總是固定長(zhǎng)度的或者是可變長(zhǎng)度的。

          Traditional z/OS data sets have one of five record formats, as follows:
          傳統(tǒng)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(固定)
                 在磁盤的上一個(gè)物理塊就是一個(gè)邏輯記錄,而且所有的塊和記錄都是同樣大小的,這種格式是很少用的了。

          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(定長(zhǎng) 分塊)
              這種格式意味著幾個(gè)邏輯記錄組合成為一個(gè)物理塊,這種格式能夠提供高效的空間利用率和操作行,是一種經(jīng)常被固定長(zhǎng)度記錄使用的格式。

          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(變長(zhǎng))
                這種格式中,一個(gè)邏輯的記錄作為一個(gè)物理塊,一個(gè)可變長(zhǎng)度的邏輯記錄包含一個(gè)記錄描述符(RDW),它放置在在數(shù)據(jù)的前面。這個(gè)記錄描述符有4個(gè)字節(jié),前兩個(gè)字節(jié)描述了邏輯記錄的長(zhǎng)度(長(zhǎng)度也包含了RDW的長(zhǎng)度在內(nèi))。長(zhǎng)度范圍可以是4字節(jié)到32760個(gè)字節(jié),第三和第四個(gè)字節(jié)必須是0,因?yàn)槠渌狄呀?jīng)被跨越式的記錄使用,這種格式也是很少使用的。

          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(變長(zhǎng),分塊)
                 這種格式將多個(gè)可變長(zhǎng)度的邏輯記錄(每一個(gè)都包含了RDW)放在一個(gè)物理塊里面。系統(tǒng)必須放置一個(gè)額外的塊描述符(BWD)在塊的開始部位,BDW它包含了這個(gè)塊全部長(zhǎng)度。

          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(未定義)
                 這個(gè)格式包含了可變長(zhǎng)度的記錄和沒有預(yù)先定義好格式的塊,這種格式對(duì)于那些不常用的應(yīng)用程序是多么的吸引,但是一般來說,主要用于可執(zhí)行模塊的存儲(chǔ)格式。

          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.
          我們這里需要強(qiáng)調(diào)一個(gè)塊和一個(gè)記錄的區(qū)別,一個(gè)塊是用于寫入磁盤,而一個(gè)記錄是一個(gè)邏輯實(shí)體。
          The terminology here is pervasive throughout z/OS literature. The key terms are:
          這些技術(shù)詞匯貫穿了Z/OS技術(shù)文化里面中,下面是關(guān)鍵的一些項(xiàng)目:
          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格式的物理塊的大小。而對(duì)于V,VB和U格式的記錄,BLKSIZE是數(shù)據(jù)集能夠使用的最大物理塊大小。
          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)是指一個(gè)邏輯記錄的大小(對(duì)于F和FB的格式)或是最大的可允許的邏輯記錄大小(對(duì)于V和VB格式的)數(shù)據(jù)集,對(duì)于格式U來說,是沒有LRECL可言的。

          Record Format (RECFM) is F, FB, V, VB, or U as just described.
          記錄格式(RECFM)F, FB, V, VB, or U,上面已經(jīng)講過了
          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.

          這些項(xiàng)目就是我們知道的(DCB)數(shù)據(jù)控制塊,被命名的DCB常用于匯編程序,當(dāng)我們需要?jiǎng)?chuàng)建新的數(shù)據(jù)集的時(shí)候,我們經(jīng)常需要指明這些項(xiàng)目的數(shù)值。數(shù)據(jù)集的類型和長(zhǎng)度由它的記錄格式(RECFM)和邏輯記錄長(zhǎng)度(LRECL)來決定的。固定長(zhǎng)度的數(shù)據(jù)集有記錄格式(RECFM)F, FB等等其他,可變長(zhǎng)度的數(shù)據(jù)集有記錄格式(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進(jìn)行定義的數(shù)據(jù)集是一個(gè)固定長(zhǎng)度的數(shù)據(jù)集,數(shù)據(jù)集的記錄長(zhǎng)度為25個(gè)字節(jié),B意味指分塊的,在一個(gè)FB格式的數(shù)據(jù)集中,LRECL項(xiàng)告訴了你這個(gè)數(shù)據(jù)集每個(gè)記錄的長(zhǎng)度,他們長(zhǎng)度都是一樣的,如上面的記錄。

          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的數(shù)據(jù)集是一個(gè)可變長(zhǎng)度的數(shù)據(jù)集,它最大的長(zhǎng)度是25個(gè)字節(jié),在一個(gè)定義為VB格式的數(shù)據(jù)集中,記錄可以有不同的才長(zhǎng)度,前面的四個(gè)字節(jié)是記錄描述(RDW),前面兩個(gè)字節(jié)包含了記錄的長(zhǎng)度(二進(jìn)制表示),因此,可變長(zhǎng)度的記錄的開始的數(shù)據(jù)位是5,定義為VB格式,LRECL=25的數(shù)據(jù)集的一條記錄會(huì)像下面這樣保存。
          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個(gè)記錄和塊的關(guān)系
          Figure 1. Basic record formats 基本記錄格式
          posted on 2013-07-27 17:49 Eric_jiang 閱讀(359) 評(píng)論(0)  編輯  收藏 所屬分類: Mainframe
          主站蜘蛛池模板: 乌兰县| 诸暨市| 桂阳县| 新民市| 渑池县| 宁晋县| 平泉县| 垫江县| 新巴尔虎右旗| 临沂市| 利川市| 库伦旗| 乌拉特前旗| 黄浦区| 宝应县| 沁阳市| 桐乡市| 绥棱县| 沁源县| 丹凤县| 绥江县| 定陶县| 蓬莱市| 唐海县| 吉隆县| 上饶市| 突泉县| 洪江市| 当阳市| 杭锦后旗| 德钦县| 临海市| 喜德县| 仪征市| 简阳市| 南木林县| 琼中| 镇平县| 辉县市| 丹寨县| 江北区|