ÕâÒ³±£´æÊÇÓà WebZIP 7.0.0.1025 ÔÚ 07/16/13 12:16:52.
µØÖ·: http://man.chinaunix.net/unix/IBM/as400/chpt05.htm
±êÌâ: ·µ»Ø×ÜĿ¼  •  ´óС: 2807863
<< Back to man.ChinaUnix.net   CUÍøÓÑÔ­´´£¬×ªÔØÇë×¢Ã÷³ö´¦ChinaUnix.net¼°×÷Õß

·µ»Ø×ÜĿ¼

 

5.       ³ÌÐò¿ª·¢²¿·Ö-- 6

5.1.            Java. 6

5.2.            RPGLE. 6

5.3.            RPG.. 6

5.3.1.      ÔÚд³ÌÐò֮ǰ-- 6

5.3.2.      ÏÔʾ³ÌÐòDDS- 6

5.3.3.      Ö´ÐгÌÐòRPG- 6

5.3.4.      ±àÒë¼°µ÷ÊÔ ÆäËü-- 6

5.3.5.      Êý¾Ý¿âµÄ²Ù×÷¼°¶ÀÕ¼´¦Àí-- 6

5.3.6.      ¶à¸öÏà¹ØÊý¾Ý¿â²Ù×÷µÄ»Ø¹öROLBK¼°COMIT²Ù×÷-- 6

5.3.7.      SDA+ RPG IV ½øÐÐ×ÓÎļþϵͳÉè¼Æ-- 6

5.3.8.      ʹÓÃSDA + RPG IV ½øÐн»»¥Ê½³ÌÐòÉè¼Æ-- 25

5.4.            CL. 25

5.5.            DELPHI 26

5.5.1.      ¼òµ¥µÄÀûÓÃODBC- 26

5.6.            VB. 26

5.7  MS.NET. 26

5.8             API 26

5.9             ÒµÎñÏà¹ØµÄÊý¾Ý¿âÉè¼Æ¡¢ÏµÍ³·ÖÎö... 26

5.10           UDB/400 Êý¾Ý¿âJDBC ³ÌÐòÉè¼Æ... 26

5.10.1 UDB/400 Êý¾Ý¿âJDBC ·ÃÎÊ·½·¨-- 26

5£®10£®2  ʹÓÃJDBC Á¬½Ó³Ø-- 26

5.³ÌÐò¿ª·¢²¿·Ö

5.1.Java

5.2.RPGLE

5.3.RPG

 

5.3.1.ÔÚд³ÌÐò֮ǰ

       ¹ØÓÚ³ÌÐò¿ª·¢£¬ÏëÇ¿µ÷µÄÊÇ£ºÒµÎñÁ÷³ÌÏÈÓÚ³ÌÐò¡ª¡ª³ÌÐòÊǸø¼ÆËã»ú¿´µÃ£¬Á÷³ÌÊÇÈËÖ´Ðеģ»³ÌÐòÊÇËÀµÄ£¬¶øÁ÷³ÌÔòÊÇÒ»¸öÏà¶ÔÄ£ºýµÄ¶«Î÷¡£ËùÒÔÔÚд³ÌÐòÇ°£¬ÒªÏÈŪÇå³þ×Ô¼ºµ½µ×Òª×öʲô£¬È»ºó½«×Ô¼ºµÄ˼Ïë±í´ï¸ø¼ÆËã»ú¡ª¡ªÕâ¸ö¹ý³Ì¾ÍÊÇCODING¡£

 

      RPGµÄ³¤´¦ÔÚÓÚÊý¾Ý¿â´¦Àí£¬½çÃæ½»»¥ÄÜÁ¦µ¹ÊÇÆä´Î¡£ËùÒÔ×ʼÐèÒªÁ˽âһЩ¹ØÓÚÊý¾Ý¿âÎļþµÄÏà¹Ø֪ʶ(ÕâÀï¾Íֻǿµ÷¸ú400ÓйصÄ)¡£ÔÚÏÂÃæµÄ²Ù×÷ÖУ¬¼ÙÉèÅóÓÑÒѾ­»áÓÃSTRPDM£¬»áÎļþµÄCOPY,Ð޸ġ£

       Êý¾ÝÎļþPF£ºCOPYÒ»¸öÒѾ­ÓеıȽϿìµã¡£È»ºóÐÞ¸ÄÒ»ÏÂÀïÃæµÄÊý¾Ý£¬¾ÍÊÇ×Ô¼ºµÄ¡£

A*¼ÙÉèÎļþÃû×Ö½ÐBAE

A          R BAER                                          ߼ǼÃû×Ö

A            AREA           3          COLHDG('AREA CODE') ßfield

A            AREANM        22          COLHDG('AREA DESC ')ßfield

 *                                                        

A          K AREA                                          ßKey,¿ÉÑ¡

       ¹ØÓÚÓò¶¨ÒåµÄ²Î¿¼£¬ÇëÔÚ³ÌÐòÀïÃæÊäÈ룬ȻºóÔÚ¸ÃÐа´F4£¬ÔÙÔÚÒª¿´µÃ²ÎÊýÉÏ°´F1,¾Í¿ÉÒԵõ½ÏêϸÐÅÏ¢¡£

       Êý¾ÝÎļþLF£ºÂß¼­ÎļþµÄ×÷ÓÃÊÇ°´Ìض¨µÄ¹Ø¼ü×Ö˳ÐòÀ´¼ìË÷Êý¾Ý¿âÀïÃæµÄ¼Ç¼¡£LFÖеÄÓò¶¨Òå¿ÉÒÔÊÇÈÎÒâ˳Ðò£¬²»±Ø¸úPFÖÐ˳ÐòµÄÒ»Ö¡£¸ü½øÒ»²½£¬LF¿ÉÒÔÏȹýÂËÒ»²¿·ÖµÄ¼Ç¼£¬¼õÉÙËÑË÷µÄ·¶Î§¡£ÏÂÃæÏÈ¿´LFÈçºÎ¶¨Ò壬¾ßÌåʹÓóÌÐòÖÐÔÙ˵£º

A          R BAER                     

A                                      PFILE(BAE) ß±íʾÕâ¸öLFÒýÓõÄÊÇBAEÎļþ

A          K AREA                                 ßËÑË÷¹Ø¼ü×ÖÊÇAREA CODE

Õâ¸öÊǼòµ¥µÄ£¬ÔÙ¿´Ò»¸öÉÔ΢¸´ÔÓµãµÄ£º

A          R BAER                     

A                                      PFILE(BAE)

A          K AREANM                              

A          S AREA                      COMP(EQ '001')

ÉÏÃæµÄƬ¶ÏÀïÃ棬¹Ø¼ü×ÖS±íʾ¡°Ñ¡Ôñ¡±£¬COMP±íʾ±È½Ï£¬EQ±íʾµÈÓÚ¡£Õû¾äÁ¬ÆðÀ´¾ÍÊÇ£ºÖ»Ñ¡ÔñAREAµÈÓÚ001µÄÄÇЩ¼Ç¼¡£

       PS£ºÈç¹ûÒ»¸öPFÿ¸ö¿âÀïÃ涼ÓУ¬ÈçºÎÈ·±£±»ÒýÓõľÍÊÇ×Ô¼ºÏ£ÍûµÄÄǸö£¿½«Ä¿±êÎļþ·ÅÔÚλÓÚ¿âÁбíµÄ×îÉÏÃæµÄ¿âÀïÃæ¡£

5.3.2.ÏÔʾ³ÌÐòDDS

       DDSµÄ´´½¨£¬ÓÐЩÅóÓÑÓÃSDU(ÆÁÄ»Éè¼Æ¹¤¾ß)±È½Ï¿ì¡£µ«ÊÇÈç¹ûÊÇÓÐÀàËƵĽçÃ棬ÔòCOPYһϱȽϷ½±ã¡£ÒÔÏÂƬ¶ÏÊǼ¸ºõÿ¸öDDS¶¼ÒªµÄ£¬³ýÁËREFÄǾä¿ÉÑ¡ÒÔÍâ¡£

A* ¼ÙÉèÏÔʾÎļþÃû×Ö½ÐEX001D

A                                      DSPSIZ(24 80 *DS3)ßÉ趨ÏÔʾÆÁ´óС

A                                      REF(*LIBL/BAE01L)߲ο¼Îļþ£¬subfileÖÐʹÓÃ

A                                      CHGINPDFT       

A                                      PRINT           

ÔÙÀ´¿´¿´½ÓÏÂÀ´Òª¶¨Òåʲô¶«Î÷£º

A          R C0                                         ßÏÔʾ»­ÃæµÄÃû×Ö

A                                      CA11(11 ' Í˳ö ')

A                                      CF08(08 ' ²âÊÔ ')

ÏÖÔÚÎÒÃÇÖªµÀÎÒÃÇÓÐÒ»¸öÏÔʾ»­Ãæ½ÐC0(ÒòΪһ¸ö³ÌÐò¿ÉÄܲ»Ö¹Ò»¸ö»­Ã棬ÕâÑùÐèÒª¶¨Ò岻ͬµÄ»­ÃæÀ´´¦Àí²»Í¬µÄÊÂÎñ)£»¶øÇÒÕâ¸ö»­Ã滹ÓÐ3¸öÃüÁî¼ü¿ÉÒÔÏìÓ¦£ºF11,F8,ENTER(ENTERÊÇϵͳĬÈϵĴ¦Àí¼ü)

ÔÙ¸øÕâ¸ö»­ÃæÌíÉϼ¸¸öÓò£º

001 A                                  5 19' Ñ¡Ïî ..........:' ß³£Á¿£¬ËµÃ÷ÓÃ

002 A            VSELEC    R        B  5 38REFFLD(DICT/SELEC DICT00F)

003 A                                      DSPATR(HI CS MDT)         

004 A                                      VALUES('1' '2' '3')     

005 A*                                                              

006 A            VNAME          6A  I  7 20

007 A*                                                             

008 A  81                              9 20' ²éѯÈÕÆÚ :'             

009 A            VDDATE    R        B    +1REFFLD(DICT/O8DAT DICT00F)

010 A                                      DSPATR(HI UL)             

ÈçÉÏ£¬

a.001ºÍ008Ðж¨ÒåÁË2¸öÏÔʾ³£Á¿£¬ÔÚÆÁÄ»ÉÏÆðÌáʾºÍ˵Ã÷×÷Óã»

b.002Ðж¨ÒåÁËÒ»¸öÑ¡ÔñÓòVSELEC£¬R±íʾÊDzο¼Êý¾Ý¿âÀïÃæÒѾ­ÓеÄÓò¸ñʽ£¬B´ú±íÊäÈëÊä³öË«Ïò(Ë«ÏòµÄÒâ˼¾ÍÊÇÓòÀïÃæµÄÐÅÏ¢±»³ÌÐòÐÞ¸ÄÁËÒԺ󻹿ÉÒÔ·´À¡¸ø»­Ãæ)£¬ 5 38±íʾÔÚµÚ5ÐеÚ38ÁУ¬REFFLD(DICT/SELEC DICT00F)±íʾ²Î¿¼ÏµÍ³DICT00FÎļþÀïÃæµÄSELECÓòµÄ¸ñʽ¡£003ÐкÍ004ÐбíʾVSELECµÄÊôÐÔ£¬003ÐÐÊÇÏÔʾ¿ØÖÆ£ºHI¸ßÁÁ¡¢CS×Ö·û·Ö¸î·½Ê½¡¢MDT±ØÐëÊäÈë¡£004ÐбíʾÕâ¸öÓò¿ÉÄÜ/Ö»ÄÜÊäÈëµÄÖµ¡£

c.006Ðбíʾһ¸ö×Ô¼º¶¨ÒåµÄÓò£¬Ãû×Ö½ÐVNAME, 6¸ö×Ö·û³¤£¬I±íʾֻ×öÊäÈëÓÃ

d.009Ðбíʾ¶¨ÒåÁËÒ»¸öVDDATEÓò£¬ÓÃÀ´ÏÔʾÈÕÆÚ¡£010ÐбíʾÏÔʾ¿ØÖÆ£ºHI¸ßÁÁ¡¢ULÏ»®Ïß¡£

e.008ÐеÄ81ÊÇÒ»¸öָʾ·û£¬Òâ˼Êǵ±81ºÅָʾ·ûÊÇ1µÄʱºò£¬¡°²éѯÈÕÆÚ¡±²ÅÏÔʾ¡£

    ÕâÑù£¬ÏÔʾÎļþ¾ÍË㶨ÒåÍê±Ï¡£

5.3.3.Ö´ÐгÌÐòRPG

    Ò»¸ö³ÌÐò»®·ÖµÄ´ÖÒ»µã£¬Ò²¾ÍÊÇ2¸ö²¿·Ö£ºÒ»ÊÇÊý¾Ý¶¨Ò壬һÊÇÖ´ÐдúÂë¡£Êý¾Ý¶¨Òå°üÀ¨ÁËÎļþÒýÓÃ(Ï൱ÓÚCÓïÑÔÀïÃæµÄÍ·Îļþ)¡¢ÄÚ²¿DS¶¨Òå¡¢ÆÕͨ³£Á¿µÈµÈ£»Ö´ÐдúÂëÔò°üÀ¨Ö÷¹ý³ÌºÍ×Ó³ÌÐò£¬Ò²¾ÍÊdzÌÐòµÄÖ÷Ìå¼°Òªµ÷ÓõÄ×Óº¯Êý¡£(Ïêϸ¶¨Ò巽ʽÇë²Î¼ûRPG400 REFERENCE)¡£

    Õû¸ö³ÌÐòµÄÖ´Ðйý³ÌÈçÏ£º

       ¶¨Ò岿·Ö(°üÀ¨H/F/E/I/DµÈ)¨¤³ÌÐò³õʼ»¯(Èç¹ûÓÐINZº¯ÊýÔò×Ô¶¯Ö´ÐУ¬·ñÔò¾ÍÊÇÓû§×Ô¼º¶¨ÒåµÄ±äÁ¿³õʼ»¯³ÌÐò£¬Ò²¿ÉÒÔ2¸ö¶¼Ö´ÐÐ)¨¤MAINÑ­»·(°üÀ¨ÈË»ú½»»¥¡¢Êý¾Ý´¦Àí¡¢·´À¡)¨¤Í˳ö(Óû§°´Í˳öÃüÁî¼ü»òÕß³ÌÐò×Ô¶¯Í˳ö)¡£

    Èç¹ûÓôúÂëµÄ±íʾ·½Ê½À´½²£¬¾ÍÊÇÈçϵĽṹ£º

H            Y                            ßÍ·Îļþ¶¨Òå

F*----------------------------------------

FBAE01L  IF  E           K        DISK    ßÒýÈëLF£¬ËÑË÷ÓÃ

FBAE02L  IF  E           K        DISK                     

F            BAE                                 KRENAMEBAE2

F*Çë×¢ÒâÒÔÉϵÄ2¾ä£ºÔÚʹÓò»Í¬LF¼ìË÷ͬһ¸öPFµÄʱºò£¬ÓÉÓÚPF¼Ç¼Ãû×ÖÏàͬ¶øµ¼ÖÂÒ»¸ö³åÍ»£¬ÕâÀï¾Íͨ¹ý½«¼Ç¼Ãû×ÖÖØÐÂÃüÃûΪBAE2¶ø±ÜÃâÕâ¸öÎÊÌâ¡£

FEX001D  CF  E                    WORKSTN        ßÏÔʾ½çÃæ

I* ÏÂÃ涨ÒåÒ»¸öDS½á¹¹£¬Ê¾·¶ÓÃ

I@PARM       DS                                       ß½á¹¹Ãû×Ö½Ð@PARM

I                                        1   6 #FCDDI ߽ṹÌåÄÚ²¿µÄÓò

I                                        7  12 #TCDDI ßÆðÖ¹·¶Î§¿ÉÒÔ²»Á¬Ðø

C* ÏÂÃæ½øÈë´úÂë¶Î£¬°üÀ¨³õʼ»¯£¬×Ó³ÌÐò

C           *INZSR    BEGSR                     ß±¾Æ¬¶Ï¿ÉÒÔ·ÅÔÚ³ÌÐòµÄÈκεط½

C                     MOVE *OFF      INDEX  40  ßµ«ÎÞÂÛ·ÅÄÄÀﶼÊÇ×îÏÈÖ´ÐÐ

C                     MOVE *ZERO     RESULT  40

C                     ENDSR 

C*Çë×¢ÒâÒÔÉϵÄ2¾ä£¬×îºó2¸ö40µÄλÖÃ´í¿ªÁËһ룬µ«ÊÇÒâÒåÍêÈ«²»Ò»Ñù¡£µÚÒ»¸ö±íʾÊÇINDEX±äÁ¿µÄ³¤¶ÈÊÇ40£¬ÀàÐÍÊÇ×Ö·ûÐÍ(ĬÈϵģ¬¿ÉÒÔÊ¡ÂÔ)£»µÚ¶þÐеÄ40±íʾRESULT³¤¶ÈÊÇ4£¬Ð¡ÊýµãλÖÃÔÚ0λ¡ª¡ªÕâÊǸöÊý×ÖÐ͵ıäÁ¿¡£ÔÚÓÃF4²é¿´µÄʱºò£¬»áºÜÇå³þµØ¿´µ½Çø±ð¡£ËùÒÔMOVEµ½±äÁ¿µÄÊý¾ÝÒ²²»Ò»Ñù(*OFFÊÇ×Ö·û¡¯0¡¯£¬*ZEROÊÇÊý×Ö0)

C* Ö÷Ì岿·Ö£¬°üÀ¨½ÓÊÜÃüÁîºÍ´¦Àí

010 C           *INLR     DOWEQ*OFF            ß³ÌÐòÔڴ˲»¶ÏÑ­»·£¬ÖªµÀLR±»ÖÃON

011 C                     EXSR MAIN            

012 C                     ENDDO               

C* ÍùϾÍÊÇ×Ó³ÌÐò¶¨ÒåÁË£¬°üÀ¨°´Å¥´¦ÀíÔÚÀïÃæ

C           MAIN      BEGSR     

C                     EXFMTC0    ßÕâ¾äÊÇÈÃC0»­Ãæ»ñµÃ½¹µã³ÉΪ»î¶¯»­Ã棬³ÌÐò¾ÍÍ£ÔÚÕâ¸öµØ·½£¬Ö±µ½ÊäÈëÍêÊý¾Ý°´ÁËF11/F8/ENTERÖеÄÒ»¸ö¡£µ±MAINÖ´ÐÐÍê±Ï£¬³ÌÐò»á´ÓÉÏÃæµÄ012ÐÐÌøתµ½010ÐУ¬¼ÌÐøÖ´ÐУ¬Ö±µ½LR±êÖ¾±»ÖÃON²ÅÍ˳öÕû¸ö³ÌÐò¡£µ±ÔÙ½øÀ´µÄʱºò£¬³ÌÐò»áÔÙ´ÎÍ£ÔÚÕâ¸öµØ·½£¬µÈ´ýÓû§ÃüÁî¡£

C* F11 = QUIT

C           *IN11     IFEQ *ON                            

C                     SETON                     LR       

C                     ELSE                                

C* F8  = TEST                                   

C           *IN08     IFEQ *ON                  

C           VSELEC    IFEQ '1'                 

C                     MOVE 'AAAA'    VNAME     

C                     ENDIF                    

C           VSELEC    IFEQ '2'                 

C                     MOVEL'BB'      VNAME      ßÇë×¢ÒâMOVEºÍMOVELµÄÇø±ð

C                     ENDIF                    

C                     ELSE                      

C* Èç¹ûÓа´¼ü£¬¼È²»ÊÇF11£¬Ò²²»ÊÇF8,ÄÇô¾ÍÖ»ÓÐENTER

C                     MOVE 20040623  VDDATE     ßÕâ¸öÓòÊÇÊý×ÖÐ͵ģ¬ÍâÃæ²»¼ÓÒýºÅ

C                     EXSR SEARCH               ßÖ´ÐÐÒ»¸öËÑË÷×Ó³ÌÐò

C                     ENDIF

C                     ENDIF

C                     ENDSR

C*

C           SEARCH    BEGSR                    

C           *LOVAL    SETLLBAE         ßÏȽ«ÓαêÍ£µ½×îµÍµã,È»ºó±éÀúÕû¸öÊý¾Ý¿â

C                     READ BAE                      92

C           *IN92     DOWEQ*OFF                      

C                     MOVELAREANM    LIST            

C                     READ BAE                      92

C                     ENDDO                          

C* ÉÏÃæµÄƬ¶ÏÖÐREADÊý¾Ý¿â£¬Èç¹ûÓмǼ£¬ÄÇô½á¹ûָʾ·û92ΪOFF״̬¡£Èç¹ûûÓжÁµ½¼Ç¼(µ½ÎļþĩβÁË£¿)¾Í»áÖÃΪON¡£Í¨¹ý¼ì²âÕâ¸öָʾ·û״̬¿ÉÒÔÍê³É±éÀú¡£

C* ÏÂÃæÔÙÀ´ÊÔÑéÒ»ÏÂKEYÊÇÈçºÎ¹¤×÷µÄ¡£

C           KBAE      KLIST                   ߶¨ÒåÒ»¸öËÑË÷¼ü

C                     KFLD           KNAME    

C*                                           

C                     MOVE ¡®AAA¡¯   KNAME            ßÒª²éÕÒµÄÄ¿±ê

C           *LOVAL    SETLLBAE                        ß»¹Ô­ÓαêλÖÃ

C           KBAE      CHAINBAE                  93    ßÕÒµ½Ãû×ÖΪAAA£¬93¾ÍÖÃOFF

C           *IN93     DOWEQ*OFF                      

C                     MOVE AREANM    TMPSTR          

C           KCUSHD    READECUSHD                    93ßÈç¹ûÊý¾Ý¿âÓÐÖظ´¼Ç¼

¾Í¶à´Î²éÕÒ

C                     ENDDO                          

C                     ENDSR

    ¹ØÓÚKLISTµÄʹÓãºKLISTÖÐFLDµÄ¶¨Òå±ØÐë¸úÒª¼ìË÷µÄÄ¿±êLFÖеÄÓòÒ»Ò»¶ÔÓ¦£¬µ«¿ÉÒÔÖ»Óв¿·Ö¡£±ÈÈçLFÖж¨Òå5¸öKEYÓò£¬·Ö±ðÊÇ1 2 3 4 5£¬ÄÇôKLISTÖеĶ¨Òå¿ÉÒÔÓÐ1£¬1 2£¬1 2 3£¬µ«²»ÄÜÊÇ2 3¡£¸÷¸ö¶ÔÓ¦µÄÓòµÄÀàÐÍ¡¢´óС¶¼±ØÐëÒ»Ñù¡£

 

5.3.4.±àÒë¼°µ÷ÊÔ ÆäËü

    ±àÒë¹ý³Ì¿ÉÒÔÅųý´ó²¿·ÖµÄÃ÷ÏÔ´íÎó£º×Ö·ûÆ´´í¡¢Î´¶¨ÒåµÄ±äÁ¿¡¢Öظ´¶¨Òå¡£±àÒëÍê»á²úÉúÒ»¸öSPLF£¬ÀïÃæ°üº¬´íÎóÁÐ±í¡£±àÒë¹ý³Ì²»ÅųýÂß¼­´íÎó¡£

    È¥µôÂß¼­´íÎó¾ÍÊǵ÷ÊÔµÄÈÎÎñ¡£±ÈÈçA BÁ½¸ö±äÁ¿£¬A 12CHAR, B 8CHAR¡£Ï£ÍûÈ¥µôAµÄ¸ß4룬ÄÇôMOVE A   B, ÔÙMOVE B  A¾Í¿ÉÒÔ¡£µ«ÊÇÕâÖмäÈç¹û²»CLEAR A£¬ÄÇôAµÄÄÚÈÝ»¹ÊÇûÓб仯µÄ¡£³ÌÐò´óÁËÒÔºóÂß¼­±È½Ï¸´ÔÓ£¬µ÷ÊÔÓÐʱºÜÀ§ÄÑ£¬Õâ¸öʱºò¾ÍÊÇÐèÒªÐÄϸ¼ÓÄÍÐÄ¡£

 

    RPGÊDzÉÓÃÒ»Öֽṹ»¯µÄÓïÑÔ£¬Õû¸öµÄ½á¹¹¿ÉÒÔ²ÉÓÃÄ£¿é»¯µÄ±à³Ì·½·¨¡£ÁíÍâҪעÒâµÄÊDZäÁ¿µÄ¶¨ÒåÊǼ´¶¨Òå¼´Ó㬶øÇÒ¶¼ÊÇÈ«¾ÖµÄ¡£Õâ¸ö½«±äÁ¿¾Ö²¿»¯µÄ¹¤×÷¾ÍÁô¸ø³ÌÐòÔ±À´Íê³É¡ª¡ªÔÚÆäËüµØ·½²»ÓþÍÊÇ¿©~~~

 

5.3.5.Êý¾Ý¿âµÄ²Ù×÷¼°¶ÀÕ¼´¦Àí

ÔÚRPGÖÐÈç¹ûÒª¶ÔÊý¾Ý¿â½øÐжÁÈ¡£¬¸üУ¬É¾³ý£¬×·¼Ó¼Ç¼µÄ²Ù×÷£¬±ØÐëÒÔÏà¶ÔÓ¦µÄ·½Ê½ËµÃ÷¶ÔÕâ¸öÎļþµÄÒýÓ᣹ØÓÚ¶ÔÊý¾Ý¿â¸÷ÖÖ²Ù×÷µÄ×éºÏ¼°ÏàÓ¦µÄÎļþÒýÓÃÉùÃ÷£¬×ܽáÈçÏ£º

Ö»´ÓÎļþ¶ÁÈ¡¼Í¼

FFILENAME    IF  E           K        DISK

Ö»ÏòÎļþÀïÃæд¼Í¼¶ø²»¶ÁÈ¡

FFILENAME    O  E                    DISK

¶ÁÈ¡¼Í¼²¢¸ü¸ÄºÍ/»òɾ³ý£¬²»×·¼Ó¼Í¼

FFILENAME   UF  E           K        DISK

¶ÁÈ¡¼Í¼²¢¸ü¸ÄºÍ/»òɾ³ý£¬ÇÒ×·¼Ó¼Í¼

FFILENAME   UF  E           K        DISK                      A

¶ÁÈ¡¼Í¼ºÍ×·¼Ó¼Í¼£¬²»¸üкÍɾ³ý

FFILENAME   IF  E           K        DISK                      A

ÐèҪעÒâµÄÊǶÔÎļþµÄ²Ù×÷±ØÐëºÍÉùÃ÷Ïà¶ÔÓ¦£¬¼´ÓÐ×·¼Óµ÷ÓÃÉùÃ÷±ØÐëÓÐWRITE, Óиüлòɾ³ýÉùÃ÷±ØÐëÓÐUPDATºÍDELET²Ù×÷¡£

ÔÚ¶ÔÎļþ½øÐвÙ×÷µÄʱºò£¬Í¨³£»áÓõ½Ö¸Ê¾Æ÷À´Åж϶ÔÊý¾Ý¿âµÄ²Ù×÷ÊÇ·ñ³É¹¦µÄÇé¿ö£¬¹ØÓÚָʾÆ÷µÄλÖü°ÆäËù´ú±íµÄÒâÒ壬ͼʾÈçÏ£º

error.jpg
    ¶ÔÎļþ½øÐиüлòÕßɾ³ý²Ù×÷µÄʱºò£¬ÐèҪעÒâµÄÒ»µãÊǸüкÍɾ³ýÊôÓÚ¶ÀÕ¼²Ù×÷£¬Í¬Ò»Ê±¼äÖ»ÄÜΪһ¸öSESSIONËù¶ÀÕ¼£¬Òò¶øÈç¹ûÓÐÒ»¸öSESSIONËø¶¨Ò»Ìõ¼Í¼£¬Ö®ºóÔÙÓÐÆäËûSESSIONÏëÒÔ¶ÀÕ¼µÄ·½Ê½¶ÁÈ¡Õâ¸ö¼Í¼µÄʱºò£¬¾Í»á·¢ÉúÏÔʾ½çÃæÍ£ÖÍ60ÃëµÄÇé¿ö£¬ËùÒÔÕâÖÖÏÖÏó±ØÐë±ÜÃâ¡£

    ÕâÖÖÏÖÏóµÄ±ÜÃâÏà¶ÔÀ´ËµÔÚ´øÓÐÏÔʾ½çÃæµÄ³ÌÐòÖиüΪÖØÒª¡£ÒòΪÖмäÓÐÍ£¶ÙµÄ¹ý³Ì£¬ËùÒÔÈç¹ûÔÚÍ£¶ÙÇ°ËøסijһÌõ¼Í¼£¬Õû¸öÍ£¶ÙÆÚ¼äÆäËûÈ˶¼²»ÄÜÊÔͼÒÔ¶ÀÕ¼µÄ·½Ê½À´¶ÁÈ¡¼Í¼¡£¿¼Âǵ½ÕâÖÖÇé¿ö£¬¶ÀÕ¼µÄʱ¼ä±ØÐëÒª¾¡¿ÉÄ̡ܶ£¶ÔÎļþÉùÃ÷UFµÄʱºò£¬Ò»°ãÇé¿öÏÂÔÚ¶ÔÎļþ¼Í¼½øÐжÁÈ¡²Ù×÷µÄʱºò£¬ÔÚÏÂÃæµÄָʾÆ÷Ç°µÄHµÄλÖüÓÉÏN£¬ÕâÑùÎļþ¾Í²»ÊÇÒÔ¶ÀÕ¼µÄ·½Ê½½øÐжÁÈ¡¡£

CL0N01N02N03FACTOR1+++OPCDEFACTOR2+++RESULTLENDHHILOEQCOMMENTS++++

C           SDKY0A      CHAINDBREC                  N9899              

ÔÚÈ·ÈÏÐèÒª¸üеÄʱºò£¬¿ÉÒÔÔÚÁÙ¸üÐÂÇ°Ëøס¼Í¼£¬ÔÚ¶ÔÐèÒª¸Ä±äµÄ×ֶθ³ÖµÒÔºó£¬Á¢¼´½øÐиüвÙ×÷¡£¾¡¿ÉÄܼõÉÙÆä¼äµÄ´úÂëÒÔ¼õÉÙ¶ÀÕ¼µÄʱ¼äÀ´·ÀÖ¹³öÏÖÍ£Ö͵ÄÏÖÏó¡£

 

5.3.6.¶à¸öÏà¹ØÊý¾Ý¿â²Ù×÷µÄ»Ø¹öROLBK¼°COMIT²Ù×÷

    COMITºÍROLBKÖ÷ҪĿµÄÊÇΪÁËÊý¾ÝµÄͳһÐÔ, Ò»°ãÓÃÔÚҪͬʱ¶Ô¼¸¸öÊý¾Ý¿â½øÐÐÔö,ɾ,¸Ä, È·±£¼¸¸öÊý¾Ý¿â¶¼ÄÜÕýȷдÈë,ɾ³ý,¸üÐÂÊý¾Ý£¬ ÔÚ³ÌÐò(CL»òRPG¶¼¿ÉÒÔ, ÆäËûÓïÑÔ²»Çå³þ)ÖÐ, Ö»ÓÐÖ´ÐÐÁËCOMITÃüÁîºó,Êý¾Ý²Ù×÷²ÅÕæÕý±»Ö´ÐС£ Ö»ÒªÈκÎÒ»¸öÊý¾Ý¿âµÄ²Ù×÷³ö´í, ¿ÉÒÔÓÃROLBKÃüÁ֮ǰµÄÊý¾Ý»Øµµ¡£ÕâÑùµÄ³ÌÐò, Èç¹ûÒòΪijÖÖÔ­Òò(Èç±»ÆäËûÓû§Ç¿ÐÐÖÕÖ¹, ¶Ìµç...)¶øÖÕÖ¹,ϵͳ»á×Ô¶¯ROLLBACK¡£

    ¶ÔÐèÒª½øÐÐCOMITµÄÎļþµÄÉùÃ÷£º

    FFILENAMEIPEAF........L..I........DEVICE+......KEXIT++ENTRY+A....U

FFILENAMEUF   E      K   DISK       KCOMIT             

  Êý¾Ý¿â¼Í¼µÄдÈë»òÕ߸üеȶ¼²»±ä£¬Óб䶯µÄ¾ÍÊǸù¾Ýʵ¼ÊµÄÌõ¼þ½øÐÐÈ·ÈÏ»òÕ߻عö¡£

CL0N01N02N03FACTOR1+++OPCDEFACTOR2+++RESULTLENDHHILOEQCOMMENTS++++

C                         ROLBK                                       

CL0N01N02N03FACTOR1+++OPCDEFACTOR2+++RESULTLENDHHILOEQCOMMENTS++++

C                         COMIT                                      

´øÓÐCOMITµÄRPG³ÌÐòÒ»°ãͨ¹ýCL³ÌÐò½øÐе÷Óã¬ÔÚµ÷ÓÃÕâ¸ö³ÌÐòµÄʱºòÓÐһЩÕë¶ÔCOMITµÄ²Ù×÷£¬°üÀ¨£º

1¡¢´´½¨ÈÕÖ¾ºÍÈÕÖ¾ÊÕ¼¯Æ÷ CRTJRN ºÍCRTJRNRCV

2¡¢°ÑPF¼ÓÈëÈÕÖ¾ STRJRNPF

3¡¢ÓÃCL Ö´ÐÐSTRCMTCTLºÍ ENDCMTCTLÉÏÃæ¾ßÌåÓ÷¨È¥²éCL REFERENCE

ÕâÑùÈκζԸÃÎļþµÄÐ޸Ķ¼»á¼ÇÈÕÖ¾,µ±Åöµ½COMIT ÃüÁîʱȷÈÏÐÞ¸Ä,Åöµ½ROLBK·ÅÆú¸üÐÂ.¹ØÓÚºóÁ½²½µÄ²¿·Ö´úÂëÈçÏ£º

STRJRNPF FILE(FILENAME1) JRN(JOURNAL)           

  STRJRNPF FILE(FILENAME2) JRN(JOURNAL)           

  STRCMTCTL  LCKLVL(*CHG)                      

  CALL     PGM(PGMNAME) PARM(&PARM1 &PARM2)   

 ENDCMTCTL                                    

 ENDJRNPF FILE(FILENAME1) JRN(JOURNAL)           

 ENDJRNPF FILE(FILENAME2) JRN(JOURNAL)           

 

5.3.7.SDA+ RPG IV ½øÐÐ×ÓÎļþϵͳÉè¼Æ

 

1¡¢PF¶¨Ò壺

 Columns . . . :    1  71           Browse                     QINGZHOU/QDDSSRC

 SEU==>                                                                  REFILE

 FMT A* .....A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 

        *************** Beginning of data *************************************

0001.00      A* DATA DICTIONARY REFERENCE FILE                                 

0002.00      A* CREATE BY TRF.LIU YUANY YAO 2004.12.18                         

0003.00      A*                                                                 

0004.00      A          R REFMT                                                

0005.00      A            CODE           5A                                    

0006.00      A            NAME          12O                                    

0007.00      A            DESCRPT       30O                                    

0008.00      A            QUATITY        7  0                                  

0009.00      A            PRICE         11  2                                  

0010.00      A            AMOUNT        15  2                                  

        ****************** End of data ****************************************

                                                                               

                                                                                

                                                                                 

 F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel     

 F16=Repeat find        F24=More keys                                           

                                         (C) COPYRIGHT IBM CORP. 1981, 2000.   

 

 Columns . . . :    1  71           Browse                     QINGZHOU/QDDSSRC

 SEU==>                                                                 INVOICE

 FMT A* .....A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 

        *************** Beginning of data *************************************

0001.00      A* INVOICE DDS SOURCE CODE                                         

0002.00      A* CREATE BY TRF.LIU YUAN YAO 2004.12.18                          

0003.00      A*                                                                

0004.00      A                                      REF(*LIBL/REFILE)           

0005.00      A          R IV_FMT                                               

0006.00      A            IV_CODE   R               REFFLD(CODE)               

0007.00      A                                      COLHDG(' ·¢Æ± ')           

0008.00      A            IV_NAME   R               REFFLD(NAME)               

0009.00      A                                      COLHDG(' Ãû³Æ ')           

0010.00      A            IV_QUTITY R               REFFLD(QUATITY)             

0011.00      A                                      EDTCDE(O)                  

0012.00      A                                      COLHDG(' ×ÜÊý ')           

0013.00      A            IV_AMOUNT R               REFFLD(AMOUNT)             

0014.00      A                                      COLHDG(' ×ܽð¶î ')         

0015.00      A                                      EDTCDE(O)                  

0016.00      A            IV_DESC   R               REFFLD(DESCRPT)            

0017.00      A                                      COLHDG(' ±¸×¢ ')           

0018.00      A*                                                                

0019.00      A          K IV_CODE                                              

        ****************** End of data ****************************************

                                                                               

    

                                                                               

 F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel     

 F16=Repeat find        F24=More keys                                          

                                                                                 

 

2¡¢SDAÉè¼Æsubfile:

 

A¡¢Ê¹ÓÃSDAÉè¼Æ×ÓÎļþ£º

                                Design Screens                                 

                                                                               

 Type choices, press Enter.                                                     

                                                                               

   Source file . . . . . . . .   QDDSSRC      Name, F4 for list                

                                                                                

     Library . . . . . . . . .   QINGZHOU     Name, *LIBL, *CURLIB             

                                                                               

   Member  . . . . . . . . . .   subfile1     Name, F4 for list                

                                                                                

                                                                               

                                                                               

                                                                                

 F3=Exit     F4=Prompt     F12=Cancel                                          

                                                                               

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

 1             SFL01                                                           

                                                                               

   (No records in file)                                                        

                                                                                

 

                                                                               

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

                                                                               

 

                               Add New Record                                  

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type choices, press Enter.                                                    

                                                                                

   New record  . . . . . . . . . . . . . . .   SFL01        Name               

                                                                               

   Type  . . . . . . . . . . . . . . . . . .   SFL          RECORD, USRDFN     

                                                            SFL,    SFLMSG     

                                                            WINDOW, WDWSFL     

                                                            PULDWN, PDNSFL      

                                                            MNUBAR             

                                                                               

                                                                                

                                                                                

 F3=Exit     F5=Refresh     F12=Cancel                                         

                                                                               

 

                               Add New Record                                  

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type choices, press Enter.                                                    

                                                                                

   New record  . . . . . . . . . . . . . . .   SFL01        Name               

                                                                               

   Type  . . . . . . . . . . . . . . . . . .   SFL          RECORD, USRDFN     

                                                            SFL,    SFLMSG     

                                                            WINDOW, WDWSFL     

                                                            PULDWN, PDNSFL     

                                                            MNUBAR             

   Subfile control record  . . . . . . . . .   SFL01C       Name               

                                                                               

  

                                                                               

 F3=Exit     F5=Refresh     F12=Cancel                                         

                                                                               

 

B¡¢×ÓÎļþÖ÷ÌåÉè¼Æ£º

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

                                                                               

 12      10    SFL01         SFL                         12/25/04              

         20    SFL01C        SFLCTL    SFL01             12/25/04              

                                                                               

                                                                               

                                                                                

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                      

 Record SFL01 added to member SUBFILE1.                                       +

 

                             Select Database Files                             

                                                                                

 Type options and names, press Enter.                                          

   1=Display database field list                                               

   2=Select all fields for input (I)                                           

   3=Select all fields for output (O)                                          

   4=Select all fields for both (B) input and output                           

                                                                               

 Option    Database File   Library      Record                                 

   1        INVOICE        QINGZHOU                                            

                                                                               

                                                                                

                                                                                

                                                                               

                                                                                

 F3=Exit     F4=Prompt     F12=Cancel                                          

                                                                               

 

                            Select Database Records                             

                                                                               

 Database file  . . . . . :   INVOICE        Library . . . :   QINGZHOU        

                                                                                

 Type options, press Enter.                                                    

   1=Select                                                                    

                                                                               

 Option   Record                                                               

   1      IV_FMT                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                         Bottom

                                                                               

 F3=Exit   F12=Cancel                                                          

                                                                                

 

                            Select Database Fields                             

                                                                               

 Record . . . :   IV_FMT                                                        

                                                                               

 Type information, press Enter.                                                

   Number of fields to roll  . . . . . . . . . . . . . . . . . .     8         

   Name of field to search for . . . . . . . . . . . . . . . . .               

                                                                               

 Type options, press Enter.                                                    

   1=Display extended field description                                        

   2=Select for input (I), 3=Select for output (O), 4=Select for both (B)      

                                                                               

 Option  Field        Length   Type    Column Heading                          

   3     IV_CODE           5    A       ·¢Æ±                                   

   3     IV_NAME          12    O       Ãû³Æ                                   

   3     IV_QUTITY       7,0    P       ×ÜÊý                                   

   3     IV_AMOUNT      15,2    P       ×ܽð¶î                                 

   3     IV_DESC          30    O       ±¸×¢                                   

                                                                                

                                                                               

 

 

  

                                                                               

                                                                                

                                                                               

                                                                               

 1:IV_CODE 2:IV_NAME 3:IV_QUTITY 4:IV_AMOUNT 5:IV_DESC                          

 

                                                                               

                                                                                

                                                                                

                                                                               

              &1         &2             &3             &4                           

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

 1:IV_CODE 2:IV_NAME 3:IV_QUTITY 4:IV_AMOUNT 5:IV_DESC                         

 

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

                                                                               

                                                                               

                                                                                

 

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

 1:IV_DESC                                                                                                                                   

 

                                Work with Fields                               

                                                                               

 Record . . . :   SFL01                                                         

                                                                               

 Type information, press Enter.                                                

   Number of fields to roll . . . . . . . . . . . . . . . . . .     6          

                                                                               

 Type options, change values, press Enter.                                     

   1=Select keywords   4=Delete field                                           

                                                                               

 Option   Order   Field       Type Use  Length  Row/Col  Ref Condition  Overlap

             10   IV_CODE           O        5   07 015   Y                    

             20   IV_NAME       O   O       12   07 024   Y                    

             30   IV_QUTITY         O      7,0   07 041   Y                    

             40   IV_AMOUNT         O     15,2   07 056   Y                    

             50   OPTX              I        1   07 012                        

                                 

                                                                         Bottom

  Add                               H            Hidden                         

                                                                               

  Add                               P            Program-to-system             

                                                                               

 F3=Exit   F6=Sort by row/column   F12=Cancel                                  

                                                                               

 

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

                                                                                

                                                                               

                                                                               

    

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

 Subfile keywords...: SFLPAG:    12         SFLLIN:     0                      

 

 

                                                                                

                                                                               

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

                                                                               

                                                                               

                                                                                

 1:IV_DESC                                                                     

 

C¡¢¶¨Òå×ÓÎļþÒþ²Ø×ֶΣº

 

                                                               Work with Fields                               

                                                                               

 Record . . . :   SFL01                                                         

                                                                               

 Type information, press Enter.                                                

   Number of fields to roll . . . . . . . . . . . . . . . . . .     6          

                                                                               

 Type options, change values, press Enter.                                     

   1=Select keywords   4=Delete field                                           

                                                                               

 Option   Order   Field       Type Use  Length  Row/Col  Ref Condition  Overlap

             10   IV_CODE           O        5   07 015   Y                    

             20   IV_NAME       O   O       12   07 024   Y                    

             30   IV_QUTITY         O      7,0   07 041   Y                    

             40   IV_AMOUNT         O     15,2   07 056   Y                    

             50   OPTX              I        1   07 012                        

   1         60   IV_DESC           H       30                                 

                                                                         Bottom

  Add                               H            Hidden                        

                                                                               

  Add                               P            Program-to-system             

                                                                                

 F3=Exit   F6=Sort by row/column   F12=Cancel                                  

                                                                               

 

                             Select Field Keywords                              

                                                                               

 Field . . . . . :   IV_DESC              Usage . . :  H                       

 Length  . . . . :   30                                                         

                                                                               

 Type choices, press Enter.                                                    

                                     Y=Yes   For Field Type                    

                                                                                

                                                                               

   Keying options  . . . . . . . . .         Hidden, Input or Both             

                                                                                

                                                                               

   General keywords  . . . . . . . .         All types                         

                                                                                

   Database reference  . . . . . . .   Y     Hidden, Input, Output, Both       

                                                                               

                                                                                

                                                                               

                                                                               

   TEXT keyword  . . . . . . . . . .                                            

                                                                               

                                                                               

 F3=Exit   F4=Display Selected Keywords   F12=Cancel                            

                                                                               

 

                           Define Database Reference                           

                                                                                

 Field . . . . . :   IV_DESC              Usage . . :  H                       

 Length  . . . . :   30                                                        

                                                                               

 Type choices, press Enter.                                                    

                                      Keyword                                  

   Reference field  . . . . . . . .   REFFLD   Y            Y=Yes              

   Reference current DDS source . .     *SRC                Y=Yes              

   Field (if different) . . . . . .            IV_DESC      Name               

   Database file  . . . . . . . . .            INVOICE      Name               

     Library  . . . . . . . . . . .            QINGZHOU     Name, *LIBL, *CURLIB

     Record . . . . . . . . . . . .                         Name               

   Override existing field definition:                                         

     New field length . . . . . . .                         +nnnn, -nnnn, nnnn 

     New decimal positions  . . . .                         +n, -n, nn         

     New keyboard shift . . . . . .                         N A X W I D M      

                                                            J O E G            

   Ignore previously specified:                                                

     Validity check . . . . . . . .   DLTCHK                Y=Yes              

     Editing  . . . . . . . . . . .   DLTEDT                Y=Yes               

                                                                               

 F3=Exit   F12=Cancel                                                          

                                                                               

 

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

 1:IV_DESC                                                                     

 

                                Exit SDA Work Screen                           

                                                                                

 Select one of the following:                                                  

                                                                               

     1. Save work since last Enter and exit work screen                        

     2. Exit without saving any work done on the work screen                   

     3. Resume work screen session                                             

                                                                                

                                                                               

 

                                                                               

                                                                                

 Selection                                                                     

     1                                                                         

                                                                                

 F12=Cancel                                                                    

                                                                               

 

D¡¢×ÓÎļþ¿ØÖÆÉè¼Æ£º

 

 

                      Work with Display Records                                 

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                                

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

                                                                                

         10    SFL01         SFL                         12/25/04              

 12      20    SFL01C        SFLCTL    SFL01             12/25/04              

                                                                                

       

                                                                               

                                                                               

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

 Image updated for record SFL01.                                                

 

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                               

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

 Work screen for SFL01C. SFL01 displayed as additional record.                 

 

                                                                               

                                                                               

           *date                    ·¢Æ±²éѯ                   *sysname        

                                                               *username       

                                                                                

                                                                               

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

                                                                               

                                                                               

                                                                               

                                                                               

 1:IV_DESC                                                                     

 

         DD/DD/DD               ·¢Æ±²éѯ                  SSSSSSSS             

                    5= Ã÷ϸ²éѯ                           UUUUUUUUUU           

                                                                               

                                                                                

           #   &2p       &3p             &4p              &5p                  

          --  -----    ------------     ---------      --------------------    

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

                                                                               

                                                                                

                                                                               

 1:IV_DESC 2:IV_CODE 3:IV_NAME 4:IV_QUTITY 5:IV_AMOUNT 6:IV_DESC               

 

         DD/DD/DD               ·¢Æ±²éѯ                  SSSSSSSS             

                                                          UUUUUUUUUU           

                    5= Ã÷ϸ²éѯ                                                

                                                                                

           #  ·¢Æ±        Ãû³Æ             ×ÜÊý               ×ܽð¶î           

          --  -----    ------------     ----------     ---------------------   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

           I  OOOOO    OOOOOOOOOOOO     -6,666,666     -6,666,666,666,666.66   

                                                                               

                                                                                  

                                                                               

 1:IV_DESC 2:IV_CODE 3:IV_NAME 4:IV_QUTITY 5:IV_AMOUNT 6:IV_DESC                               

 

 

E¡¢×ÓÎļþ¿ØÖƹؼü×Ö£º

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

                                                                               

         10    SFL01         SFL                         12/25/04              

 8       20    SFL01C        SFLCTL    SFL01             12/25/04               

                                                                               

                                                                               

                                                                               

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

                                                                                

 

                        Select Subfile Control Keywords                        

                                                                               

 Subfile control record . . . . . . . . . :   SFL01C                           

                                                                               

 Type choices, press Enter.                                                    

                                                                                

                                     Y=Yes                                     

   General keywords  . . . . . . . .   Y                                       

   Subfile display layout  . . . . .   Y                                        

   Subfile messages  . . . . . . . .                                           

                                                                               

   Select record keywords  . . . . .   Y                                        

                                                                               

   TEXT keyword  . . . . . . . . . .                                           

                                                                               

                                                                                   

                                                                               

 F3=Exit   F4=Display Selected Keywords   F12=Cancel                           

                                                                                

 

 

 

                            Define General Keywords                            

                                                                               

 Subfile control record . . . . . . . . . :   SFL01C                           

                                                                               

 Type choices, press Enter.               Keyword                              

   Related subfile record . . . . . . .   SFLCTL     SFL01        Name         

   Subfile cursor relative record . . .   SFLCSRRRN               Name         

   Subfile mode . . . . . . . . . . . .   SFLMODE                 Name         

                                                                                

                                                                               

                                                                               

                                                     Y=Yes        Indicators/+ 

   Display subfile records  . . . . . .   SFLDSP       Y          N30          

   Display control record . . . . . . .   SFLDSPCTL    Y          N30          

   Initialize subfile fields  . . . . .   SFLINZ                                

   Delete subfile area  . . . . . . . .   SFLDLT                               

   Clear subfile records  . . . . . . .   SFLCLR                  30           

   Indicate more records  . . . . . . .   SFLEND                  N30          

     SFLEND parameter   . . . . . . . .     *MORE                              

     SFLEND parameter   . . . . . . . .     *SCRBAR                 *MORE ...  

   Record not active  . . . . . . . . .   SFLRNA                               

                                                                   More...     

 F3=Exit   F12=Cancel                                                          

                                                                               

 

                             Define Display Layout                             

                                                                               

 Subfile control record . . . . . . . . . :   SFL01C                           

                                                                                

 Type values, press Enter.                                                     

                                                                               

                                            Keyword  Number                    

   Records in subfile . . . . . . . . . .   SFLSIZ     12                      

     Program-to-system field  . . . . . .                                      

                                                                                

   Records per display  . . . . . . . . .   SFLPAG    200                      

                                                                               

   Spaces between records . . . . . . . .   SFLLIN                              

                                                                               

                                                                                   

                                                                               

 F3=Exit   F12=Cancel                                                          

                                                                               

 

 

 

                            Select Record Keywords                             

                                                                                

 Record . . . :   SFL01C                                                       

                                                                               

 Type choices, press Enter.                                                     

                                                                               

                                     Y=Yes                                     

   General keywords  . . . . . . . .                                            

   Indicator keywords  . . . . . . .   Y                                       

   Application help  . . . . . . . .                                           

   Help keywords . . . . . . . . . .                                            

   Output keywords . . . . . . . . .                                           

   Input keywords  . . . . . . . . .                                           

   Overlay keywords  . . . . . . . .                                            

                                                                               

   Print keywords  . . . . . . . . .                                           

   ALTNAME keyword . . . . . . . . .                                           

                                                                               

   TEXT keyword  . . . . . . . . . .                                           

                                                                               

                                                                                

                                                                               

 F3=Exit   F4=Display Selected Keywords   F12=Cancel                           

                                                                                

 

                           Define Indicator Keywords                           

                                                                               

 Record . . . :   SFL01C                                                        

                                                                               

 Type keywords and parameters, press Enter.                                    

   Conditioned keywords:       CFnn CAnn CLEAR PAGEDOWN/ROLLUP PAGEUP/ROLLDOWN 

                               HOME HELP HLPRTN                                

   Unconditioned keywords:     INDTXT VLDCMDKEY SETOF CHANGE                   

                                                                                

 Keyword   Indicators/+ Resp Text                                              

 CA03                    03  Exit                                              

                                                                                

   

                                                                               

                                                                               

                                                                         Bottom

 F3=Exit   F12=Cancel                                                          

                                                                               

 

 

 

                            Select Record Keywords                             

                                                                                

 Record . . . :   SFL01C                                                       

                                                                               

 Type choices, press Enter.                                                    

                                                                               

                                     Y=Yes                                     

   General keywords  . . . . . . . .                                            

   Indicator keywords  . . . . . . .                                           

   Application help  . . . . . . . .                                           

   Help keywords . . . . . . . . . .                                            

   Output keywords . . . . . . . . .                                           

   Input keywords  . . . . . . . . .                                           

   Overlay keywords  . . . . . . . .   Y                                        

                                                                               

   Print keywords  . . . . . . . . .                                           

   ALTNAME keyword . . . . . . . . .                                            

                                                                               

   TEXT keyword  . . . . . . . . . .                                           

                                                                               

                                                                                

                                                                               

 F3=Exit   F4=Display Selected Keywords   F12=Cancel                           

                                                                                

 

 

                            Select Overlay Keywords                            

                                                                               

 Record . . . :   SFL01C                                                        

                                                                               

 Type choices, press Enter.                                                    

                                          Keyword    Y=Yes  Indicators/+   Roll

   Overlay without erasing  . . . . . .   OVERLAY      Y                       

   Retain data on re-display  . . . . .   PUTRETAIN                            

   Protect all input fields . . . . . .   PROTECT                               

   Activate OVRDTA and OVRATR . . . . .   PUTOVR                               

   Override Data  . . . . . . . . . . .   OVRDTA                               

   Override Attribute . . . . . . . . .   OVRATR                                

   Initialize input fields  . . . . . .   INZINP                               

   Reset all modified data tags . . . .   MDTOFF                               

     MDTOFF parameter . . . . . . . . .     *UNPR                              

                                            *ALL                               

   Erase all input fields . . . . . . .   ERASEINP                             

     ERASEINP parameter . . . . . . . .     *MDTON                             

                                            *ALL                               

   Erase all records below  . . . . . .   ERASE                                

                                                                               

                                                                                

 F3=Exit   F12=Cancel                                                          

                                                                               

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

 1             SFL01T                                                          

         10    SFL01         SFL                         12/25/04              

         20    SFL01C        SFLCTL    SFL01             12/25/04              

                                                                                

                                                                                

                                                                               

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

 Keywords updated for record SFL01C.                                                                           

 

                     Select Additional Records for Display                     

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                    

   1,2,3=Select for display as additional record                               

                                                                               

 Option   Record         Type    Status                                         

   1                                                                           

   2                                                                           

   3                                                                            

   2      SFL01          SFL                                                   

   3      SFL01C         SFLCTL                                                

          SFL01T         RECORD  In use                                         

                                                                               

                                                                                 

                                                                                

                                                                         Bottom

 F3=Exit     F5=Refresh     F12=Cancel                                         

                                                                               

 

                                                                                

        DD/DD/DD                 ·¢Æ±²éѯ                     SSSSSSSS         

                  5= Ã÷ϸ²éѯ                                 UUUUUUUUUU       

                                                                               

        #  ·¢Æ±          Ãû³Æ             ×ÜÊý           ×ܽð¶î                

       --  -----      ------------     ----------    ---------------------     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66      

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

                                                                               

  

                                                                               

 Additional record(s) selected: SFL01 SFL01C                                   

 

                                                                               

        DD/DD/DD                 ·¢Æ±²éѯ                     SSSSSSSS         

                  5= Ã÷ϸ²éѯ                                 UUUUUUUUUU       

                                                                               

        #  ·¢Æ±          Ãû³Æ             ×ÜÊý           ×ܽð¶î                

       --  -----      ------------     ----------    ---------------------     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66      

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

        I  OOOOO      OOOOOOOOOOOO     -6,666,666    -6,666,666,666,666.66     

                                                                               

                                                                               

                                                                                

          'F3=@CCCC@'                                                          

                                                                               

 Additional record(s) selected: SFL01 SFL01C                                    

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

                                                                               

         10    SFL01         SFL                         12/25/04              

         20    SFL01C        SFLCTL    SFL01             12/25/04              

         30    SFL01T        RECORD                      12/25/04              

                                                                               

     

                                                                                

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

 Record SFL01T added to member SUBFILE1.                                       

 

F¡¢Éè¼ÆÏÔʾ¼Ç¼´°Ì壺

                      Work with Display Records                                

                                                                                

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                                

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                    

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

 1             DSP01W                                                          

         10    SFL01         SFL                         12/25/04              

         20    SFL01C        SFLCTL    SFL01             12/25/04              

         30    SFL01T        RECORD                      12/25/04              

                                                                                

                                                                                  

                                                                               

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

 Record SFL01T added to member SUBFILE1.                                        

 

                               Add New Record                                  

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type choices, press Enter.                                                     

                                                                               

   New record  . . . . . . . . . . . . . . .   DSP01W       Name               

                                                                                

   Type  . . . . . . . . . . . . . . . . . .   WINDOW       RECORD, USRDFN     

                                                            SFL,    SFLMSG     

                                                            WINDOW, WDWSFL     

                                                            PULDWN, PDNSFL     

                                                            MNUBAR             

                                                                               

                                                                                        

                                                                               

 F3=Exit     F5=Refresh     F12=Cancel                                         

                                                                                

 

                          Select Window Keywords                               

                                                                               

 Window record . . . . . . . . . . . . . :    DSP01W                           

                                                                               

 Type choices, press Enter.                                                    

                                                                                

                                     Y=Yes                                     

   General keywords  . . . . . . . .   Y                                       

   Select record keywords  . . . . .                                            

                                                                               

  

                                                                               

   TEXT keyword  . . . . . . . . . .                                            

                                                                               

    

                                                                               

 F3=Exit   F4=Display Selected Keywords   F12=Cancel                           

                                                                               

 

                            Select General Keywords                            

                                                                               

 Window record . . . . . . . . . . . . . :   DSP01W                            

                                                                               

 Type choices, press Enter.                                                    

                                                                                

                                                Keyword    Y=Yes  Indicators/+ 

                                                                               

   Window parameters  . . . . . . . . . . . .   WINDOW       Y                 

     Select parameters  . . . . . . . . . . .                Y                 

   Window borders . . . . . . . . . . . . . .   WDWBORDER                      

     Select parameters  . . . . . . . . . . .                                   

   Remove windows . . . . . . . . . . . . . .   RMVWDW                         

   User Restore Display . . . . . . . . . . .   USRRSTDSP                      

                                                                                

                                                                               

                                                                                 

                                                                                

 F3=Exit   F12=Cancel                                                          

                                                                               

 

                            Define Window Parameters                           

                                                                                

 Record . . . :    DSP01W                                                      

 Keyword  . . :    WINDOW                                                      

                                                                                

 Referenced window  . . . . . . . . . . . .                      Name          

 -OR-                                                                          

 Window definition                                                              

   Default start positioning  . . . . . . .                      Y=Yes         

   -OR-                                                                        

   Start line                                                                   

     Program-to-system field  . . . . . . .                      Name          

     Actual line  . . . . . . . . . . . . .       9              1-25          

   Start position                                                               

     Program-to-system field  . . . . . . .                      Name          

     Actual position  . . . . . . . . . . .       12             1-128         

                                                                                

   Window lines . . . . . . . . . . . . . .      10              1-25          

   Window position  . . . . . . . . . . . .       60             1-128         

   Message line . . . . . . . . . . . . . .      Y               Y=Yes         

   Restrict cursor to window  . . . . . . .      Y               Y=Yes         

                                                                               

 F3=Exit   F12=Cancel                                                          

                                                                                

 

 

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                     

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                                

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

                                                                               

         10    SFL01         SFL                         12/25/04              

         20    SFL01C        SFLCTL    SFL01             12/25/04              

         30    SFL01T        RECORD                      12/25/04              

 12      40    DSP01W        WINDOW                      12/25/04               

                                                                               

   

                                                                               

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

                                                                               

 

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

           ................................................................    

           :                                                              :    

           :                                                              :    

           :                                                              :    

           :                                                              :    

           :                                                              :    

           :                                                              :    

           :                                                              :     

           :                                                              :    

           :                                                              :    

           :                                                              :    

           :..............................................................:    

                                                                               

                                                                               

                                                                                

 Work screen for record DSP01W: Press Help for function keys.                  

 

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

           ................................................................    

           :                   '@cccccccc@'                               :    

           :                                                              :    

           :                &1l                                           :    

           :                &2l                                           :    

           :                &3l                                           :    

           :                &4l                                           :    

           :                &5l                                           :    

           :                                                              :    

           :            '@cccccccccc@'                                    :    

           :                                                              :    

           :..............................................................:    

                                                                                

                                                                               

                                                                               

 1:IV_CODE 2:IV_NAME 3:IV_QUTITY 4:IV_AMOUNT 5:IV_DESC                         

 

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

           ................................................................    

           :                     ÏÔʾÃ÷ϸ                                 :    

           :                                                              :    

           :        ·¢Æ± :  OOOOO                                         :    

           :        Ãû³Æ :  OOOOOOOOOOOO                                  :    

           :        ×ÜÊý :  -6,666,666                                    :    

           :      ×ܽð¶î :  -6,666,666,666,666.66                         :    

           :        ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                :    

           :                                                              :    

           :              °´Ö´ÐмÌÐø                                      :    

           :                                                              :    

           :..............................................................:    

                                                                               

                                                                                

                                                                               

                                                                               

 

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   SUBFILE1  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                                

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

                                                                                

         10    SFL01         SFL                         12/25/04              

         20    SFL01C        SFLCTL    SFL01             12/25/04              

         30    SFL01T        RECORD                      12/25/04              

         40    DSP01W        WINDOW                      12/25/04              

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

                                                                                

 

H¡¢¶¨ÒåÎļþ¼¶¹Ø¼ü×Ö£º

 

                             Select File Keywords                              

                                                                               

 Member . . . :   SUBFILE1                                                     

                                                                               

 Type choices, press Enter.                                                    

                                                                               

                                     Y=Yes                                     

   General keywords  . . . . . . . .   Y                                       

   Indicator keywords  . . . . . . .                                           

   Print keywords  . . . . . . . . .                                           

   Help keywords . . . . . . . . . .                                           

   Display sizes . . . . . . . . . .                                           

   Alternate keywords  . . . . . . .                                            

   DBCS conversion . . . . . . . . .                                           

   Window Borders  . . . . . . . . .                                           

   Menu-bar keywords . . . . . . . .                                            

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

 F3=Exit   F4=Display Selected Keywords   F12=Cancel                           

                                                                               

 

 

                            Select General Keywords                            

                                                                                

 Member . . . :   SUBFILE1                                                     

                                                                               

 Type choices, press Enter.                    Keyword    Y=Yes   Indicators/+ 

   Invite devices for later read . . . . . .   INVITE                          

   Allow graphics  . . . . . . . . . . . . .   ALWGPH                          

   Sound alarm on messages . . . . . . . . .   MSGALARM                        

   Separate indicators area  . . . . . . . .   INDARA       Y                  

   Manage display in S/36 mode . . . . . . .   USRDSPMGT                       

   Allow blanks  . . . . . . . . . . . . . .   CHECK(AB)                       

   Move cursor right-left, top-bottom  . . .   CHECK(RLTB)                     

   Move cursor right to left . . . . . . . .   CHECK(RL)                       

   Right to left processing  . . . . . . . .   DSPRL                            

   Change input defaults . . . . . . . . . .   CHGINPDFT                       

     Select parameters . . . . . . . . . . .                                   

   Entry field attribute . . . . . . . . . .   ENTFLDATR                        

     Select parameters . . . . . . . . . . .                                   

   Write error messages to subfile . . . . .   ERRSFL                          

                                                                               

                                                                                

                                                                   More...     

 F3=Exit   F12=Cancel                                                          

                                                                                

 

                         Save DDS - Create Display File                        

                                                                               

 Type choices, press Enter.                                                     

                                                                               

   Save DDS source  . . . . . . . . . . . .   Y            Y=Yes               

     Source file  . . . . . . . . . . . . .   QDDSSRC      F4 for list         

       Library  . . . . . . . . . . . . . .   QINGZHOU     Name, *LIBL ...     

     Member . . . . . . . . . . . . . . . .   SUBFILE1     F4 for list         

     Text . . . . . . . . . . . . . . . . .                                     

                                                                               

                                                                               

   Create display file  . . . . . . . . . .   Y            Y=Yes                

     Prompt for parameters  . . . . . . . .                Y=Yes               

     Display file . . . . . . . . . . . . .   SUBFILE1     F4 for list         

       Library  . . . . . . . . . . . . . .   QINGZHOU     Name, *CURLIB       

     Replace existing file  . . . . . . . .                Y=Yes               

                                                                               

   Submit create job in batch . . . . . . .   Y            Y=Yes               

                                                                                

   Specify additional                                                          

     save or create options . . . . . . . .                Y=Yes               

                                                                                

 F3=Exit   F4=Prompt   F12=Cancel                                              

 Member SUBFILE1 already exists. Press Enter to replace.                      +

 

 

 

 

 Columns . . . :    1  71           Browse                     QINGZHOU/QDDSSRC

 SEU==>                                                                SUBFILE1

 FMT A* .....A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 

        *************** Beginning of data *************************************

0000.10      A*%%TS  SD  20041225  212604  QINGZHOU    REL-V5R1M0  5722-WDS    

0000.20      A*%%EC                                                            

0000.30      A                                      DSPSIZ(24 80 *DS3)         

0000.40      A                                      INDARA                     

0000.50      A          R SFL01                     SFL                        

0000.60      A*%%TS  SD  20041225  201258  QINGZHOU    REL-V5R1M0  5722-WDS    

0000.70      A            IV_CODE   R        O  7 12REFFLD(IV_FMT/IV_CODE QINGZHOU/INVO-

0000.80      A                                      ICE)                       

0000.90      A            IV_NAME   R        O  7 23REFFLD(IV_FMT/IV_NAME QINGZHOU/INVO-

0001.00      A                                      ICE)                       

0001.10      A            IV_QUTITY R        O  7 40REFFLD(IV_FMT/IV_QUTITY QINGZHOU/IN-

0001.20      A                                      VOICE)                      

0001.30      A            IV_AMOUNT R        O  7 54REFFLD(IV_FMT/IV_AMOUNT QINGZHOU/IN-

0001.40      A                                      VOICE)                     

0001.50      A            OPTX           1   I  7  9                            

0001.60      A            IV_DESC   R        H      REFFLD(IV_DESC QINGZHOU/INVOICE)

0001.70      A          R SFL01C                    SFLCTL(SFL01)              

0001.80      A*%%TS  SD  20041225  201258  QINGZHOU    REL-V5R1M0  5722-WDS    

0001.90      A                                      CA03(03 'Exit')            

0002.00      A                                      OVERLAY                    

0002.10      A N30                                  SFLDSP                     

0002.20      A N30                                  SFLDSPCTL                  

0002.30      A  30                                  SFLCLR                     

0002.40      A N30                                  SFLEND                     

0002.50      A                                      SFLSIZ(0200)               

0002.60      A                                      SFLPAG(0012)               

0002.70      A                                  3 19'5= Ã÷ϸ²éѯ '             

0002.80      A                                  2  9DATE                       

0002.90      A                                      EDTCDE(Y)                  

0003.00      A                                  2 63SYSNAME                     

0003.10      A                                  3 63USER                       

0003.20      A                                  2 33' ·¢Æ±²éѯ '               

0003.30      A                                  6  8'--  -----      -----------

0003.40      A                                      --------    ---------------

0003.50      A                                  5  9'#'                        

0003.60      A                                  5 11' ·¢Æ± '                   

0003.70      A                                  5 25' Ãû³Æ '                   

0003.80      A                                  5 42' ×ÜÊý '                   

0003.90      A                                  5 57' ×ܽð¶î '                 

0004.00      A          R SFL01T                                                

0004.10      A*%%TS  SD  20041225  201258  QINGZHOU    REL-V5R1M0  5722-WDS    

0004.20      A                                 22 12'F3= Í˳ö '                

0004.30      A          R DSP01W                                                

0004.40      A*%%TS  SD  20041225  211311  QINGZHOU    REL-V5R1M0  5722-WDS    

0004.50      A                                      WINDOW(9 12 10 60)         

0004.60      A                                  1 20' ÏÔʾÃ÷ϸ '                

0004.70      A                                  3  7' ·¢Æ± :'                  

0004.80      A            IV_CODE   R        O  3 16REFFLD(IV_FMT/IV_CODE QINGZHOU/INVO-

0004.90      A                                      ICE)                       

0005.00      A                                  4  7' Ãû³Æ :'                  

0005.10      A            IV_NAME   R        O  4 16REFFLD(IV_FMT/IV_NAME QINGZHOU/INVO-

0005.20      A                                      ICE)                       

0005.30      A                                  5  7' ×ÜÊý :'                  

0005.40      A            IV_QUTITY R        O  5 16REFFLD(IV_FMT/IV_QUTITY QINGZHOU/IN-

0005.50      A                                      VOICE)                     

0005.60      A                                  6  5' ×ܽð¶î :'                

0005.70      A            IV_AMOUNT R        O  6 16REFFLD(IV_FMT/IV_AMOUNT QINGZHOU/IN-

0005.80      A                                      VOICE)                     

0005.90      A                                  7  7' ±¸×¢ :'                  

0006.00      A            IV_DESC   R        O  7 16REFFLD(IV_FMT/IV_DESC QINGZHOU/INVO-

0006.10      A                                      ICE)                       

0006.20      A                                  9 13' °´Ö´ÐмÌÐø '             

        ****************** End of data ****************************************

                                                                               

                                                                                

F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel     

 F16=Repeat find        F24=More keys                                                                                                                        

 

 

5.3.8.ʹÓÃSDA + RPG IV ½øÐн»»¥Ê½³ÌÐòÉè¼Æ

 

SDA(Screen Design Aid)Òâ˼Ϊ£ºÆÁÄ»Éè¼Æ°ïÖú¡£

SDAÊÇÆÁÄ»Éè¼Æ¹¤¾ß£¬¿ÉÒÔ½«ÆÁÄ»Éè¼ÆÓÃÐÎÏ󻯻­Í¼·½Ê½½øÐÐÉè¼Æ¡£Éè¼ÆÍê³Éºó¿ÉÒÔͬʱÉú³ÉDSPFÔ´³ÌÐòÒÔ¼°DSPF OBJECTÄ¿±ê¡£

ÏÔʾÎļþ+¸ß¼¶ÓïÑÔ=³ÌÐò¡£

ÒÔÏÂÒÔOS/400 V5R1M0Ϊ»·¾³¡¢RPGIVΪ¸ß¼¶ÓïÑÔ»ù×¼£¬Ñ­Ðò½¥½øµØ²ûÊöÈçºÎÀûÓÃSDA+RPGIV½øÐмòµ¥µÄ½»»¥Ê½³ÌÐòÉè¼Æ¡£

 

A¡¢´´½¨QDDSSRC¡¢QRPGLESRC×¢ÒâÊÂÏ

 

ÓÉÓÚÒªÖ§³Ö¼òÌåÖÐÎÄ£¬ËùÒÔÔÚ´´½¨SRCPFʱҪעÒâÑ¡È¡²ÎÊýUser specified DBCS data . . .  > *YES£¬ÔÚ´´½¨QRPGLESRC»¹ÒªÉ趨Record length  . . .  > 112 ¡£

                    

                     Create Source Physical File (CRTSRCPF)                    

                                                                                

 Type choices, press Enter.                                                    

                                                                               

 File . . . . . . . . . . . . . . > QRPGLESRC     Name                          

   Library  . . . . . . . . . . . >   QINGZHUO    Name, *CURLIB                

 Record length  . . . . . . . . . > 112           Number                       

 Member, if desired . . . . . . .   *NONE         Name, *NONE, *FILE           

 User specified DBCS data . . . . > *YES          *NO, *YES                    

 Text 'description' . . . . . . . > 'RPGIV source code'                        

                                                                               

                                                                                

                                                                         Bottom

 F3=Exit   F4=Prompt   F5=Refresh   F10=Additional parameters   F12=Cancel     

 F13=How to use this display        F24=More keys                              

                                                                               

B¡¢PFÎļþ˵Ã÷£º

 

a¡¢QINGZHOU/QDDSSRC£¨REFILE£©ÊÇÊý¾Ý¹«¹²×ֵ䣺

 Columns . . . :    1  71           Browse                     QINGZHOU/QDDSSRC

 SEU==>                                                                  REFILE

 FMT A* .....A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 

        *************** Beginning of data *************************************

0001.00      A* DATA DICTIONARY REFERENCE FILE                                 

0002.00      A* CREATE BY TRF.LIU YUANY YAO 2004.12.18                         

0003.00      A*                                                                

0004.00      A          R REFMT                                                

0005.00      A            CODE           5A                                    

0006.00      A            NAME          12O                                    

0007.00      A            DESCRPT       30O                                    

0008.00      A            QUATITY        7  0                                  

0009.00      A            PRICE         11  2                                  

0010.00      A            AMOUNT        15  2                                   

        ****************** End of data ****************************************

                                                                               

                                                                                

                                                                               

 F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel     

 F16=Repeat find        F24=More keys                                           

                                         (C) COPYRIGHT IBM CORP. 1981, 2000.   

 

b¡¢QINGZHOU/QDDSSRC£¨INVOICE£©ÊDzÎÕÕÊý¾Ý¹«¹²×ÖµäµÄÆäÖÐÒ»¸öPF£º

 

 Columns . . . :    1  71            Edit                      QINGZHOU/QDDSSRC

 SEU==>                                                                 INVOICE

 FMT A* .....A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 

0001.00      A* INVOICE DDS SOURCE CODE                                        

0002.00      A* CREATE BY TRF.LIU YUAN YAO 2004.12.18                           

0003.00      A*                                                                

0004.00      A                                      REF(*LIBL/REFILE)          

0005.00      A          R IV_FMT                                                

0006.00      A            IV_CODE   R               REFFLD(CODE)               

0007.00      A                                      COLHDG(' ·¢Æ± ')           

0008.00      A            IV_NAME   R               REFFLD(NAME)               

0009.00      A                                      COLHDG(' Ãû³Æ ')           

0010.00      A            IV_QUTITY R               REFFLD(QUATITY)            

0011.00      A                                      EDTCDE(O)                  

0012.00      A                                      COLHDG(' ×ÜÊý ')           

0013.00      A            IV_AMOUNT R               REFFLD(AMOUNT)             

0014.00      A                                      COLHDG(' ×ܽð¶î ')         

0015.00      A                                      EDTCDE(O)                  

0016.00      A            IV_DESC   R               REFFLD(DESCRPT)            

0017.00      A                                      COLHDG(' ±¸×¢ ')           

0018.00      A*                                                                 

0019.00      A          K IV_CODE                                              

        ****************** End of data ****************************************

                                                                                

 

                                                                               

 F3=Exit   F4=Prompt   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle      

 F16=Repeat find       F17=Repeat change          F24=More keys                 

                                                                               

Èý¡¢ÀûÓÃSDAÖÆ×÷DSPF£º

 

1¡¢½øÈëSDAµ¥ÆÁÄ»Éè¼Æ£º

1.1¡¢ÔÚOS/400ÃüÁîÐÐÖ´ÐÐSTRSDA£¬Ñ¡Ôñ1. Design screens £º

 

                         AS/400 Screen Design Aid (SDA)                        

                                                                                

 Select one of the following:                                                  

                                                                               

      1. Design screens                                                         

      2. Design menus                                                          

      3. Test display files                                                    

                                                                                

                                                                               

                                                                               

                                                                                

 Selection or command                                                          

 ===> 1                                                                        

                                                                                

 F1=Help   F3=Exit   F4=Prompt   F9=Retrieve   F12=Cancel                      

                                          (C) COPYRIGHT IBM CORP. 1981, 2000.  

 

1.2¡¢ÇÃÈëSource file¡¢LibraryÒÔ¼°Member£¬×¢Ò⣺MemberÃûÈ·¶¨ÁËDSPFµÄÃû×Ö¡£

 

                                Design Screens                                 

                                                                               

 Type choices, press Enter.                                                    

                                                                                

   Source file . . . . . . . .   QDDSSRC      Name, F4 for list                

                                                                               

     Library . . . . . . . . .   QINGZHOU     Name, *LIBL, *CURLIB             

                                                                               

   Member  . . . . . . . . . .   IVSCREEN     Name, F4 for list                

                                                                                

                                                                               

                                                                               

                                                                                

 F3=Exit     F4=Prompt     F12=Cancel                                          

                                                                               

1.3¡¢Ñ¡Ôñ1£¬²¢¼üÈë¼Ç¼¸ñʽÃûDSP_PMPT£¬Ã¿Ò»¸ö¼Ç¼¸ñʽ±íʾÏÔʾÎļþµÄÒ»¸öÏÔʾ½çÃæ¡£×î³£ÓõÄÊÇRECORDÐÍ£¬Ã¿¸ö»­Ãæ¿ÉÒÔ´¦ÀíÊý¾Ý¿âÎļþÒ»¸ö¼Ç¼¡£

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   IVSCREEN  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

 1             DSP_PMPT                                                        

                                                                               

   (No records in file)                                                         

                                                                               

                                                                               

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

                                                                               

1.4¡¢Ö´Ðкó¼ûÈçÏ»­Ã棺

ÎÒÃÇ¿ÉÒÔ¿´µ½TypeÀàÐÍÓкܶàÑ¡Ôñ£¬RECORDÊǵ¥ÆÁÄ»Éè¼Æ£¬SFLÊÇ×ÓÎļþÀàÐÍ£¬Í¨¹ýPULDWN¡¢MNUBAR¿ÉÒÔÖÆ×÷³ö¾«ÃÀµÄÏÂÀ­²Ëµ¥»­Ãæ¡£ÓÉÓÚƪ·ùÓÐÏÞ£¬Ö»ÄÜÒ»±Ê´ø¹ý¡£

 

                               Add New Record                                  

                                                                                

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   IVSCREEN  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type choices, press Enter.                                                    

                                                                               

   New record  . . . . . . . . . . . . . . .   DSP_PMPT     Name               

                                                                                

   Type  . . . . . . . . . . . . . . . . . .   RECORD       RECORD, USRDFN     

                                                            SFL,    SFLMSG     

                                                            WINDOW, WDWSFL     

                                                            PULDWN, PDNSFL     

                                                            MNUBAR             

                                                                                

                                                                               

                                                                               

 F3=Exit     F5=Refresh     F12=Cancel                                          

                                                                               

 

1.5¡¢¼üÈëÖ´ÐпÉÒÔ¿´¼û25ÐСÁ80ÁÐ5250ÏÔʾ¿Õ°×»­ÃæÈçÏ£º

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

 Work screen for record DSP_PMPT: Press Help for function keys.          

 

1.6¡¢¿ÉÒÔͨ¹ýF14·´¸´Çл»¿ªÆô»òÕ߹رձê³ß£º

 

 ... ... 1 ... ... 2 ... ... 3 ... ... 4 ... ... 5 ... ... 6 ... ... 7 ... ... 8

  2                                                                            

  3                                                                             

  4                                                                            

  5                                                                            

  6                                                                            

  7                                                                            

  8                                                                            

  9                                                                            

 10                                                                             

 11                                                                            

 12                                                                            

 13                                                                             

 14                                                                            

 15                                                                            

 16                                                                             

 17                                                                            

 18                                                                            

 19                                                                             

 20                                                                            

 21                                                                            

 22                                                                             

 23                                                                            

 24                                                                            

 

2¡¢Ñ¡È¡Êý¾Ý¿âÎļþ

2.1°´F10£¬Ê¹ÓÃÑ¡Ïî1£¬ÇÃÈëDatabase File¡¢Library£¬²¢½«¹â±êÒÆÖÁRecordÈ»ºó°´F4£º

 

                             Select Database Files                             

                                                                               

 Type options and names, press Enter.                                          

   1=Display database field list                                               

   2=Select all fields for input (I)                                           

   3=Select all fields for output (O)                                          

   4=Select all fields for both (B) input and output                           

                                                                               

 Option    Database File   Library      Record                                 

   1        INVOICE        QINGZHOU                                       

                                                                               

                                                                               

                                                                                

                                                                               

 F3=Exit     F4=Prompt     F12=Cancel                                          

                                                                               

2.2Ñ¡Ôñ¼Ç¼¸ñʽIV_FMT£¬Ö´ÐУº

 

                            Select Database Records                            

                                                                               

 Database file  . . . . . :   INVOICE        Library . . . :   QINGZHOU         

                                                                               

 Type options, press Enter.                                                    

   1=Select                                                                    

                                                                                

 Option   Record                                                               

   1      IV_FMT                                                               

                                                                                

                                                                               

                                                                               

                                                                                

                                                                         Bottom

                                                                               

                                                                                

 F3=Exit   F12=Cancel                                                          

                                                                               

 

2.3¿É¼ûÈçÏ»­Ã棬ÎÒÃÇ¿ÉÒÔÔÝʱ¶¼Ñ¡È¡Îª3Êä³öÐÍ£¬ÎÒÃÇ¿ÉÒÔÔÚºóÃæµÄÆÁÄ»ÖØж¨Òå¡£

±¸×¢£º2=ÊäÈëÐÍ£¨I£©£¬3=Êä³öÐÍ£¨O£©£¬4=ÊäÈëÊä³öÐÍ£¨B£©¡£

 

                            Select Database Fields                             

                                                                               

 Record . . . :   IV_FMT                                                        

                                                                               

 Type information, press Enter.                                                

   Number of fields to roll  . . . . . . . . . . . . . . . . . .     8         

   Name of field to search for . . . . . . . . . . . . . . . . .               

                                                                               

 Type options, press Enter.                                                    

   1=Display extended field description                                        

   2=Select for input (I), 3=Select for output (O), 4=Select for both (B)      

                                                                               

 Option  Field        Length   Type    Column Heading                          

   3     IV_CODE           5    A       ·¢Æ±                                   

   3     IV_NAME          12    O       Ãû³Æ                                   

   3     IV_QUTITY       7,0    P       ×ÜÊý                                   

   3     IV_AMOUNT      15,2    P       ×ܽð¶î                                  

   3     IV_DESC          30    O       ±¸×¢                                   

                                                                               

                                                                                

                                                                               

                                                                         Bottom

 F3=Exit   F12=Cancel                                                          

                                                                                

 

2.4Á¬Ðø2´ÎÖ´ÐУ¬»Øµ½Éè¼ÆÆÁÄ»½çÃ棬µÃµ½µÚ24ÐÐÏÔʾµÄ×Ö¶ÎÃû¼¯ºÏ¡£

ÖÁ´ËÎÒÃÇÍê³ÉÁËʹÓÃF10Ñ¡È¡Êý¾Ý¿âÎļþ¹¦ÄÜ¡£

 ... ... 1 ... ... 2 ... ... 3 ... ... 4 ... ... 5 ... ... 6 ... ... 7 ... ... 8

  2                                                                            

  3                                                                             

  4                                                                            

  5                                                                            

  6                                                                             

  7                                                                            

  8                                                                            

  9                                                                             

 10                                                                            

 11                                                                            

 12                                                                             

 13                                                                            

 14                                                                            

 15                                                                            

 16                                                                             

 17                                                                            

 18                                                                            

 19                                                                             

 20                                                                            

 21                                                                            

 22                                                                             

 23                                                                            

 1:IV_CODE 2:IV_NAME 3:IV_QUTITY 4:IV_AMOUNT 5:IV_DESC                         

 

c¡¢ÔÚÆÁÄ»ÉÏ·ÅÖÃÊý¾Ý¿âÎļþ×ֶΣº

 

3.1ʹÓá°&+×Ö¶ÎÃûÐòºÅ¡±¿ÉÒÔ½«×ֶηÅÖÃÔÚÆÁÄ»ÉÏ£¬ÔÚ×Ö¶ÎÃûÐòºÅÖ®ºó¿ÉÒÔ¼ÓÉÏL±íʾ×ֶαêÌâ¾Ó×ó¡£½¨Ò齫×ֶηÅÖÃÔÚÆÁÄ»Öв¿¡£

 

 ... ... 1 ... ... 2 ... ... 3 ... ... 4 ... ... 5 ... ... 6 ... ... 7 ... ... 8

   2                                                                           

   3                                                                            

   4                                                                           

   5                                                                           

   6                                                                            

   7                                    &1L                                    

   8                                                                           

   9                                    &2L                                    

  10                                                                            

  11                                    &3L                                    

  12                                                                           

  13                                    &4L                                    

  14                                                                           

  15                                    &5L                                    

  16                                                                            

  17                                                                           

  18                                                                           

  19                                                                            

  20                                                                           

  21                                                                           

  22                                                                            

  23                                                                           

 1:IV_CODE 2:IV_NAME 3:IV_QUTITY 4:IV_AMOUNT 5:IV_DESC                         

 

3.2¼üÈëÖ´Ðкó£¬Ëù¶¨ÒåµÄ×ֶαêÌâ¡¢×Ö¶ÎÊôÐÔÒÔ¼°³¤¶ÈÏÔʾÔÚÆÁÄ»ÉÏ¡£                                                                                 

                                                                               

        

 

                                                                               

                                                                                

                   ·¢Æ± :  OOOOO                                               

                                                                               

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                                

                   ×ÜÊý :  -6,666,666                                          

                                                                               

                 ×ܽð¶î :  -6,666,666,666,666.66                                

                                                                               

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                                

                                                                               

                                                                               

                                                                               

                                                                               

                       

 

 

 

3.3ÎÒÃÇ¿ÉÓÃI¡¢O¡¢B¸Ä±ä×Ö¶ÎÊôÐÔ¡£

ÀýÈ磺½«¹â±ê·ÅÔÚ·¢Æ±×ֶη¶Î§ÄÚ£¬¼üÈëIÖ®ºóÖ´ÐУ¬¿ÉÒÔ·¢ÏÖÔ­×Ö¶ÎÊôÐÔÒѾ­ÓÉO¸ÄΪIÐÍ¡£

±¸×¢£º

×Ö¶ÎÀàÐÍ

ÊäÈëÐÍ

Êä³öÐÍ

ÊäÈëÊä³öÐÍ

×Ö·ûÐÍ

I

O

B

ÊýÖµÐÍ

3

6

9

                                                                       

 

                                                                                

                                                                               

                   ·¢Æ± :  IIIII                                               

                                                                               

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                               

                   ×ÜÊý :  -6,666,666                                          

                                                                                

                 ×ܽð¶î :  -6,666,666,666,666.66                               

                                                                               

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                               

                                                                               

                                                                                

 

d¡¢Ìí¼Ó³£ÊýÏ

 

4.1ÏÖÔÚΪÆÁÄ»Ìí¼ÓÒ»¸ö±êÌâ¡£½«¹â±êÖÃÓÚ¶¥²¿ºÏÊÊλÖüüÈë¡®@cccccccc@¡¯£¬Æ京ÒåΪ¡®  ¡¯Ö®ÄÚ±íʾ³£ÊýÏһ¶Ô@Ö®¼ä±íʾΪÖÐÎÄË«×Ö½Ú±¶Êý£¬×¢Òâcccccccc±ØÐëΪżÊý£¬ÒòΪºº×ÖÊÇË«×Ö½Ú¡£

 

                                                                              

                              '@cccccccc@'                                  

                                                                             

                                                                              

                                                                             

                   ·¢Æ± :  IIIII                                               

                                                                               

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                                

                   ×ÜÊý :  -6,666,666                                          

                                                                               

                 ×ܽð¶î :  -6,666,666,666,666.66                                

                                                                               

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                             

                                                                             

                                             

4.2¼üÈëÖ´Ðк󣬿ɼû4ÐÐÏ»®Ïߣ¬Ò»ÐпÉÊäÈëÒ»¸öºº×Ö¡£

 

                                                                              

                            £ß£ß£ß£ß                                   

                                                                              

                                                                              

                                                                               

                   ·¢Æ± :  IIIII                                               

                                                                               

                   Ãû³Æ :  OOOOOOOOOOOO                                         

                                                                               

                   ×ÜÊý :  -6,666,666                                          

                                                                                

                 ×ܽð¶î :  -6,666,666,666,666.66                               

                                                                               

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                              

                                                                             

                                                                             

 

4.3ÔÚÏ»®ÏßÉÏÇÃÈ뺺×Ö¡°·¢Æ±²éѯ¡±£¬Ö´ÐУº

 

                                                                              

                              ·¢Æ±²éѯ                                   

                                                                              

                                                                               

                                                                              

                   ·¢Æ± :  IIIII                                               

                                                                                

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                               

                   ×ÜÊý :  -6,666,666                                           

                                                                               

                 ×ܽð¶î :  -6,666,666,666,666.66                               

                                                                                

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                    

                                                                

 

4.4ÎÒÃÇ¿ÉÒÔʹÓÃF20¿ª¹Ø·´ÏÔ³£ÊýÏȻºóʹÓÃ>>>ÓÒÒÆ»ò<<<×óÒƳ£ÊýÏî¡£

 

                                                                               

                             ·¢Æ±²éѯ >>>>                            

                                                                              

                                                                               

                                                                              

                   ·¢Æ± :  IIIII                                               

                                                                                

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                               

                   ×ÜÊý :  -6,666,666                                           

                                                                               

                 ×ܽð¶î :  -6,666,666,666,666.66                               

                                                                               

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                             

                                                                             

                                                                              

                                                                             

                                                                             

4.5ͬʱÔÚÆÁĻϷ½·ÅÖÃÒ»¸ö¼È°üÀ¨Î÷ÎÄÒÔ¼°·ûºÅÓÖ°üÀ¨ºº×ֵij£ÊýÏî'F3=@cccc@'£¬±ØÐëʹÓõ¥Æ²ºÅ¡® ¡¯½«ËùÓг£Êý×ֶΰüÀ¨ÔÚÀïÃæ¡£

 

                                                                             

                                   ·¢Æ±²éѯ                             

                                                                             

                                                                              

                                                                             

                   ·¢Æ± :  IIIII                                               

                                                                                

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                               

                   ×ÜÊý :  -6,666,666                                           

                                                                               

                 ×ܽð¶î :  -6,666,666,666,666.66                               

                                                                                

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                             

                                                                              

                                                                             

                                                                             

                                                                             

                             'F3=@cccc@'                                     

 

4.6Ö´Ðкó£¬ÓÃͬÑù·½·¨ÔÚÏ»®ÏßÉÏÊäÈë¡°Í˳ö¡±¡£

 

                                                                                

                                                                               

                               ·¢Æ±²éѯ                               

                                                                       

                                                                               

                                                                               

                   ·¢Æ± :  IIIIII                                               

                                                                               

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                                

                   ×ÜÊý :  -6,666,666                                          

                                                                               

                 ×ܽð¶î :  -6,666,666,666,666.66                                

                                                                               

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                                

                                                                               

                                                                               

                        F3= Í˳ö                                               

                                                                                

                                                                               

                                        

e¡¢Ìí¼Ó±äÁ¿×Ö¶ÎÒÔ¼°ÏµÍ³¹Ø¼ü×Ö£º

 

5.1ÔÚÆÁÄ»24ÐУ¬ÎÒÃÇ¿ÉÒÔ²ÉÓÃ+OOOOOOOOÔö¼Ó×Ö·ûÐͱäÁ¿£¬»òÕß²ÉÓÃ+O(40)¿ìËÙÌí¼Ó³¤¶ÈΪ40µÄÊä³öÐͱäÁ¿¡£

±¸×¢£º

×Ö¶ÎÀàÐÍ

Êä³öÐÍ

ÊäÈëÐÍ

ÊäÈëÊä³öÐÍ

×Ö·ûÐÍ

+IIII »ò +I(4)

+OOOOO »ò +O(5)

+BBBBBBBB »ò +B(8)

ÊýÖµÐÍ

+33.33 »ò +3(4,2)

+666.66 »ò +6(5,2)

+9999.999 »ò +9(7,3)

 

                                                                                

                                                                                

                               ·¢Æ±²éѯ                              

                                                                      

                                                                                

                                                                               

                   ·¢Æ± :  IIIII                                               

                                                                                

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                               

                   ×ÜÊý :  -6,666,666                                          

                                                                                

                 ×ܽð¶î :  -6,666,666,666,666.66                               

                                                                               

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                        F3= Í˳ö                                               

                                                                               

                                                                               

                  +O(40)                     

 

5.2Ö´Ðкó·¢ÏÖÔÚÆÁĻϷ½Ôö¼ÓÁËÒ»¸ö×Ö·ûÐͱäÁ¿£¬ÏµÍ³×Ô¶¯¸øËüÃüÃûΪFLD001¡£

                                                                               

                                                                               

                                 ·¢Æ±²éѯ                               

                                                                    

                                                                               

                                                                               

                   ·¢Æ± :  IIIII                                               

                                                                               

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                                

                   ×ÜÊý :  -6,666,666                                          

                                                                               

                 ×ܽð¶î :  -6,666,666,666,666.66                                

                                                                               

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                                

                                                                               

                                                                               

                                                                               

                                                                               

                        F3= Í˳ö                                               

                                                                               

                                                                               

                  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                                                                                                     

 

5.3°´F4£¬·­Ò³ÕÒµ½FLD001£º

 

                                Work with Fields                               

                                                                                

 Record . . . :   DSP_PMPT                                                     

                                                                               

 Type information, press Enter.                                                 

   Number of fields to roll . . . . . . . . . . . . . . . . . .     6          

                                                                               

 Type options, change values, press Enter.                                      

   1=Select keywords   4=Delete field                                          

                                                                               

 Option   Order   Field       Type Use  Length  Row/Col  Ref Condition  Overlap

            130   FLD001            O       40   24 019                        

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                         Bottom

  Add                               H            Hidden                        

  Add                               M            Message                       

  Add                               P            Program-to-system             

                                                                               

 F3=Exit   F6=Sort by row/column   F12=Cancel                                  

                                                                                

 

5.4½«FLD001¸ÄΪMSGLINE£º

 

                                Work with Fields                               

                                                                               

 Record . . . :   DSP_PMPT                                                      

                                                                               

 Type information, press Enter.                                                

   Number of fields to roll . . . . . . . . . . . . . . . . . .     6          

                                                                                

 Type options, change values, press Enter.                                     

   1=Select keywords   4=Delete field                                          

                                                                                

 Option   Order   Field       Type Use  Length  Row/Col  Ref Condition  Overlap

            130   MSGLINE           O       40   24 019                        

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                         Bottom

  Add                               H            Hidden                         

  Add                               M            Message                       

  Add                               P            Program-to-system             

                                                                                

 F3=Exit   F6=Sort by row/column   F12=Cancel                                  

                                                                               

 

5.5 ÔÚÆÁÄ»ÉÏ·½±êÌâÐÐ×óÓÒλÖüüÈ룺*DATE¡¢*SYSNAME¡¢*USER£¬¡°*Ãû³Æ¡±Í¨³£ÎªÏµÍ³¶¨ÒåµÄ±£Áô×Ö¡£

                                                                                

                                                                               

         *DATE                   ·¢Æ±²éѯ               *SYSNAME               

                                                        *USER                  

                                                                               

                                                                               

                                                                     

                      ·¢Æ± :  IIIII                             

                                                

                      Ãû³Æ :  OOOOOOOOOOOO                      

                                                

                      ×ÜÊý :  -6,666,666                         

                                                

                    ×ܽð¶î :  -6,666,666,666,666.66             

                                                

                      ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO    

                                                 

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                        F3= Í˳ö                                               

                                                                               

                                                                               

                  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                     

 

5.6Ö´Ðк󣬿ɼûϵͳÃû¡¢Óû§Ãû·ÅÖÃÔÚÓÒÉϽǣ¬ÈÕÆÚÏî·ÅÖÃÔÚ×óÉϽǡ£

                                                                               

         DD/DD/DD                ·¢Æ±²éѯ               SSSSSSSS               

                                                        UUUUUUUUUU             

                                                                               

                                                                               

                   ·¢Æ± :  IIIII                                                

                                                                               

                   Ãû³Æ :  OOOOOOOOOOOO                                        

                                                                                

                   ×ÜÊý :  -6,666,666                                          

                                                                               

                 ×ܽð¶î :  -6,666,666,666,666.66                                

                                                                               

                   ±¸×¢ :  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                      

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

                        F3= Í˳ö                                               

                                                                               

                                                                               

                  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                     

 

f¡¢ÐÞ¸Ä×Ö¶ÎÊôÐÔ£º

6.1¿ÉÒÔͨ¹ý¶ÔÆÁÄ»×Ö¶ÎÇ°Ãæ¼üÈëͨÅä·û*ÐÞ¸Ä×Ö¶ÎÊôÐÔ£º

ÀýÈ磺Ð޸ġ°F3=Í˳ö¡±µÄÑÕÉ«ÊôÐÔ¡£

 

                                                                               

                                                                                

         DD/DD/DD                ·¢Æ±²éѯ               SSSSSSSS               

                                                        UUUUUUUUUU             

                                                                               

                                                                                

                      INVOICE:  IIIII                                          

                                                                               

                         NAME:  OOOOOOOOOOOO                                   

                                                                               

                          SUM:  -6,666,666                                     

                                                                                

                        TOTAL:  -6,666,666,666,666.66                          

                                                                               

                         DEMO:  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                 

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                       *F3= Í˳ö                                               

                                                                               

                                                                               

                  OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                     

 

6.2Ñ¡È¡Colors¡­Y £º

 

                             Select Field Keywords                             

                                                                               

 Constant  . . . :   F3= Í˳ö                                                  

 Length  . . . . :   9                    Row . . . :  21   Column . . . :  25 

                                                                               

 Type choices, press Enter.                                                    

                                     Y=Yes   For Field Type                    

   Display attributes  . . . . . . .         All except Hidden                 

   Colors  . . . . . . . . . . . . .   Y     All except Hidden                 

                                                                                

                                                                               

                                                                               

   General keywords  . . . . . . . .         All types                         

                                                                               

                                                                               

                                                                                

   TEXT keyword  . . . . . . . . . .                                           

                                                                               

                                                                                

 F3=Exit   F4=Display Selected Keywords   F12=Cancel                           

                                                                               

 

6.3 ÓÃ1Ñ¡ÔñBlue . . . BLUÀ¶É«ÑÕÉ«£º

 

                                 Select Colors                                 

                                                                               

 Constant  . . . :   F3= Í˳ö                                                   

 Length  . . . . :   9                    Row . . . :  21   Column . . . :  25 

                                                                               

 Type choices, press Enter.                                                    

                                                                                

                                          Keyword   Order   Indicators/+       

                                                    (1-7)                      

   Colors:                                COLOR                                

     Blue . . . . . . . . . . . . . . .     BLU       1                        

     Green  . . . . . . . . . . . . . .     GRN                                

     Pink . . . . . . . . . . . . . . .     PNK                                

     Red  . . . . . . . . . . . . . . .     RED                                

     Turquoise  . . . . . . . . . . . .     TRQ                                

     White  . . . . . . . . . . . . . .     WHT                                

     Yellow . . . . . . . . . . . . . .     YLW                                

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

 F3=Exit   F12=Cancel                                                          

                                                                               

 

6.4¼üÈë2´ÎÖ´ÐУ¬»Øµ½±à¼­ÆÁÄ»£¬¿ÉÒÔ¿´µ½ÆäÑÕÉ«ÒѾ­±ä³ÉÀ¶É«£º

 

6.5ÓÃͬÑù·½·¨£º¡°*IIIII¡±¿É¸Ä±ä×Ö¶ÎIV_CODE×Ö¶ÎÊôÐÔΪ·´°×Reverse image£¬Ö´ÐкóÑ¡ÔñDisplay attributes£º

 

                             Select Field Keywords                             

                                                                               

 Field . . . . . :   IV_CODE              Usage . . :  I                        

 Length  . . . . :   5                    Row . . . :  7    Column . . . :  33 

                                                                               

 Type choices, press Enter.                                                     

                                     Y=Yes   For Field Type                    

   Display attributes  . . . . . . .   Y     All except Hidden                 

   Colors  . . . . . . . . . . . . .         All except Hidden                 

   Keying options  . . . . . . . . .         Hidden, Input or Both             

   Validity check  . . . . . . . . .         Input or Both, not float          

   Input keywords  . . . . . . . . .         Input or Both                     

   General keywords  . . . . . . . .         All types                         

                                                                               

   Database reference  . . . . . . .         Hidden, Input, Output, Both       

   Error messages  . . . . . . . . .         Input, Output, Both               

                                                                               

                                                                               

                                                                                

   TEXT keyword  . . . . . . . . . .   INVOICE                                 

                                                                               

                                                                                

 F3=Exit   F4=Display Selected Keywords   F12=Cancel                           

                                                                               

6.6ÓÃYÑ¡ÔñReverse image £º

 

                           Select Display Attributes                           

                                                                               

 Field . . . . . :   IV_CODE              Usage . . :  I                       

 Length  . . . . :   5                    Row . . . :  7    Column . . . :  33 

                                                                               

 Type choices, press Enter.                                                    

                                              Keyword   Y=Yes   Indicators/+   

   Field conditioning . . . . . . . . . . .                                    

   Program-to-system field  . . . . . . . .                                    

   Display attributes:                        DSPATR                           

     High intensity . . . . . . . . . . . .     HI                             

     Reverse image  . . . . . . . . . . . .     RI        Y                    

     Column separators  . . . . . . . . . .     CS                             

     Blink  . . . . . . . . . . . . . . . .     BL                             

     Nondisplay . . . . . . . . . . . . . .     ND                             

     Underline  . . . . . . . . . . . . . .     UL                             

     Position cursor  . . . . . . . . . . .     PC                             

     Set modified data tag  . . . . . . . .     MDT                            

     Protect field  . . . . . . . . . . . .     PR                             

     Operator ID magnetic card  . . . . . .     OID                            

     Select by light pen  . . . . . . . . .     SP                             

                                                                               

 F3=Exit   F12=Cancel                                                           

                                                                               

 

6.7¼üÈë2´ÎÖ´ÐУ¬Í¬Ê±Ò²Ð޸ķ¢Æ±×Ö¶ÎÊôÐÔΪBÐÍ£»Ð޸ĵÚ24ÐеÄ×Ö·ûÐͱäÁ¿MSGLINEÑÕɫΪºìÉ«£¬ÒÔÈÃÌáʾÐÅÏ¢ÐÑÄ¿¡£

×îºóÍê³ÉÆÁÄ»Éè¼ÆÈçÏ£º

 

 

h¡¢±£´æÆÁÄ»£º

7.1°´F3£¬Ñ¡Ôñ1=±£´æÍ˳ö£º

 

                                Exit SDA Work Screen                           

                                                                                

 Select one of the following:                                                  

                                                                               

     1. Save work since last Enter and exit work screen                        

     2. Exit without saving any work done on the work screen                   

     3. Resume work screen session                                             

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

 Selection                                                                     

     1                                                                         

                                                                                

 F12=Cancel                                                                    

                                                                               

i¡¢ÎªÆÁÄ»Ìí¼Ó¿ØÖƹؼü×Ö£º

ΪÁËʹÓüüÅÌÉϵÄF1ÖÁF24¹¦Äܼü¿ØÖÆÆÁÄ»¶¯×÷£¬ÎÒÃÇÐèҪΪÆÁÄ»Ìí¼Ó¿ØÖƹؼü×Ö¡£

ÏÂÁÐΪÎÒÃǸÕÉè¼ÆµÄÆÁÄ»Ìí¼ÓF3Í˳ö¹¦ÄܵĿØÖƹؼü×Ö¡£

 

8.1¼üÈë8Ñ¡ÔñÆÁÄ»¹Ø¼ü×Ö£º

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   IVSCREEN  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                     

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

                                                                               

 8       10    DSP_PMPT      RECORD                      12/19/04              

                                                                                

                                                                               

                                                                               

                                                                                

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

 Image updated for record DSP_PMPT.                                            

8.2ÔÚIndicator keywords¡­Y,È»ºóÖ´ÐС£

ʹÓÃָʾ·ûÊÇΪÁËǶÈëÔÚRPGIVÖнøÐÐÂß¼­¿ØÖÆ£¬Ëü½öÓС®1¡¯»ò¡®0¡¯Á½ÖÖ״̬¡£

 

                            Select Record Keywords                             

                                                                               

 Record . . . :   DSP_PMPT                                                     

                                                                               

 Type choices, press Enter.                                                    

                                                                                

                                     Y=Yes                                     

   General keywords  . . . . . . . .                                           

   Indicator keywords  . . . . . . .   Y                                        

   Application help  . . . . . . . .                                           

   Help keywords . . . . . . . . . .                                           

   Output keywords . . . . . . . . .                                            

   Input keywords  . . . . . . . . .                                           

   Overlay keywords  . . . . . . . .                                           

                                                                                

   Print keywords  . . . . . . . . .                                           

   ALTNAME keyword . . . . . . . . .                                           

                                                                               

   TEXT keyword  . . . . . . . . . .                                           

                                                                               

                                                                               

                                                                                

 F3=Exit   F4=Display Selected Keywords   F12=Cancel                           

                                                                               

 

8.3 ±¾½çÃæÊǶ¨ÒåÆÁÄ»µÄ¹¦Äܼü£¬¿ÉÒÔ¶¨ÒåF1ÖÁF24Ò»¹²24¼üµÄ¹¦ÄÜ£¬ÒÔ¼°ÏòÉÏ·­Ò³¡¢ÏòÏ·­Ò³¡¢°ïÖú¼üµÈµÈ¡£

×¢Ò⣺CF¼üÓëCA¼üÊÇÓÐËù²»Í¬µÄ£¬CF¼ü¿ÉÒÔʵÏÖ¶ÔÆÁÄ»¼üÈëÊý¾ÝµÄÐ޸ģ¬¶øCA¼ü½ö½öÊÇ¿ØÖÆÆÁÄ»£¬²»Éæ¼°ÐÞ¸ÄÊý¾Ý¡£CF¡¢CA¼ü²»¿ÉÒÔ»ìÓá£

 

                           Define Indicator Keywords                           

                                                                               

 Record . . . :   DSP_PMPT                                                     

                                                                               

 Type keywords and parameters, press Enter.                                    

   Conditioned keywords:       CFnn CAnn CLEAR PAGEDOWN/ROLLUP PAGEUP/ROLLDOWN 

                               HOME HELP HLPRTN                                

   Unconditioned keywords:     INDTXT VLDCMDKEY SETOF CHANGE                   

                                                                                

 Keyword   Indicators/+ Resp Text                                              

 CF03                    03  Exit                                              

                                                                                

                                                                               

                                                                               

                                                                         Bottom

 F3=Exit   F12=Cancel                                                          

                                                                               

j¡¢±£´æDSPFÎļþ²¢±àÒëΪĿ±ê£º

 

9.1°´F3ºó»Øµ½ÈçÏ»­Ã棻

 

                      Work with Display Records                                

                                                                               

 File  . . . . . . :   QDDSSRC                Member . . . . . . :   IVSCREEN  

   Library . . . . :     QINGZHOU             Source type  . . . :   DSPF      

                                                                               

 Type options, press Enter.                                                    

   1=Add             2=Edit comments          3=Copy          4=Delete         

   7=Rename          8=Select keywords       12=Design image                   

                                                                               

 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 

                                                                               

         10    DSP_PMPT      RECORD                      12/19/04              

                                                                               

                                                                                

                                                                               

                                                                               

                                                                         Bottom

 F3=Exit                     F12=Cancel      F14=File-level keywords           

 F15=File-level comments     F17=Subset      F24=More keys                     

 Keywords updated for record DSP_PMPT.                                         

 

9.2ÔÙ°´F3ʱ£¬³öÏÖ±àÒëDSPF»­Ã棺

Á¬Ðø2´ÎÖ´ÐС£µÚÒ»´Î±íʾ±£´æDDSÔ´Â룬µÚ¶þ´Î±íʾÉú³ÉÄ¿±ê¡£

 

                         Save DDS - Create Display File                        

                                                                                

 Type choices, press Enter.                                                    

                                                                               

   Save DDS source  . . . . . . . . . . . .   Y            Y=Yes               

     Source file  . . . . . . . . . . . . .   QDDSSRC      F4 for list         

       Library  . . . . . . . . . . . . . .   QINGZHOU     Name, *LIBL ...     

     Member . . . . . . . . . . . . . . . .   IVSCREEN     F4 for list         

     Text . . . . . . . . . . . . . . . . .                                    

                                                                               

                                                                               

   Create display file  . . . . . . . . . .   Y            Y=Yes               

     Prompt for parameters  . . . . . . . .                Y=Yes               

     Display file . . . . . . . . . . . . .   IVSCREEN     F4 for list         

       Library  . . . . . . . . . . . . . .   QINGZHOU     Name, *CURLIB       

     Replace existing file  . . . . . . . .                Y=Yes               

                                                                               

   Submit create job in batch . . . . . . .   Y            Y=Yes               

                                                                               

   Specify additional                                                          

     save or create options . . . . . . . .                Y=Yes                

                                                                               

 F3=Exit   F4=Prompt   F12=Cancel                                              

 Member IVSCREEN already exists. Press Enter to replace.                      +

 

ÖÁ´ËÆÁÄ»Éè¼ÆÒѾ­È«²¿Íê³É¡£

¶ÔÓÚÑ¡Ïî2. Design menusÉè¼Æ²Ëµ¥£¬ÓÉÓںܼòµ¥£¬Ôڴβ»ÔÙ׸Êö¡£

¸½IVSCREENÕâ¸öDSPFµÄÔ´ÂëÈçÏ£º

 

 Columns . . . :    1  71            Edit                      QINGZHOU/QDDSSRC

 SEU==>                                                                IVSCREEN

 FMT A* .....A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 

        *************** Beginning of data *************************************

0000.10      A*%%TS  SD  20041219  164718  QINGZHOU    REL-V5R1M0  5722-WDS    

0000.20      A*%%EC                                                             

0000.30      A                                      DSPSIZ(24 80 *DS3)         

0000.40      A          R DSP_PMPT                                             

0000.50      A*%%TS  SD  20041219  164718  QINGZHOU    REL-V5R1M0  5722-WDS    

0000.60      A                                      CF03(03 'Exit')            

0000.70      A                                  7 19' ·¢Æ± :'                  

0000.80      A            IV_CODE   R        B  7 28REFFLD(IV_FMT/IV_CODE QINGZHOU/INVO-

0000.90      A                                      ICE)                       

0001.00      A                                      DSPATR(RI)                 

0001.10      A                                  9 19' Ãû³Æ :'                   

0001.20      A            IV_NAME   R        O  9 28REFFLD(IV_FMT/IV_NAME QINGZHOU/INVO-

0001.30      A                                      ICE)                       

0001.40      A                                 11 19' ×ÜÊý :'                   

0001.50      A            IV_QUTITY R        O 11 28REFFLD(IV_FMT/IV_QUTITY QINGZHOU/IN-

0001.60      A                                      VOICE)                     

0001.70      A                                 13 17' ×ܽð¶î :'                 

0001.80      A            IV_AMOUNT R        O 13 28REFFLD(IV_FMT/IV_AMOUNT QINGZHOU/IN-

0001.90      A                                      VOICE)                     

0002.00      A                                 15 19' ±¸×¢ :'                  

0002.10      A            IV_DESC   R        O 15 28REFFLD(IV_FMT/IV_DESC QINGZHOU/INVO-

0002.20      A                                      ICE)                       

0002.30      A                                  3 33' ·¢Æ±²éѯ '               

0002.40      A                                 21 25'F3= Í˳ö '                

0002.60      A            MSGLINE       40   O 24 19COLOR(RED)                          

0002.70      A                                  3 10DATE                       

0002.80      A                                      EDTCDE(Y)                  

0002.90      A                                  3 57SYSNAME                    

0003.00      A                                  4 57USER                       

        ****************** End of data ****************************************

                                                                               

                                                                               

 F3=Exit   F4=Prompt   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle      

 F16=Repeat find       F17=Repeat change          F24=More keys                

                                                                               

 

D¡¢±àÖÆRPGIV½»»¥Ê½³ÌÐò£º

 

ÏÂÃæ¾ÙÀý˵Ã÷£º±àÖÆÒ»¸öÊý¾Ý²éѯ³ÌÐò£¬¼üÈ뷢ƱºÅ£¬ÏÔʾ·¢Æ±Ã÷ϸÏî¡£

 

4.1.ÀûÓÃSEUÊéдRPGIV´úÂ룬¼ÙÉèRPGIV³ÌÐòÃûΪQRYIV£º

 

                       Start Source Entry Utility (STRSEU)                     

                                                                               

 Type choices, press Enter.                                                     

                                                                               

 Source file  . . . . . . . . . . > QRPGLESRC     Name, *PRV                   

   Library  . . . . . . . . . . . >   QINGZHOU    Name, *LIBL, *CURLIB, *PRV   

 Source member  . . . . . . . . .   QRYIV         Name, *PRV, *SELECT          

 Source type  . . . . . . . . . .   RPGLE         Name, *SAME, BAS, BASP...    

 Text 'description' . . . . . . .   Query Invoice RPGIV Program                

                                                                                

                                                                               

                                                                               

                                                                                

                                                                         Bottom

 F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display   

 F24=More keys                                                                  

                                                                               

4.2.³öÏÖSEUÆÁÄ»¡£

С¼¼ÇÉ£ºÎÒÃÇ¿ÉÒÔÔÚ×óÀ¸¼üÈëFMT£¬Í¬Ê±ÔÚͨÐдúÂëÀ¸¼üÈëFºóÖ´ÐУ¬¿ÉÒÔµ÷³öFFilename++IPEASFRlen+LKlen+AIDevice+.Keywords+++++++++++++++À¸£¬±ãÓÚÊéд´úÂë¶ÔӦλÖá£

 

 Columns . . . :    6  76            Edit                    QINGZHOU/QRPGLESRC

 SEU==>                                                                   QRYIV

 FMT F  FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords+++++++++++++++++++++++++

        *************** Beginning of data *************************************

FMT     F                                                                      

        ****************** End of data ****************************************

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

 F3=Exit   F4=Prompt   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle      

 F16=Repeat find       F17=Repeat change          F24=More keys                

Prompt or format not correct, or does not exist.                               

 

3.ʵÏÖ²éѯ¹¦ÄܵÄRPGIV³ÌÐò´úÂëÈçÏ£º

´ó¼Ò¿ÉÒԸоõµ½RPGIVÊéд¸ñʽÃ÷ÏÔ±ÈRPGIV×ÔÓÉÁ˺ܶࡣ

Èç¹ûÐèÒªÏêϸ½â˵ÿÐдúÂëµÄÒâ˼£¬¿ÉÒÔ¸úÌûÌá³ö¡£

 Columns . . . :    6  76           Browse                   QINGZHOU/QRPGLESRC

 SEU==>                                                                   QRYIV

 FMT ** ... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+.

        *************** Beginning of data *************************************

0000.04   //Create by TRF.LIU YUAN YAO 2004.12.18.                             

0000.05   //Query invoice RPGIV Program.                                       

0000.06                                                                         

0001.00 FINVOICE   IF   E           K DISK                                     

0002.00                                                                        

0003.00 FIVSCREEN  CF   E             WORKSTN                                  

0004.00                                                                        

0005.00  /FREE                                                                 

0005.01                                                                         

0006.00   DOW NOT *IN03;                                                       

0006.01                                                                        

0007.00    EXFMT DSP_PMPT;                                                      

0008.00                                                                        

0009.00    IF IV_CODE<>*BLANK;                                                 

0009.01                                                                         

0010.00       CHAIN IV_CODE IV_FMT;                                            

0011.00       *IN50=NOT %FOUND;                                                

0011.01                                                                         

0012.00       IF *IN50;                                                        

0012.01                                                                        

0013.00          IV_NAME=*BLANK;                                               

0014.00          IV_QUTITY=*ZERO;                                              

0015.00          IV_AMOUNT=*ZERO;                                              

0016.00          MSGLINE=' Î޴˱¸¼þ !';                                        

0016.01                                                                        

0017.00       ELSE;                                                            

0017.01                                                                         

0018.00          MSGLINE=*BLANK;                                               

0018.01                                                                        

0019.00       ENDIF;                                                            

0019.01                                                                        

0020.00    ENDIF;                                                              

0020.01                                                                         

0021.00   ENDDO;                                                               

0022.00                                                                        

0023.00   *INLR=*ON;                                                           

0024.00   RETURN;                                                              

0025.00                                                                        

0026.00  /END-FREE                                                             

        ****************** End of data ****************************************

                                                                               

                                                                               

                                                                                

                                                                               

 F3=Exit   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle   F12=Cancel     

 F16=Repeat find        F24=More keys                                           

                                                                               

E¡¢ÀûÓÃDFUÊäÈëÊý¾Ý£º

 

5.1.ÓÉÓÚÒѾ­ÔÚÉÏ»ØÓÐרÃÅÏêϸ½²½âDFUÓ÷¨£¬ÔÚ´ËÖ»×öÒ»±Ê´ø¹ý¡£

 

                          Work with Objects Using PDM                  S656C33B

                                                                                

 Library . . . . .   QINGZHOU         Position to . . . . . . . .              

                                      Position to type  . . . . .              

                                                                                

 Type options, press Enter.                                                    

   12=Work with             13=Change text           15=Copy file              

   16=Run                   18=Change using DFU      25=Find string ...        

                                                                               

 Opt  Object      Type        Attribute   Text                                 

      QRYIV       *PGM        RPGLE       Query Invoice RPGIV Program          

 18   INVOICE     *FILE       PF-DTA      invoice dds cource code              

      IVSCREEN    *FILE       DSPF        invoice screen display file          

      QDDSSRC     *FILE       PF-SRC      dds source code                      

      QRPGLESRC   *FILE       PF-SRC      rpgiv source code                    

      REFILE      *FILE       PF-DTA      data dictionary reference file       

                                                                                

                                                                               

                                                                         Bottom

 Parameters or command                                                         

 ===>                                                                          

 F11=Display names and types    F12=Cancel               F13=Repeat            

 F14=Display Size               F23=More options         F24=More keys         

                                                                                

5.2.ÊäÈë2±Ê²âÊÔÊý¾Ý£º

 

 WORK WITH DATA IN A FILE                       Mode . . . . :   CHANGE        

 Format . . . . :   IV_FMT                      File . . . . :   INVOICE       

                                                                               

  ·¢Æ± :   00001                                                               

  Ãû³Æ :   DICTIONARY                                                          

  ×ÜÊý :       100                                                             

  ×ܽð¶î :            100000                                                     

  ±¸×¢ :    ²âÊÔÊý¾Ý                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

 F3=Exit                 F5=Refresh               F6=Select format             

 F9=Insert               F10=Entry                F11=Change                   

                                                                                

 

 WORK WITH DATA IN A FILE                       Mode . . . . :   CHANGE        

 Format . . . . :   IV_FMT                      File . . . . :   INVOICE       

                                                                                

  ·¢Æ± :   00002                                                               

  Ãû³Æ :   AS/400 ½Ì²Ä                                                         

  ×ÜÊý :         2                                                             

  ×ܽð¶î :            560000                                                     

  ±¸×¢ :   AS06 (RPGIV FUNDAMENTALS)                                           

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

 F3=Exit                 F5=Refresh               F6=Select format             

 F9=Insert               F10=Entry                F11=Change                   

                                                                                

5.3Êý¾Ý±£´æÍê±Ï£¬¿ÉÒÔͨ¹ýSTRSQL²éѯ½á¹û£º

 

                              Enter SQL Statements                             

                                                                               

 Type SQL statement, press Enter.                                               

      Current connection is to relational database S656C33B.                   

 ===> select * from qingzhou/invoice                                           

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                        Bottom 

 F3=Exit   F4=Prompt   F6=Insert line   F9=Retrieve   F10=Copy line            

 F12=Cancel            F13=Services     F24=More keys                          

                                         (C) COPYRIGHT IBM CORP. 1982, 2000.   

     

5.4¡¢STRSQL²éѯ½á¹ûÈçÏ£º

 

                                  Display Data                                 

                                              Data width . . . . . . :      87 

 Position to line  . . . . .              Shift to column  . . . . . .          

 ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....

  ·¢Æ±    Ãû³Æ              ×ÜÊý                 ×ܽð¶î    ±¸×¢                

 00001   DICTIONARY           100               1,000.00   ²âÊÔÊý¾Ý            

 00002   AS/400 ½Ì²Ä            2               5,600.00  AS06 (RPGIV FUNDAMENTA

 ********  End of data  ********                                               

                                                                               

 

                                                                                

                                                                               

                                                                               

                                                                                

                                                                       Bottom  

 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           

                                                                                

5.5¡¢»òÕßͨ¹ýSTRQRY²éѯÊäÈëµÄ½á¹û¡£Èç¹û²éѯ¶¨ÒåÒѾ­±£´æ£¬Ï´οÉÒÔÖ±½Óͨ¹ýÖ´ÐУºRUNQRY QRY(QINGZHOU/QUERY_IV) ¿ìËÙ²éѯ½á¹û¡£

 

                                 Display Report                                

                                              Report width . . . . . :      87 

 Position to line  . . . . .              Shift to column  . . . . . .         

 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+....7..

         ·¢Æ±    Ãû³Æ              ×ÜÊý                 ×ܽð¶î    ±¸×¢         

 000001 00001   DICTIONARY           100               1,000.00   ²âÊÔÊý¾Ý     

 000002 00002   AS/400 ½Ì²Ä            2               5,600.00  AS06 (RPGIV FUN

 ****** ********  End of report  ********                                      

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                       Bottom  

 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           

                                                                                

 

 

F¡¢ÔËÐгÌÐò£º

ͨ¹ý£º±àÒ롪¼ì²éSPLF´íÎóÁÐ±í¡ªÐÞÕý³ÌÐò¡ªÔÙ±àÒ롪Íê³É ²½Ö裬µ÷ÊÔºÃRPGIV³ÌÐò¡£

È·±£LIBL¿âÁбíÖк¬ÓзÅÖôúÂëµÄ¶ÔÓ¦¿â£¬È»ºóÔÚÃüÁîÐÐÖ´ÐÐCALL QRYIV ¡£

6.1ÔÚ·¢Æ±À¸ÊäÈë00000ºóÖ´ÐУ¬Ï·½Ìáʾ¡°Î޴˱¸¼þ£¡¡±£¬ËµÃ÷³ÌÐòʵÏÖÁËËùÆÚ´ýµÄÌáÐÑ»úÄÜ¡£

 

6.2¡¢ÔÙ·Ö±ð²éѯ00001¡¢00002·¢Æ±ºÅ£¬ÆÁÄ»Áгö¸Ã·¢Æ±ºÅ¶ÔÓ¦µÄÃ÷ϸÏî¡£

 

 

G¡¢½áÊøÓ

 

ÏÖÔÚ£¬ÎÒÃÇÖÕÓÚÍê³ÉÁË´ÓDSPFµ½RPGIV±àд¹ý³Ì£¬ÊµÏÖÁ˼òµ¥µÄ½»»¥Ê½³ÌÐòµÄÉè¼Æ¹ý³Ì¡£ÎÒÃÇѧϰÁË»ù±¾µÄSDA¡¢RPGIVµÄF¡¢CÀඨÒ壬ָʾ·ûµÄÓ÷¨£¬ÒÔ¼°ÈçºÎʹÓÃDSPF+RPGIVÀ´±àÖƳÌÐò¡£

ÎÒÃDZ¾ÆªÓÃSDAËùÉè¼ÆµÄÊǶÔÎļþµ¥Ò»¼Ç¼½øÐвÙ×÷µÄÏÔʾÎļþ½çÃ棬¶ø×ÓÎļþ¿ÉÒÔͬʱ¶ÔÎļþÒ»×é¼Ç¼½øÐвÙ×÷µÄÏÔʾÎļþ½çÃæ¡£

×ÓÎļþÉè¼ÆÊdzÌÐòÉè¼ÆµÄÖصãºÍÄѵ㣬Èç¹û¿ÉÄܵĻ°£¬½«ÔÚÏÂһƪ·ù½øÐÐÖð²½ÉîÈë½éÉÜ¡£

 

 

5.4.CL

 

5£®4£®1 ¸Å Êö

ÌáÒª£º

* CL ÃüÁîµÄ×÷ÓÃ

* CL ÃüÁîµÄ·ÖÀà

* ϵͳ²Ëµ¥

 

 

5£®4£®1 .1 CL ÃüÁîµÄ×÷ÓÃ

 

CL £¨Control Language) ¿ØÖÆÓïÑÔÊÇÓû§Óë²Ù×÷ϵͳ֮¼äµÄÖ÷Òª½Ó¿Ú¡£¿ÉÒÔ˵Óû§¹ÜÀíºÍ²Ù×÷ AS/400 ϵͳ£¬¾ù¿ÉÒÔͨ¹ý CL ʵÏÖ¡£Óû§ÔÚ²»Í¬µÄ¹¤×÷Õ¾»ò¿Í»§¶Ë¿ÉÒÔͬʱʹÓà CL£¬ÆäÊäÈ뷽ʽÓÐÎåÖÖ:

 

* ÔÚÃüÁîÐÐÊäÈë

* Ôڲ˵¥»­ÃæÑ¡Ôñ

* ÔÚ work with ²Ëµ¥ÖУ¬option Ñ¡Ïî

* ÔÚ CL ³ÌÐòÖÐÖ´ÐÐ

* Ô¶³Ìµ÷ÓÃ

 

Ç°ÈýÖÖÊäÈ뷽ʽ¸øÓû§ÌṩһÖÖ½»»¥Ê½µÄ²Ù×÷·½·¨£¬Ö»Ö´ÐÐÒ»ÌõÃüÁµÚËÄÖÖ·½Ê½¸øÓû§ÌṩһÖÖ²Ù×÷,²¢°üº¬Âß¼­¿ØÖÆ,¿ÉÒÔÍêÕûµØʵÏÖÒ»ÏÄÜ£»µÚÎåÖÖ·½Ê½¸øÓû§ÌṩÔÚ¿Í»§¶ËÖ±½ÓÖ´ÐÐÖ÷»ú²Ù×÷µÄ½Ó¿Ú¡£

 

ÓÉÓÚ CL ʹÓÃÁËͳһµÄÃüÃû·½·¨£¬Ìṩ prompt ʽµÄÌáʾ¹¦Äܺ;ßÌåµ½ÓòÖµµÄÔÚÏß°ïÖú£¬ÒÔ¼°×Ô¶¯Éú³ÉÃüÁî²ÎÊýµÄȱʡֵ, ÔÙ¼ÓÉÏÓÐЧÐÔ¼ì²é£¬´Ó¶øʹµÃ CL µÄʹÓñäµÃ·Ç³£¼òµ¥¡¢·½±ãºÍÁé»î¡£

 

 

5£®4£®1 .2 CL ÃüÁîµÄ²ÎÊý

 

CL ʹÓÃÁËÒ»ÖֺܿÆѧ£¬½ÏΪ³É¹¦µÄÃüÃû·½·¨¡£Ã¿ÌõÃüÁîÓÉÃüÁîÃûºÍһϵÁвÎÊý×é³É¡£ÃüÁîÃûͨ³£Óɶ¯´Ê¼ÓÉϽÓÊܶ¯´ÊµÄÃû´Ê¶¨ÒåΪĿ±êOb ject£©×é³É£¬µ¥´Êͨ³£ËõдΪÈý¸ö×Öĸ¡£

 

ÀýÈ磺

CL ÃüÁî                  ÃüÁîÃû

Send Message              SNDMSG

Copy File                  CPYF

Work with Device Desripyions  WRKDEVD

 

CL µÄ²ÎÊýÓɹؼü×ֺͲÎÊýÖµ×é³É£¬¹Ø¼ü×Öͨ³£ºÍÃüÁîÒ»ÑùËõд£¬ËüÓÃÓÚ˵Ã÷²ÎÊýµÄ×÷Óã¬ÔÚÃüÁîÊäÈëÆÁ£¬°´ F11 ¼ü£¬¼´¿É¿´µ½¹Ø¼ü×Ö¡£ÔÚÃüÁîÐÐÊäÈëÃüÁîʱ£¬Èç¹û²ÎÊýÊÇ°´Õչ̶¨µÄ˳ÐòÊäÈ룬Ôò¿ÉÒÔÊ¡ÂԹؼü×Ö¡£

 

ÀýÈç: SNDMSG MSG (HOLLEO) TOUSR (LENG)

 

ÃüÁîÃû ¹Ø¼ü×Ö ²ÎÊýÖµ

 

´ó¶àÊý CL ¶¼ÊÇ Õë¶ÔÄ¿±ê¶øÑÔ£¬Ä¿±êÊÇÒ»¸öÕ¼¾ÝÁËÒ»¶¨´æ´¢¿Õ¼äµÄʵÌ壬Ëü°üÀ¨×ÔÉíÊôÐÔ¼°ÆäÊý¾ÝÌØÕ÷µÄÃèÊö£¬ÏµÍ³¿ÉÒÔ¶ÔËü½øÐвÙ×÷¡£Ä¿±êµÄÊôÐÔ°üÀ¨Ãû×Ö¡¢ÀàÐÍ¡¢³¤¶È¡¢½¨Á¢ÈÕÆÚ¼°ÆäËüÊôÐÔ¡£²»Í¬Ä¿±ê¾ßÓв»Í¬µÄÊôÐÔÃèÊö£¬´ó²¿·ÖÊôÐÔÊÇ¿ÉÒÔÐ޸ĵģ¬¶ø²»ÐèÒªÖØн¨Á¢¡£Ä¿±êµÄÊý¾ÝÖµÊÇ´¢´æÓÚÄ¿±êÖеÄÐÅÏ¢¼¯ºÏ£¬ÀýÈç: ³ÌÐòµÄÖµÊÇ×é³É³ÌÐòµÄÖ´ÐÐÂ룬ÎļþµÄÖµÊÇ×é³ÉÎļþµÄ¼Ç¼¡£

 

Ä¿±êµÄÀàÐͺܶ࣬³£Óõļ¸ÖÖ°üÀ¨£º

* LIB ¿â

* FILE Îļþ

* MSGF ÐÅÏ¢Îļþ

* PGM ³ÌÐò

* CMD ÃüÁî

* JOBQ ×÷Òµ¶ÓÁÐ

* DTAQ Êý¾Ý¶ÓÁÐ

* MSGQ ÐÅÏ¢¶ÓÁÐ

* OUTQ Êä³ö¶ÓÁÐ

* DTAARA Êý¾ÝÓò

* JRN ÈÕÖ¾

* JRNRCV ÈÕÖ¾½ÓÊÜÆ÷

* USRPRF Óû§¼òÒª±í

* SBSD ×ÓϵͳÃèÊö

* JOBD ×÷ÒµÃèÊö

* LIND Ïß·ÃèÊö

* CTLD ¿ØÖÆÆ÷ÃèÊö

* DEVD É豸ÃèÊö

 

Ò»¸ö¾ßÌåÄ¿±êÊÇÓÉÄ¿±êÃûºÍÄ¿±êÀàÐÍÀ´Î¨Ò»±êʶµÄ£¬²»Í¬µÄÄ¿±êÀàÐÍ¿ÉÒÔʹÓÃͬһ¸öÄ¿±êÃû¡£Ä¿±êÃûÓÉÓû§Ö¸¶¨£¬Ä¿±êÀàÐÍÓÉÉú³ÉËüµÄÃüÁî¾ö¶¨¡£²»Í¬ÀàÐ͵ÄÄ¿±ê¾ßÓв»Í¬µÄ²Ù×÷¡£ÀýÈ磺

CALL ÃüÁîÖ»Õë¶Ô *PGM Ä¿±ê½øÐвÙ×÷¡£

 

¹ØÓÚÄ¿±êµÄ²Ù×÷£¬ÏµÍ³Ò²½øÐÐÁËͳһµÄ¹æ·¶£¬³£Óõļ¸ÖÖ°üÀ¨£º

* WRK ¹¤×÷

* CRT ½¨Á¢

* ADD Ôö¼Ó

* CHG ¸Ä±ä

* DLT ɾ³ý

* DSP ÏÔʾ

* EDT ±à¼­

* CPY ¿½±´

* MOV Òƶ¯

* RNM ±äÃû

* SAV ±¸·Ý

* RST »Ö¸´

* RTV »ñÈ¡

* GRT ÊÚȨ

* DMP ת´¢

 

5£®4£®2  CL ±à³Ì

5£®4£®2. 1 CL ³ÌÐòµÄ×÷ÓÃ

 

CL ³ÌÐòÊÇÓÉ CL ÃüÁî×é³É£¬ÕâЩÃüÁî±»±àÒë³É¿É¹©Ëæʱµ÷ÓõijÌÐò¡£Ê¹Óà CL ³ÌÐòµÄÓŵã°üÀ¨£º

* CL ³ÌÐò±Èµ¥¶ÀÊäÈëºÍÔËÐÐÃüÁî¿ì£¬ÒòΪÃüÁî±»±àÒë³ÉÄܹ»Á¢¼´ÔËÐеÄÐÎʽ¡£

* ÓÐЩ¹¦ÄÜÐèÒª¶àÌõ CL ÃüÁîÒ»ÆðÍê³É¡£

* ²ÎÊý¿ÉÒÔ´«µÝ¸ø CL ³ÌÐò£¬CL ³ÌÐòÄÚ²¿Ò²½ÓÊÕ±äÁ¿µÄ¶¨Ò壬 ÒÔÊÊÓ¦ÌØÊâÐèÒªµÄ³ÌÐò²Ù×÷¡£

* CL ³ÌÐòÄܹ»ÏñÆäËü¸ß¼¶ÓïÑÔ³ÌÐòÒ»Ñù±»²âÊԺͼà¿Ø¡£

 

CL ³ÌÐò¿ÉÒÔÓ¦Óõ½Ðí¶à·½Ã棬°üÀ¨£º

* ͨ¹ý CL ³ÌÐòÍê³Éµ¥¶ÀÊäÈë CL ÃüÁîËù²»ÄÜÍê³ÉµÄ¹¦ÄÜ£¬ÀýÈ磬È˹¤»òÕ߶¨Ê±Ìá½»Åú×÷ÓÃÍê³ÉÒ»Ï×÷£¬ÈçÆô¶¯×Óϵͳ£¬ ½øÐÐÎļþ±¸·Ý£¬Õû¶Ùϵͳ×ÊÔ´¡£

* ¸ø½»»¥Ê½»òÅú´¦ÀíµÄÓ¦ÓóÌÐòÌṩһ¸ö½Ó¿Ú£¬Ê¹µÃÔÚÓ¦ÓóÌÐòÖÐÖ±½Ó½øÐÐϵͳ²Ù×÷»òÕß»ñȡϵͳ²ÎÊý¡£

* ÔÚÍøÂçͨÐÅ·½Ã棬CL ³ÌÐòÍùÍù³Ðµ£Ó¦ÓÃÖ÷¿Ø³ÌÐòµÄ½ÇÉ«¡£

 

5£®4£®2. 2 CL ³ÌÐòµÄ½á¹¹

CL ³ÌÐòÊǽèÖúÓÚ ADT ¹¤¾ßÖÐµÄ SEU ÊäÈëµÄ£¬ÔÚÊäÈë¹ý³ÌÖУ¬¼üÈëÒ»ÌõÃüÁî²¢°´ F4 ¼ü£¬¾Í»áÏÔʾ³öÕâÌõÃüÁîµÄÌáʾ»­Ã棬·½±ãÓû§ÊäÈëÏàÓ¦µÄ²ÎÊýÖµ¡£CL Ô´³ÌÐòÖ÷Òª·ÖΪÒÔϼ¸¸ö²¿·Ö£º

 

* ³ÌÐòµÄ¿ªÊ¼ºÍ½áÊø£º

PGM PARM£¨&A &B£© ¿ªÊ¼ CL ³ÌÐò

END PGM ½áÊø³ÌÐò

* ±äÁ¿¶¨Ò壺 DCL ¶¨Òå±äÁ¿

DCLF ¶¨ÒåÎļþ

* CL ´¦ÀíÃüÁ CHGVAR ±äÁ¿¸³Öµ

MONMSG ¼à¿Ø´íÎóÐÅÏ¢

SNDPGMMSG ´«ËͳÌÐòÐÅÏ¢

RTVJOBA »ñÈ¡×÷ÒµÊôÐÔÖµ

* Âß¼­¿ØÖÆÃüÁ IF THEN ELSE

DO ENDDO

GOTO

* ÄÚ²¿º¯Êý£º     % SST È¡×Ó´®

* CAT Á¬½Ó×Ö·û

* ³ÌÐò¿ØÖÆÃüÁ CALL µ÷ÓÃ×Ó³ÌÐò

RETURN ·µ»Øµ÷ÓóÌÐò

 

5£®4£®2. 3  CL ³ÌÐòµÄÃüÁî

 

CL ³ÌÐòÖнö¿É°üº¬ CL ÃüÁÓÉϵͳÌṩµÄ´ó¶àÊý CL ÃüÁî¿ÉÓÃÓÚ CL ³ÌÐò£¬¶øÓÐЩ CL ÃüÁîÊÇרÃÅÓÃÔÚ CL ³ÌÐòÖеġ£ ÏÂÃæÊÇÒ»ÕÅÓÃÔÚ CL ³ÌÐòÖеIJ¿·ÖÃüÁîÇåµ¥£¬ÆäÖдøÓÐÐǺŵıíʾ¸ÃÃüÁî½öÄÜÓÃÓÚ CL ³ÌÐòÄÚ²¿¡£

 

 ±äÁ¿µÄʹÓÃ

 

* ±äÁ¿ËµÃ÷£¬Ê¹Óà DCL ÃüÁîÀ´¶¨Òå±äÁ¿¼°ÆäÊôÐÔ¡¢³¤¶ÈºÍ³õÖµ¡£±ê×¼¸ñʽÈçÏ£º

* CHAR

DCL VAR (±äÁ¿Ãû) TYPE * DEC LEN (³¤¶È) VALUE(³õÖµ)

* LGL

 

ʹÓà DCL ÃüÁîʱ£¬±ØÐë×ñÑ­µÄ¹æÔòÈçÏ£º

#CL ±äÁ¿Ãû±ØÐëÒÔ & ¿ªÊ¼£¬ºó¸ú×Ö·û²»¶àÓÚ 10 ¸ö£¬& ºóµÄµÚÒ»¸ö×Ö·û±ØÐëÊÇ×Öĸ£¬ÆäÓàµÄ¿ÉÒÔÊÇ×Öĸ»òÊý×Ö¡£

#CL ±äÁ¿Öµ±ØÐëÊÇ£º×Ö·ûÐÍ×Ϊ 9999 ¸ö×Ö·û£»ÊýÖµÐÍΪѹËõÊ®½øÖÆÊý£¬×Ϊ 15 룬ÆäÖÐСÊýλ×Ϊ 9 λ£» Âß¼­ÐÍΪ¡°0¡±»ò¡°1¡±£¬±íʾ¼Ù»òÕæ¡£

#CL ±äÁ¿µÄȱʡ³õֵΪ£º×Ö·ûÐÍΪ¿Õ£¬ÊýÖµÐÍΪ 0£¬Âß¼­ÐÍΪ¡°0¡±¡£

#¶ÔÓÚ×Ö·ûÐͺÍÊýÖµÐÍ£¬Èç¹ûÖ¸¶¨Á˳õÖµ¶øδָ¶¨³¤¶È£¬Ôòȱʡ³¤¶ÈΪ³õÖµ³¤¶È¡£

* ±äÁ¿ÖµÖÐСд×Ö·ûµÄÏÞÖÆ

 

ÓÃ×÷±äÁ¿µÄ±£ÁôÖµ±ØÐëÓôóд×Öĸ±íʾ£¬ÌرðÊǵ±ËüÃÇÓÃÒýºÅÀ¨ÆðÀ´µÄʱºò¡£ÀýÈ磺

DCL VAR(&LIB) TYPE(*CHAR) LEN(10) VALUE('*LIBL')

DLTPGM &LIB/MY PROG

×¢Ò⣺Èç¹û VALUE ²ÎÊý²»Ê¹ÓÃÒýºÅ£¬ÔòСдÊÇÕýÈ·µÄ¡£ÒòΪʹÓà SEU ±à¼­»á×Ô¶¯×ª»»³É´óд¡£

 

* ±äÁ¿¸³Öµ£¬Ê¹Óà CHGVAR ÃüÁî¸ø±äÁ¿¸³Öµ£¬ÆäÖµ¿É¸Ä±ä³É£º

#³£Á¿£º CHGVAR VAR£¨&A£© VALUE£¨0£©

#±äÁ¿£º CHGVAR VAR£¨&A£© VALUE£¨&B£©

#¼ÆËãÁ¿£ºCHGVAR VAR£¨&A£© VALUE£¨&A+1£©

#º¯ÊýÁ¿£ºCHGVAR VAR£¨&A£© VALUE(%SST(&B 1 5))

CHGVAR VAR(%SST(&A 1 5)) VALUE(&B)

 

¸³ÖµÊ±Ó¦×¢ÒâÒÔϼ¸µã£º

#¶ÔÂß¼­±äÁ¿£¬±»¸Ä±äµÄÖµ±ØÐëÊÇÒ»¸öÂß¼­Öµ¡£

#¶ÔÊýÖµ±äÁ¿£¬Ö»Äܸ³ÓèÊ®½øÖÆÊý£¬»òÕßÊý×Ö×Ö·û±äÁ¿£¨°üÀ¨Ð¡ÊýµãºÍÕý¸ººÅ£©¡£

#¶Ô×Ö·û±äÁ¿£¬¼È¿É½ÓÊÜ×Ö·û£¬Ò²¿É½ÓÊÜÊ®½øÖÆÊý¡£¸³Ê®½øÖÆÊýʱ£¬¸Ã×Ö·û±äÁ¿µÄÖµÊÇÓÒ¶ÔÆ룬ǰµ¼²¹Á㣬¸ººÅ·ÅÔÚ×î×ó±ß¡£

 

* CL ³ÌÐòÖÐ×¢½âµÄÊéд£¬ÔÚÃüÁîµÄͷβʹÓÃÒ»¶Ô·ûºÅ£º/* ºÍ*/¡£

Èç¹ûÒ»ÐÐд²»ÏÂÒ»ÌõÃüÁʹÓà +¡£

 

 

5£®4£®2. 4  CL ³ÌÐòÄÚ²¿µÄÂß¼­¿ØÖÆ

 

* Ìõ¼þתÒÆÃüÁ

 

IF COND£¨Ìõ¼þ£© THEN£¨Ò»ÌõÃüÁ

ELSE CMD£¨Ò»ÌõÃüÁ

»òÕß IF COND£¨Ìõ¼þ£© THEN£¨DO£©

.

ENDDO

ELSE CMD £¨DO£©

.

ENDDO

 

* ÎÞÌõ¼þתÒÆÃüÁGOTO LABEL

 

* ²Ù×÷·û£º

Âß¼­µÄ *AND *OR *NOT

ËãÊõµÄ + - * /

×Ö·ûµÄ *CAT *TCAT

¹ØϵµÄ *EQ *GT *LT *GE *LE *NE

 

* ¼àÊÓÐÅÏ¢ÃüÁMONMSG

MONMSG MSGID£¨ÐÅÏ¢±êʶ 1 ¡­ ÐÅÏ¢±êʶ 50£©+ EXEC£¨CLÃüÁ

 

ϵͳ¶ÔÓÚCLÃüÁîÖ´ÐдíÎóËùËͳöµÄÐÅÏ¢¶¼¾ßÓÐΨһµÄ±êʶ·û£¬Èç¹û²»½øÐмàÊÓ£¬Ôòϵͳ»áÖնϳÌÐò£¬×Ô¶¯ÏÔʾ´íÎóÐÅÏ¢¡£

 

5£®4£®2. 5 ϵͳ×ÊÔ´µÄ»ñÈ¡

 

* ÈÕÆÚ¸ñʽת»»ÃüÁCVTDAT

CVTDAT DATE£¨±»×ª»»ÈÕÆÚ£© TOVAR£¨×ª»»ºóÈÕÆÚ£© FROMFMT£¨Ô­¸ñʽ£© TOFMT£¨Ð¸ñʽ£© TOSEP£¨Ð·ָô·û£©

ÆäÖУº×ª»»ºóÈÕÆڵij¤¶ÈÖÁÉÙÊÇ£º

#¶ÔÈåÂÔÈÕÆÚ£¨Èç YMD£¬DMY »ò JUL ¸ñʽ£©£¬²»Ê¹Ó÷ָô·ûΪ 5 ¸ö×Ö·û£¬Ê¹Ó÷ָô·ûΪ 6 ¸ö×Ö·û¡£

#¶Ô·ÇÈåÂÔÈÕÆÚ£¬²»Ê¹Ó÷ָô·ûΪ 6 ¸ö×Ö·û£¬Ê¹Ó÷ָô·ûΪ8 ¸ö×Ö·û¡£ ÈÕÆÚ¸ñʽºÍ·Ö¸ô·û¿ÉÒÔͨ¹ý°´ F4 ¼üÑ¡Ôñ¡£

 

* ¼ìË÷ϵͳֵÃüÁRTVSYSVAL

 

RTVSYSVAL SYSVAL£¨ÏµÍ³ÖµÃû£©RTNVAR£¨CL±äÁ¿Ãû£©

ÆäÖУºÏµÍ³ÖµÃû¿ÉÒÔͨ¹ý°´ F4 ¼üÑ¡Ôñ£¬È磺ϵͳµ±Ç°ÈÕÆÚµÄϵͳֵÊÇ QDATE¡£±äÁ¿Ãû±ØÐëºÍϵͳֵµÄÀàÐÍÆ¥Å䣬¶Ô×Ö·ûÐͺÍÂß¼­ÐÍϵͳֵ¶øÑÔ£¬±äÁ¿ÃûµÄ³¤¶È±ØÐëÏà·û£¬¶ÔÊý×ÖÐÍ£¬Ôò³¤¶È²»Ð¡ÓÚϵͳֵ³¤¶È¡£

 

* ¼ìË÷ÅäÖÃÔ´ÃüÁRTVCFGSRC

ÓÃÓÚ½«ÏÖÓÐÅäÖõÄÃèÊö´æ·Åµ½Ô´Îļþ³ÉÔ±ÖÐ

 

* ÅäÖÃ״̬¼ìË÷ÃüÁRTVCFGSTS

ÓÃÓÚ»ñÈ¡¸÷ÀàÅäÖÃÃèÊöµÄÏÖÐÐ״̬£¬·ÅÈë CL ±äÁ¿¡£

 

* ¼ìË÷ÍøÂçÊôÐÔµÄÃüÁRTVNETA

ÓÃÓÚ»ñȡϵͳµÄÍøÂçÊôÐÔ£¬·ÅÈëÏàÓ¦µÄ CL ±äÁ¿¡£È磺ϵͳÃûSYSNAME£¬±¾µØÍøÂç±êʶ LCLNETID¡£

 

* ¼ìË÷×÷ÒµÊôÐÔÃüÁRTVJOBA

ÓÃÓÚ»ñÈ¡µ±Ç°ÔËÐÐ×÷ÒµµÄÊôÐÔ£¬·ÅÈëÏàÓ¦µÄ CL ±äÁ¿¡£È磺×÷ÒµÃû JOB£¬Óû§Ãû USER¡£

 

* ¼ìË÷Ä¿±êÃèÊöÃüÁRTVOBJD

ÓÃÓÚ»ñÈ¡Ö¸¶¨Ä¿±êµÄÃèÊöÊôÐÔ£¬·ÅÈëÏàÓ¦µÄ CL ±äÁ¿¡£

 

* ¼ìË÷Óû§µµ°¸ÃüÁRTVUSRPRF

ÓÃÓÚ»ñÈ¡Ö¸¶¨Óû§µÄµµ°¸×ÊÁÏ£¬·ÅÈëÏàÓ¦µÄ CL ±äÁ¿¡£

 

5 .4 .3 ³ÌÐò¼äµÄͨѶ

³ÌÐò¼äµÄͨѶÊÇÖ¸²»Í¬³ÌÐòÖ®¼äÊý¾Ý»ò²ÎÊýµÄ´«µÝºÍ½»Á÷¡£ÕâÖÖͨѶ¿ÉÒÔ³öÏÖÔÚ²»Í¬ÖÖÀàµÄ³ÌÐòÖС£È磺RPG Óë C ÓïÑÔ£¬Ò²¿ÉÒÔ³öÏÖÔÚ²»Í¬»úÆ÷ÉÏ£¬È磺PC Óë AS/400¡£Õë¶ÔOS/400 ¶øÑÔ£¬Í¨³£³ÌÐò¼äµÄͨѶ¾ßÓÐÈýÖÖ·½Ê½£º

* CALL¡¢RETURN ÃüÁî

* Êý¾Ý¶ÓÁÐͨѶ

* Êý¾ÝÓòͨѶ

 

5.4.3.1 CALL ÃüÁîµÄʹÓÃ

µ÷ÓóÌÐò£º CALL PGM£¨PGMA£© PARM£¨&A &B£©

±»µ÷ÓóÌÐò£ºPGM PARM£¨&C &D£©

 

ÓÐ¹Ø CALL ÃüÁîʹÓõļ¸µã˵Ã÷£º

* ²ÎÊýÖµ¿ÉÒÔÊÇ×Ö·û³£Á¿¡¢ÊýÖµ³£Á¿¡¢Âß¼­³£Á¿»ò CL ³£Á¿£¬×î¶à¿É´ï 40 ¸ö¡£

* ²ÎÊýÖµÒÔ CALL ÃüÁîÖгöÏÖµÄ˳Ðò´«ËÍ£¬Õâ±ØÐëÓë±»µ÷ÓóÌÐòµÄ²ÎÊý˳ÐòÏàÆ¥Å䣬±äÁ¿Ãû²»Ò»¶¨Ïàͬ¡£

* ±»µ÷³ÌÐòÖеĽÓÊÕ²ÎÊý±ØÐë˵Ã÷£¬µ«½ÓÊÕÖµ²»ÊܱäÁ¿ËµÃ÷ÖгõÖµµÄÓ°Ïì¡£

* ½ÓÊÕ²ÎÊýÖµµÄ¸Ä±ä»á·´Ó³µ½µ÷ÓóÌÐòÖУ¬µ«³£Á¿´«ËͲ»»á¸Ä±ä¡£

* ×Ö·û³£Á¿Í¨³£ÒÔ 32 ¸ö×Ö½Ú´«ËÍ£¬Êý×Ö³£Á¿ÒÔ 15.5 ³¤¶ÈѹËõ¸ñʽ´«ËÍ¡£

 

5.4.3.2 Êý¾Ý¶ÓÁеijÌÐòͨѶ

Êý¾Ý¶ÓÁУ¨*DTAQ£©ÊÇϵͳĿ±êÖеÄÒ»ÖÖÀàÐÍ£¬µ±½¨Á¢ÁËÕâÖÖÄ¿±êºó£¬Ò»¸ö³ÌÐò¿ÉÒÔ·¢ËÍÊý¾Ý¸øËü£¬ÁíÒ»¸ö³ÌÐòÔÙ´ÓÖнÓÊÕÊý¾Ý£¬´Ó¶ø´ïµ½³ÌÐòÖ®¼äµÄÊý¾ÝͨѶ¡£

 

5.4.3.3 Êý¾Ý¶ÓÁеÄÓŵã

 

* Êý¾Ý¶ÓÁÐÊÇÁ½¸ö×÷ÒµÖ®¼ä½øÐÐÒ첽ͨѶµÄ×î¿ì·½·¨¡£Ïà¶ÔÊý¾Ý¿âÎļþ¡¢ÏûÏ¢¶ÓÁлòÊý¾ÝÓò¶øÑÔ£¬ËüÐèÒª½ÏÉٵĶîÍ⿪Ïú¡£

* ¶à¸ö×÷Òµ¿ÉÒÔÏòÏàͬµÄÊý¾Ý¶ÓÁÐËÍÊý¾ÝºÍÈ¡Êý¾Ý£¬¶øÊý¾Ý¶ÓÁеÄÏȽøÏȳö¡¢ºó½øÏȳö»ò¹Ø¼ü×Ö˳ÐòÅÅÁÐÊôÐÔ£¬Äܹ»±£Ö¤Êý¾ÝËÍÈ¡µÄÕýÈ·ÐÔ¡£

* ÔÚÈκθ߼¶ÓïÑÔ³ÌÐòÖУ¬Í¨¹ýµ÷ÓÃϵͳÌṩµÄ³ÌÐò£¬¾Í¿ÉÒÔ¶ÔÊý¾Ý¶ÓÁнøÐвÙ×÷£¬¶øÇÒ²Ù×÷·½·¨Áé»î·½±ã¡£Êý¾Ý¶ÓÁеIJÙ×÷ºÍʹÓðüÀ¨Á½ÀࣺµÚÒ»ÀàʹÓà CL ÃüÁµÚ¶þÀàµ÷ÓÃϵͳ³ÌÐò¡£

CL ÃüÁ

CRTDTAQ ½¨Á¢Êý¾Ý¶ÓÁÐ

DLTDTAQ ɾ³ýÊý¾Ý¶ÓÁÐ

WRKDTAQ ¹¤×÷Êý¾Ý¶ÓÁÐ

ϵͳ³ÌÐò£º

QSNDDTAQ ·¢ËÍÊý¾Ý¶ÓÁÐ

QRCVDTAQ ½ÓÊÕÊý¾Ý¶ÓÁÐ

QCLRDTAQ Çå³ýÊý¾Ý¶ÓÁÐ

QMHQRDQD ¼ìË÷Êý¾Ý¶ÓÁÐ

 

5.4.3.4 Êý¾Ý¶ÓÁеķ¢ËÍ

 

ÐèÒª½«Êý¾Ý·¢Ë͸øÊý¾Ý¶ÓÁУ¬Ö»ÒªÔÚ³ÌÐòÖе÷ÓÃQSNDDTAQ ¡£ÔÚ CL ³ÌÐòÖУ¬µ÷ÓõĸñʽÈçÏ£º

CALL PGM(QSNDDTAQ) PARM(&QNAME &LIB &FLDLEN &FIELD &KEYLEN &KEY)

&QNAME£º Êdz¤¶ÈΪ10µÄ×Ö·ûÐÍ£¬ËüÃüÃûÁËÊý¾Ý¶ÓÁУ¬È磺IN_Q¡£

&LIB£º Êdz¤¶ÈΪ10µÄ×Ö·ûÐÍ£¬ËüÃüÃûÁËÊý¾Ý¶ÓÁÐËùÔڵĿ⣬È磺*LIBL¡£

&FLDLEN£º Êdz¤¶ÈΪ5µÄÊý×ÖÐÍ£¬Ëü¹æ¶¨ÁË·¢Ë͸øÊý¾Ý¶ÓÁеÄ×Ö·ûÊý£¬È磺100¡£

&FIELD£º Êdz¤¶ÈΪ&FLDLENµÄ×Ö·ûÐÍ£¬Ëü°üº¬Á˾ßÌå·¢Ë͸øÊý¾Ý¶ÓÁеÄÊý¾Ý¡£

&KEYLEN£º Êdz¤¶ÈΪ3µÄÊý×ÖÐÍ,Ëü˵Ã÷ÁË´«Ë͸øÊý¾Ý¶ÓÁеĹؼü×Ö³¤¶È£¬È磺6¡£

&KEY£º Êdz¤¶ÈΪ&KEYLENµÄ×Ö·ûÐÍ£¬Ëü°üº¬ÁË´«Ë͸øÊý¾Ý¶ÓÁеĹؼü×ÖÊý¾Ý¡£

×¢£ººóÁ½¸ö²ÎÊý¿ÉÒÔ×ÔÑ¡£¬Èç¹û˵Ã÷ÁËÒ»¸ö£¬Ôò±ØÐë˵Ã÷ÁíÒ»¸ö¡£

 

5.4.3.5Êý¾Ý¶ÓÁеĽÓÊÕ

 

ÐèÒª´ÓÊý¾Ý¶ÓÁÐÖнÓÊÕÊý¾Ý£¬Ö»ÒªÔÚ³ÌÐòÖе÷ÓÃQRCVDTAQ ¡£ÔÚ CL ³ÌÐòÖУ¬µ÷ÓõĸñʽÈçÏ£º

CALL PGM(QRCVDTAQ) PARM(&QNAME &LIB &FLDLEN &FIELD &WAIT &ORDER KEYLEN &KEY &SNDRLEN &SNDR)

&QNAME£º Êdz¤¶ÈΪ10µÄ×Ö·ûÐÍ£¬ËüÃüÃûÁËÊý¾Ý¶ÓÁС£È磺 OUT_Q¡£

&LIB£º Êdz¤¶ÈΪ10µÄ×Ö·ûÐÍ£¬ËüÃüÃûÁËÊý¾Ý¶ÓÁÐËùÔڵĿ⡣È磺*LIBL¡£

&FLDLEN£º Êdz¤¶ÈΪ5µÄÊý×ÖÐÍ£¬Ëü¹æ¶¨ÁË·¢Ë͸øÊý¾Ý¶ÓÁеÄ×Ö·ûÊý¡£

&FIELD£º Êdz¤¶ÈΪ&FLDLENµÄ×Ö·ûÐÍ£¬Ëü°üº¬ÁË´ÓÊý¾Ý¶ÓÁÐÖнÓÊÕµ½µÄ¾ßÌåÊý¾Ý¡£

&WAIT£º Êdz¤¶ÈΪ5µÄÊý×ÖÐÍ£¬Ëü˵Ã÷Á˵ȴý½ÓÊÕÊý¾ÝµÄʱ¼ä¡£¸ºÊý±íʾÎÞÏÞÖƵĵȴý£»Áã±íʾ²»µÈ´ý£»

ÕýÊýʾҪµÈ´ýµÄÃëÊý£¬×î´óÖµÊÇ9999¡£Õâ¸ö²ÎÊýÖ»ÓÐÔÚÊý¾Ý¶ÓÁÐÖÐÎÞÂú×ãÌõ¼þµÄÊý¾Ýʱ, ²ÅÆð×÷



&ORDER£º Êdz¤¶ÈΪ2µÄ×Ö·ûÐÍ£¬Ëü˵Ã÷ÁË°´¹Ø¼ü×Ö½ÓÊÕÊý¾ÝµÄÌõ¼þ¡£¿ÉÓõÄ×Ö·ûÖµÊÇ£ºGT¡¢LT¡¢EQ¡¢

GE¡¢LE¡£

&KEYLEN£º Êdz¤¶ÈΪ3µÄÊý×ÖÐÍ,Ëü˵Ã÷Á˽ÓÊÕÊý¾Ý¶ÓÁеĹؼü×Ö³¤¶È¡£

&KEY£º Êdz¤¶ÈΪ&KEYLENµÄ×Ö·ûÐÍ£¬Ëü±êʶÁËÓÃÓÚ´ÓÊý¾Ý¶ÓÁÐÖнÓÊÕÊý¾ÝµÄ¹Ø¼ü×Ö±äÁ¿¡£

&SNDRLEN£ºÊdz¤¶ÈΪ3µÄÊý×ÖÐÍ£¬Ëü¹æ¶¨ÁË·¢ËÍÕß±êʶµÄ³¤¶È¡£

&SNDR£º Êdz¤¶ÈΪ&SNDRLEN µÄ×Ö·ûÐÍ£¬Ëü°üº¬ÁË·¢ËÍÕß±êʶµÄÊý¾Ý¡£

 

×¢£ººóÈý¸ö²ÎÊý¿ÉÒÔÈÎÑ¡£¬µ«ÊÇ&ORDER¡¢&KEYLENºÍ&KEY ±ØÐëͬʱ˵Ã÷¡£

 

5.4.3.6 Êý¾Ý¶ÓÁеÄÇå³ý

 

ÐèÒª´ÓÊý¾Ý¶ÓÁÐÖÐÇå³ýÊý¾Ý£¬Ö»ÒªÔÚ³ÌÐòÖе÷Óà QCLRDTAQ ÔÚ CL ³ÌÐòÖУ¬µ÷ÓõĸñʽÈçÏ£º

CALL PGM£¨QCLRDTAQ£© PARMM£¨&QNAME &LIB£©

 

5.4.3.7 Êý¾Ý¶ÓÁеļìË÷

 

ÐèÒª¼ìË÷Ò»¸öÊý¾Ý¶ÓÁеÄÃèÊöÏֻҪÔÚ³ÌÐòÖе÷ÓÃQMHQRDQD¡£ÔÚ CL ³ÌÐòÖУ¬µ÷ÓõĸñʽÈçÏ£º

CALL PGM£¨QMHQRDQD£© PARM£¨&RCVR &RCVRLEN &FORMAT &DQNAME£©

&RCVR£º Êdz¤¶ÈΪ&RCVRLENµÄ×Ö·ûÐÍ£¬Ëü±êʶÁ˺¬ÓÐÊý¾Ý¶ÓÁÐÐԵıäÁ¿¡£

&RCVRLEN£º Êdz¤¶ÈΪ4µÄÊý×ÖÐÍ£¬Ëü˵Ã÷ÁË&RCVR³¤¶È¡£

&FORMAT£º Êdz¤¶ÈΪ8µÄ×Ö·ûÐÍ£¬Ëü¶¨ÒåÁ˽ÓÊÕÄ£°åµÄ¸ñʽ¡£

&DQNAME£º Êdz¤¶ÈΪ20µÄ×Ö·ûÐÍ£¬Ëü±êʶÁËÊý¾Ý¶ÓÁкÍËùÔڿ⣬ǰʮ¸ö×Ö·ûÊǶÓÁÐÃû×Ö£¬ºóÊ®¸ö×Ö·ûÊÇ¿âÃû¡£

 

5.4.3.8 Êý¾ÝÓòµÄ³ÌÐòͨѶ

 

Êý¾ÝÓò£¨*DTAARA£©ÊÇϵͳĿ±êÖеÄÒ»ÖÖÀàÐÍ¡£µ±½¨Á¢ÁËÕâÖÖÄ¿±êºó£¬¿ÉÒÔÓÃÀ´´æÈëÊý¾Ý£¬ÒÔ±ãÈκγÌÐò½øÐжÁÈ¡ºÍÐ޸ġ£Êý¾ÝÓòµÄµäÐÍÓÃ;ÈçÏ£º

* ÌṩÓÃÓÚ¼¸¸ö³ÌÐòÖеij£Êý×ֶΣ¬Ò×ÓÚ¹²ÏíºÍÐ޸ġ£È磺±êÌ⡢˵Ã÷µÈ¡£

* ÔÚÒ»¸ö×÷ÒµÖÐÌṩһ¸ö´«µÝÐÅÏ¢µÄÇøÓò¡£

* ÔÚÒ»¸ö×÷ÒµÖÐÌṩһ¸ö×Ö¶Î×÷Ϊ¿ØÖƲÎÊý£¬ÒÔ±ãÈÝÒ׵صõ½Ð޸ġ£

 

Êý¾ÝÓòµÄ CL ÃüÁî°üÀ¨£º

CRTDTAARA ½¨Á¢Êý¾ÝÓò£¬³¤¶È²»³¬¹ý2000

CHGDTAARA ¸Ä±äÊý¾ÝÓò£¬¸Ä±äʱÊý¾ÝÓò±»Ëø¶¨

DSPDTAARA ÏÔʾÊý¾ÝÓò£¬¿ÉÒÔÒÔÊ®Áù½øÖÆ·½Ê½ÏÔʾ

RTVDTAARA ¼ìË÷Êý¾ÝÓò£¬¼ìË÷ÖµÐèÒª´æÈë CL ±äÁ¿

DLTDTAARA ɾ³ýÊý¾ÝÓò

WRKDTAARA ¹¤×÷Êý¾ÝÓò

 

5 .4 .4²âÊÔ¹¦ÄÜ

5.4.4.1 CL ³ÌÐòµÄ±àÒë

CL Ô´³ÌÐò±ØÐë¾­¹ý±àÒ룬Éú³É *PGM ·½¿ÉÔËÐС£½¨Á¢³ÌÐòµÄ·½·¨ÓÐÁ½ÖÖ£ºÒ»ÊÇ£¬Ê¹Óà CL ÃüÁî CRTCLPGM£¬¶þÊÇ£¬Ê¹ÓÃPDM ²Ëµ¥Ñ¡Ïî 14£¬°´ F4 ¼ü¼´¿É¶ÔÃüÁî²ÎÊý½øÐÐÑ¡Ôñ¡£

ϵͳ±àÒëµÄÇé¿öÈ«²¿¼Ç¼ÔÚ±àÒëÇåµ¥ÖУ¬Í¨¹ý WRKSPLF ¼´¿É¿´µ½¡£±àÒë¹ý³ÌÖеĴíÎó±»ÁÐÔÚÏàÓ¦ÃüÁîºóÃ棬ÒÔ¼°ÎļþµÄ×îºó£¬·½±ãÓû§²éÕÒ¡£ÏÂÁÐÀàÐ͵ĴíÎó½«Í£Ö¹³ÌÐòµÄ½¨Á¢£º

* Öµ´í

* ¾ä·¨´í

* ÃüÁîÄÚ²¿Óë²ÎÊý¼ä²»·û

* ÓÐЧÐÔ¼ì²éÓдí

 

CL ³ÌÐò¿ÉÒÔͨ¹ý·´±àÒëÃüÁî RTVCLSRC£¬ÖØн¨Á¢ CLÔ´³ÌÐò¡£Ê¹ÓøÃÃüÁîʱ£¬±ØÐëÂú×㽨Á¢±àÒë³ÌÐòµÄ²ÎÊý ALWRTVSRC Ϊ *YES¡£ µ±Ô´³ÌÐò±»·´±àºó£¬ÈκÎ×¢ÊÍÐÅÏ¢²»ÔÙÖØвúÉú£¬ÒÔϳÌÐòÐòÑÔ½«±»½¨Á¢£º

* ËùÓÐÕßÃû

* Ô´³ÌÐòµÄ×îÖÕÐÞ¸ÄÈÕÆÚ

* Ô´³ÌÐòµÄÖؽ¨ÈÕÆÚºÍʱ¼ä

* ×î³õ±àÒëʱµÄÐí¿É³ÌÐò¼¶

 

5.4.4.2³ÌÐòµÄ±àÒë

CL ³ÌÐòµÄ²âÊÔ

¶ÔÓÚ CL ³ÌÐòÔÚ±àÒëºÍÔËÐÐÖеĴíÎó£¬ÏµÍ³ÌṩÒÔϼ¸ÖÖ²âÊÔ¹¦ÄÜ£º

* ³ÌÐòת´¢¡£ ÔÚ CL Ô´³ÌÐòÖÐÊäÈëÃüÁî DMPCLPGM£¬ÔËÐкóͨ¹ý WRKSPLF ¼´¿É¿´µ½×ª´¢ÄÚÈÝ¡£°üÀ¨³ÌÐòÐÅÏ¢¶ÓÁеÄÈ«²¿ÐÅÏ¢ºÍÈ«²¿±äÁ¿µÄÊýÖµ¡£Èç¹û³ÌÐòÔËÐгö´í£¬³öÏÖÌáʾ»­Ãæʱ£¬ÊäÈë D Ò²¿É½øÐгÌÐòת´¢¡£

* ÉèÖöϵ㡣µÚÒ»²½£¬Æô¶¯²âÊÔ»·¾³£¬Ê¹ÓÃÃüÁî STRDBG PGM £¨PGMA£©£»µÚ¶þ²½£¬ÉèÖöϵ㣬ʹÓÃÃüÁî ADDBKP STMT 1500£© PGMVAR( '&A' '&B'); µÚÈý²½£¬ÔËÐгÌÐò£¬ÏÔʾ¶ÏµãÐÅÏ¢£»µÚËIJ½£¬½áÊø²âÊÔ»·¾³£¬Ê¹ÓÃÃüÁî ENDDBG¡£

* ÉèÖøú×Ù¡£¸ú×ÙÊǼǼ³ÌÐòÖÐÓï¾äÖ´ÐÐ˳ÐòµÄ¹ý³Ì¡£ÏµÍ³²¢²»×Ô¶¯ÏÔʾ¸ú×ÙÐÅÏ¢£¬¶øÐëʹÓÃÃüÁî DSPTRCDTA ÇëÇóÏÔʾ¸ú×ÙÐÅÏ¢£¬ÐÅÏ¢°üÀ¨Óï¾äÖ´ÐеÄ˳ÐòºÍ ADDTRC ÃüÁîÖÐÖ¸¶¨µÄ±äÁ¿Öµ¡£

 

ÀýÈ磺

Auto RGZPFM

STRCLPGM: PGM PARM(&LIBRARY)

DCL VAR(&LIBRARY) TYPE(*CHAR) LEN(10)

DCL VAR(&PERCENT) TYPE(*DEC) LEN(4 3)

DCLF FILE(QTEMP/WORKFILE) RCDFMT(QWHFDMBR)

DSPFD FILE(&LIBRARY/*ALL) TYPE(*MBR) +

OUTPUT(*OUTFILE) OUTFILE(QTEMP/WORKFILE)

NEXT: RCVF RCDFMT(QWHFDMBR)

MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(ENDCLPGM))

IF COND(&MBFILA *EQ '*PHY') THEN(DO)

CHGVAR VAR(&PERCENT) VALUE(&MBNDTR / &MBNRCD)

MONMSG MSGID(MCH1211) EXEC(GOTO CMDLBL(NEXT))

IF COND(&PERCENT *GT .15) THEN(DO)

SBMJOB CMD(RGZPFM FILE(&MBLIB/&MBFILE) MBR(&MBNAME))

ENDDO

ENDDO

GOTO CMDLBL(NEXT)

ENDCLPGM: DLTF FILE(QTEMP/WORKFILE)

ENDPGM

 

5.4£®5³£ÓÃCLÃüÁî

ϵͳ¹¦ÄÜ

ÃüÁî

ÃüÁÄÜ

Ð޸Ĺý³Ì¿ØÖÆ

 

 

CALL (Call)

µ÷ÓÃÒ»¸ö³ÌÐò

CALLPRC (Call Procedure)

µ÷ÓÃÒ»¸ö¹ý³Ì

RETURN (Return)

·µ»Øµ½ÒýÆð³ÌÐò»ò¹ý³ÌÔËÐеÄÏÂÒ»ÌõÃüÁî

CL¹ý³Ì½çÏÞ

PGM (program) (1)

Ö¸³öCL¹ý³ÌÔ´ÂëµÄ¿ªÊ¼

ENDPGM (End Program) (1)

Ö¸³öCL¹ý³ÌÔ´ÂëµÄ½áÊø

CL¹ý³ÌÂß¼­

IF (If) (1)

¸ù¾ÝÂß¼­±í´ïʽµÄÖµÖ´ÐÐÃüÁî

ELSE (Else) (1)

¶ÔIFÃüÁîΪ¼ÙÌõ¼þ¶¨Òå²ÉÈ¡µÄÐж¯

DO (Do) (1)

Ö¸³öDO×éµÄ¿ªÊ¼

ENDDO (End Do) (1)

Ö¸³öDO×éµÄ½áÊø

GOTO (Go To) (1)

תÒƵ½ÁíÍâµÄÃüÁî

CL¹ý³Ì±äÁ¿

CHGVAR (Change Variable) (1)

ÐÞ¸ÄCL±äÁ¿µÄÖµ

DCL (Declare) (1)

˵Ã÷Ò»¸ö±äÁ¿

Ìæ»»

CHGVAR (Change Variable) (1)

ÐÞ¸ÄCL±äÁ¿µÄÖµ

CVTDAT (Convert Date) (1)

ÐÞ¸ÄÈÕÆÚ¸ñʽ

Êý¾ÝÇø

CHGDTAARA (Change Data Area)

ÐÞ¸ÄÊý¾ÝÇø

CRTDTAARA (Create Data Area)

Éú³ÉÒ»¸öÊý¾ÝÇø

DLTDTAARA (Delete Data Area)

ɾ³ýÒ»¸öÊý¾ÝÇø

DSPDTAARA (Display Data Area)

ÏÔʾһ¸öÊý¾ÝÇø

RTVDTAARA (Retrieve Data Area)

°ÑÊý¾ÝÇøµÄÄÚÈݸ´ÖƵ½Ò»¸öCL±äÁ¿ÖÐ

Îļþ

ENDRCV (End Receive) (1)

 

È¡ÏûÓÉÇ°ÃæµÄRCVF,SNDF»òSNDRCVF

ÃüÁî¶ÔÒ»¸öÏÔʾÎļþ·¢³öµÄÊäÈëÇëÇó.

DCLF (Declare File) (1)

˵Ã÷Ò»¸öÏÔʾÎļþ»òÊý¾Ý¿âÎļþ

RCVF (Receive File) (1)

´ÓÏÔʾÎļþºÍÊý¾Ý¿âÎļþÖжÁ¼Ç¼

RTVMBRD (Retrieve Member Description) (1)

È¡µÃÊý¾Ý¿âÎļþ³ÉÔ±µÄÃèÊö

 

SNDF (Send File) (1)

ÍùÏÔʾÎļþÖÐд¼Ç¼

SNDRCVF (Send/Reveive File)(1)

ÍùÏÔʾÎļþÖÐд¼Ç¼,ÔÚÓû§»Ø´ðºó¶Á¼Ç¼

WAIT (Wait) (1)

 

µÈ´ý´ÓÏÔʾÎļþ·¢³öµÄSNDF,RCVF»òSNDRVFÃüÁî½ÓÊÕÎļþ

ÐÅÏ¢

MONMSG (Monitor Message)(1)

¼à¿ØËÍÍù³ÌÐò¶ÓÁеÄÌÓÒÝ,״̬ºÍ֪ͨÐÅÏ¢

RCVMSG (Receive Message)(1)

°ÑÐÅÏ¢´ÓÐÅÏ¢¶ÓÁи´ÖƵ½Ò»¸öCL±äÁ¿ÖÐ

 

RMVMSG (Remove Message)(1)

´ÓÐÅÏ¢¶ÓÁÐÈ¡ÏûÐÅÏ¢

RTVMSG (Retrieve Message)(1)

 

°ÑÔ¤Ïȶ¨ÒåµÄÐÅÏ¢´ÓÐÅÏ¢Îļþ¸´ÖƵ½CL±äÁ¿ÖÐ

SNDPGMMSG£¨Send Program Message£©(1)

ÍùÐÅÏ¢¶ÓÁз¢ËͳÌÐòÐÅÏ¢

 

SNDRPY £¨Send Reply£©(1)

¸ø²éѯÐÅÏ¢µÄ·¢ËÍÕß·¢ËͻشðÐÅÏ¢

SNDUSRMSG£¨Send User Message£©(1)

 

¸øÏÔʾ¹¤×÷Õ¾»òϵͳ²Ù×÷Ô±·¢ËÍÏûÏ¢»ò²éѯÐÅÏ¢

»ìÔÓÃüÁî

CHKOBJ (Check Object)

¼ì²éÄ¿±êÊÇ·ñ´æÔÚ¼°Ê¹ÓÃÄ¿±ê±ØÐëÓеÄȨÏÞ

PRTCMDUSG £¨Print Command Usage£©

 

²úÉúÒ»¸öÓÃÔÚij×éCL¹ý³ÌÖеÄÒ»×éÃüÁîÖеĽ»²æÒýÓñí

RTVCFGSRC (Retrieve Configuration Source)

 

¶ÔÉú³ÉµÄÒÑ´æÔÚµÄÅäÖÃÄ¿±ê½¨Á¢Ò»¸öCLÃüÁîÔ´ÂëÇÒ°ÑËü·ÅÔÚÔ´Îļþ³ÉÔ±ÖÐ

RTVCFGSTS(RetrieveConfiguration Status)(1)

 

´ÓÈý¸öÅäÖÃÄ¿±ê(Ïß·£¬¿ØÖÆÆ÷ºÍÉ豸)ÖÐÈ¡µÃÅäÖÃ״̬

RTVJOBA £¨Retrieve Job Attributes£© (1)

 

È¡µÃÒ»¸ö»ò¶à¸ö×÷ÒµÊôÐÔµÄÖµÇÒ°ÑËüÃǷŵ½CL±äÁ¿ÖÐ

RTVSYSVAL £¨Retrieve System Value£©(1)

È¡µÃϵͳֵ²¢ÇÒ°ÑËü·Åµ½Ò»¸öCL±äÁ¿ÖÐ

RTVUSRPRF £¨Retrieve User Profile£©(1)

È¡µÃÓû§ÎļþÊôÐÔ²¢°ÑËü·Åµ½CL±äÁ¿ÖÐ

³ÌÐòÉú³ÉÃüÁî

CRTCLMOD £¨Create CL Module£©

Éú³ÉÒ»¸öCLÄ£¿é

DLTMOD  £¨Delete Module£©

ɾ³ýÒ»¸öÄ£¿é

DLTPGM   £¨Delete Program£©

ɾ³ýÒ»¸ö³ÌÐò

CRTBNDCL (Create Bound Control Language Program)

Éú³ÉÒ»¸öÁª±àµÄCL³ÌÐò

CRTPGM £¨Create Program£©

Éú³ÉÒ»¸ö³ÌÐò

CRTSRVPGM£¨Create Service Program£©

Éú³ÉÒ»¸ö·þÎñ³ÌÐò

(1) ±íʾÕâЩÃüÁî½öÄÜÓÃÔÚCL¹ý³ÌÖС£

 

5.5.DELPHI

5.5.1.¼òµ¥µÄÀûÓÃODBC

Æäʵ£¬delphi ºÍÆäËûÓïÑÔÒ»Ñù£¬Èç¹ûÖ»Êǵ¥´¿µÄÀûÓÃas400µÄÊý¾Ý¿âµÄ¹¦ÄÜ£¬Í¨³££¬ÎÒÃǶ¼Ñ¡ÓÃwindowsƽ̨¡£Êý¾ÝÇý¶¯Ñ¡Ôñclient µÄodbc.Èç¹ûAS400µÄ·þÎñÆ÷µÄOS°æ±¾>4.4Ó¦¸Ã¾Í¿ÉÒÔÓÃOLDEBµÄ·½Ê½¡£ËٶȻá¿ìһЩ¡£Èç¹ûÖ÷»ú°æ±¾±È½ÏµÍ£¬Ö»ÄÜÓÃODBC¡£

ÏÂÃæ½²Êö´ÓÈçºÎ×¼±¸»·¾³µ½¿ªÊ¼Ð´³ÌÐò¡£

1.    °²×°client access

CUÉÏÃæÒѾ­ÓÐca5.2µÄÏÂÔØÁË¡£ÏÂÔØÏÂÀ´°²×°£¬Ð°汾µÄclient accessÔÚadoµÄÐÔÄÜÉÏ×ÜÌåÀ´µÄºÃһЩ¡£²»¹ýÒ²²»ÊÇËùÓеÄÖ÷»ú¶¼Äܹ»Ö§³ÖµÄ¡£ÓÐһЩÌØÐÔ½öÏÞÓڱȽϸߵİ汾¡£

2.    ÉèÖÃODBCÊý¾ÝÔ´

µã»÷ Ìí¼Ó

Ñ¡ÔñClient Access ODBC Driver (32-bit)

ÉèÖÃodbcµÄÃû×Ö

SystemÖУ¬Èç¹ûÊÇа汾µÄ¿ÉÒÔÖ±½ÓÌîÈëip,Èç¹û²»ÊÇ£¬µÃÐÞ¸Ähost±í

È»ºó´ÓÖÐÑ¡ÔñÒ»¸ö

3.    adoÁ¬½Ó

¾ÍÊǼòµ¥µÄODBCµÄÁ¬½Ó¡£

µÚ¶þ½Ú£ºµ÷ÓÃ400ÉϵÄrpg »òÕßcl³ÌÐò

Õâ¸öÎÒÿʲô¾­Ñ飬ËùÒԵȺóÈËÀ´Ìî³ä5.5.2 Delphi Ó¦Óü¼Êõ

Delphi for AS/400ÊÇBorland¹«Ë¾£¨ÏÖ¸ÄΪInprise¹«Ë¾£©×¨ÃÅΪAS/400Óû§ÌṩµÄÓÃÓÚ¿ª·¢AS/400Ó¦ÓóÌÐòµÄDelphiÇ°¶Ë¿ª·¢¹¤¾ß¡£³ýÁ˾ßÓÐ 3.0µÄÈ«²¿¹¦ÄÜÍ⣬Delphi/400ÌṩÁËÓëAS/400Ïà¼æÈݵÄÈý×éÔª¼þ£­£­SCD400 Data¡¢SCD400 SystemºÍ DB¡£ÆäÖÐSCD400 DataºÍ DBÁ½×éÔª¼þÓëÆÕͨDelphi 3.0ËùÊôÁ½×éÔª¼þ AccessºÍData ControlsÖÐÔª¼þ¾ßÓÐÏàͬ»òÀàËƵŦÄÜ¡£ÔÚSystemÔª¼þ×éÖУ¬ÌṩµÄÔª¼þ£¬¿ÉÒÔÖ±½Óµ÷ÓÃPGM³ÌÐòºÍÖ±½Óµ÷ÓÃA/400 CLÃüÁî¡£

 

Ò»¡¢ ÔÚAS/400ÉϱàÖÆʵÏÖ´òÓ¡»õÎï²Õµ¥µÄRPG³ÌÐò

 

ΪÐðÊö·½±ã£¬¼ÙÉèËùÐèÒªÓõ½µÄAS/400ÉϵÄÎļþ£¨ÔÚAS/400ÖгÆΪ¶ÔÏó£­£­Object£©¶¼·ÅÔÚTEST¿â£¨Library£©ÖС£DCPRTMFΪ´òÓ¡Îļþ£¬ÓÃÀ´Êä³ö´òÓ¡²Õµ¥µÄ´òÓ¡¸ñʽºÍÄÚÈÝ¡£DCRPGMFΪRPG³ÌÐò£¬´øÁ½²ÎÊýVSLCOD£¨´¬´úÂ룩ºÍVOYNO£¨º½´Î£©£¬ÓÃÀ´Éú³É²Õµ¥¡£

 

¶þ¡¢ ÔÚAS/400ÉϽ«´òÓ¡Îļþת»¯ÎªAS/400µÄÎïÀíÎļþ

 

ÔÚAS/400ÉϽ¨Ò»ÎïÀíÎļþMFPC£¨Ï൱ÓÚÆäËüÊý¾Ý¿âµÄTable£©£¬¼Ç¼ÃûΪMP£¬×Ö¶ÎÃûΪMP198£¬³¤¶ÈΪ198×Ö·û¡£´ËÎïÀíÎļþÓÃÀ´±£´æ»õÎï²Õµ¥´òÓ¡ÎļþÄÚÈÝ¡£Õâ¸ö¹ý³ÌÓÃMFCPYSPL³ÌÐò£¨CLPÀàÐÍ£©À´ÊµÏÖ£¬³ÌÐòÈçÏ£º

 

***************Beginning of data***************

01.0 PGM PARM(STRJOB STRUSR STRNBR)

 

0002.00 DCL VAR(STRJOB) TYPE(*CHAR) LEN(10)

0003.00 DCL VAR(STRUSR) TYPE(*CHAR) LEN(10)

04.0 DCL VAR(STRNBR) TYPE(*CHAR) LEN(6)

0005.00 CPYSPLF FILE(DCPRTMF) TOFILE(TEST/MFPC) +

0006.00 JOB(STRNBR/STRUSR/STRJOB) TOMBR(MFPC) +

0007.00 MBROPT(*REPLACE) ¢Ù

0008.00 DLTSPLF FILE(DCPRTMF)

JOB(STRNBR/STRUSR/STRJOB) ¢Ú

0010.00 ENDPGM

****************** End of data **************

ÉÏÊöÎļþ¶¨ÒåÁËÈý¸ö²ÎÊýSTRJOB¡¢STRUSRºÍSTRNBR£¬ÊÇÓë²Ù×÷Spool FileÏà¹ØµÄ²ÎÊý¡£

 

¢Ù½«´òÓ¡Îļþ£¨Spool File£©¿½±´µ½ÎïÀíÎļþMFPC£»¢Úɾ³ý´òÓ¡Îļþ¡£

 

Èý¡¢ ÓÃDelphi/400½«AS/400ÉϵĴòÓ¡Îļþת»¯ÎªÎ¢»úµÄÎı¾Îļþ

 

ÔÚ½øÐгÌÐò´¦ÀíÒÔÇ°£¬ÏÈÔÚDelphiµÄ Module½øÐÐÈçÏÂVCL×é¼þÉèÖãº

 

1£®AS400×é¼þÉèÖãºname£­£­AS4001¡£

 

2£®Table×é¼þÉèÖãºname£­£­MfpcTbl£»

tablename£­£­MFPC¡£ÓëAS/400ÉϵÄÎïÀíÎļþÁ¬½Ó¡£

 

3£®Call400×é¼þÉèÖãºname£­£­Call400PRTMF£»

AS400£­£­AS4001£»LibraryName£­£­TEST£»

ProgramName£­£­DCRPGPC£»Params¶¨Òå¶ÔÓ¦VSLCODºÍVOYNO¡£

 

4£®Call400×é¼þÉèÖãºname£­£­Call400CPYSPL£»

AS400£­£­AS4001£»LibraryName£­£­TEST£»

ProgramName£­£­MFCPYSPL£»Params

¶¨Òå¶ÔÓ¦STRJOB¡¢STRUSRºÍSTRNBR¡£

 

5£®Cmd400×é¼þÉèÖãºname£­£­Cmd400Addlible£»

AS400£­£­AS4001£»CommandLine£­£­ADDLIBLE LIB(TEST)

POSITION(*FIRST)¡£½«TEST¼ÓÈë¿â±í¡£

 

6£®Cmd400×é¼þÉèÖãºname£­£­Cmd400Rtvjob£»AS400£­£­AS4001£»

CommandLine£­£­RTVJOBA JOB(P.1) USER(P.2)

NBR(P.3) USRLIBL(P.4)¡£ÓÃÓÚ»ñÈ¡ÔËÐÐMFCPYSPL³ÌÐòËùÐèÒªµÄ²ÎÊý¡£

 

ÒÔϾÍÊÇʵÏÖ½«AS/400ÉϵĴòÓ¡ÎļþDCPRTMFת»¯ÎªÎ¢»úµÄÎı¾ÎļþµÄÔ´³ÌÐò¡£

var

F,ToF:TextFile;

TempStr:String;

Fname:String;

Str_Job:String;

Str_Usr:String;

Str_Nbr:String;

begin

//»ñÈ¡ÔËÐн«´òÓ¡Îļþת»»ÎªÎïÀíÎļþ³ÌÐòµÄ²ÎÊý

CommDtmFrm.Cmd400Rtvjoba.Execute;

Str_Job:=CommDtmFrm.Cmd400Rtvjoba.Value[0];

Str_Usr:=CommDtmFrm.Cmd400Rtvjoba.Value[1];

Str_Nbr:=CommDtmFrm.Cmd400Rtvjoba.Value[2];

 

//Ôö¼Ó¿â±í

CommDtmFrm.Cmd400Addlible1.Execute;

 

//Éú³ÉCARGO MENIFEST£¬ÆäÖÐStrVslcod¡¢

StrVoyageΪ´òÓ¡²Õµ¥µÄ²ÎÊý

CommDtmFrm.Call400PRTMF.Value[0]:=StrVslcod;

CommDtmFrm.Call400PRTMF.Value[1]:=StrVoyage;

CommDtmFrm.Call400PRTMF.Execute ;

 

//ת»»ÎªÎïÀíÎļþ

CommDtmFrm.Call400Cpyspl.Value[0]:=Str_Job;

CommDtmFrm.Call400Cpyspl.Value[1]:=Str_Usr;

CommDtmFrm.Call400Cpyspl.Value[2]:=Str_Nbr;

CommDtmFrm.Call400Cpyspl.Execute ;

 

//²úÉúÒ»¸öÐÂÎļþ

Fname:='C:\Communication\Newmf.txt';

AssignFile(F,Fname);

ReWrite(F);

if CommDtmFrm.MfpcTbl.Active=false then

CommDtmFrm.MfpcTbl.Active:=True ;

 

//½«ÎïÀíÎļþµÄÊý¾Ý¶Á³ö±£´æΪÎı¾Îļþ

with CommDtmFrm.MfpcTbl do

begin

DisableControls;

try

First;

while not EOF do

begin

{ Process each record here }

TempStr:=CommDtmFrm.MfpcTblMP198.Value;

writeln(F,TempStr);

Next;

end;

finally

EnableControls;

end;

end;

 

if SaveDialog1.Execute then

begin

AssignFile(ToF, SaveDialog1.FileName);

ReWrite(ToF);

Reset(F);

while not EOF(F) do

begin

{ Process each record here }

Readln(F,TempStr);

writeln(ToF,TempStr);

 

end;

 

end;

CloseFile(F);

CloseFile(ToF);

 

5.6.VB

ÇëÏÈ°²×°CA£¬²ÅÄÜʹÓÃһϿª·¢¼¼ÇÉ¡£

5£®6£®1            ODBCÁ¬½ÓAS400

            ConnectString = "Provider=IBMDA400;Data Source='" & Trim(LjIp) & "';User ID='" & Trim(LjUser) & "' ;PassWord='" & Trim(LjPwd) & "'"

                     Sourece ´¦ÇëÌîд400µÄµØÖ·

                     Useid   ´¦ÇëÌîдÓû§Ãû

                     Password ´¦ÇëÌîдÃÜÂë

5£®6£®2            ͨ¹ýAPIÏÂÔØÊý¾Ý

'   ͨ¹ýIBMÌṩµÄ²ÎÊý,ÏÂÔØ400Îļþ,²¢¼ì²éÏÂÔؽá¹û

'ÊäÈë²ÎÊý

'   ÎÞ

'Êä³ö²ÎÊý

'   ²ÎÕÕMAIN˵Ã÷

'µ÷Óú¯Êý

'   ÎÞ

    Dim SysName As New cwbx.SystemNames

    Dim AsSys As New cwbx.AS400System

    Dim AsTr As cwbx.DatabaseTransferResults

    Dim Dlt As New cwbx.DatabaseDownloadRequest

    Dim DltACC As cwbx.DatabaseDownloadASCIIOptions

    Dim SysNum As Integer

    Dim SysExist As Boolean

    Dim StrTime As Date

    Dim FreeNum As Integer

    '¼ì²éÊÕµ½µÄµØÖ·ÊÇ·ñÓÐЧ AS400

    SysExist = False

    StrTime = Now()

    For SysNum = 1 To SysName.Count     ' RunInput(1) ¾ÍÊÇ400ϵͳÃû

        If SysName.Item(SysNum) = RunInput(1) Then

            SysExist = True

            Exit For

        End If

    Next SysNum

    If SysExist = False Then

        Ca_Down = -305

        Exit Function

    End If

   

    '¿ªÊ¼ÏµÍ³Á¬½Ó¶¨Òå

On Error GoTo SysErr

    AsSys.Define RunInput(1)

    AsSys.UserID = RunInput(2)     'Óû§Ãû

    AsSys.Password = RunInput(3)   'ÃÜÂë

    AsSys.Signon

   

    '¿ªÊ¼ÏÂÔض¨Òå

    Set Dlt.System = AsSys

    Dlt.AS400File = RunInput(4)       ¡¯400ÎļþÃû

    Dlt.Query.Select = RunInput(5)    'ÏÂÔصÄ×Ö¶ÎÁбí

    Dlt.Query.Where = RunInput(6)    ¡¯ÏÂÔØÌõ¼þ

    If Trim(RunInput(8)) = 0 Or Len(Trim(RunInput(8))) = 0 Then   'ÏÂÔØÎļþµÄ±£´æ¸ñʽ

        Dlt.pcFile.FileType = cwbdtASCIIText

        Set DltACC = Dlt.pcFile.Options

        DltACC.TruncateSpaces = False

        DltACC.CodePage = cwbnlCodePageClientANSI

    Else

        Dlt.pcFile.FileType = cwbdtCSV

    End If

    Dlt.pcFile.Name = RunInput(7)       ¡¯Pc»úÉϱ£´æµÄÎļþÃû

    '¿ªÊ¼ÏÂÔØ

On Error GoTo DltErr

    Dlt.Download

    Set AsTr = Dlt.TransferResults

    'ÏÂÔؽá¹û´¦Àí

On Error GoTo AsTrErr

    If AsTr.DataErrors.Count > 0 Then

        Select Case AsTr.DataErrors.Item(1).ErrorType

            Case 1, 5

                Ca_Down = -311

            Case 2, 6

                Ca_Down = -312

            Case 3, 7

                Ca_Down = -313

            Case 4, 8

                'Êý¾Ýת»»´íÎó

                Ca_Down = -314

        End Select

    End If

    Ca_Down = DateDiff("s", StrTime, AsTr.CompletionTime)

    Set DltACC = Nothing

    Set Dlt = Nothing

    Set AsSys = Nothing

    Exit Function

DltErr:

    Select Case Dlt.Errors.ReturnCode

        Case 3

            'ÏÂÔØÎļþĿ¼²»´æÔÚ

            Ca_Down = -322

        Case 112

            '´ÅÅÌ¿Õ¼äÂú

            Ca_Down = -323

        Case 7004

            '¿Õ¼Ç¼

            FreeNum = FreeFile

            Open RunInput(7) For Append As #FreeNum

            Close #FreeNum

            Ca_Down = -308

        Case 6053

            'ͨѶ´íÎó

            Ca_Down = -306

'        Case 7412

'            'AS400ϵͳÎļþ´æÔڼǼËø

'            Ca_Down = -307

        Case 7038, 7040, 7412

            'Ö¸¶¨Îļþ»òÕß¿â²»´æÔÚ

            RunInput(4) = LCase(RunInput(4))

            If InStr(1, RunInput(4), "abjq/batfiles") > 0 Then

                If InStr(1, RunInput(4), "batfiles1") > 0 Then

                    RunInput(4) = Replace(RunInput(4), "batfiles1", "batfiles3")

                Else

                    RunInput(4) = Replace(RunInput(4), "batfiles3", "batfiles1")

                End If

                RepNum = RepNum + 1

                If RepNum >= 2 Then

                    Ca_Down = -316

                    Exit Function

                End If

                Set AsTr = Nothing

                Set DltACC = Nothing

                Set Dlt = Nothing

                Set AsSys = Nothing

                Ca_Down

            Else

                Ca_Down = -316

            End If

        Case Else

            '³öÏÖÎÞ·¨Ô¤²â´íÎó

            Ca_Down = -317

    End Select

    Set AsSys = Nothing

    Exit Function

SysErr:

    Select Case AsSys.Errors.ReturnCode

        Case 8002

            'ÃÜÂë´í

            Ca_Down = -309

        Case 8001

            'Óû§Ãû´í

            Ca_Down = -310

        Case Else

            '³öÏÖÎÞ·¨Ô¤²â´íÎó

            Ca_Down = -317

    End Select

    Exit Function

AsTrErr:

    Ca_Down = -315

End Function

 

5.7  MS.NET

Ëæ×ÅITµÄ·¢Õ¹£¬Î¢ÈíÌá³öÏÂÒ»´ú½«ÊÇ.netµÄʱ´ú¡£Èç¹ûÎ嵽ʮÄêÖ®ÄÚ£¬»¹ÊÇwindowsÕ¼¾Ý¸öÈ˵çÄԵIJÁ×÷ϵͳµÄÖ÷Á÷µÄ»°¡£ÄÇÓ¦¸ÃÊÇÕâÑùµÄÇé¿ö¡£

¶ÔOSµÄÒªÇó£ºv5r1.

Èç¹û²»ÐèÒªÊÂÎñÖ§³Ö4.4¾Í¿ÉÒÔÁË¡£

¿Í»§¶Ë£¬Èç¹ûÊÇÓ¦ÓóÌÐò£¬¿Í»§¶ËÐèÒª°²×°client acess v5r3 »òÕß ÒÔÉϵġ£ÒòΪÕâ¸ö°æ±¾ÌṩÁË.net provider

Èç¹ûÊÇ»ùÓÚwebµÄ£¬Ö»ÐèÒªweb server°²×°client acessv5r3 »òÕßÒÔÉϾͿÉÒÔÁË¡£

connection µÄÁ¬½Ó´®£º

Protection Level=None;User ID=Óû§Ãû;Force Translate=65535;Data Source=·þÎñÆ÷ip;Password=ÃÜÂë;Provider=IBMDASQL;Transport Product=Client Access;Catalog Library List=;Default Collection=Óû§Ãû;Persist Security Info=True;Convert Date Time To Char=TRUE;SSL=DEFAULT

ÕâÊǶԼòµ¥µÄ£¬ÒªÇóϵͳ¹ÜÀíÔ±¶ÔÓû§½øÐÐÊÚȨ£¬×îºÃÊÇpublic ÊÇ*EXCLUDE.È»ºó¸ù¾ÝÓû§ÔÚ½øÐÐÊÚȨ¡£

ADO.NETÇ¿µ÷µÄÊǶϿªÊ½Á¬½Ó¡£¾ÍÊÇ˵£¬Èç¹ûÄãºÍÊý¾Ý¿âÁ¬½ÓÓÃÍêÁË£¬¾Í¶Ï¿ª¡£.net frameworkĬÈÏÓÐÊý¾Ý¿âÁ¬½Ó³Ø¹ÜÀí¡£

Ä¿Ç°µÄ.net provider»¹²»Ö§³ÖÊý¾Ý¶ÓÁеÈһЩ±È½Ï¸ß¼¶µÄ²Ù×÷¡£

ÓÃ.net·ÃÎÊas400ÓкܶàÖÖÑ¡Ôñ£¬ÎÒÃÇΪÁËÌṩ¿ÉǨÒÆÐÔ£¬ËùÒÔÖ»ÓÃoledb£¬Æäʵclient acess±¾ÉíÌṩÁËÒ»Ì×ÀàËÆado.netµÄ.netÀà¡£

¿Í»§¶Ë³ÌÐò×îÖØÒªµÄÊÇË÷Òý¡£µ±È»Ë÷ÒýµÄÉèÖÃ×îºÃÉ÷ÖØ£¬¹ý¶àµÄË÷Òý»áÀË·ÑÓ²Å̿ռ䡣

»¹ÓÐÓû§µ÷ÓÃsqlµÄʱºòÐèÒªÊÂÏȲâÊÔsqlÊÇ·ñ°²È«£¬±ÈÈ磬ÎÒ²éÕÒÊý¾Ý£¬µ«ÊÇÎÒʱ¼äÆÚÏÞÉèÖúܴó£¬È»ºóÓÖ¶à±í¹ØÁª£¬ÕâÑù»á³Ô¹âÄڴ棬×îÖÕµ¼ÖÂ400µ±»ú¡£ËùÒÔ×ö³ÌÐòµÄʱºòÒª¿¼Âǵ½ÕâЩ·¶Î§¡£

Ä¿Ç°×ö.net·ÃÎÊ400¸Ð¾õ»¹ÊDz»ÊǺܿ죬µ«ÊÇÖÁÉÙ¿ÉÒÔ½ÓÊÜ¡£²»¹ý400µÄÓŵãÔÚÓÚ´óÅúÁ¿Êý¾Ý¼ìË÷µÄʱºòЧÂʱÈsqlserverÖ®ÀàµÄÀ´µÃ¿ì¡£µ±ÄãµÄÊý¾Ý³¬¹ý100ÍòµÄʱºò£¬ÌåÏÖ¸ü¼ÓµÄÃ÷ÏÔ¡£

ÓÉÓÚËٶȲ»ÊÇÌ«¿ì£¬ËùÒÔ½¨Ò飬¾¡¿ÉÄܼõÉÙÊý¾Ý¿âÍù·µ£¬²»¹ýÈç¹û¹ØÁªµÄÊý¾Ý¿â¶¼ÊÇÊý¾ÝÁ¿ºÜ´ó£¬ÎÒ¾õµÃÄþÔ¸¶à¼¸´ÎÊý¾ÝÍù·µ£¬ÒòΪ400µÄ¹ØÁªÊµÔÚÊÇÌ«ÂýÁË¡£ËûµÃ½¨Á¢·ÃÎÊ·¾¶£¬ÌØÏûºÄʱ¼ä¡£¡¢

ÎÒÄÜдµÃ¾ÍÕâô¶àÁË¡£ÆäÓàµÄ¶¼ÊÇ.netµÄ֪ʶÁË¡£

                                                                  

       ¾­¹ýÒ»¶Îʱ¼äµÄ»ùÓÚas400µÄ.net¿ª·¢Ö®ºó£¬·¢ÏÖÁËһЩ³£¼ûµÄÎÊÌ⣺

a)      Èç¹ûÐèÒªÊÂÎñÖ§³Ö£¬ÄÇôÊ×ÏÈPFµÃÌí¼Ójournal£¬¿ÉÒÔÓÃstrjrnpf°ó¶¨journal.

Èç¹ûûÓаó¶¨journal£¬µÃµ½µÄexceptionͨ³£¶¼ÊÇÔÚ½øÐÐinsert/update/deleteµÄ

ʱºò·¢Éú£¬´íÎóÒ»°ã¶¼ÊÇ£ºxxx/xxxpf²»ÄÜÊÊÓÃÓÚÕâÖÖ²Ù×÷¡£

b)      Èç¹û²»ÓÃ5250 £¬client accessÖ»ÐèÒª°²×°base.exe dataccess.exe

c)      As400µÄÊý¾Ý×ÖµäÔÚqsys2/systables syscolumnsÀïÃ棬²»¹ýÊDZ»Ëø¶¨£¬¿ÉÒÔcopfµÄÐÎʽ¿½±´µ½±ðµÄµØ·½£¬ÐÞ¸Äccid=935,¹©¿Í»§¶Ë½¨Ä£Ê¹Óá£

d)      Ò»°ãÀ´Ëµ£¬ÎÒÃÇÔÚ400ÉÏʹÓõÄÊý¾ÝÀàÐͶÔÓ¦pc

S----int32 

P----decimal

OµÈ×Ö·ûÐÍ¡ªstring

ÈÕÆÚÐÍûÓùý£¬²»ÊǺÜÇå³þ

5. ±¨±í×îºÃÓÃÍÆģʽ£¬ÕâÑù¿ÉÒÔ·ÀÖ¹ºÜ¶àµØ·½ÐèÒª¼ÇסÊý¾Ý¿âÁ¬½Ó´®£¬¾ßÌåµÄÍÆģʽ

¾ÍÊÇÏÈbuildÒ»¸ödataset£¬Êý¾ÝÔ´ÓÃÕâ¸öÀ´°ó¶¨£¬Ð´±¨±íµÄʱºò£¬°´ÕÕ֮ǰbuild

ºÃµÄÒ»¸ödatasetµÄ½á¹¹£¬Ìî³äÊý¾Ý£¬È»ºóÍƸø±¨±í¾Í¿ÉÒÔÁË¡£

×îºÃ×öÒ»¸ödal²ã£¬Í³Ò»¹ÜÀíÊý¾Ý·ÃÎÊ£¬¾ßÌåµÄ¿ÉÒԲο¼Î¢ÈíµÄdata acesss block

6. ÍƼö°´ÕÕ΢ÈíµÄduwamishµÄ¼Ü¹¹£¬¸öÈ˸оõ±È½ÏÊʺÏas400µÄ¿ª·¢£¬¿ÉÒÔÈÃÄã±È½Ï

ÈÝÒ׵İÚÍÑÌîд·±ÔÓµÄsqlÓï¾ä£¬µ±È»ÁË£¬»¹Óиü¼Ó¶à¸ü¼ÓÓÅÐãµÄ¼Ü¹¹£¬²»¹ý¶ÔÓÚ

Ó¦Óÿò¼Ü£¬¿ÉÒԲο¼Ä¿Ç°×îÏȽøµÄaop£¨ÃæÏò·½Ãæ±à³Ì£©

7. ÁíÍâÊǹØÓÚccidµÄÊÂÇé(frankÅöµ½µÄ)

        Èç¹û·¢ÏÖÄãµÄpfµÄccid²»Äܸü¸Ä£¬ÄÇôÊÇÒòΪÕâ¸öobject±»ÈËËøסÁË

        ¸ü¸ÄÁË£¬µ«ÊDz»ÄÜÁ¢ÂíÆðЧ¹û£¬Ó¦¸ÃÊÇ»¹ÓÐÈËËøס£¬»úÆ÷ÖØÐÂÆô¶¯ÍæÖ®ºó¾Í¿ÉÒÔ

ÁË£¬»òÕß°Ñtcp/ipÖØÐÂÆô¶¯Ò»Ï¾ͿÉÒÔÁË¡£

        Èç¹û·¢ÏÖ»¹ÊDz»ÐУ¬ÄÇô¾ÍÊÇuserporfileµÄÎÊÌâ

ÒÔǰĬÈϵÄ*SYSVAL ¸Ä³É935»ò1388¾Í¿ÉÒÔÁË£¡

 

 

5.8           API

5.9           ÒµÎñÏà¹ØµÄÊý¾Ý¿âÉè¼Æ¡¢ÏµÍ³·ÖÎö

5.10  UDB/400 Êý¾Ý¿âJDBC ³ÌÐòÉè¼Æ

5.10.1 UDB/400 Êý¾Ý¿âJDBC ·ÃÎÊ·½·¨

JDBC ÊÇJAVA ³ÌÐòÖзÃÎÊÊý¾Ý¿âϵͳµÄ±ê×¼½Ó¿Ú£¬Ö÷ÒªµÄÊý¾Ý¿â³§É̶¼Îª×Ô¼ºµÄÊý¾Ý¿â¹ÜÀíϵͳÌṩÁËÅäÌ×µÄJDBC Çý¶¯³ÌÐò¡£IBM ΪUDB/400 Êý¾Ý¿âÌṩÁËÁ½ÖÖÀàÐ͵ÄJDBC Çý¶¯³ÌÐò¡£Ò»ÖÖÊÇIBM ToolBox for JAVA Öаüº¬µÄcom.ibm.as400.access.AS400JDBCDriver Çý¶¯³ÌÐò£¬ÁíÒ»ÖÖÊÇUDB/400 ×Ô´øµÄcom.ibm.db2.jdbc.app.DB2Driver Çý¶¯³ÌÐò¡£ÏÖÔÚÁ½ÖÖÇý¶¯³ÌÐò¾ù¹ã·ºµÄÓ¦ÓÃÔÚ¸÷ÖÖ»ùÓÚJAVA µÄUDB/400 Ó¦ÓóÌÐòÖС£ÏÂÃ潫ÏêϸµÄ½éÉÜÁ½ÖÖÇý¶¯µÄʹÓ÷½·¨ºÍ²î±ð

A.  IBM ToolBox for JAVA JDBC Çý¶¯³ÌÐò

IBM ToolBox for JAVA ÊÇIBM ÌṩµÄÒ»¸öJAVA Àà¿â¡£Ê¹ÓÃÕâ¸öÀà¿â£¬¿ª·¢Õß²»µ«¿ÉÒÔ·ÃÎÊUDB/400 Êý¾Ý¿â¡£¶øÇÒ¿ÉÒÔ·ÃÎʺÍʹÓÃOS/400 ²Ù×÷ϵͳÖеĸ÷ÖÖ×÷Òµ¶ÓÁС¢ÏûÏ¢¶ÓÁС¢ÑéÖ¤Óû§È¨ÏÞµÈÏà¹Ø·þÎñºÍ×÷Òµ£¬¹¦Äܷdz£Ç¿´ó¡£ÕâÀï×ÅÖؽéÉÜIBM ToolBox for JAVA ÌṩµÄJDBC Çý¶¯³ÌÐò£¨¼ò³ÆToolBox JDBC Çý¶¯³ÌÐò£©µÄʹÓ÷½·¨¡£

 

ToolBox JDBC Çý¶¯³ÌÐò°üº¬ÔÚcom.ibm.as400.access.* °üÖУ¬Ê¹ÓÃʱͨ¹ý×¢²ácom.ibm.as400.access.AS400JDBCDriver À´Ê¹Óá£ÔÚʹÓÃToolBox JDBC Çý¶¯³ÌÐò֮ǰ£¬OS/400 ϵͳ±ØÐë°²×°Ðí¿É³ÌÐò¡°IBM Developer Kit for Java¡± 5722JV1 £¨»òV4R5 °æ±¾ÒÔÇ°5769JV1£©ºÍÐí¿É³ÌÐò¡°IBM ToolBox for JAVA¡± 5722JC1£¨»ò5769JC1£©¡£°²×°ÁËIBM ToolBox for JAVA ºó£¬ÐèÒª½«ToolBox for JAVA µÄJAR Îļþ¼ÓÈ뵽ϵͳµÄCLASSPATH ÖУ¬Ê¹JAVA ³ÌÐò¿ÉÒÔÕÒµ½¸ÃÀà¿â¡£ÔÚOS/400 µÄIFSÎļþϵͳÏ£º/QIBM/ProdData/HTTP/Public/jt400/lib

ÒýÓÃToolBox JDBC Çý¶¯³ÌÐòʱ£¬Ó¦ÔÚ³ÌÐòÖе¼Èëcom.ibm.as400.access.* °ü¡£Í¬Ê±Ê¹ÓÃDriverManager ×¢²ácom.ibm.as400.AS400JDBCDriver Àà¡£import com.ibm.as400.access.*; //µ¼Èëcom.ibm.as400.access.* °ütry {//×¢²ácom.ibm.as400.access.AS400JDBCDriver Çý¶¯³ÌÐòDriver driver = (Driver) Class.forName("com.ibm.as400.access.AS400JDBCDriver").newInstance();DriverManager.registerDriver(driver);}

 

ÿÖÖJDBC Çý¶¯³ÌÐò¶¼ÓÐ×Ô¼ºµÄÊý¾Ý¿âÁ¬½Ó´®£¨Database URL£©¸ñʽ£¬ToolBoxJDBC Çý¶¯³ÌÐòµÄÊý¾Ý¿âÁ¬½Ó´®¸ñʽΪ£ºjdbc:as400://HostAddress/DatabaseName£¬ÆäÖС°jdbc:as400://¡±ÎªJDBC Á¬½ÓЭÒ飬ָ¶¨Á¬½ÓÊý¾Ý¿âʹÓÃToolBox JDBC Çý¶¯³ÌÐò¡£¶ø¡°HostAddress¡±´ú±íÒªÁ¬½ÓµÄÊý¾Ý¿â·þÎñÆ÷µÄIP µØÖ·£¬Èç¹ûOS/400 ÖÐÖ¸¶¨ÁËHostTable »ò¿ÉÓõÄDNS ·þÎñÆ÷Ò²¿ÉÒÔʹÓÃÒªÁ¬½ÓµÄÖ÷»úÃû´úÌæIP µØÖ·¡£Èç¹ûÒªÁ¬½ÓµÄUDB/400 Êý¾Ý¿âºÍJAVA ³ÌÐòÔÚͬһ̨»úÆ÷ÉÏ£¬ÔòʹÓá°*local¡±À´±íʾ±¾»úµØÖ·¡£²Î¼ûÏÂÃæµÄÀý×Ó£º

jdbc:as400://169.254.200.4/testdb //Á¬½Ó169.254.200.4 ÉϵÄtestdb ¿â

jdbc:as400://*local/testdb //Á¬½Ó±¾µØµÄtestdb ¿â

ÏÂÃæÊÇÒ»¸öÍêÕûµÄÔÚJSP ÖÐÒýÓÃToolBox JDBC Çý¶¯³ÌÐò·ÃÎÊUDB/400 Êý¾Ý¿â

µÄÀý×Ó£º

<%@ page language="java" import="java.sql.*, com.ibm.as400.access.* "%>

<%

//¼ÓÔØÊý¾Ý¿âÇý¶¯³ÌÐò

try{

//×¢²ácom.ibm.as400.access.AS400JDBCDriver Çý¶¯³ÌÐò

Driver driver = (Driver) Class.forName("com.ibm.as400.access.AS400JDBCDriver").newInstance();

DriverManager.registerDriver(driver);

out.print("iSeries 400 JDBC Driver ÕýÈ·°²×°<br>");

}

catch(Exception e){

out.print("iSeries 400 JDBC Driver °²×°Ê§°Ü<br>");

}

//Á¬½ÓÊý¾Ý¿â²¢Ö´Ðвéѯ

try {

Connection conn = null;

conn = DriverManager.getConnection("jdbc:as400://169.254.200.4/testdb","qsecofr","qsecofr");

out.print("ÕýÈ·Á¬½Ó iSeries 400 Êý¾Ý¿â <br>");

Statement stmt = conn.createStatement();

ResultSet rs = stmt.executeQuery("select * from test");

out.println("<br>²éѯ½á¹û:<br>");

while (rs.next()) {

String a = rs.getString(1);

out.print(" name= " + a + "<br>");

}

rs.close();

stmt.close();

conn.close();

} catch( Exception e ) {

out.println("<br>²éѯʧ°Ü<br>");

}

%>

ToolBox JDBC Çý¶¯³ÌÐòÊÇTYPE 2 ÀàÐ͵ÄÇý¶¯³ÌÐò£¨·ûºÏJDBC 3.0 ±ê×¼£©£¬ÕâÒâζ×ÅToolBox JDBC Çý¶¯³ÌÐòÊÇÓÉ´¿JAVA ±àдµÄ£¬¿ÉÒÔÔËÐÐÔÚÈκÎÖ§³ÖJAVA µÄƽ̨ÉÏ¡£±ÈÈçÔËÐÐÔÚLinux ·þÎñÆ÷ÉϵÄJAVA ³ÌÐò¾Í¿ÉÒÔͨ¹ýToolBox JDBC Çý¶¯³ÌÐò·ÃÎÊÔËÐÐÔÚiSeries ÉϵÄUDB/400 Êý¾Ý¿â¡£ÊµÏÖÓ¦Ó÷þÎñÆ÷ºÍÊý¾Ý¿â·þÎñÆ÷µÄ·ÖÀë¡£

B.  iSeries Native JDBC Çý¶¯³ÌÐò

iSeries Nativer JDBC Çý¶¯³ÌÐòÓÖ³ÆΪUDB/400 ±¾µØÇý¶¯³ÌÐò£¬ºÍToolBox JDBCDriver ²»Í¬¡£Native JDBC Çý¶¯³ÌÐòµÄµ×²ãÊÇÓÃC/C++ÓïÑÔʵÏֵģ¬Éϲãͨ¹ýJNI£¨JAVA Native Interface£©½øÐÐÁË·â×°¡£ÓÉÓÚNative JDBC Çý¶¯³ÌÐòµÄµ×²ãÊÇÓø߼¶ÓïÑÔʵÏֵĶþ½øÖÆ´úÂ룬ִÐÐЧÂÊÒª±ÈToolBox for JAVA Çý¶¯¸ß¡£µ«ÊÇÓÉÓÚÒÀÀµÓڵײãµÄ¶þ½øÖÆ´úÂ룬Native JDBC Çý¶¯³ÌÐòÖ»ÄÜÔËÐÐÔÚOS/400 ²Ù×÷ϵͳ֮ÉÏ¡£

 

Native JDBC Çý¶¯³ÌÐò°üº¬ÔÚcom.ibm.db2.* °üÖУ¬ ʹÓÃʱͨ¹ý×¢²á¡°com.ibm.db2.jdbc.app.DB2Driver¡±À´Ê¹Óá£ÔÚʹÓÃ֮ǰNative JDBC Çý¶¯³ÌÐòµÄJAR Îļþ¼ÓÈ뵽ϵͳµÄCLASSPATH ÖУ¬Ê¹JAVA ³ÌÐò¿ÉÒÔÕÒµ½¸ÃÀà¿â¡£ÔÚOS/400µÄIFS ÎļþϵͳÏ£º/QIBM/ProdData/Java400/extÒýÓÃToolBox JDBC Çý¶¯³ÌÐòʱ£¬Ó¦ÔÚ³ÌÐòÖе¼Èëcom.ibm.as400.access.* °ü¡£Í¬Ê±Ê¹ÓÃDriverManager ×¢²ácom.ibm.as400.AS400JDBCDriver Àà¡£

import com.ibm.db2.*; //µ¼Èëcom.ibm.db2.* °ü

try {

//×¢²ácom.ibm.db2.jdbc.app.DB2Driver Çý¶¯³ÌÐò

Driver driver = (Driver) Class.forName("com.ibm.db2.jdbc.app.DB2Driver").newInstance();

DriverManager.registerDriver(driver);

}

Native JDBC Çý¶¯³ÌÐòµÄÊý¾Ý¿âÁ¬½Ó´®¸ñʽΪ£ºjdbc:db2:DataBaseName£¬ÆäÖÐ

¡°jdbc:db2:¡±ÎªJDBC Á¬½ÓЭÒ飬ָ¶¨Á¬½ÓÊý¾Ý¿âʹÓÃNative JDBC Çý¶¯³ÌÐò¡£¶ø

¡°DataBaseName¡±´ú±íÒªÁ¬½ÓµÄ±¾µØÊý¾Ý¿âÃû³Æ£¨library name£©¡£²Î¼ûÏÂÃæµÄÀý×Ó£º

jdbc:db2:testdb //Á¬½Ó±¾µØµÄtestdb ¿â

ÏÂÃæÊÇÒ»¸öÍêÕûµÄÔÚJSP ÖÐÒýÓÃNative JDBC Çý¶¯³ÌÐò·ÃÎÊUDB/400 Êý¾Ý¿âµÄÀý×Ó£º

<%@ page language="java" import="java.sql.*, com.ibm.db2.* "%>

<%

//¼ÓÔØÊý¾Ý¿âÇý¶¯³ÌÐò

try{

//×¢²ácom.ibm.db2.jdbc.app.DB2Driver Çý¶¯³ÌÐò

Driver driver = (Driver) Class.forName("com.ibm.db2.jdbc.app.DB2Driver").newInstance();

DriverManager.registerDriver(driver);

out.print("<br>iSeries 400 JDBC Native Driver ÕýÈ·°²×°<br>");

}

catch(Exception e){

out.print("<br>iSeries 400 JDBC Native Driver °²×°Ê§°Ü<br>");

}

//Á¬½ÓÊý¾Ý¿â²¢Ö´Ðвéѯ

try {

Connection conn = null;

conn = DriverManager.getConnection("jdbc:db2://*local/slb2b","slb2b","b2b720");

out.print("ÕýÈ·Á¬½Ó iSeries 400 Êý¾Ý¿â <br>");

Statement stmt = conn.createStatement();

ResultSet rs = stmt.executeQuery("select * from test");

out.println("<br>²éѯ½á¹û:<br>");

while (rs.next()) {

String a = rs.getString(1);

out.print(" name= " + a + "<br>");

}

rs.close();

stmt.close();

conn.close();

} catch( Exception e ) {

out.println("<br>²éѯʧ°Ü<br>");

}

%>

5£®10£®2  Ê¹ÓÃJDBC Á¬½Ó³Ø

A. Êý¾Ý¿âÁ¬½Ó³ØʵÀý

import java.io.*;

import java.sql.*;

import java.util.*;

import java.util.Date;

/*

* Êý¾Ý¿âÁ¬½Ó³ØÀà

*/

public class DBConnectPool {

static private DBConnectPool instance; // ΨһʵÀý

private int checkedOut = 0;

private Vector freeConnections = new Vector(); //Á¬½Ó³ØÏòÁ¿±í

private int maxConn; //Á¬½Ó³ØÖÐ×î´óÁ¬½ÓÊý

private String name; //Á¬½Ó³ØµÄÃû×Ö

private String user; //Êý¾Ý¿âÓû§

private String password; //Êý¾Ý¿âÃÜÂë

private String URL; //Êý¾Ý¿âÁ¬½Ó´®

/*

* ˽Óз½·¨´´½¨Êý¾Ý¿âÁ¬½Ó³Ø£¬·ÀÖ¹ËæÒâµÄ´´½¨Á¬½Ó³Ø¡£ËùÓеĿͻ§¶Ë³ÌÐò¶¼Ê¹ÓÃͳһµÄʵÀý

* @param name Á¬½Ó³ØÃû×Ö

* @param URL Êý¾Ý¿âµÄJDBC URL

* @param user Êý¾Ý¿âÕʺÅ,»ò null

* @param password ÃÜÂë,»ò null

* @param maxConn ´ËÁ¬½Ó³ØÔÊÐí½¨Á¢µÄ×î´óÁ¬½ÓÊý

*/

private DBConnectPool (String name, String URL, String user, String password, int maxConn) {

this.name = name;

this.URL = URL;

this.user = user;

this.password = password;

this.maxConn = maxConn;

//×¢²áÊý¾Ý¿âJDBC Çý¶¯³ÌÐò

try {

Driver driver = (Driver) Class.forName("com.ibm.as400.access.AS400JDBCDriver").newInstance();

DriverManager.registerDriver(driver);

}

catch (Exception e) {

return;

}

//´´½¨Á¬½Ó³Ø

try {

for (int i = 0; i<maxConn; i++) {

Connection conn = newConnection();

//Èç¹ûÁ¬½Ó²»¿ÕÔò½«¸øÁ¬½Ó¼ÓÈëÁ¬½Ó³Ø

if (conn != null) {

freeConnections.addElement(conn);

}

}

}

catch (Exception e) {

}

}

/*

* ½«²»ÔÙʹÓõÄÁ¬½Ó·µ»Ø¸øÁ¬½Ó³Ø

* @param con ¿Í»§³ÌÐòÊͷŵÄÁ¬½Ó

*/

public synchronized void freeConnection(Connection con) {

freeConnections.addElement(con); //½«Ö¸¶¨Á¬½Ó¼ÓÈëµ½ÏòÁ¿Ä©Î²

checkedOut--; //½«µ±Ç°Ê¹ÓÃÁ¬½ÓÊý¼õÉÙÒ»¸ö

notifyAll();

}

/*

* ´ÓÁ¬½Ó³Ø»ñµÃÒ»¸ö¿ÉÓÃÁ¬½Ó.ÈçûÓпÕÏеÄÁ¬½ÓÇÒµ±Ç°Á¬½ÓÊýСÓÚ×î´óÁ¬½Ó

* ÊýÏÞÖÆ,Ôò´´½¨ÐÂÁ¬½Ó.ÈçÔ­À´µÇ¼ÇΪ¿ÉÓõÄÁ¬½Ó²»ÔÙÓÐЧ,Ôò´ÓÏòÁ¿É¾³ýÖ®,

* È»ºóµÝ¹éµ÷ÓÃ×Ô¼ºÒÔ³¢ÊÔеĿÉÓÃÁ¬½Ó.

*/

public synchronized Connection getConnection() {

Connection conn = null; //ÏÈÉú³ÉÒ»¸ö¿ÕµÄÁ¬½Ó

//Åжϵ±Ç°Á¬½Ó³ØµÄ³ß´çÊDz»ÊÇ´óÓÚ0

if (freeConnections.size() > 0) {

// »ñÈ¡ÏòÁ¿ÖеÚÒ»¸ö¿ÉÓÃÁ¬½Ó

conn = (Connection) freeConnections.firstElement();

freeConnections.removeElementAt(0);

try {

if (conn.isClosed()) {

// µÝ¹éµ÷ÓÃ×Ô¼º,³¢ÊÔÔٴλñÈ¡¿ÉÓÃÁ¬½Ó

conn = getConnection();

}

}

catch (SQLException e) {

// µÝ¹éµ÷ÓÃ×Ô¼º,³¢ÊÔÔٴλñÈ¡¿ÉÓÃÁ¬½Ó

conn = getConnection();

}

}

else if (maxConn == 0 || checkedOut < maxConn) {

conn = newConnection();

}

//Èç¹ûÁ¬½Ó²»¿Õ£¬Ôò¼ÆÊýÆ÷Ôõ¼ÓÒ»

if (conn != null) {

checkedOut++;

}

return conn;

}

/*

* ´ÓÁ¬½Ó³Ø»ñÈ¡¿ÉÓÃÁ¬½Ó.¿ÉÒÔÖ¸¶¨¿Í»§³ÌÐòÄܹ»µÈ´ýµÄ×ʱ¼ä£¬²Î¼ûÇ°Ò»¸ögetConnection()·½·¨.

* @param timeout ÒÔºÁÃë¼ÆµÄµÈ´ýʱ¼äÏÞÖÆ

*/

public synchronized Connection getConnection(long timeout) {

//¼Ç¼¿ªÊ¼Ê±¼ä

long startTime = new Date().getTime();

Connection conn;

while ((conn = getConnection()) == null) {

try {

wait(timeout);

}

catch (InterruptedException e) {

}

if ((new Date().getTime() - startTime) >= timeout) {

// wait()·µ»ØµÄÔ­ÒòÊdz¬Ê±

return null;

}

}

return conn;

}

/*

*»ñÈ¡DBConnectPool µÄΨһʵÀý£¬Èç¹ûʵÀýΪ¿Õ£¬Ôò´´½¨Ò»¸öʵÀý

*/

static synchronized public DBConnectPool getInstance() {

if (instance == null) {

instance = new DBConnectPool("ConnPool","jdbc:as400://9.185.43.193/","chenjh","chenjh",3);

}

return instance;

}

/*

* ´´½¨ÐµÄÁ¬½Ó

*/

private Connection newConnection() {

//ÏȽ¨Ò»¸ö¿ÕÁ¬½Ó

Connection conn = null;

try {

//»ñÈ¡Ò»¸öеÄÊý¾Ý¿âÁ¬½Ó

if (user == null) {

conn = DriverManager.getConnection(URL);

}

else {

conn = DriverManager.getConnection(URL, user, password);

}

//È¡Ïû×Ô¶¯Ìá½»

if (conn != null) {

conn.setAutoCommit(false);

}

}

catch (SQLException e) {

return null;

}

return conn;

}

/*

* ¹Ø±ÕËùÓÐÁ¬½Ó

*/

public synchronized void release() {

//ÌáÈ¡ËùÓеÄÁ¬½ÓÔªËص½ÁоÙÊý×é

Enumeration allConnections = freeConnections.elements();

while (allConnections.hasMoreElements()) {

//±éÀúÿһ¸öÁ¬½Ó

Connection conn = (Connection) allConnections.nextElement();

try {

conn.close();

}

catch (SQLException e) {

}

}

//Çå¿ÕËùÓеÄÁ¬½Ó

freeConnections.removeAllElements();

}

}

B. DBConnectPool ʵÏÖ˵Ã÷

DBConnectPool ÊÇÒ»¸öÊý¾Ý¿âÁ¬½Ó³ØµÄ¾ßÌåʵÏÖ£¬ÆäÖаüÀ¨ÁË7 ¸ö¾ßÌåµÄ·½·¨ÓÃÀ´¹¹¼þºÍ³·ÏúÊý¾Ý¿âÁ¬½Ó³Ø

¨¹ DBConnectPool () ¹¹½¨Êý¾ÝÁ¬½Ó³Ø

¨¹ getInstance() »ñÈ¡Êý¾Ý¿âÁ¬½Ó³ØµÄΨһʵÀý

¨¹ freeConnection() ÊÍ·Å¿ÕÏеÄÁ¬½Óµ½Á¬½Ó³Ø

¨¹ getConnection() ´ÓÁ¬½Ó³ØÖÐÌáÈ¡¿ÕÏеÄÁ¬½Ó

¨¹ getConnection(timeout) µÈ´ýÖ¸¶¨µÄʱ¼ä£¬´ÓÁ¬½Ó³ØÖÐÌáÈ¡¿ÕÏеÄÁ¬½Ó

¨¹ newConnection() ¹¹ÔìÁ¬½Ó³ØµÄʱºòн¨Á¬½Ó

¨¹ release() ÊÍ·ÅÊý¾Ý¿âÁ¬½Ó³Ø

¶ÔËùÓÐʹÓÃÁ¬½Ó³ØµÄJAVA ³ÌÐòÀ´ËµÊý¾Ý¿âÁ¬½Ó³ØÊÇÒ»¸ö¹²ÏíµÄ×ÊÔ´£¬Òò´ËËùÓеÄJAVA ³ÌÐòÓ¦¸ÃʹÓÃΨһÁ¬½Ó³ØʵÀý¡£ÔÚDBConnectPool ³ÌÐòÖÐÌṩÁËÒ»¸ö·½·¨getInstance()£¬¹©µ÷ÓÃÁ¬½Ó³ØµÄJAVA ³ÌÐò»ñÈ¡Á¬½Ó³ØµÄΨһʵÀý¡£µ÷ÓÃgetInstance()ʱÈç¹ûÁ¬½Ó³ØʵÀý²»´æÔÚ£¬Ôòµ÷ÓÃDBConnectPool ·½·¨´´½¨Ò»¸öеÄÁ¬½Ó³ØʵÀý£¬²¢×÷ΪΨһµÄÁ¬½Ó³ØʵÀý±£´æ¡£DBConnectPool ·½·¨¸ºÔð´´½¨ÐµÄÊý¾Ý¿âÁ¬½Ó³ØʵÀý¡£DBConnectPool ·½·¨±»¶¨ÒåΪ˽Óеķ½·¨£¬Ö»Äܹ»±»getInstance ·½·¨µ÷Óã¬ÕâÑù¾Í±£Ö¤ÁËÁ¬½Ó³ØµÄʵÀýÊÇΨһµÄ¡£ÔÚµ÷ÓÃDBConnectPool ·½·¨µÄʱºò£¬ÐèÒªÖ¸¶¨Êý¾Ý¿âÁ¬½Ó´®URL¡¢Óû§Ãû¡¢ÃÜÂë¡¢×î´óµÄÊý¾Ý¿âÁ¬½ÓÊýµÈ²ÎÊý¡£ÔÚDBConnectPool ·½·¨ÖÐ×¢²áJDBC Çý¶¯³ÌÐò£¬Í¬Ê±¸ù¾ÝÊäÈëµÄÏà¹Ø²ÎÊý´´½¨Ö¸¶¨ÊýÄ¿µÄÊý¾ÝÁ¬½Ó¡£ËùÓеĿÉÓÃÁ¬½Ó¶ÔÏó¾ùµÇ¼ÇÔÚÃûΪfreeConnections µÄÏòÁ¿£¨Vector£©ÖС£

 

Èç¹ûÏòÁ¿ÖÐÓжàÓÚÒ»¸öµÄÁ¬½Ó£¬getConnection()×ÜÊÇÑ¡È¡µÚÒ»¸ö¡£Í¬Ê±£¬ÓÉÓÚеĿÉÓÃÁ¬½Ó×ÜÊÇ´Óβ²¿¼ÓÈëÏòÁ¿£¬´Ó¶øʹµÃÊý¾Ý¿âÁ¬½ÓÓÉÓÚ³¤Ê±¼äÏÐÖöø±»¹Ø±ÕµÄ·çÏÕ¼õµÍµ½×îС³Ì¶È¡£¿Í»§³ÌÐò¿ÉÒÔʹÓÃDBConnectionPool ÀàÌṩµÄÁ½¸ögetConnection ·½·¨»ñÈ¡¿ÉÓÃÁ¬½Ó¡£Á½ÕߵĹ²Í¬Ö®´¦ÔÚÓÚ£ºÈçÁ¬½Ó³ØÖдæÔÚ¿ÉÓÃÁ¬½Ó£¬ÔòÖ±½Ó·µ»Ø£¬·ñÔò´´½¨ÐµÄÁ¬½Ó²¢·µ»Ø¡£Èç¹ûûÓпÉÓÃÁ¬½ÓÇÒÒÑÓÐÁ¬½Ó×ÜÊýµÈÓÚ×î´óÏÞÖÆÊý£¬µÚÒ»¸ö·½·¨½«Ö±½Ó·µ»Ønull£¬¶øµÚ¶þ¸ö·½·¨½«µÈ´ýÖ±µ½ÓпÉÓÃÁ¬½ÓΪֹ¡£µÚÒ»¸ögetConnection ·½·¨ÔÚ·µ»Ø¿ÉÓÃÁ¬½Ó¸ø¿Í»§³ÌÐò֮ǰ£¬µ÷ÓÃÁËisClosed()·½·¨ÑéÖ¤Á¬½ÓÈÔ¾ÉÓÐЧ¡£Èç¹û¸ÃÁ¬½Ó±»¹Ø±Õ»ò´¥·¢Òì³££¬getConnection()µÝ¹éµØµ÷ÓÃ×Ô¼ºÒÔ³¢ÊÔ»ñÈ¡ÁíÍâµÄ¿ÉÓÃÁ¬½Ó¡£Èç¹ûÔÚÏòÁ¿freeConnections Öв»´æÔÚÈκοÉÓÃÁ¬½Ó£¬getConnection()·½·¨¼ì²éÊÇ·ñÒѾ­Ö¸¶¨×î´óÁ¬½ÓÊýÏÞÖÆ¡£ÈçÒѾ­Ö¸¶¨£¬Ôò¼ì²éµ±Ç°Á¬½ÓÊýÊÇ·ñÒѾ­µ½´ï¼«ÏÞ¡£´Ë´¦maxConn Ϊ0 ±íʾûÓÐÏÞÖÆ¡£Èç¹ûûÓÐÖ¸¶¨×î´óÁ¬½ÓÊýÏÞÖÆ»òµ±Ç°Á¬½ÓÊýСÓÚ¸ÃÖµ£¬¸Ã·½·¨³¢ÊÔ´´½¨ÐµÄÁ¬½Ó¡£Èç´´½¨³É¹¦£¬ÔòÔö¼ÓÒÑʹÓÃÁ¬½ÓµÄ¼ÆÊý²¢·µ»Ø£¬·ñÔò·µ»Ø¿ÕÖµ¡£

 

´´½¨ÐÂÁ¬½ÓÓÉnewConnection()·½·¨ÊµÏÖ¡£´´½¨¹ý³ÌÓëÊÇ·ñÒѾ­Ö¸¶¨Êý¾Ý¿âÕʺš¢ÃÜÂëÓйء£JDBC µÄDriverManager ÀàÌṩ¶à¸ögetConnection()·½·¨£¬ÕâЩ·½·¨ÒªÓõ½JDBCURL ÓëÆäËüһЩ²ÎÊý£¬ÈçÓû§ÕʺźÍÃÜÂëµÈ¡£DriverManager ½«Ê¹ÓÃÖ¸¶¨µÄJDBCURL È·¶¨ÊʺÏÓÚÄ¿±êÊý¾Ý¿âµÄÇý¶¯³ÌÐò¼°½¨Á¢Á¬½Ó¡£µÚ¶þ¸ögetConnection()·½·¨ÐèÒªÒ»¸öÒÔºÁÃëΪµ¥Î»µÄʱ¼ä²ÎÊý£¬¸Ã²ÎÊý±íʾ¿Í»§³ÌÐòÄܹ»µÈ´ýµÄ×ʱ¼ä¡£½¨Á¢Á¬½ÓµÄ¾ßÌå²Ù×÷ÈÔ¾ÉÓɵÚÒ»¸ögetConnection()·½·¨ÊµÏÖ¡£¸Ã·½·¨Ö´ÐÐʱÏȽ«startTime ³õʼ»¯Îªµ±Ç°Ê±¼ä¡£ÔÚwhile Ñ­»·Öг¢ÊÔ»ñµÃÒ»¸öÁ¬½Ó¡£Èç¹ûʧ°Ü£¬ÔòÒÔ¸ø¶¨µÄʱ¼äֵΪ²ÎÊýµ÷ÓÃwait()¡£wait()µÄ·µ»Ø¿ÉÄÜÊÇÓÉÓÚÆäËüÏ̵߳÷ÓÃnotify()»ònotifyAll()£¬Ò²¿ÉÄÜÊÇÓÉÓÚÔ¤¶¨Ê±¼äÒѵ½¡£ÎªÕÒ³öwait()·µ»ØµÄÕæÕýÔ­Òò£¬³ÌÐòÓõ±Ç°Ê±¼ä¼õ¿ªÊ¼Ê±¼ä£¨startTime£©£¬Èç²îÖµ´óÓÚÔ¤¶¨Ê±¼äÔò·µ»Ø¿ÕÖµ£¬·ñÔòÔٴε÷ÓÃgetConnection()¡£°Ñ¿ÕÏеÄÁ¬½ÓµÇ¼Çµ½Á¬½Ó³ØÓÉfreeConnection()·½·¨ÊµÏÖ£¬ËüµÄ²ÎÊýΪ·µ»Ø¸øÁ¬½Ó³ØµÄÁ¬½Ó¶ÔÏ󡣸öÔÏó±»¼ÓÈëµ½freeConnections ÏòÁ¿µÄĩβ£¬È»ºó¼õÉÙÒÑʹÓÃÁ¬½Ó¼ÆÊý¡£µ÷ÓÃnotifyAll()ÊÇΪÁË֪ͨÆäËüÕýÔڵȴý¿ÉÓÃÁ¬½ÓµÄÏ̡߳£release()·½·¨¹©JAVA ³ÌÐòµ÷Ó᣸÷½·¨±éÀúfreeConnections ÏòÁ¿²¢¹Ø±ÕËùÓÐÁ¬½Ó£¬È»ºó´ÓÏòÁ¿ÖÐɾ³ýÕâЩÁ¬½Ó¡£

5£®10£®3. JDBC ³ÌÐòÉè¼ÆÓÅ»¯

A. SQL Óï¾äÔ¤´¦Àí

ÔÚJDBC ÖÐÓÃExecuteQuery ·½·¨Ö´ÐÐÒ»ÌõSQL Óï¾äÊÇͨ¹ýPreparedStatement¨¤Execute Á½¸ö²½ÖèÀ´Íê³ÉµÄ¡£Èç¹ûÿ´Î¶¼ÊÇÓö¼Ê¹ÓÃExecuteQuery µÄ·½·¨µÄ»°£¬ºÜ¶àµÄʱ¼ä¶¼ÓÃÀ´×öÔ¤´¦ÀíµÄ¹¤×÷¡£Èç¹ûÿ´ÎÖ´ÐеÄSQL Óï¾ä²Ù×÷¶¼ÊÇÒ»ÑùµÄ£¬Ö»ÊDzÙ×÷µÄÖµ²»Ò»Ñù£¬Ôò¿ÉÒÔÈ˹¤µÄÖ´ÐÐPreparedStatement ²Ù×÷£¬È»ºóÔÙÖ´ÐÐExecuteÓï¾ä¡£¼õÉÙÖظ´½øÐеÄPreparedStatement¡£¡°Ò»´ÎPrepared£¬¶à´ÎÖ´ÐС±¡£

BigDecimal bd = new BigDecimal("123456");

PreparedStatement ps = c.prepareStatement("insert into cujosql.xxx values(?, ?, ?, ?)");

ps.setInt(1, 99); //ÉèÖÃSQL Óï¾äµÄ²ÎÊý

ps.setBigDecimal(2, bd);

ps.setBigDecimal(3, bd);

ps.setBigDecimal(4, bd);

ps.executeQuery(); //Ö´ÐÐÔ¤´¦ÀíÓï¾ä

ps.setInt(1,200); //ÉèÖÃSQL Óï¾äµÄ²ÎÊý

ps.setBigDecimal(2, bd);

ps.setBigDecimal(3, bd);

ps.setBigDecimal(4, bd);

ps.executeQuery(); //Ö´ÐÐÔ¤´¦ÀíÓï¾ä

B. ºÏÀíµÄʹÓÃSELECT Óï¾ä

ÔÚʹÓÃSELECT Óï¾äµÄʱºò¾¡Á¿¼õÉÙʹÓò»È·¶¨µÄÄ£ºý²éѯ£¬¾¡Á¿¾«È·µÄ±í´ï²éѯµÄÌõ¼þºÍ½á¹û¶ÔÏó¡£¼ÓÉèÒ»¸ö±íÓÐCOL1¡­ COLN ¸öColumn£¬²éѯÐèҪѡȡCOL1,COL2 ×÷Ϊ²éѯ½á¹û¡£Èç¹ûʹÓá°SELECT * FROM TABLENAME¡±½øÐвéѯ£¬ÔòÊý¾Ý¿â»á·µ»ØËùÓеÄColumn ×÷Ϊ½á¹û¼¯¡£¶øʵ¼Ê±»Ê¹ÓõÄÖ»ÓÐCOL1 ºÍCOL2Á½¸öColumn µÄ½á¹û¡£

 

½¨Ò齫²éѯÓï¾ä¸ÄΪ¾«È·µÄ²éѯÓï¾ä¡° SELECT COL1,COL2 FROM  TABLENAME¡±¡£½«Ä£ºýµÄ²éѯ½á¹ûÃèÊö¡°*¡±£¬¸Ä±äΪ¾«È·µÄ½á¹ûÃèÊö¡°COL1,COL2¡±¡£COL1, COL2 ÊdzÌÐòÖÐʵ¼ÊÐèÒªµÃµ½µÄ½á¹û£¬ÆäËüCOL3¡­ .COLN ÔÙÉú³É²éѯ½á¹û¼¯µÄʱºò¾ÍûÓб»°üÀ¨ÔÚÆäÖУ¬ÏµÍ³×ÊÔ´µÃµ½ÁËÓÐЧµÄÀûÓ㬼õÉÙÁËÀË·Ñ¡£Í¬Ê±Ó¦¸Ã¾¡Á¿±ÜÃâʹÓø´Ôӵĸ´ºÏ²éѯÓï¾ä£¨Èç×Ó²éѯǶÌ×£©£¬ÕâЩÓï¾äÔÚÔËÐеÄʱºò»á²úÉú´óÁ¿µÄÁÙʱÖмä±í£¬¶Ôϵͳ×ÊÔ´µÄÏûºÄÊǷdz£´óµÄ¡£½¨Ò齫ÕâЩ¸´ºÏ²éѯÓï¾ä²ð·ÖΪ¶à¸ö¼òµ¥²éѯÓï¾ä¡£

¹ØÓÚ¸üÏêϸµÄSQL ÐÔÄܵ÷Õû£¬Çë²Î¼ûDB2 SQL Performance Tuning Guide¡£

C. ¿é²åÈ빦ÄÜÖ§³Ö

UDB/400 µÄJDBC Çý¶¯³ÌÐòÖ§³Ö¿é²åÈ빦ÄÜ£¬Ö§³ÖÒ»´Î²åÈë¶àÌõÊý¾Ý¼Í¼£¬¿é²åÈë¿ÉÒÔÃ÷ÏԵļõÉÙ²åÈë´óÁ¿Êý¾ÝÏûºÄµÄʱ¼äºÍϵͳ×ÊÔ´¡£²¢ÇÒÔÚËæV5R1 ÌṩµÄJDBC Çý¶¯³ÌÐòÖÐÌṩÁËеĿé²åÈëÖ§³ÖÓï¾ä£º¡±use block insert=true¡±¡£¿ì²åÈëµÄÏÞÖÆÌõ¼þ£º

l ±ØÐëÊÇInsert Óï¾ä

l ±ØÐëʹÓà PreparedStatement ¶ÔInsert Óï¾ä½øÐÐÔ¤´¦Àí

l ±ØÐëÔÚInsert Óï¾äÖÐÃèÊö±íµÄÿһ¸öColumns

l ±ØÐë¶Ô±¾µØϵͳ½øÐвÙ×÷

¿é²åÈëµÄʹÓ÷½·¨²Î¼ûÏÂÃæµÄÀý×Ó£º

// »ñÈ¡Ò»¸öÊý¾Ý¿âÁ¬½Ó£¬²¢Ê¹ÓÃеĿé²åÈëÓï¾ä

Connection c = DriverManager.getConnection("jdbc:db2:*local;use block insert=true");

BigDecimal bd = new BigDecimal("123456");

// Éú³ÉÒ»¸öSQL Ô¤´¦ÀíÓï¾ä

PreparedStatement ps = c.prepareStatement("insert into cujosql.xxx values(?, ?, ?, ?)");

for (int i = 1; i <= 10000; i++) {

ps.setInt(1, i); //ÉèÖÃSQL Óï¾äµÄ²ÎÊý

ps.setBigDecimal(2, bd);

ps.setBigDecimal(3, bd);

ps.setBigDecimal(4, bd);

ps.addBatch(); //½«²ÎÊý¼ÓÈëµ½Batch ²Ù×÷ÖÐ

}

// Ö´Ðпé²åÈë

int[] counts = ps.executeBatch();

__