Just had another thought.
Instead of adding a record to act as a completed flag you could delete the DB2400 file at the start of processing then create it (empty is fine) on completion. Then in the DTS job you could use a bit of VB script to check of the presence of the file...
'Connect
Set...
Use IBM i-series access to create an ODBC data source. Works fine - I use it all the time. IBM DB2 Client Connectivity also fine but more expensive if you have got a licence already.
The suggestion from DBomrrsm will of course do the trick. You would need the CLP driver to wtite / uodate a record in a dummy file in DB2/400. However, I try to avoid 'busy flags' because in the event of an abnormal termination you can end up with the flag in the wrong state.
Have a look at
http://www-912.ibm.com/s_dir/slkbase.NSF/0/26e8d8b78808bc46862566ba00595402?OpenDocument
The syntax in a CLP program is simply:
PGM
RUNRMTCMD CMD('c:\temp\run.bat') RMTLOCNAME('192.168.12.231' *IP) +...
Not sure about delays in DTS.
I normally get the AS400 to run the DTS job when it's finished doing whatever. Have a word with your nearest AS400 tech about RUNRMTCMD (Run Remote Command) All you need to do is create a .BAT file containing DTSRUN commands and then get the AS400 to run it.
I have a DTS job that imports an Excel spreadsheet into SQL server. Most nights it runs fine but occasionally it justs hangs. It doesn't fail - just sits there for hours. I don't believe any other job/task could have a lock on the file. I tried adding Data Pump task logging but no joy. Is there...
This worked OK when I was trying to recurse though a bill of materials
WITH RPL (LEVEL, PART, SUBPART, QUANTITY) AS
(
SELECT 1, ROOT.PART, ROOT.SUBPART, ROOT.QUANTITY
FROM PARTLIST ROOT
WHERE ROOT.PART = '01'
UNION ALL
SELECT PARENT.LEVEL+1...
If you are accessing DB2 files (tables) check out the CCSIS
on the table:
From an AS/400 command line type DSPFD OURLIBRARY/YOURFILE and Find CCSID.
Check what character translation is specified in you ODBC or other datasource.
Not sure that you can find a list of all Queries but the following is a good workaround:
use the command DSPOBJD (Display Object Description)
for *ALL objects in *ALL libraries with an object type of *QRYDFN. Direct to output to *OUTFILE and then use Query or SQL to examine the output
Did you create the worksheet first? Try creating an empty workbok and letting DTS create the destination table (worksheet) In my test, numeric(11,2) was converted to 'double' without any problem.
Importing Excel figures is a bit hit and miss. Try applying a custom format in the spreadsheet. If you want leading zeros then you will have to pad the column in your DTS sql statement
Still unclear as to the source and content of these 'reports' If they contain static text i.e instructions then copy to PC doc and then copy to CD or e-mail or whatever. For variable contents i.e what was included in last nights backup, then my previous suggestions apply.
Hi Adam,
Still not sure exactly which report you mean. Could be an AS/400 job log, a DSPTAP (Display Tape) listing, or a listing from bespoke program. Regardless of how it's generated if the result is an AS/400 spooled file you can use the CPYSPLF (Copy Spooled File) to copy the report to a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.