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 do you differentiate between cobol and cobol-ii?
How do we get current date from system with century in COBOL?
What is link edit in cobol?
What is report-item in COBOL?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
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.
What the difference is between continue and next sentence?
How do get the result of your program directly on your pc?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
Name the divisions, which are available in a cobol program?
What are the pertinent COBOL commands?
what is the use of outrecord?
) How do u handle errors in BMS macro?