We are having a requirement that we need to create an interface file with different sections as follows. File Header, Data Header, Data Details and Footer. Each record is of variable length. But the information should follow the same format such as File Header should be first record then followed by data header and data details. Data Header and Data details will be repeated for many transactions. Last record will be footer record. The output should be in CSV format. As the information has variable length records, I created a flat file and using data structure I defied the comma as delimiter and FTP the file. But the output has blanks in the field when the value is not completely filled the field length. Is there any way that I can remove the blanks in the field or there is a better way to create the output file.
Sample of the CSV file is as follows.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!