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
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is the difference between next sentence and continue in cobol programing language?
i want a program using by if, evaluate , string, unstring, perform, occurs?
What is the difference between Call and a Link?
how to access the file from prodution from changeman tool and to submit a file to production
What is the problem of ordered sequential files access?
What are different data types in cobol?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
Why did you choose to work with ibm mainframe cobol programming?
Discuss about changing dataset name in proc.
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What are the different types of condition in cobol and write their forms.
What are the various section in data division and briefly explain them.
Which is not true about evaluate statement