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
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
Difference between cobol and cobol-ii?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
Are you comfortable in cobol or jcl?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is the problem of ordered sequential files access?
What are different data types in cobol?
Name some of the examples of COBOl 11?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
what are decleratives in cobol?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
how do you reference the ksds vsam file formats from cobol programs
how to refer the data field?
Can a Search can be done on a table with or without Index?
What are 77 levels used for?