Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can we SET TO TRUE before using the cond variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sekarvnm
Currently Banned

New User


Joined: 06 Oct 2006
Posts: 4
Location: NAGERCOIL

PostPosted: Fri Oct 06, 2006 12:19 pm    Post subject: Can we SET TO TRUE before using the cond variable
Reply with quote

When we use condition var?give eg?can we set true before using cond variable
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Fri Oct 06, 2006 12:33 pm    Post subject:
Reply with quote

Hi there,

Condition var:Wherever a condition can occur, such as in an IF statement or an EVALUATE or a PERFORM..UNTIL, a Condition Name (Level 88) may be used.

Condition Names are defined in the DATA DIVISION using the special level number 88. They are always associated with a data-item and are defined immediately after the definition of the data-item.

A Condition Name is a name given to a specified subset of the values which its associated data-item can hold.

Like a condition, a Condition Name evaluates to True or False.

eg:01 EUCountryCode PIC 99.
88 CodeIs1 VALUE 1.
88 CodeIs2 VALUE 2.
88 CodeIs3 VALUE 3.
etc.

IF CodeIs2 THEN
ADD Bonus to StructuralFunds(EUCountry)
END-IF
IF CodeIs1 THEN
SUBTRACT Bonus FROM StructuralFunds(EUCountry)
END-IF


SETVerb:SET {ConditionName} ... TO TRUE

A Condition Name set to true when one of the condition values mentioned in its VALUE clause is moved into its associated data-item. But you can also set a Condition Name to true using the SET verb.

When the SET verb is used to set a Condition Name, the first condition value specified after the VALUE clause in the definition is moved to the associated data-item. Thus, the value of the associated data-item is changed.



Regarding ur 3 question yes we can set it to true befor using condition variable

Hope it will helpful
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 Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us