As400顯示文件創(chuàng)建_第1頁
As400顯示文件創(chuàng)建_第2頁
As400顯示文件創(chuàng)建_第3頁
As400顯示文件創(chuàng)建_第4頁
As400顯示文件創(chuàng)建_第5頁
已閱讀5頁,還剩21頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、Display Files如何創(chuàng)建顯示文件 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.顯示文件是一些幫助我們創(chuàng)建和用戶進(jìn)行交互的AS400菜單

2、和屏幕界面的DDS文件。顯示文件能夠包含多個紀(jì)錄,每個記錄定義了屏幕界面的一部分。這些記錄或者相互覆蓋。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

3、alter the screen through its code.SDA程序允許我們在屏幕上“畫草稿”,它會根據(jù)我們所畫的“草稿”生成相應(yīng)的DDS代碼。下面,我們將要創(chuàng)建利用DDS創(chuàng)建一個屏幕界面,然后查看這些代碼的片斷,因?yàn)?,有些時(shí)候,利用代碼來修改界面還是比較容易些。In this chapter ,we'll create a screen to show a clients data.在這一章,我們將創(chuàng)建一個顯示客戶數(shù)據(jù)的界面。To open SDA type STRSDA on the system prompt. This screen should appear:在系統(tǒng)

4、命令行輸入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,然后輸入相關(guān)的選項(xiàng),如下圖,Source file就是代碼保存的文件了,在Member輸入我們想要創(chuàng)建的成員(Member)。Create file 創(chuàng)建文件Press Enter.

5、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:接著我們輸入記錄類型,在這個例子中我們輸入RecordAfter the Enter an empty screen appears. In this screen you can “draw” the top record. Add the cont

6、ent you see on the image bellow.按下回車,現(xiàn)在我們就可以“草繪” top記錄,添加內(nèi)容了,如下圖: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.當(dāng)你想輸入一個字符串的時(shí)候,請問打上單引號,假

7、如你不這樣做的話,系統(tǒng)會把他們當(dāng)作分開的不同字符串。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用來在屏幕上顯示系統(tǒng)當(dāng)前日期。*TIME

8、用來在屏幕上顯示系統(tǒng)的當(dāng)前時(shí)間。*SYSNAME 用來在屏幕上顯示系統(tǒng)名稱。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

9、9;ll lose all you've done since you last opened the record for editing.按照上圖輸入完成后按下回車,就可以看到下圖了,請?jiān)诎聪禄剀囍白屑?xì)檢查,因?yàn)榘聪禄剀囍?,只能用代碼進(jìn)行修改了,當(dāng)然,你也可以退出這條記錄而不保存,但是你就會丟失這些工作成果。Moving a field 移動字段You can move a field to the right placing “>” characters to the right of the field. The number of > you type wil

10、l 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.你可以通過在字段右邊的輸入來使字段向后移動,你輸入符號的數(shù)量就是字段向右移動的位移量,向左是同樣的道理。Centering a field 字段居中To center a field on the screen place an 'ac' at the left of the field and the 'c' mu

11、st 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結(jié)束你對字段的編輯,選擇1保存你的工作成果。Create another record named BOTTOM, the same way you've created the TOP record.現(xiàn)在

12、我們創(chuàng)建另外一個記錄叫做Bottom,方法是跟創(chuàng)建TOP字段是一樣的。When you open the new record for editing press F9. This menu will appear:當(dāng)你打開按下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 m

13、eans 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.為了不要覆蓋你的其他記錄,你可以選擇在菜單中對其他記錄可視化,你可以發(fā)現(xiàn)Bottom記錄處于正在使用“In Use”狀態(tài),意味著這正是我們正在編輯的記錄,你可以選擇最到3條記錄進(jìn)行可視化,將1,2,3 放在你想可視化的記錄上面,然后按

14、回車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” some

15、thing 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:我們現(xiàn)在修改“F3=Exit” 字段的屬性,在這

16、個字段的左邊輸入*, 然后按下回車。This screen appears. Place an 'Y' in the Colors option. We're going to change the color of the characters.當(dāng)出現(xiàn)了下面的界面,在顏色選項(xiàng)中輸入Y,Place an 1 in the Blue field:在藍(lán)色選項(xiàng)那里輸入1Select blue color 選擇藍(lán)色Press Enter until you're back in the editing screen. The field is now blue. Exi

17、t the editing screen (F3) and save your work.按回車返回,直至你返回編輯界面,現(xiàn)在可以看到字段已經(jīng)變成藍(lán)色了,按F3退出編輯界面然后保存你的工作成果。Create a new record, MIDDLE, the same way you've created the previous records.創(chuàng)建一個新的記錄,MIDDLE,方法跟你之前的事一樣的Press F9 to visualize the records you already created:按F9可視化你剛剛創(chuàng)建的記錄Draw what you can see in t

18、he 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

19、 for input or input/output choosing one of the other options. You should write this on the menu and press Enter:現(xiàn)在我們將要在客戶表中選擇我們想要的字段,將他們顯示在界面上面,按下F10,現(xiàn)在第3項(xiàng)(select the Database File Clients for output),你也可以為其它的選項(xiàng),選擇字段作為輸出和輸入。Select the table 選擇表On the bottom of the screen there's a message with a

20、ll 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.在

21、下圖中,你可以看到一條信息顯示在最下面,顯示了客戶表的所有字段和字面名字前面附帶著號碼,要將這些字段顯示在界面的,你需要將相關(guān)的字段的號碼寫在屏幕界面上,前邊帶上一個&的符號,如下圖,The final result: 最后結(jié)果Exit the record editing. We now need to make a few adjustments to the file options.推出記錄編輯,我們需要對文件選項(xiàng)進(jìn)行一些修改Record level options (overlay) 記錄層面選項(xiàng)(覆蓋)Choose option 8 to the TOP record: 在

22、Top記錄選擇選項(xiàng)8Change overlay option 修改覆蓋選項(xiàng)Select option Overlay Keywords: 選擇覆蓋關(guān)鍵字Change overlay option step 2 修改覆蓋選項(xiàng)第二步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

23、listing. Activate this option on the other records.在選項(xiàng)(Overlay without erasing)的地方輸入Y,這個選項(xiàng)允許你在屏幕界面中同時(shí)顯示其他的記錄。一路回車直至你看到記錄列表,在其他界面中激活這個選項(xiàng)Change overlay option step 3修改覆蓋屬性步驟3File level options (indicators) 文件層面的選項(xiàng)(指示器)We need to declare the indicator 03 (so that “F3=Exit” works) at the file level. On

24、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.要實(shí)現(xiàn)“F3=Exit”的功能,我們需要需要在文件的層面聲明指示器03,在字段列表的菜單中我們輸入F14 (F13=shift+F1; F14=shift+F2; F15=shift+F3, etc.).然后,我們選擇指示器選項(xiàng)關(guān)鍵字,如下圖Insert the data you see o

25、n 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:

26、你可以查看上面步驟產(chǎn)生的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:這是文件層面的選項(xiàng),你遲些可以在這里增加一行,它允許你重命名這個已經(jīng)

27、用了的指示器,在DSPSIZ后面添加一行,如下A INDARAYou should also have some lines like these: 你也可以添加幾行像下面的:A R TOPA OVERLAYA 1 65USERA 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.上面四行是關(guān)于

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論