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

) How do u handle errors in BMS macro?

1514


What is difference between static and dynamic call in cobol?

903


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

797


What guidelines should be followed to write a structured cobol prgm?

766


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2837






i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

1086


How do you reference the fixed block file formats from cobol programs

805


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

764


What are the different rules to perform a Search?

702


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2763


What is a report item?

813


What are the pertinent COBOL commands?

2713


how do you reference the variable unblock file formats from cobol programs

858


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2155


Explain how you can characterize tables in cobol?

730