Compile the program

Use the following command to compile the getdiag program:
esql -o getdiag getdiag.ec

The -o getdiag option tells esql to name the executable program getdiag. Without the -o option, the name of the executable program defaults to a.out.