Appreciate if anyone can help.
I am currently using Unidata (Release 4.1) running on HP-UX (Release
10.20). I'd like to extract some customer information and export it to
our SQL database at web server. This is to allow customer inquiry
through our web site.
Need some help on the following:
i) How can I extract the data from Unidata to a text file (eg.
CSV format)?
ii) How can I automate the extraction process since I'm planning to do
extraction at hourly interval?
iii) After extraction, how can the text file be text file be
automatically exported to the web server at hourly interval?
(Assuming importing from text file to the SQL database has been
taken care of.)
I hope the scope of the questions is not too broad. Kindly let me know
if you need more information.
Thanks a lot.
Havo
--
Posted via http://dbforums.com
You might try searching the archives of the U2 list. This topic has been
discussed
several times in the past. The site is http://www.indexinfocus.com/. Also,
being
as Unidata user you might want to subscribe tot he U2 list. It is specific
to the
Unidata and Universe databases with some of the people responsible for
development
and tech support being contributors. You can subscribe at
http://www.oliver.com/lists/u2/.
Ron White
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
>
>Hi all,
>
>Appreciate if anyone can help.
>
>I am currently using Unidata (Release 4.1) running on HP-UX (Release
>10.20). I'd like to extract some customer information and export it to
>our SQL database at web server. This is to allow customer inquiry
>through our web site.
>
>Need some help on the following:
>
>i) How can I extract the data from Unidata to a text file (eg.
> CSV format)?
Use the LIST command with the TO DELIM option, eg:
LIST CUSTOMER FNAME LNAME TO DELIM " " _HOLD_/CUSTDATA.TXT
The delimiter character is specified between the quotes. In the example, a single Tab
character (not a space) is used; tab-delimeted data eliminates problems with data
containing embedded commas or quotes.
>
>ii) How can I automate the extraction process since I'm planning to do
> extraction at hourly interval?
A cron job and shell script executing a UniData process will do this. Remember to set the
UDTHOME and UDTBIN environment variables at the beginning of the script.
>
>iii) After extraction, how can the text file be text file be
> automatically exported to the web server at hourly interval?
> (Assuming importing from text file to the SQL database has been
> taken care of.)
>
>
>I hope the scope of the questions is not too broad. Kindly let me know
>if you need more information.
>
>Thanks a lot.
>
>Havo
---
Kent Walker - walk...@pacbell.net
Write a pretty simple pick program to do this for you (checkout
WRITESEQ)
>
> ii) How can I automate the extraction process since I'm planning to do
> extraction at hourly interval?
Via cron or "PHANTOM" of the above program to run once and hour and
then go back to sleep.... (I like cron better... also you will have to
setup some env variables (to use cron))
>
> iii) After extraction, how can the text file be text file be
> automatically exported to the web server at hourly interval?
> (Assuming importing from text file to the SQL database has been
> taken care of.)
>
If you have perl on your HP machine its pretty easy using the perl
module Net::ftp (expect is another option (I prefer perl))
>
> I hope the scope of the questions is not too broad. Kindly let me know
> if you need more information.
>
> Thanks a lot.
>
> Havo
If you need some help with any of the above drop me an email (as I am
currently waiting for my new job in austin to start in @2 weeks and
have some free time)
dougc
If all you're doing is exporting the data just to allow information to be
available on the website from your U2 (Unidata/Universe) databases. You may
want to look at Redback, it's middleware and may be worth it depending on
exactly how much data you plan to put on the website. We've use it for
years with very little (if any) problems, using ASP and JSP pages.
It sure beats duplication of data and business logic. It ain't cheap, but it
depends on how much data you're dealing with.
http://www-3.ibm.com/software/data/u2/redback/
Don Verhagen
Tandem Staffing Solutions, Inc.
:
: Need some help on the following:
One of our vendor's clients created a utility call "DOWNLOAD". The syntax is
similar to Uni-Query. Download adds some extras such as the ability to use
"secondary files", and can output in a variety of file formats. They recently
released it to the "U2 list" and now provide a version for Universe.
[BTW, You may need to use an older version (6.02 is the most recent) since
you're on Unidata 4.1]
Files are located @ ftp://ftp.cedarville.edu/download/
*-----------------------------------------------------------*
Jon Wells
Database Administrator Beloit College
Information Technology Services Beloit, Wisconsin
608-363-2290 wel...@beloit.edu 608-363-2100(fax)
*-----------------------------------------------------------*
AIX 4.3.3 IBM RS6000 F50 UniData 5.1.35
*-----------------------------------------------------------*
To extract data from UniData, I've tried the LIST statement and it
works.
LIST CUSTOMER FNAME LNAME TO DELIM " " _HOLD_/CUSTDATA.TXT
I'm really new in UniData and Unix. I'd appreciate if anyone show me
some sample how to create a shell script to execute the about LIST
statement and use cron to run it at hourly interval.
Appreciate your help
TX
well you need to setup a program/shell script that does the following:
UDTHOME=/usr/ud60
UDTBIN=/backup/ud60/bin
LANG=C
PATH=$PATH:/usr/ud/bin
export UDTHOME UDTBIN LANG PATH
**NOW THESE ARE CORRECT FOR MY SYSTEM, SO YOU NEED TO SET THE PATH AND
SUCH APPRIOPATE FOR YOUR SYSTEM**
then cd to the appriopate directory
and execute udt <list command>
that will run the command, the results will go to the screen so you
need to decide what you want to do with the output.
to run your script run crontab -e (and add your command) the format of
the crontab file is as follows:
* * * * * <command> | <path to command>
minute, hour, day of month, month of year, day of week (in that order)
** this is for redhat linux check your docs for your version of
linux/unix **
(man cron and man crontab)
example:
20 22 * * 0 <command or path to command>
(executes at 10:20 on sunday every month)
hope that helps,
dougc
>
> Appreciate your help
>
> TX
I found this thread while searching for a help/discussion forum for
Redback. I have been using it for several months now but I still have
occasional problems and it would be nice to have a place to go for
support. The documentation isn't very good.
Would you know of a good source for this?
Thanks,
Meeta Advani