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......

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

IF I mention stop run in CICS what happens?

1898


what happens if parmparameter passes zero bytes to the program

1667


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

710


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

5695


How do you reference the following file formats from cobol programs?

696






What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

681


Which division and paragraphs are mandatory for a COBOL program?

712


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

1005


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

1933


example for sub strings ? and refernce modifications whit output pls

1846


What is the Purpose of POINTER Phrase in STRING command in COBOL?

723


Whats the difference between search & search ALL?

5270


HOw can I get the negative sign while deduct high value from low value

1792


What are the pertinent COBOL

2045


) how do u code after getting data?

1582