Editing
Flow-Diagrams
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== 6. UI (primesui.cbl) Method Dispatch == '''Program:''' <code>primesui.cbl</code><br /> '''What it shows:''' How primesui routes each verb to the correct paragraph, and the detail of the <code>write</code> path β page management, line accumulation, and EOP handling. <pre class="mermaid">flowchart TD A([ENTRY β primesui\nUSING primes-ui]) --> B{EVALUATE TRUE\non ui-methods} B -->|start-ui| C[r90-start-primesui\nOPEN OUTPUT fprinter\nprimes.prt] B -->|write-ui| D[r92-write-primesui] B -->|message-ui| E[r98-message-ui\nDISPLAY process-message\nUPON scherm] B -->|stop-ui| F[r99-stop-primesui] B -->|other| G[ui-method-result = 1] C --> C1{primes-prt-status\n= '00'?} C1 -->|Yes| C2[SET primes-idx TO 1\nui-method-result = 0\nLOG 'Open printer Ok'] C1 -->|No| C3[ui-method-result = 1\nDISPLAY status on console] D --> D1[t-ident at primes-idx = u-sequence\nt-prime at primes-idx = u-number\nSET primes-idx UP BY 1] D1 --> D2{new-page?} D2 -->|Yes| D3[r93-new-page\nWRITE primes-heading\nWRITE table-header\nprint-new-page = 0] D2 -->|No| D4{primes-idx = 7?} D3 --> D4 D4 -->|Yes| D5[WRITE primes-table line\n132-char data record\nSET primes-idx TO 1] D4 -->|No| D6{linage-counter = 53?} D5 --> D6 D6 -->|Yes| D7[r94-eop\nWRITE blank line\nWRITE primes-footing\npage-number += 1\nprint-new-page = 1] D6 -->|No| Z F --> F1[MOVE 0 TO u-sequence and u-number\nPERFORM r92-write-primesui\nUNTIL new-page β flush partial line] F1 --> F2[LOG 'close printer'\nCLOSE fprinter\nui-method-result = primes-prt-status] C2 --> Z C3 --> Z D7 --> Z E --> Z F2 --> Z G --> Z Z([EXIT PROGRAM])</pre> '''Page management state machine:''' <pre>print-new-page = 1 (initial) β βΌ (on any "write" call) IF new-page β r93-new-page: WRITE heading + column header print-new-page = 0 β βΌ (accumulate 6 entries) IF primes-idx = 7 β WRITE data line, reset idx to 1 β βΌ IF linage-counter = 53 β r94-eop: WRITE blank + footing page-number += 1 print-new-page = 1 β triggers new heading on next write</pre> ----- <span id="inter-program-call-sequence-generate-run"></span>
Summary:
Please note that all contributions to Webhuis wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see
Project:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Voorpagina
Cobol and PostgreSQL
PostgreSQL
CFEngine
Proxmox
Webhuis Kennisbank
Basale infra
Webhuis bouwstenen
Webhuis configuratie
Webhuis Infra
Webhuis Support
Webhuis Raspberry
Opzet Applicaties
Business Applicaties
Community portal
Current events
Recent changes
Random page
Help
sitesupport
Tools
What links here
Related changes
Special pages
Page information