1

出于学习目的,我正在尝试以下操作:我正在尝试通过 COBOL 显示表格......我想定义它在SCREEN SECTION.

以下发生或应该发生 - 所有这些都没有打开多个屏幕:

(1) User enters ENTRY-SCREEN
(2) User has to type in a password (nothing happens there yet ... I am going   
    step by step)
(3) User hits ENTER and gets to the MAIN MENU
    (3.1) User hits "D" --> List of states and abbreviations is displayed
    (3.2) User hits "S" --> User gets to screen where he can look up state-name  
          by entering abbreviation.
(4) By pressing F2 the user can go back to the MAIN MENU
(5) By pressing F1 the user can exit the program

我的问题是 3.1 没有打开新屏幕,也不必为每个状态定义行和列定义。有没有办法——可能是循环或使用THRU——使这更容易,甚至可以在屏幕部分定义它?喜欢:

PERFORM VARYING counter FROM 1 BY 1 UNTIL counter > 50
*<Display the abbreviation and state-name w/o opening new screen>
END-PERFORM.
4

1 回答 1

1

您可以通过使用可变行号定义要在屏幕部分中显示的行来做到这一点,该行号本身在工作存储中单独定义。

使用循环,在过程划分中,您可以通过将 1 加到您的行变量来显示每一行,显示该行并重复。

于 2010-02-23T21:52:26.170 回答