How to remove the spaces at end of each record in the
output file Via COBOL program?
note: The file has a VB length
Answer Posted / 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 |
Post New Answer View All Answers
) what is the difference between AID and HANDLE AID?
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
how do you reference the variable unblock file formats from cobol programs
What is the use of intialize verb?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
What is the difference between binary search and sequential search?
how do you reference the printer file formats from cobol programs
Write a program to explain size error.
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
How do you define a variable of comp-1 and comp-2?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
Can a Search can be done on a table with or without Index?