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 records which is in sequential file in reverse order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my doubt any one
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
What is R-mode and A-mode?
What is the usage of comp fields in cobol?
how do u link sub pgm to main pgm ?
What is SET TO TRUE all about, anyway?
Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?
What will happen if we try to create GDG (+2) generaton instead of (+1) generation?
What is the difference between a DYNAMIC and STATIC call in COBOL?
Suppose i want to declare a binary comp fild of 7 byte .how to write?
how we can edit records in vsam data set and non vsam data sets
how to change picture class of copy book variable inside program?