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!
== 8. Inter-Program Call Sequence β Report Run == '''What it shows:''' All CALL interactions during a <code>report</code> invocation β UI setup, database connection, transaction and cursor lifecycle, the fetch loop, and shutdown. <pre class="mermaid">sequenceDiagram participant OS as OS / Shell participant main as primesmain participant gen as primesgen participant dal as primes (DAL) participant ui as primesui participant db as PostgreSQL participant prt as primes.prt OS->>main: execute with arg "report" main->>ui: CALL "primesui" ui-methods="start" ui->>prt: OPEN OUTPUT prt-->>ui: file-status="00" ui-->>main: ui-method-result=0 main->>gen: CALL "primesgen" methods="report" gen->>dal: CALL "primes" dal-methods="connect" dal->>db: EXEC SQL CONNECT TO primes db-->>dal: SQLCODE=0 dal-->>gen: dal-result=0 gen->>ui: LOG "Database initialisation succeeded." gen->>dal: CALL "primes" dal-methods="cursor" dal->>db: EXEC SQL AT primes START TRANSACTION dal->>db: EXEC SQL OPEN primescursor db-->>dal: SQLCODE=0 dal-->>gen: dal-result=0 gen->>ui: LOG "Cursor initialisation succeeded." gen->>dal: r94-fetch β dal-methods="next-prime" dal->>db: EXEC SQL FETCH primescursor INTO :primes-row db-->>dal: first row (ident, prime) dal-->>gen: primes-sequence, prime-number / dal-result=0 gen->>ui: LOG "Fetch first row ok." loop for each row until cursor exhausted gen->>ui: CALL "primesui" ui-methods="write" u-sequence / u-number ui->>prt: accumulate in 6-col buffer\nwrite 132-char line every 6 entries\nwrite heading+footing at page boundaries gen->>dal: r94-fetch β dal-methods="next-prime" dal->>db: EXEC SQL FETCH primescursor db-->>dal: next row or SQLCODEβ 0 (no more rows) dal-->>gen: dal-result=0 (row) or dal-result=1 (eof/error) note over gen: β οΈ session-method-eof (9) never set;\nloop exits on error (1), not clean eof end gen->>dal: CALL "primes" dal-methods="disconnect" dal->>db: EXEC SQL CONNECT RESET primes db-->>dal: SQLCODE=0 dal-->>gen: dal-result=0 gen-->>main: session-result=0 / EXIT PROGRAM main->>ui: CALL "primesui" ui-methods="log-message" "Primes run complete." main->>ui: CALL "primesui" ui-methods="stop" ui->>ui: pad remaining cells with zeros\nPERFORM r92 UNTIL new-page\nCLOSE fprinter ui->>prt: CLOSE prt-->>ui: file-status="00" ui-->>main: ui-method-result=0 main->>OS: STOP RUN</pre> ----- '''β [[Data-Dictionary|Data Dictionary]]''' | [[Primes system Design|Primes system Design β]]
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