Thanks for ALL your replies Rob
Im learning a huge $#!+ load at the moment
In STRSQL I ran
values nbjdta.HIRADINTERFACENAMEOPENAR
by itself
It displayed the variable - but had null value
Is that because I am using STRSQL?
It looks like I have to change my insert to what you suggested earlier in this e-mail to the following, but using the correct column names
Boy - the times when I appear dense, thick, moronic seem to be hitting me more often nowadays
0100.00 RUNSQL SQL('insert into NBJDTA.HRCTRLFP ( +
0101.00 col1, col2, col3, col4, col5, col6, col6
0102.00 values (
0101.00 nbjdta.HIRADINTERFACENAMESHPD, +
0102.00 nbjdta.HIRADFILENAMESHPD, +
0103.00 nbjdta.HIRADAS400FILENAMESHPD, +
0104.00 nbjdta.HIRADBATCH#SHPD, +
0105.00 nbjdta.HIRADSTATUSSHPD, +
0106.00 nbjdta.HIRADBATCHTIMESTAMPSHPD, +
0107.00 nbjdta.HIRADODITIMESTAMPSHPD +
0108.00 )') COMMIT(*NONE)
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Thursday, January 7, 2021 4:17 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] RE: Problem with SQL variables
I suspect we were both thinking they were more like a *DTAARA. They obviously are not.
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 7310 Innovation Blvd, Suite 104
Ft. Wayne, IN 46818
Ship to: 7310 Innovation Blvd, Dock 9C
Ft. Wayne, IN 46818
http://www.dekko.com
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Rob Berendt
Sent: Thursday, January 7, 2021 4:14 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Problem with SQL variables
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/db2/rbafzvaluestmt.htm
Instead of using SELECT you use VALUES.
Often used for displaying system registers.
values current date
instead of
select current date from sysibm.sysdummy1
But my suggestion to display one with VALUES displayed my ignorance of sql variables. I just discovered they are only a transitional value stored in memory in a service program.
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.