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 WE WILL SORT THE ARRAY WHICH IS GOING TO USE FOR SEARCH ALL?
What is the difference between a DYNAMIC and STATIC call in COBOL?
Write the code implementing the perform … varying.
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Which is the best IBM mainframe Training Institute in Ameerpet, Hyderabad
given the following piece of code: CALL SUB-PGM USING A, B, C. CALL SUB-PGM USING A, C, C. (a) Both CALL statements will always produce same result. (d) Both CALL statements may produce different result. (c) Compile-time error because SUB-PGM is a dataname. (d) Compile-time error because A, B, C are used twice.
what is rediffine clause?in what situation it can use?give me real time example?
What is CALL statement in COBOL?
What is the difference between SEARCH and SEARCH ALL?
what is S04E error in jcl?
11 Answers IBM, L&T,
How to Write the RESTART Logic Using COBOL?
4 Answers GalaxE, L&T, Syntel, TCS,
what is the advantage of using redefines instead of delaring the variables ?