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 do you reference the fixed block file formats from cobol programs
if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.
Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through a-exit next sentence else if b=c perform c-test through c-exit. if a=d perform d-test through d-exit. a-test. -- -- a-exit. exit. can u tell me what will happen if a=b after looping into a-exit will the control go back to a- test1. will the condition a=d be checked???
How can we increase the size of an existing PDS to include more no. of modules.
DATAONLY, MAPONLY functionality?
i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?
Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $
how to display date in reverse order if the pic clause of the is numeric suppose date is 09032010 ==> need to print in 20100309 (pic clause is numeric)
I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.
Can we move X(9) to 9(9). If yes what are the ways for doing this?
What is an index for tables?
What is LENGTH in COBOL II?