Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

What is Declarative and how its used

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: What is Declarative and how its used
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: 2360
Location: Israel

PostPosted: Mon Feb 20, 2006 1:43 am    Post subject:
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    Post subject: Re: What is Declarative and how its used
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts U4038 abend Neither FILE STATUS nor a... rajesh_kota ABENDS & Debugging 6 Tue Mar 04, 2008 3:07 pm
No new posts DECLARATIVE SECTION in procedure divi... iknow COBOL Programming 2 Fri Nov 04, 2005 8:53 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us