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 |
Extract only those records from a PS file which are having word 'TEXT' in the records using COBOL? The word TEXT is not present in a particular position in all the records.
What is the default value of DISP for temp datasets
what is the minimum number of lines a Cobol program should have to successfully compile and run
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
can internal sort be applied to sort ksds files?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
I got user abend U4038 while compiling my runjcl.. can anyone help me?
Is it possible to mutliply a comp variable with an comp-3 variable. Will there be any error if i do it?
can we use 77 level no for Redefines?if we use give an example?
what do you mean by copybook? and what is the difference between the copybook which we are using in working storage and procedure division.
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
What is the meaning of 'TALLING' verb in cobol?