Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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

What is a scope terminator give example?

429


what is search and searchall?what is the diffrence between them?give an best example?

4729


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

8974


How do you get the data to code the BMS macro?

1236


How are the next sentence and continue different from each other?

476






Difference between cobol and cobol-ii?

466


How to remove 2 duplicate records and copy only one using job control language?

473


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

1709


how to convert the recors form vsam file to db2 table tru file aid

2439


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1623


What is Pic 9v99 Indicates in COBOL?

424


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

484


how do you reference the ksds vsam file formats from cobol programs

434


Which is not true about evaluate statement

634


What is the difference between Global and External Variables?

423