Re: [U2] Exporting to File regularly

Bruce Decker <[email protected]>
Newsgroups gmane.comp.db.u2.general
Message-ID <[email protected]>
Triggers are probably the way, but if you have a touchy vendor, they might
not appreciate your trigger as much as you do.  If triggers aren't an
option, maybe this could work (at least on a smallerish file):

*Assume the filename is FOO and the id is @ID*

*At ECL/TCL:*
SSELECT FOO BY-DSND @ID
SELECT FOO SAMPLE 1
SAVE-LIST HIGHEST_NUMBER

*In a PROC*
PQ
HSSELECT FOO BY-DSND @ID
STON
HSELECT FOO SAMPLE 1<
HSAVE-LIST HIGHEST_NUMBER
P

*In BASIC*
EXECUTE \SSELECT FOO BY-DSND @ID\ RTNLIST foolist
EXECUTE \SELECT FOO SAMPLE 1\ PASSLIST foolist RTNLIST foolist
EXECUTE \SAVE-LIST HIGHEST_NUMBER\ PASSLIST foolist


Now, the highest ID in the file is contained in the directory &SAVEDLISTS&
in the file/item HIGHEST_NUMBER.

Depending on the type of data in @ID (e.g., numeric or alpha ) you may need
to create a special @ID that is right justified to achieve the desired sort
order.

Bruce Decker
Blue Prairie, Inc.
www.bluepinc.com <http://bluepinc.com>  
720.733.0459





--
View this message in context: http://u2-universe-unidata.1073795.n5.nabble.com/Exporting-to-File-regularly-tp42264p42270.html
Sent from the U2 - Users mailing list archive at Nabble.com.
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.