we can use set true for condition names..
similarly can we code set to false in cobol pgm?
will it work?



we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it..

Answer / shakilaashwin

you can use 'SET condition-name TO FALSE' but with little
change in the data item declaration

Example is below :

01 WS-EOF-FLAG PIC X(1)VALUE 'N'.
88 WS-EOF-FLAG-N VALUE 'N' WHEN SET FALSE 'Y'.

PROCEDURE DIVISON.
100-MAIN-PARA.
DISPLAY 'PROG STARTS'.
DISPLAY 'FLG VALUE AFTER - ' WS-EOF-FLAG.
SET WS-EOF-FLAG-N TO FALSE.
DISPLAY 'FLG VALUE BEFORE- ' WS-EOFFLAG.
STOP RUN.

Is This Answer Correct ?    8 Yes 9 No

Post New Answer

More COBOL Interview Questions

Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM PERFORM PARA-X UNTIL W-NUM > 9. ------ PARA-X ADD 1 TO W-NUM How many times PARA-X is executed ?

14 Answers   Accenture, TCS,


Which division and paragraphs are mandatory for a COBOL program?

0 Answers  


What is the difference between PIC 9.99 and PIC9v99?

0 Answers  


how to code in cobol while using variable block file?

1 Answers  


What is the difference between perform … with test after and perform … with test before?

0 Answers  






What happens in the background of spool when we submit a job for compilation and execution... This is a recent question in ibm...Kindly help me.....

3 Answers   IBM,


how to know that the file has 300 records how to acess it?

0 Answers   Hewitt, TCS,


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

0 Answers   IBM,


COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE ELSE NEXT SENTENCE PERFORM <IMP-STMT> END-IF.

7 Answers   HCL,


What is the difference between copy and include in cobol?

1 Answers  


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

0 Answers  


WHAT IS SOC3?HOW IT CAN BE RESOLVED?

1 Answers  


Categories