Comma-delimited, newline-delimited with format file

The first example creates an output file with commas between all fields in a row and a newline terminator at the end of each row. This example creates a format file (pub_fmt) that you can use later to copy the same or similar data back into Adaptive Server.

bcp pubs2..publishers out pub_out

The results as stored in the pub_out file are:

0736,New Age Books,Boston,MA
0877,Binnet  & Hardley,Washington,DC
1389,Algodata Infosystems,Berkeley,CA

The contents of the pub_fmt format file are:

10.0
4
1    SYBCHAR 0 4   ","   1  pub_id
2    SYBCHAR 0 40  ","   2  pub_name
3    SYBCHAR 0 20  ","   3  city
4    SYBCHAR 0 2   "\n"  4  state