Difference between revisions of "Primesgen.out"
(Created page with "This is the compplete source code of the primes Cobol program, which contains the high level SQL statements. <pre> </pre> <hr/> Terug naar: primes") |
|||
| Line 1: | Line 1: | ||
| − | This is the |
+ | This is the outpur of the primesmain Cobol program compilation. |
<pre> |
<pre> |
||
| + | GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0001 |
||
| + | |||
| + | LINE PG/LN A...B............................................................SEQUENCE |
||
| + | |||
| + | 000001 identification division. |
||
| + | 000002 program-id. primesgen. |
||
| + | 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 input-output section. |
||
| + | 000012 file-control. |
||
| + | 000013 select fprinter assign to "primes.prt"; |
||
| + | 000014 organization line sequential. |
||
| + | 000015 |
||
| + | 000016 data division. |
||
| + | 000017 file section. |
||
| + | 000018 fd fprinter. |
||
| + | 000019 01 file-buffer pic x(132). |
||
| + | 000020 |
||
| + | 000021 working-storage section. |
||
| + | 000022 01 filler pic x(32) value "Start WS primesgen". |
||
| + | 000023 |
||
| + | 000024 01 printer. |
||
| + | 000025 03 print-buffer PIC X(132). |
||
| + | 000026 03 line-number PIC 99 value 99. |
||
| + | 000027 03 page-number PIC 9999 value zero. |
||
| + | 000028 |
||
| + | 000029 01 test-quot pic 9(9). |
||
| + | 000030 |
||
| + | 000031 * ui-operations methods and data |
||
| + | 000032 *01 ui-session. |
||
| + | 000033 * 03 ui-methods pic x(32). |
||
| + | 000034 * 88 start-session value "start". |
||
| + | 000035 * 88 write-primesui value "write". |
||
| + | 000036 * 88 display-primesui value "write". |
||
| + | 000037 * 88 stop-session value "stop". |
||
| + | 000038 * 03 ui-method-result pic 9(2) value zero. |
||
| + | 000039 * 03 primes-set. |
||
| + | 000040 * 05 ui-ident pic 9(9). |
||
| + | 000041 * 05 ui-prime pic 9(9). |
||
| + | 000042 |
||
| + | 000043 * dalcb-operations methods and data |
||
| + | 000044 01 primes. |
||
| + | 000045 03 gen-methods pic x(32). |
||
| + | 000046 88 query-process value "query". |
||
| + | 000047 88 start-process value "start". |
||
| + | 000048 88 next-divider value "get". |
||
| + | 000049 88 write-prime value "put". |
||
| + | 000050 88 stop-process value "stop". |
||
| + | 000051 03 primes-result pic 9(2) value zero. |
||
| + | 000052 88 init-primes-ok value 1. |
||
| + | |||
| + | GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0002 |
||
| + | |||
| + | LINE PG/LN A...B............................................................SEQUENCE |
||
| + | |||
| + | 000053 88 first-divider-ok value 2. |
||
| + | 000054 88 next-divider-ok value 3. |
||
| + | 000055 * 03 prime-sequence pic 9(9). |
||
| + | 000056 * 03 prime-number pic 9(9). |
||
| + | 000057 03 test-number pic 9(9). |
||
| + | 000058 03 test-number-sqr pic 9(9)v9(9). |
||
| + | 000059 03 test-divider pic 9(9). |
||
| + | 000060 03 test-rest pic 9(9)v9(9). |
||
| + | 000061 03 old-test-number pic 9(9). |
||
| + | 000062 03 old-ident pic 9(9). |
||
| + | 000063 03 new-ident pic 9(9). |
||
| + | 000064 |
||
| + | 000065 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). |
||
| + | 000017C 03 ui-method-result pic 9(2) value zero. |
||
| + | 000018C 88 ui-method-ok value 0. |
||
| + | 000019C 88 ui-method-nok value 1. |
||
| + | 000066 |
||
| + | 000067 copy primes-dal. |
||
| + | 000001C * three-tier-operations methods |
||
| + | 000002C * business dal tier |
||
| + | 000003C 01 primes-dal. |
||
| + | 000004C 03 dal-methods pic x(32). |
||
| + | 000005C 88 next-prime value "next-prime". |
||
| + | 000006C 88 next-divider value "next-divider". |
||
| + | 000007C 88 write-prime value "write". |
||
| + | 000008C 88 db-cursor value "cursor". |
||
| + | 000009C 88 db-connect value "connect". |
||
| + | 000010C 88 db-disconnect value "disconnect". |
||
| + | 000011C 88 invalid-method value "bad". |
||
| + | 000012C 03 primes-data. |
||
| + | 000013C 05 primes-sequence pic 9(9). |
||
| + | 000014C 05 prime-number pic 9(9). |
||
| + | 000015C 03 dal-result pic 9(2) value zero. |
||
| + | 000016C 88 dal-method-ok value 0. |
||
| + | 000017C 88 dal-method-nok value 1. |
||
| + | 000018C 88 dal-method-eof value 99. |
||
| + | |||
| + | GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0003 |
||
| + | |||
| + | LINE PG/LN A...B............................................................SEQUENCE |
||
| + | |||
| + | 000019C * 03 primes-table. |
||
| + | 000020C * 05 ident pic s9(9). |
||
| + | 000021C * 05 prime pic s9(9). |
||
| + | 000022C |
||
| + | 000068 |
||
| + | 000069 linkage section. |
||
| + | 000070 |
||
| + | 000071 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. |
||
| + | 000072 |
||
| + | 000073 procedure division using primes-session. |
||
| + | 000074 * primes-ui, primes-dal. |
||
| + | 000075 |
||
| + | 000076 evaluate true |
||
| + | 000077 |
||
| + | 000078 when report-primes |
||
| + | 000079 |
||
| + | 000080 perform r90-start-primes-report |
||
| + | 000081 if session-method-ok then |
||
| + | 000082 * move "report" to methods |
||
| + | 000083 * perform r86-report-primes until dal-method-eof |
||
| + | 000084 perform r86-report-primes until session-method-eof |
||
| + | 000085 |
||
| + | 000086 when generate-primes |
||
| + | 000087 |
||
| + | 000088 perform r91-start-primes-generation |
||
| + | 000089 if session-method-ok then |
||
| + | 000090 * move "generate" to methods |
||
| + | 000091 perform r80-test-number until test-number = 999999999 |
||
| + | 000092 |
||
| + | 000093 when other |
||
| + | 000094 |
||
| + | 000095 move "primesgen" to program-name |
||
| + | 000096 move "main" to program-paragraph |
||
| + | 000097 move 'log-message' to methods |
||
| + | 000098 move 'Bad method, primes process failed.' |
||
| + | 000099 to program-message |
||
| + | |||
| + | GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0004 |
||
| + | |||
| + | LINE PG/LN A...B............................................................SEQUENCE |
||
| + | |||
| + | 000100 call "primesui" using primes-ui |
||
| + | 000101 end-evaluate. |
||
| + | 000102 |
||
| + | 000103 perform r99-close-primes. |
||
| + | 000104 |
||
| + | 000105 exit program. |
||
| + | 000106 |
||
| + | 000107 r80-test-number. |
||
| + | 000108 |
||
| + | 000109 divide test-number by test-divider giving test-quot |
||
| + | 000110 remainder test-rest. |
||
| + | 000111 |
||
| + | 000112 evaluate true |
||
| + | 000113 when test-rest = 0 |
||
| + | 000114 perform r82-next-test-number |
||
| + | 000115 when test-divider > test-number-sqr |
||
| + | 000116 perform r85-write-prime |
||
| + | 000117 perform r82-next-test-number |
||
| + | 000118 when other |
||
| + | 000119 perform r89-get-next-divider. |
||
| + | 000120 |
||
| + | 000121 r82-next-test-number. |
||
| + | 000122 |
||
| + | 000123 add 2 to test-number. |
||
| + | 000124 compute test-number-sqr = test-number ** 0.5 . |
||
| + | 000125 move 1 to old-ident. |
||
| + | 000126 perform r89-get-next-divider. |
||
| + | 000127 |
||
| + | 000128 r85-write-prime. |
||
| + | 000129 |
||
| + | 000130 move 'write' to ui-methods. |
||
| + | 000131 call "primes" using primes-dal. |
||
| + | 000132 call "primesui" using primes-ui. |
||
| + | 000133 * display primes-result upon scherm. |
||
| + | 000134 |
||
| + | 000135 r86-report-primes. |
||
| + | 000136 |
||
| + | 000137 move 'write' to ui-methods. |
||
| + | 000138 move primes-data to u-primes. |
||
| + | 000139 call "primesui" using primes-ui. |
||
| + | 000140 perform r94-fetch. |
||
| + | 000141 * display prime-number upon scherm. |
||
| + | 000142 |
||
| + | 000143 r89-get-next-divider. |
||
| + | 000144 |
||
| + | 000145 move 'get' to gen-methods. |
||
| + | 000146 call "primes" using primes. |
||
| + | 000147 |
||
| + | 000148 r90-start-primes-report. |
||
| + | 000149 |
||
| + | 000150 move 'connect' to dal-methods. |
||
| + | 000151 call "primes" using primes-dal. |
||
| + | |||
| + | GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0005 |
||
| + | |||
| + | LINE PG/LN A...B............................................................SEQUENCE |
||
| + | |||
| + | 000152 |
||
| + | 000153 move "primesgen" to program-name. |
||
| + | 000154 move "r90-start-primes-report" to program-paragraph. |
||
| + | 000155 move 'log-message' to ui-methods. |
||
| + | 000156 |
||
| + | 000157 if dal-method-ok then |
||
| + | 000158 move 'Database initialisation succeeeded.' |
||
| + | 000159 to program-message |
||
| + | 000160 call "primesui" using primes-ui |
||
| + | 000161 else |
||
| + | 000162 move 'Database initialisation failed.' |
||
| + | 000163 to program-message |
||
| + | 000164 call "primesui" using primes-ui |
||
| + | 000165 move 1 to session-result. |
||
| + | 000166 |
||
| + | 000167 move 'cursor' to dal-methods. |
||
| + | 000168 call "primes" using primes-dal. |
||
| + | 000169 |
||
| + | 000170 move "primesgen" to program-name. |
||
| + | 000171 move "r90-start-primes-report" to program-paragraph. |
||
| + | 000172 move 'log-message' to ui-methods. |
||
| + | 000173 |
||
| + | 000174 if dal-method-ok then |
||
| + | 000175 move 'Cursor initialisation succeeeded.' |
||
| + | 000176 to program-message |
||
| + | 000177 call "primesui" using primes-ui |
||
| + | 000178 else |
||
| + | 000179 move 'Cursor initialisation failed.' to program-message |
||
| + | 000180 call "primesui" using primes-ui |
||
| + | 000181 move 1 to session-result. |
||
| + | 000182 |
||
| + | 000183 if dal-method-ok then |
||
| + | 000184 perform r94-fetch. |
||
| + | 000185 |
||
| + | 000186 if dal-method-ok then |
||
| + | 000187 move 'Fetch first row ok.' to program-message |
||
| + | 000188 move 0 to dal-result |
||
| + | 000189 else |
||
| + | 000190 move 'Fetch first row nok.' to program-message |
||
| + | 000191 move 1 to dal-result. |
||
| + | 000192 |
||
| + | 000193 move 'primesgen' to program-name. |
||
| + | 000194 call "primesui" using primes-ui. |
||
| + | 000195 |
||
| + | 000196 r91-start-primes-generation. |
||
| + | 000197 |
||
| + | 000198 move 'connect' to dal-methods. |
||
| + | 000199 call "primes" using primes-dal. |
||
| + | 000200 |
||
| + | 000201 move 'log-message' to ui-methods |
||
| + | 000202 |
||
| + | 000203 if dal-method-ok then |
||
| + | |||
| + | GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0006 |
||
| + | |||
| + | LINE PG/LN A...B............................................................SEQUENCE |
||
| + | |||
| + | 000204 move 2 to test-divider |
||
| + | 000205 move 1 to old-ident |
||
| + | 000206 move 3 to test-number |
||
| + | 000207 compute test-number-sqr = test-number ** 0.5 |
||
| + | 000208 move 'Database initialisation succeeeded.' |
||
| + | 000209 to program-message |
||
| + | 000210 call "primesui" using primes-ui |
||
| + | 000211 else |
||
| + | 000212 move 'Database initialisation failed.' |
||
| + | 000213 to program-message |
||
| + | 000214 call "primesui" using primes-ui |
||
| + | 000215 move 1 to session-result. |
||
| + | 000216 |
||
| + | 000217 r94-fetch. |
||
| + | 000218 |
||
| + | 000219 move 'next-prime' to dal-methods. |
||
| + | 000220 call "primes" using primes-dal. |
||
| + | 000221 |
||
| + | 000222 move "primesgen" to program-name. |
||
| + | 000223 move "r94-fetch" to program-paragraph. |
||
| + | 000224 move 'log-message' to ui-methods. |
||
| + | 000225 |
||
| + | 000226 if dal-method-ok then |
||
| + | 000227 next sentence |
||
| + | 000228 else |
||
| + | 000229 move 'Fetch failed.' to program-message |
||
| + | 000230 call "primesui" using primes-ui |
||
| + | 000231 move 1 to session-result. |
||
| + | 000232 |
||
| + | 000233 r99-close-primes. |
||
| + | 000234 |
||
| + | 000235 move 'disconnect' to dal-methods. |
||
| + | 000236 call "primes" using primes. |
||
| + | 000237 |
||
| + | 000238 move 'log-message' to methods |
||
| + | 000239 |
||
| + | 000240 if dal-method-ok then |
||
| + | 000241 move 'Database close succeeeded.' |
||
| + | 000242 to program-message |
||
| + | 000243 call "primesui" using primes-ui |
||
| + | 000244 else |
||
| + | 000245 move 'Database close failed.' |
||
| + | 000246 to program-message |
||
| + | 000247 call "primesui" using primes-ui |
||
| + | 000248 move 1 to session-result. |
||
| + | 000249 |
||
| + | |||
| + | |||
| + | 0 warnings in compilation group |
||
| + | 0 errors in compilation group |
||
</pre> |
</pre> |
||
Latest revision as of 22:20, 9 December 2025
This is the outpur of the primesmain Cobol program compilation.
GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0001 LINE PG/LN A...B............................................................SEQUENCE 000001 identification division. 000002 program-id. primesgen. 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 input-output section. 000012 file-control. 000013 select fprinter assign to "primes.prt"; 000014 organization line sequential. 000015 000016 data division. 000017 file section. 000018 fd fprinter. 000019 01 file-buffer pic x(132). 000020 000021 working-storage section. 000022 01 filler pic x(32) value "Start WS primesgen". 000023 000024 01 printer. 000025 03 print-buffer PIC X(132). 000026 03 line-number PIC 99 value 99. 000027 03 page-number PIC 9999 value zero. 000028 000029 01 test-quot pic 9(9). 000030 000031 * ui-operations methods and data 000032 *01 ui-session. 000033 * 03 ui-methods pic x(32). 000034 * 88 start-session value "start". 000035 * 88 write-primesui value "write". 000036 * 88 display-primesui value "write". 000037 * 88 stop-session value "stop". 000038 * 03 ui-method-result pic 9(2) value zero. 000039 * 03 primes-set. 000040 * 05 ui-ident pic 9(9). 000041 * 05 ui-prime pic 9(9). 000042 000043 * dalcb-operations methods and data 000044 01 primes. 000045 03 gen-methods pic x(32). 000046 88 query-process value "query". 000047 88 start-process value "start". 000048 88 next-divider value "get". 000049 88 write-prime value "put". 000050 88 stop-process value "stop". 000051 03 primes-result pic 9(2) value zero. 000052 88 init-primes-ok value 1. GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0002 LINE PG/LN A...B............................................................SEQUENCE 000053 88 first-divider-ok value 2. 000054 88 next-divider-ok value 3. 000055 * 03 prime-sequence pic 9(9). 000056 * 03 prime-number pic 9(9). 000057 03 test-number pic 9(9). 000058 03 test-number-sqr pic 9(9)v9(9). 000059 03 test-divider pic 9(9). 000060 03 test-rest pic 9(9)v9(9). 000061 03 old-test-number pic 9(9). 000062 03 old-ident pic 9(9). 000063 03 new-ident pic 9(9). 000064 000065 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). 000017C 03 ui-method-result pic 9(2) value zero. 000018C 88 ui-method-ok value 0. 000019C 88 ui-method-nok value 1. 000066 000067 copy primes-dal. 000001C * three-tier-operations methods 000002C * business dal tier 000003C 01 primes-dal. 000004C 03 dal-methods pic x(32). 000005C 88 next-prime value "next-prime". 000006C 88 next-divider value "next-divider". 000007C 88 write-prime value "write". 000008C 88 db-cursor value "cursor". 000009C 88 db-connect value "connect". 000010C 88 db-disconnect value "disconnect". 000011C 88 invalid-method value "bad". 000012C 03 primes-data. 000013C 05 primes-sequence pic 9(9). 000014C 05 prime-number pic 9(9). 000015C 03 dal-result pic 9(2) value zero. 000016C 88 dal-method-ok value 0. 000017C 88 dal-method-nok value 1. 000018C 88 dal-method-eof value 99. GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0003 LINE PG/LN A...B............................................................SEQUENCE 000019C * 03 primes-table. 000020C * 05 ident pic s9(9). 000021C * 05 prime pic s9(9). 000022C 000068 000069 linkage section. 000070 000071 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. 000072 000073 procedure division using primes-session. 000074 * primes-ui, primes-dal. 000075 000076 evaluate true 000077 000078 when report-primes 000079 000080 perform r90-start-primes-report 000081 if session-method-ok then 000082 * move "report" to methods 000083 * perform r86-report-primes until dal-method-eof 000084 perform r86-report-primes until session-method-eof 000085 000086 when generate-primes 000087 000088 perform r91-start-primes-generation 000089 if session-method-ok then 000090 * move "generate" to methods 000091 perform r80-test-number until test-number = 999999999 000092 000093 when other 000094 000095 move "primesgen" to program-name 000096 move "main" to program-paragraph 000097 move 'log-message' to methods 000098 move 'Bad method, primes process failed.' 000099 to program-message GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0004 LINE PG/LN A...B............................................................SEQUENCE 000100 call "primesui" using primes-ui 000101 end-evaluate. 000102 000103 perform r99-close-primes. 000104 000105 exit program. 000106 000107 r80-test-number. 000108 000109 divide test-number by test-divider giving test-quot 000110 remainder test-rest. 000111 000112 evaluate true 000113 when test-rest = 0 000114 perform r82-next-test-number 000115 when test-divider > test-number-sqr 000116 perform r85-write-prime 000117 perform r82-next-test-number 000118 when other 000119 perform r89-get-next-divider. 000120 000121 r82-next-test-number. 000122 000123 add 2 to test-number. 000124 compute test-number-sqr = test-number ** 0.5 . 000125 move 1 to old-ident. 000126 perform r89-get-next-divider. 000127 000128 r85-write-prime. 000129 000130 move 'write' to ui-methods. 000131 call "primes" using primes-dal. 000132 call "primesui" using primes-ui. 000133 * display primes-result upon scherm. 000134 000135 r86-report-primes. 000136 000137 move 'write' to ui-methods. 000138 move primes-data to u-primes. 000139 call "primesui" using primes-ui. 000140 perform r94-fetch. 000141 * display prime-number upon scherm. 000142 000143 r89-get-next-divider. 000144 000145 move 'get' to gen-methods. 000146 call "primes" using primes. 000147 000148 r90-start-primes-report. 000149 000150 move 'connect' to dal-methods. 000151 call "primes" using primes-dal. GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0005 LINE PG/LN A...B............................................................SEQUENCE 000152 000153 move "primesgen" to program-name. 000154 move "r90-start-primes-report" to program-paragraph. 000155 move 'log-message' to ui-methods. 000156 000157 if dal-method-ok then 000158 move 'Database initialisation succeeeded.' 000159 to program-message 000160 call "primesui" using primes-ui 000161 else 000162 move 'Database initialisation failed.' 000163 to program-message 000164 call "primesui" using primes-ui 000165 move 1 to session-result. 000166 000167 move 'cursor' to dal-methods. 000168 call "primes" using primes-dal. 000169 000170 move "primesgen" to program-name. 000171 move "r90-start-primes-report" to program-paragraph. 000172 move 'log-message' to ui-methods. 000173 000174 if dal-method-ok then 000175 move 'Cursor initialisation succeeeded.' 000176 to program-message 000177 call "primesui" using primes-ui 000178 else 000179 move 'Cursor initialisation failed.' to program-message 000180 call "primesui" using primes-ui 000181 move 1 to session-result. 000182 000183 if dal-method-ok then 000184 perform r94-fetch. 000185 000186 if dal-method-ok then 000187 move 'Fetch first row ok.' to program-message 000188 move 0 to dal-result 000189 else 000190 move 'Fetch first row nok.' to program-message 000191 move 1 to dal-result. 000192 000193 move 'primesgen' to program-name. 000194 call "primesui" using primes-ui. 000195 000196 r91-start-primes-generation. 000197 000198 move 'connect' to dal-methods. 000199 call "primes" using primes-dal. 000200 000201 move 'log-message' to ui-methods 000202 000203 if dal-method-ok then GnuCOBOL 4.0-early-dev. primesgen.cbl Fri Dec 5 15:28:35 2025 Page 0006 LINE PG/LN A...B............................................................SEQUENCE 000204 move 2 to test-divider 000205 move 1 to old-ident 000206 move 3 to test-number 000207 compute test-number-sqr = test-number ** 0.5 000208 move 'Database initialisation succeeeded.' 000209 to program-message 000210 call "primesui" using primes-ui 000211 else 000212 move 'Database initialisation failed.' 000213 to program-message 000214 call "primesui" using primes-ui 000215 move 1 to session-result. 000216 000217 r94-fetch. 000218 000219 move 'next-prime' to dal-methods. 000220 call "primes" using primes-dal. 000221 000222 move "primesgen" to program-name. 000223 move "r94-fetch" to program-paragraph. 000224 move 'log-message' to ui-methods. 000225 000226 if dal-method-ok then 000227 next sentence 000228 else 000229 move 'Fetch failed.' to program-message 000230 call "primesui" using primes-ui 000231 move 1 to session-result. 000232 000233 r99-close-primes. 000234 000235 move 'disconnect' to dal-methods. 000236 call "primes" using primes. 000237 000238 move 'log-message' to methods 000239 000240 if dal-method-ok then 000241 move 'Database close succeeeded.' 000242 to program-message 000243 call "primesui" using primes-ui 000244 else 000245 move 'Database close failed.' 000246 to program-message 000247 call "primesui" using primes-ui 000248 move 1 to session-result. 000249 0 warnings in compilation group 0 errors in compilation group
Terug naar: primes