July 18, 2008, 09:54 AM
Georgie Vcsv with different formats in same file
i have to create a csv file with 2 different record formats header followed by multiple detail records, i have finally gotten the csv file by using ON TABLE PCHOLD AS FILENAME COMMA, the commas and quotes are where they should be but i can't get the 2 formats in the file. Open for suggestions.
July 18, 2008, 10:06 AM
Tom FlynnGeorgie V,
Try
APP FI FILENAME DISK FOLDERNAME/FILENAME.com
or
APP FI FILENAME DISK c:\ibi\apps\FOLDERNAME\FILENAME.com
Then, generate the HEADER record into the FILENAME:
ON TABLE HOLD AS FILENAME FORMAT COMMA
END
-RUN
FILEDEF FILENAME CLEAR
-RUN
APP FI FILENAME DISK FOLDERNAME/FILENAME.com (APPEND
or
APP FI FILENAME DISK c:\ibi\apps\FOLDERNAME\FILENAME.com (APPEND
Now, populate with your detail
Hope this helps...
Tom