How to remove the spaces at end of each record in the
output file Via COBOL program?
note: The file has a VB length
Answers were Sorted based on User's Feedback
Answer / rajesh
U can declare a copybook for the output file without spaces
and this will do.
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / 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 |
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
In a COBOL II PERFORM statement, when is the conditional tested, before or after the perform execution?
What is the difference between structured cobol programming and object alternativelyiented cobol?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
Why there is no questions in this column?
) What is the use of IGNORE?
What is the difference between working storage copybook and linkage section copybook?
Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc.
I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.
RENAME clause takes new SPACE in memory.TRUE or FALSE? a)TRUE 2)FALSE
How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?