View previous topic :: View next topic
|
Author |
Message |
fawzy47 Currently Banned New User
Joined: 22 Oct 2005 Posts: 42
|
|
|
|
Hello,
What is Declarative, and how and for waht reason do you use them in a COBOL program
Thank you
Fawzy |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Declaratives are well documented in the fine manual.
O. |
|
Back to top |
|
|
cevelavl
New User
Joined: 20 Feb 2006 Posts: 4
|
|
|
|
Hi,
Declaratives are the sections in the begin of the procedure division that are to be executed when a specific exception or condition occurs based on the USE statement.
The main useful is the "USE AFTER ERROR ON file-name-x" which gives the possibility for the universal file-status-checking or "USE BEFORE REPORTING identifier-y" in report writer.
Procedures in DECLARATIVES are executed automatically after the detection of prescribed conditions - i.e. programmer cannot start them.
This example is from z/OS but in VS Cobol II it is analogous:
http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/IGY3PG30/1.13.4.2?SHELF=igy3sh31&DT=20050628164603& |
|
Back to top |
|
|
fawzy47 Currently Banned New User
Joined: 22 Oct 2005 Posts: 42
|
|
|
|
Thank you
that was very helpful
Fawzy |
|
Back to top |
|
|
|