Good afternoon all,
I am hoping to do something very simple with embedded SQL statements in C. This will be my first working program and I've been playing with the C language for a bit over a year now. I want to run a simple select statement in C, and print with printf. I believe if I can get there I can complete what I'm hoping to do.
I have been reading online and know I need to use CRTSQLCI, but honestly haven't quite grasped that yet.
Perhaps I'm shooting for something outside of my foundation knowledge right now, but I need some guidance.
I am hoping to do something very simple with embedded SQL statements in C. This will be my first working program and I've been playing with the C language for a bit over a year now. I want to run a simple select statement in C, and print with printf. I believe if I can get there I can complete what I'm hoping to do.
I have been reading online and know I need to use CRTSQLCI, but honestly haven't quite grasped that yet.
Code:
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sqlca.h> int main(){ EXEC SQL SELECT * FROM TABLE(QSYS2.JOB_INFO( JOB_STATUS_FILTER => '*OUTQ', JOB_USER_FILTER => 'JKLEIN' )) WHERE JOB_NAME_SHORT = 'BOS043JRNL' order by JOB_ENTERED_SYSTEM_TIME DESC; };
Comment