Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *> SPDX-License-Identifier: Unlicense
- *> ***************************************************************
- *> outfile can be specified by setting any of the environment
- *> variables:
- *> dd_outfile; or
- *> DD_outfile.
- *>
- *> If these environment variables do not exist then GnuCobol
- *> searches for the file named by the literal outfile.
- *>
- *> If none of these methods return a valid file then the file
- *> outfile will be used.
- *> ***************************************************************
- *> Date Change Description
- *> ====== ==================
- *> xxyymm Initial release
- *>
- *> ***************************************************************
- identification division.
- program-id. main.
- environment division.
- configuration section.
- source-computer. posix.
- object-computer. posix.
- special-names.
- repository.
- function all intrinsic.
- input-output section.
- file-control.
- *> select
- *> assign to
- *> organization is
- *> .
- i-o-control.
- data division.
- file section.
- *> fd .
- *> 01 .
- working-storage section.
- 01 xxx constant as 42.
- *> 01 work-areas.
- *> 01 tables.
- *> 01 accumulators.
- *> 01 flags.
- *> copybooks
- local-storage section.
- *> ***************************************************************
- linkage section.
- screen section.
- /
- *> ***************************************************************
- procedure division.
- declaratives.
- end declaratives.
- *> ===============================================================
- *> The **mainline** section is the program entry point.
- *> ===============================================================
- mainline section.
- goback.
- /
- *> ===============================================================
- *> Provide details of warnings and abends.
- *> ===============================================================
- display-exception section.
- display-soft-exception.
- >>IF DEBUG DEFINED
- reset trace
- display
- "Exception-file: " exception-file upon syserr
- end-display
- display
- "Exception-status: " exception-status upon syserr
- end-display
- display
- "Exception-location: " exception-location
- upon syserr
- end-display
- display
- "Exception-statement: " exception-statement
- upon syserr
- end-display
- ready trace
- .
- >>END-IF
- display-hard-exception.
- perform display-soft-exception
- stop run returning 127
- .
- end program main.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement