04-12-2017 09:46 AM
Here is the sample code for file creation. When I use DSD option in the file statement, it is putting double quotes around field A in the output file whereas without DSD option it gives an extra space for missing fields. Any one has a solution?
Its putting double quotes because your delimiter is a pipe and your Field A also has a pipe.
filename outfile "/uhome/snoone/test.txt" ;
file outfile DELIMITER='|' dropover dsd lrecl=1000;
04-12-2017 10:05 AM - edited 04-12-2017 10:08 AM
Sorry, what is the question here, you seem to have your answer?
" Its putting double quotes because your delimiter is a pipe and your Field A also has a pipe. "
If your data contains the delimiter, then it has to quote the string otherwise delimeters will get messed up. Sort your input dataset out:
And the problem will go away.
Edit: Alternatively change your delimiter. The point about delimited files is that the delimiter only appears between data items.