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 |
What is a scope terminator give example?
In an array processing what is the thing that can be done by using subscripts but not by using index
how do you reference the esds vsam file formats from cobol programs
What does the IS NUMERIC clause establish ?
IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-I PIC 9(2). PROCEDURE DIVISION. A1000-MAIN-PARA. PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5 STOP RUN. PARA-X. DISPLAY "BEST2". I m getting error s722,while executing the program, seems getting in loop, can anybody tell me why
What is tne need to use sub programs in Cobol?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
what are the isolation levels and where we use it in the db2 program
if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error
Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING C Which of the following is true ? (a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.
If there are two files one with 100 records and other with 101 records. we have to find out the one record that is the odd man out . What are the steps to do it
why mainframe we use not like java as frontend oracle as backend. or not word excel.In there also huge ammount data stored.