dbTalk Databases Forums  

I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file!

comp.databases.pick comp.databases.pick


Discuss I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file! in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
GEEK^&
 
Posts: n/a

Default I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file! - 09-15-2005 , 04:29 PM






OK,

Small problem. Although it seems extremely difficult in PICK/UniVerse.
I just need some basic code or some recall statements (LIST?) to output
the data in comma delimited format. That is it!

The output could also be in any format such that I can read it into
MySQL or Excell (again the comma delimted is fine!)

I am very very new to Pick/Universe databases. HELP!

D. Ulm


Reply With Quote
  #2  
Old   
Richard Wilson
 
Posts: n/a

Default Re: I *JUST* would like to output the data in a PICK (UniVerse) databaseto a comma delimited file! - 09-15-2005 , 04:35 PM






go to ftp.cedarville.edu for a complete download package

csv,tab,xml,etc types of formats

GEEK^& wrote:

Quote:
OK,

Small problem. Although it seems extremely difficult in PICK/UniVerse.
I just need some basic code or some recall statements (LIST?) to output
the data in comma delimited format. That is it!

The output could also be in any format such that I can read it into
MySQL or Excell (again the comma delimted is fine!)

I am very very new to Pick/Universe databases. HELP!

D. Ulm



Reply With Quote
  #3  
Old   
Mark Brown
 
Posts: n/a

Default Re: I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file! - 09-15-2005 , 05:22 PM




"GEEK^&" <darrellulm (AT) yahoo (DOT) com> wrote

Quote:
OK,

Small problem. Although it seems extremely difficult in PICK/UniVerse.
I just need some basic code or some recall statements (LIST?) to output
the data in comma delimited format. That is it!

The output could also be in any format such that I can read it into
MySQL or Excell (again the comma delimted is fine!)

I am very very new to Pick/Universe databases. HELP!

D. Ulm




Reply With Quote
  #4  
Old   
douglas@pickteam.com
 
Posts: n/a

Default Re: I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file! - 09-15-2005 , 06:15 PM



This is certainly not difficult in BASIC. Just read the item in, loop
through the attributes and concatenate them to a string, add the
commas, write the file, and you're done.

If you don't know the file structure, or how certain fields (dates,
money) are stored, or if you don't know what an attribute is, or how to
write a native file then you are in over your head and should have
someone else do this.

Again, this is easy.


Reply With Quote
  #5  
Old   
Luke Webber
 
Posts: n/a

Default Re: I *JUST* would like to output the data in a PICK (UniVerse) databasetoa comma delimited file! - 09-15-2005 , 06:24 PM



Richard Wilson wrote:
Quote:
go to ftp.cedarville.edu for a complete download package

csv,tab,xml,etc types of formats
Take my advice and use tab-delimited.

Luke

Quote:
GEEK^& wrote:

OK,

Small problem. Although it seems extremely difficult in PICK/UniVerse.
I just need some basic code or some recall statements (LIST?) to output
the data in comma delimited format. That is it!

The output could also be in any format such that I can read it into
MySQL or Excell (again the comma delimted is fine!)

I am very very new to Pick/Universe databases. HELP!

D. Ulm



Reply With Quote
  #6  
Old   
dawn
 
Posts: n/a

Default Re: I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file! - 09-15-2005 , 07:15 PM




GEEK^& wrote:
Quote:
OK,

Small problem. Although it seems extremely difficult in PICK/UniVerse.
I just need some basic code or some recall statements (LIST?) to output
the data in comma delimited format. That is it!
I don't have the URL handy, but look for the Cedarville DOWNLOAD
program (as in University at www.cedarville.edu). It works with both
UniVerse and UniData. I'm pretty sure the author reads u2-users (sign
up for that list following instructions from www.u2ug.org) and others
there use it too, so if you don't find it right off, you might want to
ask there.

--dawn

Quote:
The output could also be in any format such that I can read it into
MySQL or Excell (again the comma delimted is fine!)

I am very very new to Pick/Universe databases. HELP!

D. Ulm


Reply With Quote
  #7  
Old   
Ross Ferris
 
Posts: n/a

Default Re: I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file! - 09-15-2005 , 08:11 PM



If you are using a TE like AccuTerm, you can also use the FTD utility
and have the data automatically sent to a .XLS


Reply With Quote
  #8  
Old   
iakovos@gmail.com
 
Posts: n/a

Default Re: I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file! - 09-15-2005 , 08:32 PM




Ross Ferris wrote:
Quote:
If you are using a TE like AccuTerm, you can also use the FTD utility
and have the data automatically sent to a .XLS
Here's a routine I am using to create a .csv (comma delimited file)

001 *
002 * This routine creates a comma delimited csv file given a FILENAME
003 *
004 OPEN '&SAVEDLISTS&' TO PF ELSE STOP 201,PF
005 GET(ARG.,1)FILENAME ELSE
006 PRINT 'Usage: CREATE.CSV filename itemname delimiter'
007 STOP
008 END
009 *
010 GET(ARG.,2)ITEMNAME ELSE
011 ITEMNAME = FILENAME:'.csv'
012 END
013 GET(ARG.,3)DELIMITER ELSE DELIMITER = ','
014 *
015 OPEN FILENAME TO THE.FILE ELSE STOP 201,FILENAME
016 DIM LIST(100000)
017 MAT LIST = ''
018 *
019 HDNG = ''
020 IF NOT(INDEX(FILENAME,',',1)) THEN
021 OPEN 'DICT ':FILENAME TO DICT.FILE THEN
022 DONE = 0
023 FOR I = 1 TO 20 UNTIL DONE
024 READ DICTREC FROM DICT.FILE,I THEN
025 HDNG<-1> = OCONV(CHANGE(DICTREC<3>,@VM,' '),'MCU')
026 END ELSE DONE = 1
027 NEXT I
028 IF HDNG # "" THEN
029 LIST(1) = 'ID,':CHANGE(HDNG,@AM,',')
030 END
031 END
032 END
033 *
034 PERFORM 'SSELECT ':FILENAME:' BY @ID'
035 *
036 CNT = 0 + (HDNG # "")
037 LOOP
038 CNT += 1
039 READNEXT ID ELSE EXIT
040 READ REC FROM THE.FILE,ID THEN
041 LIST(CNT) = IDELIMITER:CHANGE(REC,@AM,DELIMITER)
042 IF NOT(REM(CNT,100)) THEN PRINT @(0,23):CNT:" ":
043 END
044 REPEAT
045 PRINT
046 MATWRITE LIST ON PF,ITEMNAME

good luck



Reply With Quote
  #9  
Old   
dawn
 
Posts: n/a

Default Re: I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file! - 09-15-2005 , 08:39 PM




dawn wrote:
Quote:
GEEK^& wrote:
OK,

Small problem. Although it seems extremely difficult in PICK/UniVerse.
I just need some basic code or some recall statements (LIST?) to output
the data in comma delimited format. That is it!

I don't have the URL handy, but look for the Cedarville DOWNLOAD
program (as in University at www.cedarville.edu). It works with both
UniVerse and UniData. I'm pretty sure the author reads u2-users (sign
up for that list following instructions from www.u2ug.org) and others
there use it too, so if you don't find it right off, you might want to
ask there.
It can be downloaded from ftp://ftp.cedarville.edu

Check out the new documentation at
ftp://ftp.cedarville.edu/download/download.pdf

Quote:
--dawn

The output could also be in any format such that I can read it into
MySQL or Excell (again the comma delimted is fine!)

I am very very new to Pick/Universe databases. HELP!

D. Ulm


Reply With Quote
  #10  
Old   
dennis@freshmarksystems.co.za
 
Posts: n/a

Default Re: I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file! - 09-21-2005 , 09:30 AM



actually there are many ways. The easiest I've used takes a bit of time
to set up (not that much really) and then is wonderfully easy
thereafter.

[skip lecture]
a small lecture on data storage structure might help - if known, skip
this:
in a multivalue environment (be it universe,pick,etc)
- tables are known as "files", rows as "records", columns as "fields"
- every file has a "data portion" and a "dictionary portion"
- the dictionary describes the layout of rows (ie the columns in them)
- ie the structure of the row
- the data portion holds multiple rows all looking alike in structure.
[/skip lecture]

there is a query language accessible from the command line. It kind of
looks like SQL in reverse, eg
LIST ABC.FILE BY NAME BY DATE NAME DATE TOTAL QTY
which would list the ABC.FILE
sorted by columns date within name
listing columns NAME, DATE, and QTY
with a total of QTY at the end of the report

To create a CSV file, I create an extra dictionary definition, which I
call
"COMMA" (surprisingly), which goes like this:
001 A
002 0
003 ,
004
005
006
007
008 F;","
009 L
010 1

note that line 3 also contains just a single comma - this ensures that
the headings from the report also have separating commas.

file this in either the dictionary of the file you want to list, or in
DICT.DICT to work for every file in the account

(I currently work on Pick/D3 so you may have to massage that for UV)

That's it (for the overhead)
-------------------------------------------------------
For every report I want to export as CSV

I then set the SPOOLER to HOLD, SUPPRESS
sp-assign HS F0
which will route printed files to &HOLD& (or PEQS for me)

LIST ABC.FILE BY NAME BY DATE NAME COMMA DATE COMMA QTY (P

will now list ABC.FILE as before but with commas between name, date and
qty (the total is now removed as it no longer makes sense)

finally copy the &HOLD& printfile to windows (and save it as a dot csv)
------------------------------------------------
I know it looks all muddled here, but once in the DICT.DICT file, it
makes CSV creation a cinch for anything.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.