How to read records from flat file in reverse order through
COBOL program?
Answers were Sorted based on User's Feedback
Answer / sreejith
i think it is also possible by using access mode dynamic.
first randomly point last record from the file using START
option. after you start read record in reverse order by
using READ PREV option until header of the file reached
Is This Answer Correct ? | 18 Yes | 26 No |
Answer / gurukulu
use COBOL internal sort in ascending or descending key.
Is This Answer Correct ? | 0 Yes | 11 No |
Answer / janu
using iebcmpr
we can easily read
sort fields=(pos,length,d,char)
Is This Answer Correct ? | 8 Yes | 23 No |
How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.
HOW WE WILL SORT THE ARRAY WHICH IS GOING TO USE FOR SEARCH ALL?
In COBOL "BEFORE" advancing is there or not ?
Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.
Please let me know at which Scenarios we will go for STATIC call or DYNAMIC
What is the use of EVALUATE statement?
what is the default print format? in cobol
what is qualification on occurs clause?
why we are using set in searchall?
Hi , I am posting some questons which are asked at interview. These may help u for ur interview... what is static and dynamic call?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move 'xy' to b. display a,b.