Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



How to remove the spaces at end of each record in the output file Via COBOL program? note: The fi..

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

How to remove the spaces at end of each record in the output file Via COBOL program? note: The fi..

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

Post New Answer

More COBOL Interview Questions

How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

0 Answers   HCL,


In a COBOL II PERFORM statement, when is the conditional tested, before or after the perform execution?

3 Answers  


What is the difference between structured cobol programming and object alternativelyiented cobol?

0 Answers  


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

0 Answers  


Why there is no questions in this column?

6 Answers  


) What is the use of IGNORE?

1 Answers   IBM,


What is the difference between working storage copybook and linkage section copybook?

5 Answers   TCS,


Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc.

3 Answers  


I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

2 Answers   L&T,


RENAME clause takes new SPACE in memory.TRUE or FALSE? a)TRUE 2)FALSE

12 Answers   TCS,


How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.

1 Answers  


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

0 Answers  


Categories