Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

both execution

IDENTIFICATION DIVISION.
PROGRAM-ID.  Iteration-If.
AUTHOR.  Michael Coughlan.

DATA DIVISION.
WORKING-STORAGE SECTION.
01  V-DII7DV-TEMP-VARS.
           03  TMP0 PIC S9(5)V9(13) USAGE COMP-3
                  VALUE 0.
           03  X-PIC-TMP0 REDEFINES TMP0 PIC X(10).
           03  OLDTMP0 PIC S9(5) USAGE COMP-3
                  VALUE 0.
           03  X-PIC-OLDTMP0 REDEFINES OLDTMP0 PIC X(3).
           
           
01  V-DII7DV-DII8DV.


           03  F-ELEVATOR-POSITION PIC S9(4) USAGE COMP-4.
 01  V-DII7DV-DII9DV.

           03  F-ZAAAKAB PIC S9(9) USAGE COMP-4.

PROCEDURE DIVISION.
 DISPLAY "Enter F-ELEVATOR" WITH NO ADVANCING.
    ACCEPT F-ELEVATOR-POSITION.
DISPLAY "F-ELEVATOR-POSITION IS = ",F-ELEVATOR-POSITION.

                    COMPUTE OLDTMP0 OF V-DII7DV-TEMP-VARS =  ( F-ELEVATOR-POSITION
           OF V-DII7DV-DII8DV - 51 )  / 50.
           DISPLAY "OLDTMP 0 IS = ", OLDTMP0 OF V-DII7DV-TEMP-VARS.

           COMPUTE TMP0 OF V-DII7DV-TEMP-VARS =  ( F-ELEVATOR-POSITION
           OF V-DII7DV-DII8DV - 51 )  / 50.
           DISPLAY "TMP 0 BEFORE IS = ", TMP0 OF V-DII7DV-TEMP-VARS.
           
  
              
           COMPUTE TMP0 OF V-DII7DV-TEMP-VARS = FUNCTION INTEGER ( TMP0
           OF V-DII7DV-TEMP-VARS).
           DISPLAY "TMP 0 AFTER INTEGER IS = ", TMP0 OF V-DII7DV-TEMP-VARS.
           COMPUTE F-ZAAAKAB OF V-DII7DV-DII9DV = F-ELEVATOR-POSITION OF
            V-DII7DV-DII8DV - TMP0 OF V-DII7DV-TEMP-VARS * 2 - 2.
            
             DISPLAY "Result NEW is = ", F-ZAAAKAB OF V-DII7DV-DII9DV.
             
             COMPUTE F-ZAAAKAB OF V-DII7DV-DII9DV = F-ELEVATOR-POSITION OF
            V-DII7DV-DII8DV - OLDTMP0 OF V-DII7DV-TEMP-VARS * 2 - 2.
            
             DISPLAY "Result OLD is = ", F-ZAAAKAB OF V-DII7DV-DII9DV.

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.