I can't seem to find any information on this. I'm writing a VB program that needs to transfer text files to Teradata. The only way that I can think of is by sending the file to MVS and then running a Fastload program.
Hi,
Why do you need to take it MVS to use FASTLOAD?
Fastload runs from WINDOWS. This is assuming you can get to your teradata box from network attached clients and that you have a licensed copy of Fastload for Windows.
Now Teradata is just a program ( albeit a very big program )running on the Worldmark nodes. The Node itself is running either UNIX or WINDOWS and has the full capabiliites of those 2 platforms.
You can FTP the file over to the PC which is running teradata although that still won't get the File inside the Teradata Database.
Are you trying to get the file inside the teradata database so that you can search it?
If you look at how our Online help table is organized,
and then you look at our DIPOLH script we use to populate it, you will see we just simply use Simple INSERT statements and run it from BTEQ.
insert into OLH values
( "SQL", "SELECT", 1, "first line of text"
insert into OLH values
( "SQL", "SELECT", 2, "second line of text"
insert into OLH values
( "SQL", "SELECT", 3, "third line of text"
insert into OLH values
( "SQL", "SELECT", 4, "fourth line of text"
.
.
.
insert into OLH values
( "SQL", "SELECT", xxxxxxx, "last line of text"
It probably takes a little longer than fastload, but as I point out above we can't be sure that people have a licensed copy of FASTLOAD installed when they first install the system, so we are forced to use BTEQ.
then we have macros which execute stuff like.....
sel text from OLH
where (typeofstatement = "SQL" and
(statement = "SELECT"
order by lineno;
You could generate these INSERT statements directly from your visual basic program and execute them via ODBC ( again assuming licensing issues ) and that way you wouldn't have to make an intermediate file are add an extra step to go run FASTLOAD.
insert into yourtable values
( "Filename", 1, "first line of textfile"
.
.
.
insert into yourtable values
( "Filename", xxxxx, "last line of textfile"
Hope this helps. let me know if you need any more information.
Are you saying that there is a Windows version of Fastload? The only way I could think of to use fastload via a VB program was through the use of Sendkeys, which I don't want to use.
<i>You can FTP the file over to the PC which is running teradata although that still won't get the File inside the Teradata Database.</i>
How is that possible?
<i>Are you trying to get the file inside the teradata database so that you can search it?</i>
Yes. I need the table in the Teradata database because I will be joining to it to retrieve records during a datapull.
<i>You could generate these INSERT statements directly from your visual basic program and execute them via ODBC ( again assuming licensing issues ) and that way you wouldn't have to make an intermediate file are add an extra step to go run FASTLOAD.</i>
I didn't want to do this type of thing because we will eventually be dealing with some fairly large text files in which we have to move. Although, we may end up having to do this type of move because we don't have any other choice.
the thing I didn't mention is it comes with one user DEMO license of all the Windows Client utilities. including fastload and OLEDBLOAD. Most of them Client utilities will even run on 98 but we haven't certified that platform.
These are the actual fully functional client utilities, no time bombs, no nothing. We are hoping that REAL customers would purchase these utilities through their teradata account teams or get them thrown in as part of the price of the system or something like that.
Check with your teradata people you may already have these lying around somewhere.
Also just because the IP address of the local machine is the default DBC all the utilities talk to there is no reason you can't define your own COP aliases for other machines and using the client applications against them.
I have never used OLEDBLOAD but you are supposed to be able to be able to use it from inside Windows apoplications I think.
If after getting the CD and trying it out for a while you find this satisfies your requirement, you should contact your teradata representative and getting a fully licensed version to use in production. I don't know what the cost is.
Even if you were going to be fastloading the Text file into the database you are still going to have to break it up into records.
FILENAME lineno TEXT
FILENAME lineno TEXT
FILENAME lineno TEXT
FILENAME lineno TEXT
FILENAME lineno TEXT
FILENAME lineno TEXT
FILENAME lineno TEXT
FILENAME lineno TEXT
FILENAME lineno TEXT
to allow fastload to process it. maybe you can do that with an inmod.
Lets just skip the FTP part since thast is irrelevent to the further discussions.
P.S. you can install the client utilities from the DEMO disk on you windows box without installing the teradata Sample database. This will save you some disk space.
Actually the really COOL think about the DEMO version of Teradata is that you can do your entire application development aginst the DEMO Version on your windows PC and never have to worry about whether Production database is up or down or congested. you never have to schedule your time to run your jobs on the production system.
If you need more space drop the SAMPLE database and create your own. You can have up to 1 GIG of database space ( some of that needs to be shared with the system tables )
Then once you have the whole application ( VB/ FASTLOAD/ Batch scripts whatever you need ready to go ) change the IP address the application uses to point at the production box and retest and deploy.
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.