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 |
Can we redefine the field of x(200) to less than 200?
which is better comp or comp-3 in terms of memory utilization?
I need to compare two VSAM files, both having 'number' as key. If there is a matching record, write the data into another VSAM file. How will it be possible.
a. Can the OPTIONAL clause in COBOL only be coded for input files? b. If it is coded for files opened in OUTPUT, I-O or EXTEND mode, will it give a compilation error? c. If there are no compilation errors and if such files are not coded in the JCL, will the OPEN statement run fine when these files are opened? d. How will a WRITE statement work for the above files?
what is a load module ?
How to read the last 100 records from a COBOL file. The file contains N number of records.
can we declare occurs in 01 level?
How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1: move 20 to a.
s9(18) comp-3:: What is the size of memory it takes internally?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
Explain the configuration section of a cobol program with examples of syntax.
Can anyone explain me CALL procedure in COBOL.Does it carries similarities like call by reference in C.