Rational Developer for System z

COBOL 수행 아키텍처 구조 보기

단락이나 섹션에 대한 참조를 선택할 때는 팝업 메뉴에서 Open Perform Hierarchy 조치를 선택합니다.
Perform Hierarchy 뷰에는 계층 구조에 있는 각 명령문의 행 번호와 단락이 표시되며 이 뷰를 이용하면 이러한 명령문을 쉽게 탐색할 수 있습니다. Perform Hierarchy 뷰에는 다음과 같은 두 가지 모드가 있습니다. Performer Hierarchy 모드에서는 선택한 단락에 대한 참조가 표시됩니다. 예를 들어, 단락 "Copy-input-to-output"이 주어지면 Performer Hierarchy 모드에서는 Perform Copy-input-to-output과 같은 명령문을 사용하여 해당 단락에 제어를 전송할 수 있는 모든 단락과 섹션을 표시합니다. Performee Hierarchy 모드에서는 선택된 단락 내에 포함된 다른 단락에 대한 참조가 표시됩니다. 예를 들어, 단락 Copy-input-to-output이 주어지면 Performee Hierarchy 모드에서는 Perform Read-next-input-data와 같은 명령문을 사용하여 선택 단락의 외부로 제어를 전송할 수 있는 명령문을 표시합니다. 임으로 수행 계층 구조를 중첩할 수 있으므로 Perform Hierarchy는 이러한 중첩 구조를 순회할 수 있는 트리 뷰라고 할 수 있습니다.

예제

다음은 Performee(강조된 부분)를 사용한 COBOL 코드에 대한 예제입니다.

* ****************************************************************************
* Utility method for copying input data from the input file to the output file
* ****************************************************************************
  Copy-input-to-output.
* Loop until end of file for input file
     Move "0" to Input-eof
     Perform until
             NOT inputfile-success OR
             NOT outputfile-success
         PERFORM  Read-next-input-data 
         IF inputfile-success
            PERFORM Write-output-data
         End-IF
         End-perform.
      Copy-input-to-output-EXIT.
         EXIT.

* *******************************************
* Utility method for reading from input file
* *******************************************
  Read-input-data.
*    Assume text to be read into Temp-data from IN-INTERNAL-FILE
     Move Spaces to Temp-data.

같은 COBOL 프로그램에서 가져온 다음 예제에는 Performer가 강조되어 있습니다.

 Procedure DIVISION USING PARMS.
* Open the input and/or output files
     PERFORM Open-files.

* Process the user request

     EVALUATE ACTION
         WHEN DO-COPY-DATASET
             PERFORM  Copy-input-to-output. 
         WHEN OTHER
             CONTINUE.
     END-EVALUATE.
     MOVE IN-FILE-STATUS
          TO PARM-IN-FILE-STATUS.
     MOVE OUT-FILE-STATUS
          TO PARM-OUT-FILE-STATUS.
     MOVE IN-VSAM-CODE
          TO PARM-IN-VSAM-CODE.
     MOVE OUT-VSAM-CODE
          TO PARM-OUT-VSAM-CODE.
     PERFORM Close-files.
     goback.

* ***************************************************
* Utility method to open the input and/or output file
* ***************************************************
  Open-files.
* Open the input file
     OPEN I-O IN-INTERNAL-FILE

이용 약관 | 피드백

이 Information Center는 Eclipse 기술로 구현됩니다. (http://www.eclipse.org 웹사이트 참조)