we can use set true for condition names..
similarly can we code set to false in cobol pgm?
will it work?
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 |
How to delete leading spaces/blank in COBOL ? Example:- 01 data-name-1 pic x(220) " English is a language". I would like to delete leading spaces.
a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?
i have a variable block which is used in my cobol program as input file having records of 4080 after compilation while runing the program im getiing file attribut mismatch and it is saying tht the record length of the file is 4084 can any one knw the answer how to reslove it ?
can I copy book which contain db2 statment in procedure divion?
hw to create 3 dimensional array & hw to access it?
Program A calls program B. Will the working storage variables declared in program B be initialized every time it is called by program A or will the values be retained until the end of program A?
Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be
Differentiate COBOL and COBOL-II?
what will be the output when a)pic 9(6)value 000178 is moved to pic ***,***. b)pic 9(5) value 57397 is moved to pic $$,$$9.
How To move a value to an array using move verb?
COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE ELSE NEXT SENTENCE PERFORM <IMP-STMT> END-IF.
What is the figurative constant in cobol?