Primesmain.out

From PostgreSQL_wiki
Revision as of 22:18, 9 December 2025 by Martin (talk | contribs) (Created page with "This is the outpur of the primesmain Cobol program compilation. <pre> GnuCOBOL 4.0-early-dev. primesmain.cbl Fri Dec 5 15:27:25...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is the outpur of the primesmain Cobol program compilation.

GnuCOBOL 4.0-early-dev. primesmain.cbl                                                Fri Dec  5 15:27:25 2025  Page 0001

LINE    PG/LN  A...B............................................................SEQUENCE

000001         identification division.
000002         program-id. primesmain.
000003
000004         environment division.
000005         configuration section.
000006         source-computer. linux-laptop.
000007         object-computer. linux-laptop.
000008         special-names.
000009             console is scherm.
000010
000011         data division.
000012         working-storage section.
000013         01  filler               pic x(32) value "Start WS primesmain".
000014         01  commandline-args     pic x(32).
000015           88 execute-generate    value "generate".
000016           88 execute-report      value "report".
000017
000018             copy primes-session.
000001C       *    three-tier-operations methods
000002C       *    business session tier
000003C        01 primes-session.
000004C         03 methods                 pic x(32).
000005C          88 report-primes          value "report".
000006C          88 generate-primes        value "generate".
000007C          88 start-primes           value "start".
000008C          88 stop-primes            value "stop".
000009C          88 invalid-method         value "bad".
000010C       * 03  primes-data.
000011C       *  05 primes-sequence        pic 9(9).
000012C       *  05 prime-number           pic 9(9).
000013C         03  session-result         pic 9(2)  value zero.
000014C          88 session-method-ok      value 0.
000015C          88 session-method-nok     value 1.
000016C          88 session-method-eof     value 9.
000019
000020             copy primes-ui.
000001C       *    three-tier-operations methods
000002C       *    ui part, methods available to all objects
000003C        01 primes-ui.
000004C         03 ui-methods              pic x(32).
000005C          88 write-ui               value "write".
000006C          88 message-ui             value "log-message".
000007C          88 start-ui               value "start".
000008C          88 stop-ui                value "stop".
000009C         03 process-message.
000010C          05 program-name           pic x(20).
000011C          05 program-line.
000012C           07 program-paragraph     pic x(20).
000013C           07 program-message       pic x(92).
000014C         03 u-primes.
000015C          05 u-sequence             pic 9(9).
000016C          05 u-number               pic 9(9).

GnuCOBOL 4.0-early-dev. primesmain.cbl                                                Fri Dec  5 15:27:25 2025  Page 0002

LINE    PG/LN  A...B............................................................SEQUENCE

000017C         03 ui-method-result        pic 9(2)  value zero.
000018C          88 ui-method-ok           value 0.
000019C          88 ui-method-nok          value 1.
000021
000022         procedure division.
000023
000024             accept commandline-args from command-line.
000025             move commandline-args to methods.
000026             move 'primesmain' to program-name.
000027
000028             perform r90-start-session.
000029
000030             evaluate true
000031
000032               when report-primes
000033
000034                 move 'log-message' to ui-methods
000035                 move 'Primes report generation starts.'
000036                 to program-message
000037                 call "primesui" using primes-ui
000038
000039                 move "report"    to methods
000040
000041                 perform r92-generate-primes
000042
000043               when generate-primes
000044
000045                 move 'log-message' to ui-methods
000046                 move 'Primes generation starts.'
000047                 to process-message
000048                 call "primesui" using primes-ui
000049
000050                 move 'generate' to methods
000051        *        perform r92-generate-primes
000052
000053               when other
000054
000055                 move 'log-message' to ui-methods
000056                 move 'Bad parameter, program initialisation failed.'
000057                 to program-message
000058                 call "primesui" using primes-ui
000059
000060                 move 'stop'     to ui-methods
000061                 perform r99-stop-session
000062
000063                 stop run
000064
000065             end-evaluate.
000066
000067             move 'log-message' to ui-methods.
000068             move 'Primes run complete, program stops.'
000069             to program-message.

GnuCOBOL 4.0-early-dev. primesmain.cbl                                                Fri Dec  5 15:27:25 2025  Page 0003

LINE    PG/LN  A...B............................................................SEQUENCE

000070             call "primesui" using primes-ui.
000071
000072             move 'stop'     to methods.
000073             perform r99-stop-session.
000074
000075             stop run.
000076
000077         r90-start-session.
000078
000079             move 'start-session' to program-paragraph.
000080             move 'start'         to ui-methods.
000081
000082             call "primesui" using primes-ui.
000083
000084             if ui-method-ok                  then
000085
000086               move 'log-message' to ui-methods
000087               move 'UI initialisation succeeded.'
000088               to program-message
000089               call "primesui" using primes-ui
000090
000091             else
000092
000093               display "Emergency console message program stops."
000094                  upon scherm
000095               stop run.
000096
000097             move 'log-message' to ui-methods.
000098             move commandline-args to program-message.
000099             call "primesui" using primes-ui.
000100
000101         r92-generate-primes.
000102
000103             call "primesgen" using primes-session.
000104
000105         r99-stop-session.
000106
000107             move 'stop' to ui-methods.
000108             call "primesui" using primes-ui.
000109


0 warnings in compilation group
0 errors in compilation group

Terug naar: primes