Editing
Naming and Coding Standards
(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!
== 11. Error Handling Standard == <span id="sql-errors"></span> === 11.1 SQL errors === Every EXEC SQL block must check SQLCODE as specified in Β§7.3. On error: # Move <code>SQLERRMC</code> to <code>program-message</code>. # Set the tierβs result field to 1 (nok). # Call primesui with <code>ui-methods = "log-message"</code> to log the error. # EXIT PROGRAM β do not STOP RUN from within a subprogram. <span id="file-io-errors"></span> === 11.2 File I/O errors === Every file OPEN, READ, WRITE, CLOSE must check the file-status field: <syntaxhighlight lang="cobol"> IF <file>-status = "00" THEN <success> ELSE MOVE <file>-status TO program-message PERFORM r98-message-ui MOVE 1 TO ui-method-result END-IF.</syntaxhighlight> <span id="return-code"></span> === 11.3 Return code === At the end of <code>primesmain</code> (the only <code>STOP RUN</code> in the system), set the process return code: <syntaxhighlight lang="cobol"> IF <any-error-indicator> THEN MOVE 1 TO RETURN-CODE ELSE MOVE 0 TO RETURN-CODE END-IF. STOP RUN.</syntaxhighlight> ----- <span id="compliance-checklist"></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