How to remove the spaces at end of each record in the
output file Via COBOL program?
note: The file has a VB length

Answer Posted / mvramesh

I will explain this with an example. Lest assume the Maximum record length for VB file is 4000.

For every record you write, Move the actual record length value to RECORD-LENGTH, this would trim off the entire record beyond that length. If the data is populated only till 3000 bytes, move 3000 to RECORD-LENGTH which would trim off the last 1000 bytes.

I hope i answered your question.

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you differentiate between cobol and cobol-ii?

865


what is amode(24), amode(31), rmode(24) and rmode(any)?

895


IF I mention stop run in CICS what happens?

2096


how do you reference the rrds file formats from cobol programs

1165


What is report-item in COBOL?

899


What is perform what is varying?

919


Can you please let me know the centre name of INS certification in Kolkata.

1950


What is the difference between goback, stop run and exit program in cobol?

1239


How do define dynamic array in cobol.

865


i need a small 3d program using inline and outline.

1909


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

1707


Give some examples of command terminators?

953


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

876


Explain about different table spaces.

864


What is the default value(s) for an initialize and what keyword allows for an override of the default?

960