Going along this train of thought. What if you setup a new printer and make the Device's filename to be a script filename. Then when you setup the SP.ASSIGN and Then do your LIST ... it will send the output directly to your script.
Granted, you will need to setup a new "printer" device on the UV system account But that shouldn't be too difficult. But - Personally, I'd opt for Trigger method and have the subroutine also track Deletes and Changes as well as Adds. However the Trigger method has filename naming constraints As well as permissions issues to allow the setting of the Trigger, however, a search Of this list will yield some trigger setup tips from about 6 months ago I believe. George -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Allen Egerton Sent: Wednesday, December 11, 2013 6:33 AM To: 'U2 Users List' Subject: Re: [U2] Exporting to File regularly Good morning David. While the answers you've gotten regarding triggers are valid, they're perhaps an overly complicated solution to your problem. Your statement that LIST FILE.NAME LPTR gives you the info you need seems to imply to me that the record key is numeric and generated sequentially. If so, then there's a control record in the existing system that you should be able to retrieve. And it may be as simple as finding the &NEXT.AVAILABLE& record in the dictionary of the file that you're looking at. If not, it's going to be stored in a parameter file somewhere. Unfortunately that "somewhere" is a nasty word given that you are new to universe... -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of David Campbell Sent: Wednesday, December 11, 2013 12:39 AM To: [email protected] Subject: [U2] Exporting to File regularly Hi Everyone, I'm new to universe (a complete noob) and I couldn't quite find what I was looking for on google and I've been smashing my face against this for a while until I stumbled upon this mailing list so I was wondering if anyone could help me out here. I'm writing a script that will hopefully alert me via email whenever a new record is added to a particular universe file, if there is a better way to do this I would be all ears. I'm working around another proprietary system which operates on universe and I dont know enough about universe to really say for sure what is proprietary and what is universe standard code and the proprietary stuff is covered in NDA's and no touchy hand slappy orders so I cannot really modify the way it works, I just need to know when a new entry appears, preferably via an smtp email. My Current plan works like this I'm looking to regularly (every 5 minutes) output data into a text or csv file, doesn't matter really, so long as it is not full of characters that batch scripts hate and it can happen in an automated fashion. The closest thing I can get to what I want right now is SP.ASSIGN HS LIST FILE.NAME LPTR this lists all the records and dumps them in a spool file under /var/spool/uv/ and then a script I have written in the past retrieves that spool file for me, I have trained that spool file to look for specific markers in the first line of the file and apply a particular script to it This spooled print job gives me a list of the records that I can then sort numerically, pick the highest number, check that number against what the number was last time and alert me via email if its different. Ultimately I would love for a regularly running script to just output the highest record (maybe sort numerically and give me the highest number and dump just that number into a file on the unix box for me to retrieve and the work with. Any help would be greatly appreciated! -- View this message in context: http://u2-universe-unidata.1073795.n5.nabble.com/Exporting-to-File-regularly -tp42264.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 _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
