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 do you reference the fixed block file formats from cobol programs
wht is the difference between goto and perform stmts
In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)
How many bytes do a s9 (7) comp-3 field occupy?
S9(5)V9(2) occupies how many bytes memory ?
If by mistake we MOVE a working storage variable into LINKAGE area. What will happen??
How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree
Can anybody give me example of subscript and index
If a file has 1000 records.. if i have to replace the first and last characters of the file with another character. how it can be done....
Write a program to explain size error.
for an INITIALIZE and what keyword allows for an override of the default.
How To move a value to an array using move verb?