免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3478 | 回复: 8
打印 上一主题 下一主题

Cobol Subfile问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-14 21:03 |只看该作者 |倒序浏览
调试subfile 时界面不能显示,并且不能退出(即左下角提示"X System").
请教各位高手问题出在哪里,谢谢.

部分代码如下:
Identification Division.                  
Program-ID. TEST.                    
Author. test.   
                        
Environment Division.                     
  Input-Output Section.                  
   File-Control.                          
                                          
     Select test-master                 
         Assign        To Database-xxxx
         Organization  Is Indexed ,   
         Record Key    Is aaa ,
         Alternate Record Key Is bbb WITH DUPLICATES ,
         Access Mode   Is Sequential ,                 
         File Status Is File-Status-Main.              
                                                      
     Select Screen-File                                
         ASSIGN TO Workstation-TestScreen              
         Organization  Is Transaction                  
         Access Mode   Is Sequential                  
         File Status Is File-Status                    
         Control-Area Is Indicator-Area.               
File Section.                     
                                 
FD   test-master.               
01   test-Record.            
     03 aaa        pic 9(4).   
     03 bbb        pic 99.      
     03 ccc        pic 9(6).   
                                 
FD   Screen-File.                  
     01   Screen-Record  
     Copy DDS-All-Formats of TestScreen.               
.........
                                       
Working-Storage Section.               
                                       
77   File-Status pic xx.               
77   File-Status-Main pic xx.         
77   Sub-Num Pic 9(4) Value 1.         
                                       
01   Indicator-Area.
     * Exit                  
     03  In03    Pic 1.               
         88 Not-End-Of-Job value B'0'.
         88 End-Of-Job     value B'1'.
     * Confirm
     03  In05    Pic 1.
         88 Not-Confirm    value B'1'.
         88 Confirm        value B'0'.
     * Subfile Dsplay
     03  In83    Pic 1.               
         88 SubF-Dsp       value B'1'.
     * Subfile Dsplay Control
     03  In84    Pic 1.               
         88 SubF-Dsp-Ctl   value B'1'.
     * Subfile Clear
     03  In85    Pic 1.               
         88 SubF-Clr       value B'0'.
     * PageDown
     03  In99    Pic 1.               
         88 Roll-Down      value B'1'.
................                                      
                                      
Procedure Division.                  
                                      
     Open I-O   test-master.        
     Open I-O   Screen-File.         
                    
Func-Enq .                                         
     Move 1 To Sub-Num .                           
     Set Not-End-Of-Job To True.         
     Move zeros To Indicator-Area.      
     Set Not-Confirm    To True.                  
     Set SubF-DSP       To True                    
     Set SubF-DSP-CTL   To True                    
     Move Corr Indicator-Area To MENUSFLC-O-INDIC .
     
     Write Screen-Record FORMAT IS 'TESTMC'        
     END-Write.                                    
                                                   
     Read Screen-File Record                       
     END-Read.                                    
                                                   
       Perform Func-Read Thru Read-End            
                                                   
    Perform Until End-Of-Job                       
       Move Corr Indicator-Area To MENUSFLC-O-INDIC
       Set SubF-DSP       To True                  
       Set SubF-DSP-CTL   To True                  
       Read Screen-File FORMAT IS 'TESTMS'         
       END-Read                                    
       Move Corr MENUSFLC-I-INDIC To Indicator-Area
    End-Perform.                                   
                                                   
Enq-End.                                          

    Stop Run.
                                                   
****************************************           
      Function Read File                           
****************************************           
                                                   
Func-Read.                                         
Next-Record .                                      
     Read test-master Next                       
        Not At End                                            
        Move aaa  of test-record To Daaas  of TESTMS-O .
        Move bbb  of test-record To Dbbbs  of TESTMS-O .
        Move ccc  of test-record To Dcccs  of TESTMS-O .
                                                              
        Write Screen-Record                                   
             Format Is 'TESTMS'                              
        End-Write.                                            
                                                              
        Compute Sub-Num = Sub-Num + 1  .                     
End-Reading .
Read-End.     

================================================================
Display File
================================================================
A                                      DSPSIZ(24 80 *DS3)
A                                      CF03(03 'EXIT')   
A                                      CF05(05 'CONFIRM')
A          R TESTMS                    SFL                    
A            DaaaS        4  0O  6  2                        
A            DbbbS        2  0O  6 16                        
A            DcccS        6  2O  6 59                        
A          R TESTMC                    SFLCTL(TESTMS)           
A                                      OVERLAY                  
A                                      SFLSIZ(13)               
A                                      SFLPAG(12)               
A  99                                  ROLLDOWN(82 'ROLL DOWN')
A  83                                  SFLDSP                  
A  84                                  SFLDSPCTL            
A  85                                  SFLCLR               
A N99                                  SFLEND(*MORE)        
A                                  1  2'TEST SCREEN'        
A                                       DSPATR(HI)         
A                                  4  2'aaa' DSPATR(HI)  
A                                  4 16'bbb' DSPATR(HI)   
A                                  4 59'ccc' DSPATR(HI)
A          R MENUSFL                   SFL                 
A                                      SFLMSGRCD(24)      
A            xxxKEY                    SFLMSGKEY           
A            xxxxxxMQ                  SFLPGMQ            
A          R MENUSFLC                  SFLCTL(MENUSFL)     
A                                      LOCK               
A                                      SFLSIZ(50) SFLPAG(1)
A  99                                  SFLEND              
A  99                                  SFLDSP   
A  99                                  SFLDSPCTL
A  99                                  SFLINZ   
A            xxxxxxMQ                  SFLPGMQ

论坛徽章:
0
2 [报告]
发表于 2007-08-15 10:12 |只看该作者
有人会吗?

论坛徽章:
0
3 [报告]
发表于 2007-08-15 12:09 |只看该作者
各位,有subfile的简单例子吗?

论坛徽章:
0
4 [报告]
发表于 2007-08-15 14:32 |只看该作者
还是日文地

COBOL-3.pdf

26.3 KB, 下载次数: 335

RF520S.pdf

61.6 KB, 下载次数: 382

论坛徽章:
0
5 [报告]
发表于 2007-08-15 14:50 |只看该作者
utirei,

谢谢.但日语的我打不开......

论坛徽章:
0
6 [报告]
发表于 2007-08-15 15:43 |只看该作者
http://www.k5.dion.ne.jp/~point/cob3.htm

       * INDARA を定義したので、ワークに標識エリアを定義します。
        01  FILE2-INDICS.                                       
            COPY  DDS-ALL-FORMATS-INDIC  OF RM420S.

论坛徽章:
0
7 [报告]
发表于 2007-08-15 16:02 |只看该作者
utirei,

不行啊,还是乱码啊.......

论坛徽章:
0
8 [报告]
发表于 2007-08-15 16:07 |只看该作者
烦死了,界面就是不显示出来.....
明明都已经将SFLDSP和SFPDSPCTL都set 为TRUE了.....

论坛徽章:
0
9 [报告]
发表于 2007-08-15 22:19 |只看该作者
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP