[U2] Send output from query to text file
A lot of the times I want to query UniVerse and capture that information to a text file. I can send to an XML file no problem and sometimes that is exactly what I want to do. However most of the time I just want to view the info unformatted without screen scraping or copy and pasting from Dynamic Connect. What I really want to do is: SORT VOC \\server\fileshare\file.txt Thanks, Norm ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Set your page size to 99 and send results to _HOLD_ via SETPTR. You will have one header at the top. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Norman Bauer Sent: Friday, June 12, 2009 9:22 AM To: U2 Users List Subject: [U2] Send output from query to text file A lot of the times I want to query UniVerse and capture that information to a text file. I can send to an XML file no problem and sometimes that is exactly what I want to do. However most of the time I just want to view the info unformatted without screen scraping or copy and pasting from Dynamic Connect. What I really want to do is: SORT VOC \\server\fileshare\file.txt Thanks, Norm ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
If you run the query as a phantom then the output ends up in the _PH_ directory. If you EXECUTE the phantom command and capture the output it'll give the name of the phantom file. Ed From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Norman Bauer Sent: 12 June 2009 14:22 To: U2 Users List Subject: [U2] Send output from query to text file A lot of the times I want to query UniVerse and capture that information to a text file. I can send to an XML file no problem and sometimes that is exactly what I want to do. However most of the time I just want to view the info unformatted without screen scraping or copy and pasting from Dynamic Connect. What I really want to do is: SORT VOC \\server\fileshare\file.txt Thanks, Norm --- Please remember to recycle wherever possible. Reduce, reuse, recycle, think do you need to print this e-mail? --- This e-mail and any attachment(s), is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the addressee, dissemination, copying or use of this e-mail or any of its content is prohibited and may be unlawful. If you are not the intended recipient please inform the sender immediately and destroy the e-mail, any attachment(s) and any copies. All liability for viruses is excluded to the fullest extent permitted by law. It is your responsibility to scan or otherwise check this email and any attachment(s). Unless otherwise stated (i) views expressed in this message are those of the individual sender (ii) no contract may be construed by this e-mail. Emails may be monitored and you are taken to consent to this monitoring. Civica Services Limited, Company No. 02374268; Civica UK Limited, Company No. 01628868 Both companies are registered in England and Wales and each has its registered office at 2 Burston Road, Putney, London, SW15 6AR. --- ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
I can't speak for UV, but in UD you could do something like SORT VOC ATB1 ATB2 ATB3 TO DELIM | \\server\fileshare\file.txt This would create a pipe-delimited txt file. Brad. u2-users-boun...@listserver.u2ug.org wrote on 06/12/2009 08:22:17 AM: [image removed] [U2] Send output from query to text file Norman Bauer What I really want to do is: SORT VOC \\server\fileshare\file.txt U.S. BANCORP made the following annotations - Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. - ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Thats what the HOLD file is for. Use the SETPTR command to redirect printing to the hold file by using mode 3 in the 6th parameter of your SETPTR statement and append LPTR to your query: SETPTR 0,132,66,0,0,3,BANNER FILENAME.TXT,NHEAD,NFMT,BRIEF LIST VOC SAMPLE 10 LPTR This will put the output of LIST VOC SAMPLE 10 into a file in HOLD called FILENAME.TXT Norman Bauer wrote: A lot of the times I want to query UniVerse and capture that information to a text file. I can send to an XML file no problem and sometimes that is exactly what I want to do. However most of the time I just want to view the info unformatted without screen scraping or copy and pasting from Dynamic Connect. What I really want to do is: SORT VOC \\server\fileshare\file.txt Thanks, Norm ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Exactly! But also set the page length to something huge (99) so that you only have 1 header. Scrape the first couple of lines (if needed) and the reset is raw text. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, June 12, 2009 9:39 AM To: U2 Users List Subject: Re: [U2] Send output from query to text file Thats what the HOLD file is for. Use the SETPTR command to redirect printing to the hold file by using mode 3 in the 6th parameter of your SETPTR statement and append LPTR to your query: SETPTR 0,132,66,0,0,3,BANNER FILENAME.TXT,NHEAD,NFMT,BRIEF LIST VOC SAMPLE 10 LPTR This will put the output of LIST VOC SAMPLE 10 into a file in HOLD called FILENAME.TXT Norman Bauer wrote: A lot of the times I want to query UniVerse and capture that information to a text file. I can send to an XML file no problem and sometimes that is exactly what I want to do. However most of the time I just want to view the info unformatted without screen scraping or copy and pasting from Dynamic Connect. What I really want to do is: SORT VOC \\server\fileshare\file.txt Thanks, Norm ___ U2-Users mailing list U2-Users@listserver.u2ug.orgmailto:U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Didn't know about this method, but I can see it being very useful in the future - the option to set the delimiter could be extremely useful - as it puts all the output data into an easily parsed / loadable into Excel format. FWIW, DELIM only seems to be recognised with ECLTYPE U. Ed From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of bradley.sch...@usbank.com Sent: 12 June 2009 14:27 To: U2 Users List Subject: Re: [U2] Send output from query to text file I can't speak for UV, but in UD you could do something like SORT VOC ATB1 ATB2 ATB3 TO DELIM | \\server\fileshare\file.txt This would create a pipe-delimited txt file. Brad. u2-users-boun...@listserver.u2ug.org wrote on 06/12/2009 08:22:17 AM: [image removed] [U2] Send output from query to text file Norman Bauer What I really want to do is: SORT VOC \\server\fileshare\file.txt U.S. BANCORP made the following annotations - Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. - --- Please remember to recycle wherever possible. Reduce, reuse, recycle, think do you need to print this e-mail? --- This e-mail and any attachment(s), is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the addressee, dissemination, copying or use of this e-mail or any of its content is prohibited and may be unlawful. If you are not the intended recipient please inform the sender immediately and destroy the e-mail, any attachment(s) and any copies. All liability for viruses is excluded to the fullest extent permitted by law. It is your responsibility to scan or otherwise check this email and any attachment(s). Unless otherwise stated (i) views expressed in this message are those of the individual sender (ii) no contract may be construed by this e-mail. Emails may be monitored and you are taken to consent to this monitoring. Civica Services Limited, Company No. 02374268; Civica UK Limited, Company No. 01628868 Both companies are registered in England and Wales and each has its registered office at 2 Burston Road, Putney, London, SW15 6AR. --- ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Add COUNT.SUP, COL.SUP, HDR.SUP to suppress record count at the bottom, column headers and report header. note that if longer than 32K lines there will be a char(12) (page break) inserted. Excel does not handle that as a page break. Laure Hansen, City of Redwood City I.T. Tel: 650-780-7087 Cell: 650-207-3235 From: u2-users-boun...@listserver.u2ug.org u2-users-boun...@listserver.u2ug.org To: 'U2 Users List' u2-users@listserver.u2ug.org Sent: Fri Jun 12 06:40:53 2009 Subject: Re: [U2] Send output from query to text file Exactly! But also set the page length to something huge (99) so that you only have 1 header. Scrape the first couple of lines (if needed) and the reset is raw text. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Friday, June 12, 2009 9:39 AM To: U2 Users List Subject: Re: [U2] Send output from query to text file Thats what the HOLD file is for. Use the SETPTR command to redirect printing to the hold file by using mode 3 in the 6th parameter of your SETPTR statement and append LPTR to your query: SETPTR 0,132,66,0,0,3,BANNER FILENAME.TXT,NHEAD,NFMT,BRIEF LIST VOC SAMPLE 10 LPTR This will put the output of LIST VOC SAMPLE 10 into a file in HOLD called FILENAME.TXT Norman Bauer wrote: A lot of the times I want to query UniVerse and capture that information to a text file. I can send to an XML file no problem and sometimes that is exactly what I want to do. However most of the time I just want to view the info unformatted without screen scraping or copy and pasting from Dynamic Connect. What I really want to do is: SORT VOC \\server\fileshare\file.txt Thanks, Norm ___ U2-Users mailing list U2-Users@listserver.u2ug.orgmailto:U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
I don't recommend smart query becuase of its dependency on SB Client. We have a lot of reports done with smart query, and use OLE to transfer them to Excel. It kills the system and requires a per seat license for SB Client. If you built up a toolkit around straight ECL or the DOWNLOAD tool, it seems it will scale better. Michael Martin wrote: How about SMART.QUERY. *From:* u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] *On Behalf Of *Norman Bauer *Sent:* Friday, June 12, 2009 8:22 AM *To:* U2 Users List *Subject:* [U2] Send output from query to text file A lot of the times I want to query UniVerse and capture that information to a text file. I can send to an XML file no problem and sometimes that is exactly what I want to do. However most of the time I just want to view the info unformatted without screen scraping or copy and pasting from Dynamic Connect. What I really want to do is: SORT VOC \\server\fileshare\file.txt Thanks, Norm ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Ed: You mention "FWIW, DELIM only seems to be recognised with ECLTYPE U." Then change the command to (note the lower case verb): :sort VOC NI-SUPP COL-HDR-SUPP HDR-SUPP ATB1 ATB2 ATB3 TO DELIM "|" \\server\fileshare\file.txt The lower case verb parses the sentence in UniData mode if you're already in ECLTYPE P. HTH, Bill From: Edward Brown ebr...@civica.co.uk Sent: 6/12/2009 6:47 AM To: U2 Users List u2-users@listserver.u2ug.org Subject: Re: [U2] Send output from query to text file Didnt know about this method, but I can see it being very useful in the future the option to set the delimiter could be extremely useful as it puts all the output data into an easily parsed / loadable into Excel format. FWIW, DELIM only seems to be recognised with ECLTYPE U. Ed From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of bradley.sch...@usbank.com Sent: 12 June 2009 14:27 To: U2 Users List Subject: Re: [U2] Send output from query to text file I can't speak for UV, but in UD you could do something like SORT VOC ATB1 ATB2 ATB3 TO DELIM "|" \\server\fileshare\file.txt This would create a pipe-delimited txt file. Brad. u2-users-boun...@listserver.u2ug.org wrote on 06/12/2009 08:22:17 AM: [image removed] [U2] Send output from query to text file Norman Bauer What I really want to do is: SORT VOC \\server\fileshare\file.txt U.S. BANCORP made the following annotations - Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. - --- Please remember to recycle wherever possible. Reduce, reuse, recycle, think do you need to print this e-mail? --- This e-mail and any attachment(s), is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the addressee, dissemination, copying or use of this e-mail or any of its content is prohibited and may be unlawful. If you are not the intended recipient please inform the sender immediately and destroy the e-mail, any attachment(s) and any copies. All liability for viruses is excluded to the fullest extent permitted by law. It is your responsibility to scan or otherwise check this email and any attachment(s). Unless otherwise stated (i) views expressed in this message are those of the individual sender (ii) no contract may be construed by this e-mail. Emails may be monitored and you are taken to consent to this monitoring. Civica Services Limited, Company No. 02374268; Civica UK Limited, Company No. 01628868 Both companies are registered in England and Wales and each has its registered office at 2 Burston Road, Putney, London, SW15 6AR. --- ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Does this work with UNC paths? I have used this methods, but have always seemed to have to write my results to the PWD. Note with this method! BREAK-ON, EXPLODING, and other "advanced" ECL feature may not work with TO DELIM. TO DELIM is my favorite quick way to get data out for my use. Bill Haskett wrote: Ed: You mention "FWIW, DELIM only seems to be recognised with ECLTYPE U." Then change the command to (note the lower case verb): :sort VOC NI-SUPP COL-HDR-SUPP HDR-SUPP ATB1 ATB2 ATB3 TO DELIM "|" \\server\fileshare\file.txt The lower case verb parses the sentence in UniData mode if you're already in ECLTYPE P. HTH, Bill ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Works fine for me on unidata 7.1 writing to C:\whatever.txt Bill - yes, I've come across the lower case usage before. First used it with select and 'saving unique' when we started using unidata (after R91/95) many moons ago. Oh look (I thought) - a special sort of SELECT with shiny things! Ed From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Romanow Sent: 12 June 2009 18:22 To: U2 Users List Subject: Re: [U2] Send output from query to text file Does this work with UNC paths? I have used this methods, but have always seemed to have to write my results to the PWD. Note with this method! BREAK-ON, EXPLODING, and other advanced ECL feature may not work with TO DELIM. TO DELIM is my favorite quick way to get data out for my use. Bill Haskett wrote: Ed: You mention FWIW, DELIM only seems to be recognised with ECLTYPE U. Then change the command to (note the lower case verb): :sort VOC NI-SUPP COL-HDR-SUPP HDR-SUPP ATB1 ATB2 ATB3 TO DELIM | \\server\fileshare\file.txt The lower case verb parses the sentence in UniData mode if you're already in ECLTYPE P. HTH, Bill --- Please remember to recycle wherever possible. Reduce, reuse, recycle, think do you need to print this e-mail? --- This e-mail and any attachment(s), is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the addressee, dissemination, copying or use of this e-mail or any of its content is prohibited and may be unlawful. If you are not the intended recipient please inform the sender immediately and destroy the e-mail, any attachment(s) and any copies. All liability for viruses is excluded to the fullest extent permitted by law. It is your responsibility to scan or otherwise check this email and any attachment(s). Unless otherwise stated (i) views expressed in this message are those of the individual sender (ii) no contract may be construed by this e-mail. Emails may be monitored and you are taken to consent to this monitoring. Civica Services Limited, Company No. 02374268; Civica UK Limited, Company No. 01628868 Both companies are registered in England and Wales and each has its registered office at 2 Burston Road, Putney, London, SW15 6AR. --- ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Steve: Yes. It works for me anyway (UD v7.2) :sort VOC NI-SUPP COL-HDR-SUPP HDR-SUPP F1 F2 F3 TO DELIM "|" \\Asiolywaweb\webdev\test.txt Webdev is a "shared" directory. Not sure this makes much difference, but it could. Bill From: Steve Romanow slestak...@gmail.com Sent: 6/12/2009 10:21 AM To: U2 Users List u2-users@listserver.u2ug.org Subject: Re: [U2] Send output from query to text file Does this work with UNC paths? I have used this methods, but have always seemed to have to write my results to the PWD. Note with this method! BREAK-ON, EXPLODING, and other "advanced" ECL feature may not work with TO DELIM. TO DELIM is my favorite quick way to get data out for my use. Bill Haskett wrote: Ed: You mention "FWIW, DELIM only seems to be recognised with ECLTYPE U." Then change the command to (note the lower case verb): :sort VOC NI-SUPP COL-HDR-SUPP HDR-SUPP ATB1 ATB2 ATB3 TO DELIM "|" \\server\fileshare\file.txt The lower case verb parses the sentence in UniData mode if you're already in ECLTYPE P. HTH, Bill ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Thanks for all the suggestions. Brian's EXPORT was the best solution. Thanks Brian! Norm On Fri, Jun 12, 2009 at 9:22 AM, Norman Bauer normanba...@gmail.com wrote: A lot of the times I want to query UniVerse and capture that information to a text file. I can send to an XML file no problem and sometimes that is exactly what I want to do. However most of the time I just want to view the info unformatted without screen scraping or copy and pasting from Dynamic Connect. What I really want to do is: SORT VOC \\server\fileshare\file.txt Thanks, Norm ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Send output from query to text file
Anyone who already has mv.NET can use mvExec entirely for free. nospampleaseNebula-RnD.com/freeware That allows you to issue your TCL commands from any system in your office, not just a logged-in telnet session. Commands can be issued from a DOS prompt, .bat file, or any program. [ads] If you don't have mv.NET then we can provide a single low-cost session license which you can use for any purpose. Since people have commented about Excel here, I'll also mention that delimited files will get you boring columns and rows but to take it to the next level for real attractive spreadsheets with styles, borders, and other visual features, check out NebulaXLite. It's completely free for developers and only $200 for a permanent license for any production server. (No connectivity required.) NebulaXLite supports Excel, OpenOffice, and Google Apps. remove.pleaseNebula-RnD.com/products/xlite.htm [/ads] Tony Gravagno Nebula Research and Development TG@ remove.pleaseNebula-RnD.com Nebula RD sells mv.NET and other Pick/MultiValue products worldwide, and provides related development services remove.pleaseNebula-RnD.com/blog Visit PickWiki.com! Contribute! From: Norman Bauer A lot of the times I want to query UniVerse and capture that information to a text file. I can send to an XML file no problem and sometimes that is exactly what I want to do. However most of the time I just want to view the info unformatted without screen scraping or copy and pasting from Dynamic Connect. What I really want to do is: SORT VOC \\server\fileshare\file.txt ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users