GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 17 of 159    Print  
What is SET TO TRUE all about, anyway?
In COBOL II the 88 levels can be set rather than moving their associated values to the related data item. (Web note: This change is not one of COBOL II's better specifications.)


  
Total Answers and Comments: 5 Last Update: July 15, 2008   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 14, 2005 07:18:03   #1  
Azahar        

RE: What is SET TO TRUE all about, anyway?

The set to true is done for 88 level variables to set that flag

For eg: 05 ws-change-flag    pic x(1).

              88 ws-chg       value 'Y'

              88 ws-no-chg   value 'N'

when set ws-chg  to true is done then ws-change-flag  contains value 'Y'  .It is same as move 'Y' to ws-change-flag     

If the statement is set ws-no-chg to true then ws-change-flag    contains value 'N'.It is same is move 'N' to ws-change-flag   

At one point of time only one flag can be set.


 
Is this answer useful? Yes | No
January 08, 2007 06:16:36   #2  
chetan patel        

RE: What is SET TO TRUE all about, anyway?

no it is not like that.

            if in a level no. 88 if there is more than one one condition then if i want to true only first condition then we use SET TO TRUE condition.for example-

                                77 ws-status pic x(8).

                                 88 married-value "1" "2" "3".

                          Then if i want  to true only first condition i.e (1) then in a PROCEDURE DIVISION you just give a statement-

                             married-value set to true.


 
Is this answer useful? Yes | No
October 30, 2007 08:15:38   #3  
aggarwal_dipti Member Since: October 2007   Contribution: 2    

RE: What is SET TO TRUE all about, anyway?
then wat would be the value of married-value when ws-status = "2"?
 
Is this answer useful? Yes | No
April 16, 2008 08:53:50   #4  
poojaDeep Member Since: April 2008   Contribution: 4    

RE: What is SET TO TRUE all about, anyway?
no, its not like that..according to me first answer is right..!

e.g. 05  ACCOUNT-TYPE         PIC X(01) VALUE 'N'.
             88  PREPAID-ACCT                     VALUE 'Y'.
             88  POSTPAID-ACCT                  VALUE 'Y'.

Use this in:-

SET POSTPAID-ACCT  TO TRUE 

This will set the post paid value to Y.

SET PREPAID-ACCT  TO TRUE  - THIS WILL SET PREPAID=Y



 
Is this answer useful? Yes | No
July 15, 2008 02:33:40   #5  
gilbat82 Member Since: July 2008   Contribution: 10    

RE: What is SET TO TRUE all about, anyway?
Last answer is correct and below example also.
e.g. 05  ACCOUNT-TYPE         PIC X(01) VALUE 'N'.
             88  PREPAID-ACCT                     VALUE 'Y'.
             88  POSTPAID-ACCT                  VALUE 'Y'.

Use this in:-

SET POSTPAID-ACCT  TO TRUE 

This will set the post paid value to Y.

SET PREPAID-ACCT  TO TRUE  - THIS WILL SET PREPAID=Y

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape