[U2] BCI Connect

2004-12-30 Thread graham.forbes
Hello all

I am trying to extract data from an Oracle Database from Unidata. I have read
through the BCI Connect manual and it looks fairly simple using the Connect
command, but much more complicated using directly within Unibasic. Does
anyone have a simple example of executing a SQL statement and returning the
results into either a Unidata file or reading each row?

If I do not want to update should I just datastack and use the CONNECT
command?

Thanks

Graham



Graham Forbes
Trading Systems
BT Consulting  Systems Integration






This email may contain information which is privileged or confidential. If you
are not the intended recipient of this email, please notify the sender
immediately and delete it without reading, copying, storing, forwarding or
disclosing its contents to any other person
Thank you

Check us out at http://www.bt.com/consulting


---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] sum vs looping

2004-12-30 Thread Rex Gozar
George,

I have a utility that I just posted to
http://www.pickwiki.com/cgi-bin/wiki.pl?Row2Col called ROW2COL, which may
help you.

For example:
   CALL ROW2COL(YDATA) ;* flip the fields and values
   X=SUM(YDATA2)
   CALL ROW2COL(YDATA) ;* flip them back

Or you could set a temporary variable and SUM on it.

Rex


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of George Gallen
 Sent: Wednesday, December 29, 2004 5:40 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] sum vs looping


 What is needed is a VSUM() command, or vertical sum.

 Say X=VSUM(YDATA,2)  and it will add up all the numbers
   vertically that are in x,2 of the dynamic array.

 George
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [OT] - Happy new year

2004-12-30 Thread Claus Derlien
Just the last words from me this year,

Happy new year to all on the list.

Thanks for all the good info and knowledge I have received during 2004


best regards from 'dark and freezingly wet Denmark'

Claus Derlien
edb-afdelingen
direkte : 63 13 86 69
email   : [EMAIL PROTECTED]



Frie Funktionfrer - faglig organisation og tvfrfaglig a-kasse - www.f-f.dk

*
**
Denne email og alle filer vedlagt som bilag kan indeholde fortroligt
materiale, der kun er beregnet for adressaten,
og maa ikke udleveres eller kopieres til uvedkommende. Har De ved en
fejltagelse modtaget denne email, bedes
De venligst omgaaende meddele os dette pr. telefon : 6313 8550. Paa forhaand
tak.
*
**
This email and any files transmitted with it may contain confidential
information intended for the addressee(s) only.
The information is not to be surrendered or copied to unauthorised persons. If
you have received this
communication in error, please notify us immediately by telephone: +45 6313
8550. Thank you.
*
**
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] sum vs looping

2004-12-30 Thread George Gallen
Thanks,

I have something similar, although not as detailed.

George

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Rex Gozar
Sent: Thursday, December 30, 2004 9:19 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] sum vs looping


George,

I have a utility that I just posted to
http://www.pickwiki.com/cgi-bin/wiki.pl?Row2Col called
ROW2COL, which may
help you.

For example:
   CALL ROW2COL(YDATA) ;* flip the fields and values
   X=SUM(YDATA2)
   CALL ROW2COL(YDATA) ;* flip them back

Or you could set a temporary variable and SUM on it.

Rex
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] sum vs looping

2004-12-30 Thread George Gallen
I tried the FIELDS before, but never tried the OCONV method.
Intresting...


George,

'Vertical' summation can be achieved by using vector OCONVS with a G
conversion. eg to sum the 2nd value from an attribute delimited dynamic
array : SUM(OCONVS(Z,'G1':@VM:1))


nb. It would seem logical to use FIELDS() function rather than
use the G
conversion but - heh - FIELDS(), despite the documentation,
doesn't work
using @VM as the separator.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UD] memresize - checking progress

2004-12-30 Thread Simon Lewington
Unidata 6+ on various nix/doze platforms.

Is there any way to check the progress of a memresize file resize?

Sometimes a resize seems to take inordinately long, so I'd like to be able
to confirm that it is x% complete and increasing.

I imagine the technique would be different for static and dynamic files.

Also, does anyone know if and how the [MEMORY buf_size] has any effect on
the speed if the buffer is smaller than the file size?  I can't see any
difference here on a 500Mb static file with an 8Mb and 100Mb buffer.

Cheers
Simon
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] LOOP or GOTO on READNEXT [END OF THREAD]

2004-12-30 Thread Larry Hiscock
This thread is now officially ended.  You have been instructed to take it to
u2-community.

Larry Hiscock
Moderator


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hanwell, David
Sent: Thursday, December 30, 2004 8:29 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] LOOP or GOTO on READNEXT

GOTO falls under the category of religion As The Grand PooBah of the
Church Of Where-Do-I-GOTO, I, The Reverend Rabbi Ayatollah Davey Ben Davey,
deeply resent the slur upon the fine religion of Where-Do-I-GOTO by knaves
and fools who know nothing of its theology. This violation of Political
Correctness can only be removed by you, Mr. Charles Barouch, Atheist
Moderator of Sin and spawn of Satan, educating yourself on the moral,
philosophical, spiritual, and hedonistic principles of the exemplary Church
Of Where-Do-I-GOTO. I recommend my treatise The Quim, or The Elementary
Principals of the Church Of Where-Do-I-GOTO and Why Infidels Claim We
Observant Worshippers Are Doomed to an Eternal LOOP RETURN. You can find
this outstanding theological work in Volume XXX of Larry Flynn's Hustler
collection of objects d'art, dated December 32, 1993. My work has been
nominated for the Nobel Prize in Theology for 11 consecutive years, but
unfortunately, when I nominate myself, nobody seconds it. So just remember
this: For infidel know you have trod on the toe of The Reverend Rabbi
Ayatollah Davey Ben Davey.

Debster, please send a case of eggnog-and-rum bottles to me, The Reverend
Rabbi Ayatollah Davey Ben Davey. We Observants quaff this libation
throughout our services except for Communion, where we honor Margarita,
Mother of the Church Of Where-Do-I-GOTO by drinking from a clay chalice
containing a tequila-lemon-salt concoction.

Justice is incidental to law and order. - J. (John) Edgar Hoover (1895 -
1972) David Hanwell

-Original Message-
From: [EMAIL PROTECTED] On Behalf Of Debster
Sent: Wednesday, December 29, 2004 11:26 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] LOOP or GOTO on READNEXT

Chuck

ok...

Calm down

Take an egg nog in hand and sip slowly

We will take heed and GOTO to the community list and hope it does not do a
LOOP RETURN...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Moderator
Sent: Wednesday, December 29, 2004 6:33 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] LOOP or GOTO on READNEXT


ONCE AGAIN: MOVE THIS TO U2-COMMUNITY!

This belongs on U2-Community, not on U2-Users. GOTO falls under the category
of religion and this is a technology mailing list. Off-topic matters belong
on U2-Community.

 - Charles Barouch, Moderator
 [EMAIL PROTECTED] - U2-Users Moderator
--
To subscribe to the u2-users or u2-community mailing lists or digest lists,
send one or more of the following lines in the BODY (not the subject) of an
email addressed to [EMAIL PROTECTED]

 subscribe u2-users
 subscribe u2-users-digest
 subscribe u2-community
 subscribe u2-community-digest
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/





CONFIDENTIALITY
This e-mail and any attachments are confidential and also may be privileged.
If you are not the named recipient, or have otherwise received this
communication in error, please delete it from your inbox, notify the sender
immediately, and do not disclose its contents to any other person, use them
for any purpose, or store or copy them in any medium.
Thank you for your cooperation.

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UD] memresize - checking progress

2004-12-30 Thread Baakkonen, Rodney
You can monitor the 'rsz' file or directory (dynamic files) that memresize
creates. This will give you an vague idea of how far along it is. 

If memresize is extremely slow, it probably means the file we due for
resizing long before you got around to it. The better shape the original
file, the faster the resize goes in my experience. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 30, 2004 1:25 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UD] memresize - checking progress


With a larger buffer, memresize can shuffle the data around in memory,
then write it the new file.  This saves I/O because it can write the
file out in whole groups instead of rereading a group to insert each
record as it runs through the original file.

If the file is larger than the buffer, all the data can't be in memory
at once.  I don't know what it does in that case, but I imagine it
should have some benefit.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simon Lewington
Sent: Thursday, December 30, 2004 11:09 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] [UD] memresize - checking progress

Unidata 6+ on various nix/doze platforms.

Is there any way to check the progress of a memresize file resize?

Sometimes a resize seems to take inordinately long, so I'd like to be
able to confirm that it is x% complete and increasing.

I imagine the technique would be different for static and dynamic files.

Also, does anyone know if and how the [MEMORY buf_size] has any effect
on the speed if the buffer is smaller than the file size?  I can't see
any difference here on a 500Mb static file with an 8Mb and 100Mb buffer.

Cheers
Simon
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Taking threads to community

2004-12-30 Thread FFT2001
This thread is now officially ended.  You have been instructed to take it to
u2-community.

Larry Hiscock  Moderator

It might be helpful to actually place the appropriate email addr in the 
reply-to listings so people know HOW to do this :)
   I have noted the attempt to end a certain thread at least four times but a 
bet a number of people have no idea what you're saying or how to accomplish it.
   You are welcome now, to REPLY-ALL and then remove u2-users from the email 
listing.  It just seems like a simpler approach to me.

Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] BCI Connect

2004-12-30 Thread Ray Wurlod
Source code for the CONNECT verb is supplied.  Track it down and take a look at 
it.

The steps are as follows.  You should check for, and clear, errors at every 
step.  Seriously.  ODBC simply does not function with dirty handles.

1.  Allocate ODBC environment (SQLAllocEnv)
2.  Allocate connection environment (SQLAllocConnect)
3.  Connect to Oracle database (SQLConnect)
(optional) discover information about connection (SQLTables, etc.)
4.  Construct SELECT statement.  
5.  If SELECT statement includes parameter markers (?) bind variables to each 
(SQLBindParameter).
6.  Allocate statement environment (SQLAllocStmt)
7.  Either:
(a) send SQL statement to be prepared (SQLPrepare) and executed (SQLExecute)
(b) send SQL statement to be executed directly (SQLExecDirect)
8.  If you don't already know how many columns there are in the result set 
(e.g. SELECT * FROM ...)
find out (SQLNumResultCols).
9.  Bind a variable to each result set column (SQLBindCol).
10. Loop calling (SQLFetch), which returns one result row, until its status is 
SQL.NO.DATA.FOUND.
11. The value from each column is in the relevant bound variable.  Do whatever 
with these.
12. Now that the loop's finished:
(a) Free the statement environment (SQLFreeStmt)
(b) Disconnect from the Oracle server (SQLDisconnect)
(c) Free the connection environment (SQLFreeConnect)
(d) Free the ODBC environment (SQLFreeEnv)

Simple, innit?


- Original Message -
From: [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Subject: [U2] BCI Connect 
Date: Thu, 30 Dec 2004 13:30:39 -

 
 Hello all
 
 I am trying to extract data from an Oracle Database from Unidata. I have read
 through the BCI Connect manual and it looks fairly simple using the Connect
 command, but much more complicated using directly within Unibasic. Does
 anyone have a simple example of executing a SQL statement and returning the
 results into either a Unidata file or reading each row?
 
 If I do not want to update should I just datastack and use the CONNECT
 command?
 
 Thanks
 
 Graham
 
 
 
 Graham Forbes
 Trading Systems
 BT Consulting  Systems Integration
 
 
 
 
 
 
 This email may contain information which is privileged or confidential. If you
 are not the intended recipient of this email, please notify the sender
 immediately and delete it without reading, copying, storing, forwarding or
 disclosing its contents to any other person
 Thank you
 
 Check us out at http://www.bt.com/consulting
 
 
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] UVTEMP

2004-12-30 Thread Ray Wurlod
They SHOULDN'T be left behind.  Unless the process aborts, EXECUTE..CAPTURING 
usually cleans up its temporary file automatically.

The small size of each of the files in your example leads me to suspect a bug 
where the process did not clean up because the CAPTURING variable was empty.

Report it to your support provider as a buglet.  =8^D

Clean them up periodically; the names have a consistent naming convention.

- Original Message -
From: [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] UVTEMP
Date: Thu, 30 Dec 2004 03:57:11 +

 
 Thanks Ray, informative as always.   Do you know why they are being 
 left behind?
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/