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 |
why 02 level number can't be use as a separate level number like 01 or 77 ?
I have put two write operations in a single para for two different conditions.Will that lead to an abend or run successfully and write two records?
what is the use of keep and pass in disp
WE HAVE 5 DIFFERENT RECORDING MODE IN COBOL.FIXED, FIXEDBLOCK, VARIABLE, VARIABLEBLOCK AND UNDEFINED. WHAT IS THE DIFFERENCE AMONG ALL AND WHICH TYPE OF FORMAT SHOULD BE USED WHEN
The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290
What is the LINKAGE SECTION used in COBOL?
Describe the difference between subscripting and indexing ?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
db2 variable decimal(15,2) what is the equalent size of cobol variable
I got user abend U4038 while compiling my runjcl.. can anyone help me?
How do you define a sort file in JCL that runs the COBOL program?
Mention the guidelines to write a structured cobol program?