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

What rules are followed by the search verb.

629


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

706


In which area will you utilize 88 level items in cobol?

708


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

2718


i want a program using by if, evaluate , string, unstring, perform, occurs?

4037






what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8143


Why occurs cannot be used in 01 level in COBOL?

707


Write a cobol program making use of the redefine clause.

721


What is the difference between PIC 9.99 and PIC9v99?

771


Define static linking and dynamic linking.

657


What guidelines should be followed to write a structured cobol prgm?

663


) How do u handle errors in BMS macro

1499


) what is the difference between AID and HANDLE AID?

1628


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

697


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

650