Rational Developer for System z

Modes de hiérarchie d'exécution

La vue Hiérarchie d'exécution comporte deux modes. Les deux modes, Performer ou Performeee, vous permettent de vous concentrer sur le flux de contrôle du programme depuis une perspective unique.

Hiérarchie Performer
Affiche tous les éléments pouvant transférer le contrôle à la sélection. Par exemple, pour le paragraphe "Copy-input-to-output", la hiérarchie Performer affiche tous les paragraphes et sections qui peuvent transférer le contrôle au paragraphe avec une instruction de type Perform Copy-input-to-output.
Hiérarchie Performee
Affiche tous les éléments référencés depuis la sélection. Par exemple, pour le paragraphe Copy-input-to-output, la hiérarchie Performee contient une instruction qui transfère le contrôle en dehors du paragraphe de sélection avec des instructions de type Perform Read-next-input-data. Comme les hiérarchies d'exécution peuvent être imbriquées, la hiérarchie d'exécution est une vue arborescente qui permet de traverser cette imbrication.
La vue Hiérarchie d'exécution dispose des deux modes ci-dessous :

Exemples

Voici un exemple de code COBOL avec le performee sélectionné :

* ****************************************************************************
* 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.

In the following example from the same COBOL program the performer is highlighted:

 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

Retour d'informations