in cobol i have one file it contains records like
10,4,23,98,7,90..... total records 100. iwant 10 to 20 in
reverse order in cobol environ ment any one please give the
answer......
Answers were Sorted based on User's Feedback
Answer / ramesh kumar
let me explain the ans for if the file is PS.
fist compute the value 100-80 into one ws-variable.
then read the file and add 1 to some ws-count variable upto 20th record then check for the conditon if it is 20th record
like if ws-variable = ws-count
if it is then write into o/p rec, now decresae 1 from ws-variable like subtract 1 from ws-variable
and read file again add 1 to ws-count then check for the conditon if it is 19 recrd then write into o/p rec.
perform until ws-variable=0.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / karthick
Ya its simple.......
U can select these records as primary key in ksds cluster.
In cobol program you specify access as random. then select
particular records. and then sort it out in reverse order.
| Is This Answer Correct ? | 1 Yes | 3 No |
If we use GO BACK instead of STOP RUN in cobol?
What are all the divisions of a COBOL program?
WORKING-STORAGE SECTION. 01 A PIC X(3) VALUE 'ABC' 01 B PIC 9(3). PROCEDURE DIVISION. MOVE A TO B. STOP RUN. OUTPUT IS: AB3 WHY AND HOW THIS IS HAPPENING.
what is the difference between external and global variables?
which of the following can be used as a check protection symbol a.Z b.S c.* d.+
What is the difference between static call & Dynamic call?
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 ?
what is filler and what is use of filler
How do you differentiate between cobol and cobol-ii?
How can we increase the size of an existing PDS to include more no. of modules.
What is the difference beetween Arrays and Tables in Cobol? please dont give the answer that arrays in cobol terminology is called tables......
how to display comp3 variables reply soon ?