Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL pgm

Status
Not open for further replies.
Nov 19, 2003
117
US
I am a serious new guy to rpg programming on an iSeries
all i really want to do is have a simple insert statement run in an sqlrpg le program. I am planning on moving SQL to a stored proc later but i just wanted to learn the basics first.

C/Exec SQL
C+ SELECT * FROM MYLIB/CUSTMST
C/END-EXEC

I have no idea how i should compile this thing either. I am basically clueless.

Sincerely,
Michael
 
C/Exec SQL
C+ INSERT INTO MYLIB/CUSTMST (FileFld1, FileFld2, FileFld3, FileDate )
C+ VALUES( :Fld1, : Fld2, 'X', :MyDate )
C/END-EXEC

FileFld1, FileFLd2, FileFld3, FileDat are the fields pertaining to the CUSTMST file.

Fld1, Fld2, MyDate are fields declared somewhere in the program.


 
I find funny MdnghtPgmr, that we replied apparently both at the same minute :eek:)
 
Mercury2,

Yeah. But at least you had code to show! That and I'm pretty slow at getting back out here...

MdnghtPgmr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top