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 |
in real time what is the suitable exp where in-stream procedure is better then catalog procedure.
In an EVALUTE statement is the order of the WHEN clauses significant?
i have two file, each file having : file1 is having 2 fields field1 field2 file2 is having 3 fields field1 field2 field3 my req is to make it one file like: field1 field2 field1 field2 field3 if anyone know please send me syntax, i tried this with DFSORT but could not succeed.
What are the divisions in a cobol program?
What is the difference between CALL BY VALUE and CALL BY CONTENT?
what is record label is empty or standard in file description of data division?
How to read records from flat file in reverse order through COBOL program?
14 Answers Accenture, Broadridge, IBM, MAT, Polaris, SPIC, Syntel, TCS, Wipro,
01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??
How can we increase the size of an existing PDS to include more no. of modules.
how to transfer the file from pc to mainframe??
how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?
What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?