sample code for read a 2nd record from last in flatfile how
can do?

Answer Posted / santhosh vayathuri

for this we need to do fallowing steps

1) read all the records and store into an array and count
value store into an var

2) from that array subtract count var by 1 we will get last
2nd record

ex :: array(count-1) == last 2nd rec

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

694


) what is the difference between AID and HANDLE AID?

1636


Differentiate between structured cobol programming and object-oriented cobol programming.

667


What are the cobol coding sheets?

664


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

892






What is the difference between comp and comp-3 usage?

680


What is rmode(any) ?

686


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2731


What are the different rules to perform a Search?

617


how to access the file from prodution from changeman tool and to submit a file to production

6686


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

712


What is perform what is varying?

709


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?

1874


What is the use of intialize verb?

750