The NoteBook of EricKong

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

#

AE-L与AF-L功能键

  从这个功能的使用上,可能会很容易看得出专业玩家与业余摄友之间的差别,因为有些人玩相机很多年,甚至还不知道这个功能是什么。


你忽略了吗  7个小众但实用的相机功能

  AF-L是“自动对焦锁定”,当你半按快门对焦完毕后并打开AF-L后,相机只会锁定在你半按快门时的那个焦距,当你无论转移到任何角度,相机都会锁定在你之前半按快门时的那个焦距上。适合用于运动摄影,进行定点捕捉闯进画面内的物体等。

  AE-L即“自动曝光锁定”,它的意思是,当你构图后,相机会根据画面来判断需要多少的曝光量,随着画面移动,比方说从一个暗地方到亮地方,这个过程里相机对曝光量一定是会变化的。但AE-L打开的话,照相机会锁定你之前半按快门时的曝光量,拍摄别的东西的时候,光圈快门都不会变化。适合统一曝光下进行接片的拍摄等。

posted @ 2013-08-02 14:32 Eric_jiang 阅读(238) | 评论 (0)编辑 收藏

With subfiles you can create a display file with lists of items. Let's see how that's done.
利用子文件我们可以创建带有列表项目的显示文件,现在我们就看看是如何创建的
A subfile is a display file where you can place a listing of values and process changes on the list. The list of members that you can see in the PDM is an example of a subfile.
子文件是一个显示文件,它能够帮助你显示列表和在列表上作相应的处理,你在PDM上能看到的列表成员就是你的一个子文件
In this chapter we'll create a subfile which will show all the cards from a client given its ID. To make the manipulation of several tables easier, we'll create a view with the fields we'll use on the subfile. In STRSQL insert this code:
在这一章,我们将要创建一个子文件,它用于根据特定的ID显示所有的卡,为了更好地维护几张表,我们创建一个表包含多个我们将要用在子文件的字段,在STRSQL中输入这些代码
CREATE VIEW CLICARD AS SELECT CL.ID_CLI, CR.ID_CRD, SH.NAME_SHP, CR.SHOP_CRD 
FROM DEMO/CLIENTS CL, DEMO/SHOP SH, DEMO/CARDS CR 
WHERE CL.ID_CLI = CR.CLIENT_CRD AND CR.SHOP_CRD = SH.ID_SHP
Open SDA (STRSDA) and create a new member:
打开SDA创建一个新的成员

Create a BOTTOM record that should look like this:
创建一个Bottom记录像如下

And the TOP record like this: 和Top记录

Let's create the subfile now. Create a new record, name it LIST, the record type is SFL:
现在我们开始创建子文件了,创建一个新的记录,名字为LIST,记录的类型是SFL

When you press Enter a new record appears. Write SFLCTL on it:
现在我们按下回车,一个新的记录出现如下,在上面写下SFLCTL如图

This field creates a subfile control record, which works like the heading on the list.
这个字段用来创建子文件控制记录,就像列表的头部
You have to activate some options now: 现在你需要激活下面的选项

On the General Keywords menu insert the data you see below:
在General Keywords菜单输入输入如下

These indicators allow us to manipulate the status of the subfile from the RPG code. Press Enter to go back to the previous screen. Select Subfile display layout.
这些指示器允许我们利用RPG代码维护控制控制子文件的状态,输入回车我们会返回之前的屏幕界面,现在选择子文件的显示布局

On subfile maximum size type 9999 and on the number of records for page type 9:
在子文件的最大值输入9999和页面的最大记录数输入9

Press enter to go back. Select the option Select Record Keyword:
输入回车返回,然后选择字段关键字选项

Choose Overlay keywords: 选择覆盖关键字

Select Overlay without erasing: 选择覆盖但不擦除选项

Press Enter until you're back on this screen: 输入回车,然后返回如下 

Open the SFLCTL record. By default the record list is already visible on the design screen. Select to visualize the other 2 records, TOM and BOTTOM (F9).
打开SFLCTL记录,默认是这个记录显示在设计界面上,选择To和Bottom进行可视化(按下F9)

Back to the design screen, write at the top “Client Nr.”. Select the fields from CLICARD view for input/output (F10) and select the ID_CLI field:
返回设计界面,在上面写上“Client Nr.”,在CLICARD试图中选择字段ID_CLI作为输入和输出,

Type the titles of the subfile's columns and a separating line:
输入分割线和子文件的字段标题

Let's add some proprieties to the Client ID field. Place an * before to the left of the field.
现在我们添加一些新的属性给与Client ID字段,在这个字段的左边输入一个*

We're going to add an indicator to this field, which will be activated when no record is found for an ID inserted (either the ID doesn't exist or it doesn't have any associated cards). Option Error Messages:
现在我们需要为这个字段添加一个指示器,当值一个指定的ID没有找到记录(这个ID并不存在或者根据这个ID找不到记录)的时候,这个指示器将被激活,在错误描述选项的地方输入Y

Insert the following information:
输入下面的信息

Close this record and open the LIST record. Select the TOP and BOTTOM records for display (F9):
选择这个记录并且同时打开这个LIST记录,选择Top和Bottom记录作显示(按下F9)

To create an input field, where the user will type the options, type '+i' on the same position as in the following image and press Enter.
创建一个输入字段,用户我在这里输入选项,我们在如下图的位置输入‘+i’然后按下回车

Notice how the field spread across the 9 line you previously defined as the subfile page size.
注意你之前是如何定义子文件的每页大小为9行

Select the records from CLICARD view for output.
从CLICARD视图中选择记录作为输入

The fields will probably be listed twice, because the SDA will show you the field that had been previously loaded from I/O in the SFLCTL record. You should select the fields further to the right, because they are the last ones loaded. You must be careful selecting the fields.
这些字段大概会本显示两次,因为SDA会把之前加载的字段也被显示出来,因此选择字段的时候需要小心一点,尽量选择那些比较靠右的字段,因为他们是最后被加载的,
If there are more fields than the ones that can fit the message line, a plus (+) sign will appear at the end of the line. Press Page Down to see the remaining fields.
假如有很多的字段,消息行显示不完,在行尾会显示一个+号,按下翻页键就可以看到剩下的那些没有显示的字段。

Place the fields on their positions: 将字段放在相关的位置

The final result: 最后的结果

Don't forget to activate the indicator 03 at file-level so that “F3=Exit” can work and add the keyword INDARA to the code. Check out the Display file chapter if you don't remember how to do this.
不要忘记激活03指示器,在文件的层面,使得“F3=Exit”生效,同时添加关键字INDARA到代码中去,假如你忘记了怎么做的话,回头看看第八章的显示文件创建。
You must add the red line to the SFLCTL record:
你必须为SFLCTL记录添加红线
A R SFLCTL SFLCTL(LIST)
A SFLSIZ(9999)
A SFLPAG(0009)
A OVERLAY
A 30 SFLDSP
A 31 SFLDSPCTL
A 35 SFLCLR
A 33 SFLEND(*MORE)
A 4 8'Client Nr.'
A ID_CLI R B 4 19REFFLD(CLICARD/ID_CLI DEMO/CLICARD)
A 90 ERRMSG('No Data Found')
A 6 4'Op.'
A 6 12'Card Nr.'
A 6 27'Shop Nr.'
A 6 42'Shop Name'
A 7 2'__________________________________-
A ___________________________________-
A __________'
A RRN 4S 0H SFLRCDNBR(CURSOR)
In the LIST record change the name of the input field to OPTION. By default it must be named FLD001, or something like it.
在LIST记录中,你必须修改默认的输入字段的名字,因为默认是FLD001,或者像如下
A R LIST SFL
A OPTION 1A I 9 5
(...)
Executing the subfile 执行子文件
To run the subfile you must create an RPGLE member. Check out the file QRPGLESRC.SHW_SFL for more details on how to write this member.
要运行子文件,你必须创建一个RPGLE的成员,检出文件QRPGLESRC.SHW_SFL 查看一下细节,看看是如何写这个文件
When you run the RPGLE code: 当你运行RPGLE代码后可以看到下面的结果

Attachments

posted @ 2013-08-02 10:34 Eric_jiang 阅读(592) | 评论 (0)编辑 收藏

Display files are DDS files that enable us to create AS/400 menus and screens to interact with the user. Display files can have several records. Each record defines part of the screen's appearance. These records may or may not overlap each other.
显示文件是一些帮助我们创建和用户进行交互的AS400菜单和屏幕界面的DDS文件。显示文件能够包含多个纪录,每个记录定义了屏幕界面的一部分。这些记录或者相互覆盖。
The SDA application allows us to “draw” what should show up on the screen and creates the DDS code from our “drawing”. Next we'll create a screen with DDS and afterward we'll look at some code excerpts, because sometimes it's easier to alter the screen through its code.
SDA程序允许我们在屏幕上“画草稿”,它会根据我们所画的“草稿”生成相应的DDS代码。下面,我们将要创建利用DDS创建一个屏幕界面,然后查看这些代码的片断,因为,有些时候,利用代码来修改界面还是比较容易些。
In this chapter ,we'll create a screen to show a clients data.
在这一章,我们将创建一个显示客户数据的界面。
To open SDA type STRSDA on the system prompt. This screen should appear:
在系统命令行输入STRDA就可以打开SDA程序了,如下图显示:

 Choose option 1 and type the options as you see them on the image below. Source file is the file where the code will be stored. Member is the name of member we're creating.

选择1,然后输入相关的选项,如下图,Source file就是代码保存的文件了,在Member输入我们想要创建的成员(Member)。

 Create file 创建文件

Press Enter. A new screen appears. Add a new record, named TOP, typing what you see on the image bellow.
按下回车键,然后我们添加记录,命名为Top,如下图

 Now specify the record type, in this case it's RECORD:

接着我们输入记录类型,在这个例子中我们输入Record

After the Enter an empty screen appears. In this screen you can “draw” the top record. Add the content you see on the image bellow.
按下回车,现在我们就可以“草绘” top记录,添加内容了,如下图:
When you type a string you should place it between apostrophes. If you don't each word will be handled like a different field. Placing the apostrophes allows you to manipulate all the words as a single field.
当你想输入一个字符串的时候,请问打上单引号,假如你不这样做的话,系统会把他们当作分开的不同字符串。
The *USER function shows the username on the screen. There are other functions that retrieve information from the system: *DATE (shows the system current date), *TIME(shows the system current time), *SYSNAME (shows the system name).
*USER用来在屏幕上显示用户名
*DATE用来在屏幕上显示系统当前日期。
*TIME 用来在屏幕上显示系统的当前时间。
*SYSNAME 用来在屏幕上显示系统名称。

 After typing what you see on the image press Enter. Always check what you've done before pressing Enter, because after that you can only alter the screen by manipulating its code. You can also exit the record editing without saving your work, but then you'll lose all you've done since you last opened the record for editing.

按照上图输入完成后按下回车,就可以看到下图了,请在按下回车之前仔细检查,因为按下回车之后,只能用代码进行修改了,当然,你也可以退出这条记录而不保存,但是你就会丢失这些工作成果。
Moving a field 移动字段
You can move a field to the right placing “>” characters to the right of the field. The number of > you type will be the number of columns the field will move. To move the field to the left place < signs on the left side of the field.
你可以通过在字段右边的输入〉来使字段向后移动,你输入〉符号的数量就是字段向右移动的位移量,向左是同样的道理。

 Centering a field 字段居中

To center a field on the screen place an 'ac' at the left of the field and the 'c' must be overlapping the first character of the field. Then press Enter.
Press F3 to finish editing this record. Choose option 1 to save your work:
要是想将字段居中,你可以在字段的左边输入ac,c必须覆盖字段字段的第一个字符,然后按下回车,按下F3结束你对字段的编辑,选择1保存你的工作成果。

Create another record named BOTTOM, the same way you've created the TOP record.

现在我们创建另外一个记录叫做Bottom,方法是跟创建TOP字段是一样的。
When you open the new record for editing press F9. This menu will appear:
当你打开按下F9对新的记录,我们可以看见菜单显示出来了

So that you don't overlap the records you can choose to visualize other records in the menu. You can see that the status of the BOTTOM record is “In Use” which means it is the one currently being edited. You can select at most 3 records to visualize. To do so place numbers 1 to 3 on the records you want. Select the TOP record and press Enter.

为了不要覆盖你的其他记录,你可以选择在菜单中对其他记录可视化,你可以发现Bottom记录处于正在使用“In Use”状态,意味着这正是我们正在编辑的记录,你可以选择最到3条记录进行可视化,将1,2,3 放在你想可视化的记录上面,然后按回车

The names of the selected fields appear on the bottom of the screen. Don't forget you are only “drawing” on the record in use. The other records only help you place your elements on the right place.

可以看到,你所选的字段显示在屏幕的底部了,但是你不要忘记了,你只能“草绘”那个正在使用(“In Use”)的记录,其它记录只能辅佐那个正在使用的字段放置合适的位置而已。 
“Draw” something similar to what you see in the next image. Use the underscore to make the line.
像下图那样“草绘”我们的需要的界面,我们使用下划线描述出一条直线来

Changing field proprieties修改字段属性

We're going to edit the proprieties of the “F3=Exit” field. Place an '*' at the left of the field and press Enter:
我们现在修改“F3=Exit” 字段的属性,在这个字段的左边输入*, 然后按下回车。

This screen appears. Place an 'Y' in the Colors option. We're going to change the color of the characters.

当出现了下面的界面,在颜色选项中输入Y,

Place an 1 in the Blue field:

在蓝色选项那里输入1

Select blue color 选择蓝色

Press Enter until you're back in the editing screen. The field is now blue. Exit the editing screen (F3) and save your work.
按回车返回,直至你返回编辑界面,现在可以看到字段已经变成蓝色了,按F3退出编辑界面然后保存你的工作成果。
Create a new record, MIDDLE, the same way you've created the previous records.
创建一个新的记录,MIDDLE,方法跟你之前的事一样的
Press F9 to visualize the records you already created:
按F9可视化你刚刚创建的记录

 Draw what you can see in the following image. Press Enter when you're done.

按照下图草绘界面,完成后按回车

Add fields

添加字段
Using table records
使用表记录
We're going to select the fields from the Clients table to show them on the screen. Press F10. On that menu select the Database File Clients for output (option 3). You can also select fields for input or input/output choosing one of the other options. You should write this on the menu and press Enter:
现在我们将要在客户表中选择我们想要的字段,将他们显示在界面上面,按下F10,现在第3项(select the Database File Clients for output),你也可以为其它的选项,选择字段作为输出和输入。

Select the table 选择表

On the bottom of the screen there's a message with all the Client's field names preceded by a number. To use a field on the screen you should write its correspondent number preceded with an '&'. You can see it in the next image. Be careful, because if you write a number and press Enter the order of the list on the bottom will change.
在下图中,你可以看到一条信息显示在最下面,显示了客户表的所有字段和字面名字前面附带着号码,要将这些字段显示在界面的,你需要将相关的字段的号码写在屏幕界面上,前边带上一个‘&’的符号,如下图,

 The final result: 最后结果

 Exit the record editing. We now need to make a few adjustments to the file options.

推出记录编辑,我们需要对文件选项进行一些修改
Record level options (overlay) 记录层面选项(覆盖)
Choose option 8 to the TOP record: 在Top记录选择选项8

Change overlay option 修改覆盖选项

Select option Overlay Keywords: 选择覆盖关键字

Change overlay option step 2  修改覆盖选项第二步

Place an Y at the option Overlay without erasing. This option allows to display this record on the screen together with the others. Press Enter until you reach the menu with the record listing. Activate this option on the other records.
在选项(Overlay without erasing)的地方输入Y,这个选项允许你在屏幕界面中同时显示其他的记录。一路回车直至你看到记录列表,在其他界面中激活这个选项

Change overlay option step 3

修改覆盖属性步骤3
File level options (indicators) 文件层面的选项(指示器)
We need to declare the indicator 03 (so that “F3=Exit” works) at the file level. On the menu with the record listing press F14 (F13=shift+F1; F14=shift+F2; F15=shift+F3, etc.). On the following screen choose the option Indicator Keywords.
要实现“F3=Exit”的功能,我们需要需要在文件的层面声明指示器03,在字段列表的菜单中我们输入F14 (F13=shift+F1; F14=shift+F2; F15=shift+F3, etc.).然后,我们选择指示器选项关键字,如下图

 Insert the data you see on the image below:按照下图输入

 

Press Enter until you've reached the starting menu. Press F3 and save the file.
一路回车直至看到开始菜单,按F3保存文件。
Display Files DDS code 显示DDS文件的代码
You can check out the code from this display at QDDSSRC, the member is SHW_CLI. At the beginning of the file should be something like this:
你可以查看上面步骤产生的DDS代码,位置在QDDSSRC,成员名字是SHW_CLI,在文件的开头我们可以看到这样两行:
A DSPSIZ(24 80 *DS3)
A CF03(03 'Exit')
These are the file-level options. You should add a line to this area that later will allow you to rename the indicators used. Add this line after the DSPSIZ line:
这是文件层面的选项,你迟些可以在这里增加一行,它允许你重命名这个已经用了的指示器,在DSPSIZ后面添加一行,如下
A INDARA
You should also have some lines like these: 你也可以添加几行像下面的:
A R TOP
A OVERLAY
A 1 65USER
A 3 27'Client Details:'
In these four lines are the definitions to the TOP record. Notice the OVERLAY option we had defined in SDA. The keyword USER is placed on the 1st line, column 65.
上面四行是关于TOP 记录的定义,要注意的是OVERLAY 选项是我们在SDA中定义的,关键字USER被放在第一行,第65列。
Look at this line from MIDDLE record: 现在我们看看MIDDLE的记录
A ID_CLI R O 8 23REFFLD(CLIENTS/ID_CLI DEMO/CLIENTS)
Here you have a reference to the ID_CLI field on the CLIENTS table and this reference is positioned at line 8 column 23, an can only be accessed for reading (O).
这里你定义了一个引用,指向CLIENTS表的ID_CL字段,这个字段的位置在第8行,第23列,是一个只读的字段。
Compile the file (option 14) after you've closed the member.
关闭了这个成员之后,你可以按F14编译这个文件。
Executing display files 执行显示文件
To run the screen you must create an RPGLE member which will handle all the possible events (pressing F3 for example). Check out the file QRPGLESRC.SHW_CLI to see how this member should be defined. Create a file like QRPGLESRC.SHW_CLI and run it. The result should be something like this:
要运行这个界面,你必须创建一个RPGLE成员,来处理所有可能的事件(例如按下F3),打开文件QRPGLESRC.SHW_CLI,看看我们英文怎么定义这个成员,创建一个像QRPGLESRC.SHW_CLI文件,然后我们运行,结果如下图,

Execute display file 1

If you press Enter:

posted @ 2013-07-30 17:07 Eric_jiang 阅读(1081) | 评论 (0)编辑 收藏

     摘要: 一个简单的例子而已。IDENTIFICATION DIVISION.                           &nbs...  阅读全文
posted @ 2013-07-29 17:23 Eric_jiang 阅读(852) | 评论 (3)编辑 收藏

The default options that were set up when your compiler was installed are in effect for your program unless you override them with other options. To check the default compiler options of your installation, do a compile and check in the compilation listing.

Ways of overriding the default options

1.Compiler options can be passed to COBOL Compiler Program (IGYCRCTL) through the PARM in JCL.
2.PROCESS or CBL statement with compiler options, can be placed before the identification division.
3.If the organization uses any third party product or its own utility then these options can be coded in the pre-defined line of the utility panel.

Precedence of Compiler Options

  1. (Highest precedence). Installation defaults, fixed by the installation.
  2. Options coded on PROCESS /CBL statement
  3. Options coded on JCL PARM parameters
  4. (Lowest Precedence). Installation defaults, but not fixed.
The complete list of compiler option is in the table:
Aspect
Compiler Option
Source Language
APOST, CMPR2, CURRENCY, DBCS, LIB, NUMBER,
QUOTE, SEQUENCE, WORD
Date Processing
DATEPROC, INTDATE, YEARWINDOW
Maps and Listing
LANGUAGE, LINECOUNT, LIST, MAP, OFFSET, SOURCE, SPACE, TERMINAL, VBREF, XREF
Object Deck generation
COMPILE, DECK, NAME, OBJECT, PGMNAME
Object Code Control
ADV, AWO, DLL, EXPORTALL, FASTSRT, OPTIMIZE, NUMPROC, OUTDD, TRUNC, ZWB
Debugging
DUMP, FLAG, FLAGMIG, FLAGSTD, SSRANGE, TYPECHK
Other
ADATA, ANALYZE, EXIT, IDLGEN
ADV: It is meaningful if your program has any printer files with WRITE..ADVANCING keyword. The compiler adds one byte prefix to the original LRECL of printer files for printing control purpose. If you are manually populating printing control character in the program, then you can compile your program with NOADV.
DYNAM: Use DYNAM to cause separately compiled programs invoked through the CALL literalstatement to be loaded dynamically at run time. DYNAM causes dynamic loads (for CALL) and deletes (for CANCEL) of separately compiled programs at object time. Any CALL identifierstatements that cannot be resolved in your program are also treated as dynamic calls. When you specify DYNAM, RESIDENT is also put into effect.
LIST/OFFSET: LIST and OFFSET are mutually exclusive.  If you use both, LIST will be ignored. LIST is used to produce listing a listing of the assembler language expansion of your code. OFFSET is used to produce a condensed Procedure Division listing. 
With OFFSET, the procedure portion of the listing will contain line numbers, statement references, and the location of the first instruction generated for each statement.  These options are useful for solving system ABENDS. Refer JCL session for more details.
MAP:   Use MAP to produce a listing of the items you defined in the Data Division.
SSRANGE:   If the program is compiled with SSRANGE option, then any attempt to refer an area outside the region of the table will abnormally terminate with protection exception, usually S0C4.It also avoids any meaningless operation on reference modification like negative number in the starting position of reference modification expression. If the program is compiled with NOSSRANGE, then the program may proceed further with junk or irrelevant data. So usually the programs are compiled with SSRANGE during development and testing.
RENT: A program compiled as RENT is generated as a reentrant object module. CICS programs should be compiled with RENT option to share the same copy of the program by multiple transactions (Multithreading)
RESIDENT:   Use the RESIDENT option to request the COBOL Library Management Feature. (The COBOL Library Management Feature causes most COBOL library routines to be located dynamically at run time, instead of being link-edited with the COBOL program.).CICS Programs should be compiled with RESIENT option.
XREF: Use XREF to get a sorted cross-reference listing.  EBCDIC data-names and procedure-names will be listed in alphanumeric order.   It also includes listing, where all the data-names that are referenced within your program and the line number where they are defined. This is useful for identifying the fields that are defined but not used anywhere after the development of new program.



COMPILATION JCL:
//SMSXL86B JOB ,'COMPILATION JCL', MSGCLASS=Q,MSGLEVEL=(1,1),CLASS=C  
//COMPILE1  EXEC  PGM=IGYCRCTL, PARM=’XREF,APO,ADV,MAP,LIST),REGION=0M
//STEPLIB      DD  DSN=SYS1.COB2LIB,DISP=SHR
//SYSIN         DD  DSN=SMSXL86.TEST.COBOL(SAMPGM01),DISP=SHR
//SYSLIB       DD  DSN=SMSXL86.COPYLIB,DISP=SHR
//SYSPRINT    DD  SYSOUT=*
//SYSLIN       DD  DSN=&&LOADSET, DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200),
//                 DISP=(NEW,PASS),UNIT=SYSDA,SPACE=(CYL,(5,10),RLSE),
//SYSUT1       DD UNIT=&SYSDA,SPACE=(CYL,(1,10))  => Code SYSUT2 to UT7
//LINKEDT1    EXEC  PGM=IEWL,COND=(4,LT)
//SYSLIN       DD  DSN=&&LOADSET, DISP=(OLD,DELETE)
//SYSLMOD    DD  DSN=&&GOSET(SAMPGM01),DISP=(NEW,PASS),UNIT=SYSDA
//                 SPACE=(CYL,1,1,1))
//SYSLIB       DD  DSN=SMSXL86.LOADLIB,DISP=SHR
//SYSUT1       DD  UNIT=SYSDA,SPACE=(CYL,(1,10))
//SYSPRINT    DD SYSOUT=*
//*** EXECUTE THE PROGRAM ***
//EXECUTE1  EXEC  PGM=*.LINKEDT1.SYSLMOD,COND=(4,LT),REGION=0M
//STEPLIB      DD  DSN=SMSXL86.LOADLIB,DISP=SHR
//                 DD  DSN=SYS1.SCEERUN,DISP=SHR
//SYSOUT      DD  SYSOUT=*
//SYSPRINT    DD  SYSOUT=*
posted @ 2013-07-29 16:02 Eric_jiang 阅读(367) | 评论 (0)编辑 收藏

Data set structure
数据集的结构
 
Working with data sets requires an understanding of the physical and logical structure of a data set, and how z/OS® accesses information in the data set.
使用数据集需要我们理解数据集的物理和逻辑结构和Z/OS如果访问这些数据集的信息.
Data set
In z/OS, a data set is a named collection of related data records that is stored and retrieved by an assigned name. A data set is equivalent to a file in other operating systems. Data sets are stored on tape or disks.
数据集
    在Z/OS中,数据集是一个已命名的内容相关数据记录的集合,系统通过这个名字保存和访问这些数据记录.数据集相当于其他操作系统里面的文件.数据集是存储在磁盘或者是磁带里面的.
Direct Access Storage Device (DASD)
DASD is another name for a disk drive. Additional synonyms include: disk volume, disk pack, or Head Disk Assembly (HDA).
(DASD)直接访问存储器
DASD 是磁盘设备的别名,它还有其他的同义词disk volume, disk pack, or Head Disk Assembly (HDA).
Space
Disk space is allocated in units called cylinders, tracks, or blocks.
磁盘空间
    磁盘空间以柱面,磁道,或者块为单位作分配.
Cylinder
A disk drive contains cylinders. A cylinder is a unit of storage on a count-key-data (CKD) device with a fixed number of tracks.
柱面
    磁盘包含柱面,一个柱面是一个(CKD)设备上一个存储单位,指向一个固定号码的磁道.
Track
Cylinders contain tracks, which are circular paths on the surface of a disk or diskette on which information is magnetically recorded and from which recorded information is read. Tracks are in count-key-data (CKD) format, which means that each track contains fields that indicate the start of the track and the space used, followed by records containing three fields:
The count field defines the length of the record
The key field contains optional accounting information
The data field contains the user data
磁道
柱面包含磁道,它是磁盘表面的环形轨道,以磁性物质保存和被访问数据信息. 磁道使用(CKD)格式,意味着每一个磁道包含一系列的字段,这些字段指明了磁道的开始位置和所用的空间,后面跟随着数据记录,数据记录内保存三个字段,
.记数字段包含了记录的长度
.关键字字段包含了可选的帐户信息
.数据字段包含了用户的实际数据
Count Key Data(CKD)是一种磁盘数据结构。每条物理磁盘记录包含一个count区,一个可选的key,以及在一个记录内间隔后面的数据data记录。这个结构后面的原理就是:即然数据记录的长度可能不同,它们就需要有一个统计字段来指示key和物理记录的长度。统计区有以柱面头记录格式记录的物理位置标识,Key的长度,和数据记录的长度。Key要么没有,要么是一串字符。大多数情况下是没有key的,记录顺序排列,或者以直接柱面头记录定位。如果有key,则它通常是数据记录前几个字节的拷贝,但它可以是用来找到这条记录的任何数据。这个key(还有记录)都是通过硬件命令来定位的。Count Key Data Achitecture是由IBM在20世纪60年代创建的,用来作为System/360的磁盘驱动,也叫固定块架构(Fixed Block Achitecture。
Record
记录
Tracks contain records. A record is some number of bytes containing data. The record is the basic unit of information used by a program running on z/OS.
磁道包含记录,一个记录是一些包含了数据的字节.记录是Z/OS上应用程序处理数据的基本单位.
Records have a logical record length (abbreviated as LRECL); different types of DASD impose different maximum lengths for records.
Records are either fixed length or variable length in a given data set. Traditional z/OS data sets have one of five record formats (abbreviated as RECFM): Fixed (F), fixed blocked (FB), variable (V), variable blocked (VB), or undefined (U).
.记录有一个逻辑记录长度(LRECL)属性,不同的DASD设备决定了数据记录的最大长度的不同
.记录可是定长的,也可以是变长的,传统上,z/OS有5种记录格式(RECFM),F固定,FB固定,分块,V变长,VB变长,分块,U未知
Blocks
Records can be grouped into data blocks, which are the units of recording on disk. Blocking makes processing more efficient because z/OS can access an entire block at once instead of reading or writing records individually.
Block size (abbreviated as BLKSIZE) is the physical block size written on the disk for fixed (F) and fixed block (FB) records. For variable and undefined (V, VB, and U) records, block size is the maximum physical block size that can be used for the data set.
数据记录群组成为数据块,是写入和读取磁盘的单位.分块的方式使数据处理更加高效,因为z/OS可以用一个块的单位来读写记录,而不是一个一个记录单独来读写.
块大小(BLKSIZE),是指以F(固定)和FB(固定,分块)格式的数据记录写入磁盘的块的大小,对于分块,V变长,VB变长,分块,U格式的数据记录,块大小是数据集最大的可用数据物理块大小.
Extents
扩展
Space for a disk data set is assigned in primary and secondary extents. An extent is a contiguous number of disk drive tracks, cylinders, or blocks. Data sets can increase in extents as they grow. As with blocking, the use of extents is more efficient because reading or writing contiguous tracks is faster than reading or writing data that is scattered over the disk.
磁盘空间分配对于数据集来说包括(primary)第一次分配和二次(secondary)扩展,一个扩展分配了一定数量连续的磁盘磁道,柱面,或者块.基于块的读写方式下,使用磁盘扩展数据更加高效,应为读写连续的磁道是比读写零碎的数据快速很多.
Volume
The term volume is often used to refer to a disk.
卷经常被认为是磁盘
Volume serial
卷名
The six-character name of a disk or tape volume, such as TEST01.
是磁盘或者磁带的名字,6个字符,例如test01
Device type
设备类型
A model or type of disk device, such as 3390.
磁盘设备的型号或者是类型,例如3390
Organization
组织方式
The method of processing a data set, such as sequential.
处理数据的方式,例如顺序访问
posted @ 2013-07-29 11:36 Eric_jiang 阅读(502) | 评论 (0)编辑 收藏

//IBMUSERA JOB 168,'ERIC KONG',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
//         NOTIFY=IBMUSER                                        
//CRTFILEA EXEC PGM=IEFBR14                                      
//CRTFIL1  DD DSN=IBMUSER.TEST.DATAPF5,                          
//         DISP=(NEW,CATLG),                                     
//         UNIT=SYSDA,                                           
//         SPACE=(TRK,(10,5),RLSE),                              
//         DCB=(RECFM=FB,LRECL=208,BLKSIZE=208)                   
posted @ 2013-07-28 22:06 Eric_jiang 阅读(367) | 评论 (0)编辑 收藏

//IBMUSERA JOB 168,'ERIC KONG',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),   
//         NOTIFY=IBMUSER                                           
//CRTFILEA EXEC PGM=IEFBR14                                         
//CRTFIL1  DD DSN=IBMUSER.TEST.DATAPF3,                             
//         DISP=(MOD,DELETE),                                       
//         SPACE=(TRK,(0,0))                                      
posted @ 2013-07-28 21:52 Eric_jiang 阅读(398) | 评论 (0)编辑 收藏

//IBMUSERK JOB 168,'ERIC KONG',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),      
//         NOTIFY=IBMUSER                                              
//CPSTEP   EXEC PGM=IEBGENER                                           
//SYSPRINT DD SYSOUT=*                                                 
//SYSUT1   DD DSN=IBMUSER.TEST.DATAPF2,DISP=SHR                        
//SYSUT2   DD DSN=IBMUSER.TEST.DATAPF2B,DISP=(,CATLG,DELETE),          
//            SPACE=(TRK,(1,1)),                                       
//            DCB=(RECFM=FB,LRECL=208,BLKSIZE=2080),UNIT=SYSDA         
//SYSIN    DD DUMMY                                                    
//           
posted @ 2013-07-28 21:50 Eric_jiang 阅读(445) | 评论 (0)编辑 收藏

//IBMUSERC JOB 'COMP BATCH',CLASS=A,MSGCLASS=H,                        
//       NOTIFY=IBMUSER,MSGLEVEL=(1,1)                                 
//***************  DEFINE A PROC START  *******************************
//CBLBATCH PROC                                                        
//*********************************************************************
//        SET SRC=&SRC                                                 
//*********************************************************************
//* JOB TO COMPILE AND LINK-EDIT COBOL PROGRAM                         
//*********************************************************************
//***************  COMPILE STEP ***************************************     
//COBOL EXEC PGM=IGYCRCTL,REGION=2048K,                                
//      PARM='NODYNAM,LIB,OBJECT,RENT,RES,APOST,MAP,XREF,OFFSET'       
//STEPLIB DD DSNAME=IGY410.SIGYCOMP,                                   
//           DISP=SHR                                                  
//SYSPRINT DD SYSOUT=*                                                 
//SYSLIN DD DSNAME=&&LOADSET,UNIT=SYSDA,                               
//        DISP=(MOD,PASS),SPACE=(TRK,(3,3)),                           
//        DCB=(BLKSIZE=3200)                                           
//SYSIN DD DSN=IBMUSER.TEST.COBOL(&SRC),DISP=SHR  
//SYSLIB DD DSN=IBMUSER.TEST.COPY,DISP=SHR                              
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))                                
//SYSUT2  DD UNIT=SYSDA,SPACE=(CYL,(1,1))                               
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1))                                
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(1,1))                                
//SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(1,1))                                
//SYSUT6 DD UNIT=SYSDA,SPACE=(CYL,(1,1))                                
//SYSUT7 DD UNIT=SYSDA,SPACE=(CYL,(1,1))                                
//****************** LINK STEP *****************************************
//LKED EXEC PGM=HEWL,COND=(8,LT,COBOL),REGION=1024K,                    
//          PARM='LIST,XREF'                                            
//SYSLIB DD DSNAME=CEE.SCEELKED,DISP=SHR                                
//       DD DSN=IBMUSER.TEST.LOAD,DISP=SHR                              
//SYSPRINT DD SYSOUT=*                                                  
//SYSLIN DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)                          
//SYSLMOD  DD DSNAME=IBMUSER.TEST.LOAD(&SRC),DISP=SHR                   
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10))                              
//**********************************************************************
//*      DEFINE A PROC COMPLETE                                         
//**********************************************************************
//       PEND                                                           
//*********  RUN THE PROC TO COMPILE COBOL RESOURCE  *******************
//RUNAPP1 EXEC CBLBATCH,SRC=HELLO                                       
//*************** RUN THE PROGRAM ************************************** 
//STEPRUN EXEC PGM=HELLO                                                
//STEPLIB DD DSN=IBMUSER.TEST.LOAD(HELLO),DISP=SHR                      
//SYSOUT DD SYSOUT=*                                                    
//                                                                      
posted @ 2013-07-28 16:53 Eric_jiang 阅读(326) | 评论 (0)编辑 收藏

仅列出标题
共57页: First 上一页 20 21 22 23 24 25 26 27 28 下一页 Last