Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Exporting data from Unidata

2,425 views
Skip to first unread message

havolinec

unread,
Jun 4, 2003, 9:26:05 AM6/4/03
to

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)?

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

Ron White

unread,
Jun 4, 2003, 12:36:26 PM6/4/03
to
"havolinec" <membe...@dbforums.com> wrote in message
news:2957220.1...@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 =---

Kent Walker

unread,
Jun 5, 2003, 4:28:01 AM6/5/03
to
On Wed, 04 Jun 2003 13:26:05 +0000, havolinec <membe...@dbforums.com> wrote:

>
>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

doug chanco

unread,
Jun 5, 2003, 10:43:00 AM6/5/03
to
havolinec <membe...@dbforums.com> wrote in message news:<2957220.1...@dbforums.com>...
> 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)?

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

Don Verhagen

unread,
Jun 5, 2003, 3:07:47 PM6/5/03
to
In news:2957220.1...@dbforums.com,
havolinec <membe...@dbforums.com> typed:
: 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.

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:

Beloit College

unread,
Jun 6, 2003, 3:08:22 PM6/6/03
to
Havo,

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
*-----------------------------------------------------------*

havolinec

unread,
Jun 10, 2003, 7:52:20 AM6/10/03
to

Hi there,

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

doug chanco

unread,
Jun 13, 2003, 6:48:25 PM6/13/03
to
havolinec <membe...@dbforums.com> wrote in message news:<2984435.1...@dbforums.com>...

> Hi there,
>
> 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.

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

madvani

unread,
Jun 18, 2003, 10:02:18 AM6/18/03
to

Originally posted by Don Verhagen
> 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.

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

ianpr...@gmail.com

unread,
Apr 27, 2018, 2:19:18 PM4/27/18
to
I don't know how others do it, but at my database I do not have authorization to write to a file, so to get information out of the UNI-Verse database I you python and Telnet and run my queries I built and then parse the data returned.

The trick is to suppress all of the stuff that UNIQuery puts in the response in order to make it human-readable. You add these (SUPP to the end of a query and they are stackable (you can add them together)

The following are supported letter code and keyword options:
(C or COL-HDR-SUPP suppresses both the default page header and the column headers. COL.HDR.SUPP (note two P’s) is a synonym for COL-HDR-SUPP.
(D or DET-SUPP suppresses detail listings. DET.SUP is a synonym for DET-SUPP.
(E prevents the listing of data in vertical format when listing more than five dict items. Listing remains in horizontal format, regardless of width. This is the opposite of VERT.
(F suppresses “not on file” message generation. Because select lists are implemented as SQL joins that only return rows that are in both the select list and the file, Caché MultiValue compares each item in the list with the file; items that don’t match are added to the error list, unless suppressed using this option.
(H or HDR-SUPP suppresses the default page header. It does not suppress a page header specified using the HEADING clause. HDR.SUP and SUPP are synonyms for HDR-SUPP.
(I or ID-SUPP suppresses listing the @ID field. ID-SUP and ID.SUP are synonyms for ID-SUPP.
(N or NOPAGE suppresses the page break prompt. NO.PAGE is a synonym for NOPAGE.
(P redirects all output to the STANDARD print queue. The LPTR clause performs the same operation. You can use LISTPEQS to view the print queue.
(Y displays query metadata.
(Z displays the CMQL Query Execution Plan before performing the LIST operation.

0 new messages