      $ SET MF(2) NOOSVS NOVSC2
       IDENTIFICATION DIVISION.
       PROGRAMID. PI.
       AUTHOR. PFTR.
      *
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       OBJECTCOMPUTER. MDS800.
       SPECIALNAMES. CONSOLE IS CRT.
      *
       DATA DIVISION.
       WORKINGSTORAGE SECTION.
      *
       01  SCREEN PIC X(1920).
      *
       01  DI1 REDEFINES SCREEN.
           02 FILLER PIC X(160).
           02 DITX1 PIC X(160).
           02 DITX2 PIC X(13).
           02 DITERM PIC X(15).
           02 FILLER PIC X(136).
           02 DITX3 PIC X(6).
           02 DIPI PIC X(15).
           02 FILLER PIC X(1415).
      *
       01  DI2 REDEFINES SCREEN.
           02 FILLER PIC X(333).
           02 DITERM2 PIC X(15).
           02 FILLER PIC X(142).
           02 DIPI2 PIC X(15).
           02 FILLER PIC X(1415).
      *
       01  WORKAREA.
           02 PIC PIC S9V9(14).
           02 TERM PIC S9V9(14).
           02 W PIC S9V9(14).
           02 N PIC 9999.
           02 N1 PIC 9999.
           02 N2 PIC 9999.
           02 ED PIC 9.9(12).
      *
       01  CONSTANTS.
           02 TX1 PIC X(17) VALUE CALCULATION OF PI.
           02 TX2 PIC X(12) VALUE NEXT TERM IS.
           02 TX3 PIC X(5) VALUE PI IS.
      *
       PROCEDURE DIVISION.
       LASTART.
           DISPLAY SPACE.
           MOVE SPACE TO SCREEN.
           MOVE TX1 TO DITX1.
           MOVE TX2 TO DITX2.
           MOVE TX3 TO DITX3.
           MOVE 0.5 TO ED.
           MOVE ED TO DITERM.
           MOVE 3 TO ED.
           MOVE ED TO DIPI.
           DISPLAY DI1.
           MOVE 0.5 TO PIC.
           MOVE 0.5 TO TERM.
           MOVE 3 TO N.
       LOOP.
           MOVE N TO N2.
           SUBTRACT 2 FROM N2.
           MULTIPLY N2 BY N2.
           MULTIPLY N2 BY TERM.
           MOVE N TO N1.
           SUBTRACT 1 FROM N1.
           MULTIPLY N BY N1.
           MULTIPLY 4 BY N1.
           DIVIDE N1 INTO TERM.
           IF TERM < 0.0000000000001 THEN GO TO HALT.
           ADD TERM TO PIC.
           MOVE PIC TO W.
           MULTIPLY 6 BY W.
           MOVE W TO ED.
           MOVE ED TO DIPI2.
           MOVE TERM TO ED.
           MOVE ED TO DITERM2.
           DISPLAY DI2.
           ADD 2 TO N.
           IF N < 100 GO TO LOOP.
       HALT.
           STOP RUN.
wX9)>X0tX>t?H>u	X49>u>)u>*0t	X43>X0t>)u>u
\>X0t+