× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Read the bottom as to your issue but let me ramble first...

I didn't say the file on the insert is a dummy file
I said get rid of the dummy file as in replace
0100.00 RUNSQL SQL('insert into NBJDTA.HRCTRLFP (select +
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 from +
0108.00 SYSIBM.SYSDUMMY1)') COMMIT(*NONE)
With
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)

But, let's see if your variables exist:

select *
from qsys2.sysvariables
where variable_schema='ROB'
;

Pick one and display the contents with:
Values rob. HIRADAS400FILENAMESHPD

There's no reason (for this process) to use SYSDUMMY1. It brings nothing to the party.

WHAT THE ISSUE IS:
<snip>
Session scope: Global variables have a session scope. This means that although they are available to all sessions that are active on the database, their value is private for each session.
</snip>
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/db2/rbafzcvariable.htm
If I created that variable with Run SQL Scripts and then I go into STRSQL and do
Values rob. HIRADAS400FILENAMESHPD
I get a null value.

So now you are probably wondering: What is the definition of a session scope? A job? What?
Good luck with that exercise.

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.