IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is Declarative and how its used


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
fawzy47
Currently Banned

New User


Joined: 22 Oct 2005
Posts: 42

PostPosted: Mon Feb 20, 2006 1:01 am
Reply with quote

Hello,
What is Declarative, and how and for waht reason do you use them in a COBOL program
Thank you
Fawzy
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Feb 20, 2006 1:43 am
Reply with quote

Declaratives are well documented in the fine manual.

O.
Back to top
View user's profile Send private message
cevelavl

New User


Joined: 20 Feb 2006
Posts: 4

PostPosted: Tue Feb 21, 2006 1:44 pm
Reply with quote

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
View user's profile Send private message
fawzy47
Currently Banned

New User


Joined: 22 Oct 2005
Posts: 42

PostPosted: Wed Feb 22, 2006 5:32 am
Reply with quote

Thank you
that was very helpful
Fawzy
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts U4038 abend Neither FILE STATUS nor a... ABENDS & Debugging 6
No new posts DECLARATIVE SECTION in procedure divi... COBOL Programming 2
Search our Forums:

Back to Top