From owner-sqr-users@USA.NET Tue Jan 2 18:06:14 1996 Date: Tue, 2 Jan 1996 17:45:07 EST From: "Suresh P. Reddy" <74634.400@COMPUSERVE.COM> Subject: Useful Scripts Need helpful hints in writting good SQR code. Any help is highly appreciated. Thanks SPR From owner-sqr-users@USA.NET Sun Jan 7 23:19:52 1996 Date: Sun, 7 Jan 1996 22:16:37 -0500 From: Ray Ontko Subject: Re: Useful Scripts > Need helpful hints in writting good SQR code. Any help is highly appreciated. > Thanks > SPR Suresh, SQR netters, Here's a start at SQR naming conventions and coding standards. I mean for this to get the discussion rolling, so please offer additions, alternatives, and comments. Ray ----- SQR Coding Guidelines January 7, 1996 Ray Ontko Purpose This document provides recommended naming conventions and coding guidelines for SQR programs. Overview This document addresses the following areas of SQR program development: o File Naming o Variable Naming o Reusable Program Modules o Passing Parameters between Procedures o Internal Documentation File Naming All SQR program files should be named xxx.sqr. Include files should be named xxx.sqh, where xxx is the name of the module defined in the file, or the primary module if several are defined. Max files for a given program should be named xxx.sqm, where xxx.sqr is the name of the program they are used with. Under Unix, all file names should be all lower-case. Variable Naming Avoid use of the hyphen "-" in variable names. Use the underscore "_" instead. Avoid use of capitalization in variable names. Use the underscore "_" character to separate different "words" within the variable name. Reusable Program Modules All reusable program modules should be created as .sqh files. Each sqh file should contain one callable procedure (it may also contain procedures that are called exclusively by the procedure). The file should be named .sqh. Any procedures which are used exclusively within the reusable program module (i.e., they are not also reusable) should be named _xxx (where is the name of the main procedure in the file) to avoid naming conflicts with user-defined procedures or other reusable procedures. Avoid using global variables in reusable program modules. If these are needed for persistence between calls to the module, all such global variables should be named _xxx (starting with # or $ or &, of course). Reusable program modules used by a program should be referenced using the "#include" directive immediately after "end-report". All reusable program modules should be wrappered with: #ifndef ____ #define ____ ... #endif Any "#include" needed by a reusable program module should be added after the "#define ____ " shown above. Passing Parameters between Procedures All procedures implemented as external reusable program modules should pass all values into and out of the procedure using parameters (no global variables). Reusable procedures which pass no parameters should be declared LOCAL. Procedures specific to a program may use global variables, but this practice is recommended only for the smallest of programs. These procedures should be declared within the program file (not #included). Internal Documentation All programs and include files should include the following header: !++ ! ! Name ! ! xxx.sqr (or xxx.sqh) ! ! Description ! ! ! ! Parameters ! ! ! ! Notes ! ! ! !-- ! ! Modification History ! ! Name Date Comment ! --------------- ---------- ----------------------------------------- ! yyyy.mm.dd Created ! A simple program can be used to extract the information between the "!++" and the "!--". From owner-sqr-users@USA.NET Fri Jan 12 13:30:50 1996 Date: Fri, 12 Jan 1996 12:26:34 -0400 From: GARRIDF@SNYFARVA.CC.FARMINGDALE.EDU Subject: Can Easy SQR access flat files? Is there a way for ESQR (EASY SQR) to either READ a flat file or INPUT data to be used in selecting data from the Oracle tables? We wanted to match a file of ID's to the name, address and other information on the database, and create an extract file for word processing. -------------------------------------------------------------------------------- | F R A N C E S G A R R I D O | |Associate Director for Administrative Computing Phone: (516) 420-2757 | |SUNY College of Technology at Farmingdale Fax: (516) 420-2696 | |Computer Center, Greenley Hall DECNET: SFARVA::GARRIDF| |2350 Route 110 BITNET: GARRIDF@SNYFARVA| |Farmingdale, New York 11735-1021 INTERNET:garridf@snyfarva.cc.farmingdale.edu| -------------------------------------------------------------------------------- From owner-sqr-users@USA.NET Mon Jan 15 16:42:40 1996 Date: Mon, 15 Jan 1996 14:01:47 -0400 From: Edward Forman Subject: Re: Can Easy SQR access flat files? fran, I have tons of regular SQR program which read flat files to get student IDs for processing. If this will help please contact me and I'll send you some samples. Ed Date: Fri, 12 Jan 1996 12:26:34 -0400 From: GARRIDF@SNYFARVA.CC.FARMINGDALE.EDU Subject: Can Easy SQR access flat files? Is there a way for ESQR (EASY SQR) to either READ a flat file or INPUT data to be used in selecting data from the Oracle tables? We wanted to match a file of ID's to the name, address and other information on the database, and create an extract file for word processing. ------------------------------------------------------------------------------- - | F R A N C E S G A R R I D O | |Associate Director for Administrative Computing Phone: (516) 420-2757 | |SUNY College of Technology at Farmingdale Fax: (516) 420-2696 | |Computer Center, Greenley Hall DECNET: SFARVA::GARRIDF| |2350 Route 110 BITNET: GARRIDF@SNYFARVA| |Farmingdale, New York 11735-1021 INTERNET:garridf@snyfarva.cc.farmingdale.edu| ------------------------------------------------------------------------------- - From owner-sqr-users@USA.NET Tue Jan 16 11:22:08 1996 Date: Tue, 16 Jan 1996 18:01:46 GMT From: Avi Algazy Subject: SQR With Sybase 10 I'm trying to compile some SQR scripts using SQR 2.4 for Sybase, on SCO. The server is Sybase 10 running on Aviion. Some scripts are compiled OK. For the others - I get error message similar to this: Sybase DBCANCEL error in cursor 9: (20296) Timed out waiting for server to acknowledge attention. Cursor 9 is: Cursor #9: SQL = select getdate() Compiles = 1 Executes = 0 Rows = 0 When the server is Sybase 4.9 (Also on Aviion) all the scripts are compiled OK When the client is Aviion (instead of SCO) running SQR 2.5, and the server is the same Sybase 10 - it is also OK Does anyone have any experience using SQR on SCO with Sybase10 as a server? Does SQR 2.x on SCO CAN work with Sybase 10? What about SQR3? Any help would be greatly appreciated - Avi Algazy From owner-sqr-users@USA.NET Tue Jan 16 16:37:02 1996 Date: Tue, 16 Jan 1996 11:52:41 PST From: johnk@SUN4.MITI.COM Subject: Re: SQR With Sybase 10 I would suggest getting SQR version 3.0.8 for SCO Unix/Sybase. I would doubt that any testing was ever done with V2.4 against a Sybase 10 database. I remember a very old SQR bug with select statements that did not have a from table clause, for example: select getdate(). I can't remember if the error you are reporting was the same. I would expect it to fail on both 4.9 and 10 databases, so it does not appear to be the problem. John L. Kellogg MITI Technical Support ______________________________ Reply Separator _________________________________ Subject: SQR With Sybase 10 Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 16/01/96 9:22 AM I'm trying to compile some SQR scripts using SQR 2.4 for Sybase, on SCO. The server is Sybase 10 running on Aviion. Some scripts are compiled OK. For the others - I get error message similar to this: Sybase DBCANCEL error in cursor 9: (20296) Timed out waiting for server to acknowledge attention. Cursor 9 is: Cursor #9: SQL = select getdate() Compiles = 1 Executes = 0 Rows = 0 When the server is Sybase 4.9 (Also on Aviion) all the scripts are compiled OK When the client is Aviion (instead of SCO) running SQR 2.5, and the server is the same Sybase 10 - it is also OK Does anyone have any experience using SQR on SCO with Sybase10 as a server? Does SQR 2.x on SCO CAN work with Sybase 10? What about SQR3? Any help would be greatly appreciated - Avi Algazy From owner-sqr-users@USA.NET Wed Feb 7 01:51:01 1996 Date: Wed, 7 Feb 1996 13:47:07 +0800 From: Raymond Yip Subject: SQR on HP What is the latest version of SQR on HP-UX? Raymond Yip MTRC From owner-sqr-users@USA.NET Thu Feb 8 11:17:32 1996 Date: Thu, 8 Feb 1996 07:14:51 PST From: marcosr@SUN4.MITI.COM Subject: Re: SQR on HP SQR Workbench v3.0 for HP-UX SQR Version HP-UX Version Database 3.0.12.1 10 Sybase 4.9.2,10.0.2/Oracle 6.0.37,7.0.16 3.0.5 9.0.5 Sybase 4.9.2,10.0.2/Oracle 6.0.37,7.0.16 3.0.7.3 9.0.5 Informix 6.00.UE1,7.10UC1 3.0.7 9.0.6 Ingres 6.4 MITI Technical Support ______________________________ Reply Separator _________________________________ Subject: SQR on HP Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 2/7/96 5:37 PM What is the latest version of SQR on HP-UX? Raymond Yip MTRC From owner-sqr-users@USA.NET Thu Feb 8 12:26:25 1996 Date: Thu, 8 Feb 1996 08:09:52 PST From: diannej@SUN4.MITI.COM Subject: Re: SQR on HP Oracle/HP-UX = 3.0.12.1 Sybase/HP-UX = 3.0.12.1 Informix/HP-UX = 3.0.7.3 Ingres/HP-UX = 3.0.7 ______________________________ Reply Separator _________________________________ Subject: SQR on HP Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 2/7/96 5:37 PM What is the latest version of SQR on HP-UX? Raymond Yip MTRC From owner-sqr-users@USA.NET Thu Feb 8 13:28:04 1996 Date: Thu, 8 Feb 1996 08:54:52 PST From: johnk@SUN4.MITI.COM Subject: Re[2]: SQR on HP There is also a 3.0.12.2 version available for the Oracle database that supports HP-UX version 9. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Re: SQR on HP Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 08/02/96 8:34 AM SQR Workbench v3.0 for HP-UX SQR Version HP-UX Version Database 3.0.12.1 10 Sybase 4.9.2,10.0.2/Oracle 6.0.37,7.0.16 3.0.5 9.0.5 Sybase 4.9.2,10.0.2/Oracle 6.0.37,7.0.16 3.0.7.3 9.0.5 Informix 6.00.UE1,7.10UC1 3.0.7 9.0.6 Ingres 6.4 MITI Technical Support ______________________________ Reply Separator _________________________________ Subject: SQR on HP Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 2/7/96 5:37 PM What is the latest version of SQR on HP-UX? Raymond Yip MTRC From owner-sqr-users@USA.NET Thu Feb 8 13:33:47 1996 Date: Thu, 8 Feb 1996 08:29:51 PST From: jefff@SUN4.MITI.COM Subject: Re: SQR on HP For HP/UX 9.x.x = 3.0.5 For HP/UX 10.x.x = 3.0.12.2 Regards, Jeff Fishman jefff@miti.com ______________________________ Reply Separator _________________________________ Subject: SQR on HP Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 2/7/96 5:37 PM What is the latest version of SQR on HP-UX? Raymond Yip MTRC From owner-sqr-users@USA.NET Thu Feb 8 14:35:30 1996 Date: Thu, 8 Feb 1996 10:55:55 -0800 From: Mark Shields Subject: Re: SQR on HP Diane, We are currently running SQR on HP-UX 9.X connecting to Oracle ? We would like to be able to run SQR on the same machine and connect to another HP running HP-UX 10.0 and sybase. What are our options ? Thanks, Mark Shields (mshields@qualcomm.com) > Oracle/HP-UX = 3.0.12.1 > Sybase/HP-UX = 3.0.12.1 > Informix/HP-UX = 3.0.7.3 > Ingres/HP-UX = 3.0.7 > > >______________________________ Reply Separator >_________________________________ >Subject: SQR on HP >Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet >Date: 2/7/96 5:37 PM > > >What is the latest version of SQR on HP-UX? > >Raymond Yip >MTRC From owner-sqr-users@USA.NET Thu Feb 8 14:47:10 1996 Date: Thu, 8 Feb 1996 10:58:35 -0800 From: Mark Shields Subject: Re: SQR on HP Jeff, I sent this mail to Diane@MITI but I recognized your name so I'm sending it to you too. Thanks. We are currently running SQR on HP-UX 9.X connecting to Oracle ? We would like to be able to run SQR on the same machine and connect to another HP running HP-UX 10.0 and sybase. What are our options ? Thanks, Mark S (mshields@qualcomm.com) > For HP/UX 9.x.x = 3.0.5 > For HP/UX 10.x.x = 3.0.12.2 > > > Regards, > > Jeff Fishman > jefff@miti.com > > >______________________________ Reply Separator >_________________________________ >Subject: SQR on HP >Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet >Date: 2/7/96 5:37 PM > > >What is the latest version of SQR on HP-UX? > >Raymond Yip >MTRC From owner-sqr-users@USA.NET Wed Feb 14 19:48:05 1996 Date: Wed, 14 Feb 1996 16:00:58 -0800 From: Benjamin Le Subject: FORM FEED Hi there: I'm writing a SQR progam to produce graduation listing and labels. The program will print listing or labels base upon option parameter. If listing selected, I want to print the listing with new-page at 55 lines. If labels selected, labels will continue printing without form feed. Since 'no-formfeed' command is only placed in BEGIN-SETUP that cause no form feed, how do I control the form feed in the program? Any help is really appreciated. Thanks. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Thu Feb 15 08:47:54 1996 Date: Thu, 15 Feb 1996 08:14:15 -0500 From: Richard Vernick Subject: FORM FEED -Reply You can use no-formfeed all of the time. In your header section, print (or not) a chr(12) as the first character for formfeeds. Checkout 'encode' in the manual. Hope this helps.. >>> Benjamin Le 02/14/96 07:00pm >>> Hi there: I'm writing a SQR progam to produce graduation listing and labels. The program will print listing or labels base upon option parameter. If listing selected, I want to print the listing with new-page at 55 lines. If labels selected, labels will continue printing without form feed. Since 'no-formfeed' command is only placed in BEGIN-SETUP that cause no form feed, how do I control the form feed in the program? Any help is really appreciated. Thanks. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Thu Feb 15 09:02:50 1996 Date: Thu, 15 Feb 1996 08:27:59 -0400 From: Edward Forman Subject: Re: FORM FEED Use an ASK statement to set the number of lines per page and use the #IFDEF DEBUG - #ENDIF syntax to incluse/exclude the no-formfeed statement. Here's a sample form an SQR that sets the lines/page at run time: ask numlines 'How many lines-per-page would you like? (66 or 80)?' page-size {numlines} 136 Ed Forman Associate Director, Computer Services SUNY - College at Oneonta FORMANEL@ONEONTA.EDU (607)436-2706 --------------------------------------------------------------------------- Original Message: Date: Wed, 14 Feb 1996 16:00:58 -0800 From: Benjamin Le Subject: FORM FEED Hi there: I'm writing a SQR progam to produce graduation listing and labels. The program will print listing or labels base upon option parameter. If listing selected, I want to print the listing with new-page at 55 lines. If labels selected, labels will continue printing without form feed. Since 'no-formfeed' command is only placed in BEGIN-SETUP that cause no form feed, how do I control the form feed in the program? Any help is really appreciated. Thanks. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Thu Feb 15 09:03:38 1996 Date: Thu, 15 Feb 1996 08:39:31 -0400 From: Edward Forman Subject: Re: FORM FEED -Reply But won't you then lose SQR's nice ability to automatically create pages of the correct length for you? Ed Forman Associate Director, Computer Services SUNY - College at Oneonta FORMANEL@ONEONTA.EDU (607)436-2706 --------------------------------------------------------------------------- Original Message: Date: Thu, 15 Feb 1996 08:14:15 -0500 From: Richard Vernick Subject: FORM FEED -Reply You can use no-formfeed all of the time. In your header section, print (or not) a chr(12) as the first character for formfeeds. Checkout 'encode' in the manual. Hope this helps.. >>> Benjamin Le 02/14/96 07:00pm >>> Hi there: I'm writing a SQR progam to produce graduation listing and labels. The program will print listing or labels base upon option parameter. If listing selected, I want to print the listing with new-page at 55 lines. If labels selected, labels will continue printing without form feed. Since 'no-formfeed' command is only placed in BEGIN-SETUP that cause no form feed, how do I control the form feed in the program? Any help is really appreciated. Thanks. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Tue Feb 20 13:33:10 1996 Date: Tue, 20 Feb 1996 09:36:19 -0800 From: Benjamin Le Subject: Page Break Hi SQRers: I might confused you with my previous help message. This is more clear I think. I writing a program with combination of listing and labels. There is a parameter option for user to choose either producing listing or labels. The problem is page breaking. If listing, I want to have a page break at 55 lines. If labes then do not do page break. If I put 'no-formfeed' command at BEGIN-SETUP then listing will not do a page break. Without 'no-formfeed' command, labels will do page break after each label print. Here is an example: !------------------------------------------- BEGIN-SETUP page-size {numlines} 133 no-formfeed END-SETUP !------------------------------------------- BEGIN-PROCEDURE start-up input $option 'Enter LIST or LABEL ' evaluate $option when = 'LIST' #define numlines 55 do list_query break when = 'LABEL' #define numlines 6 do label_query break end-evaluate END-PROCEDURE !------------------------------------------- BEGIN-PROCEDURE list_query begin-select spriden_id &id ... from ... where ... print &id (+1,1) ... if (#current-line = 55) ! Do page break at 55 lines for listing. new-page ! Since 'no-formfeed' at BEGIN-SETUP, it won't end-if ! do form feed here ??? end-select END-PROCEDURE !------------------------------------------- BEGIN-PROCEDURE labe_query columns 1 35 69 103 begin-select spvadds_street_line1 &ad1 ... from ... where ... print &ad1 (+1,1) ! Do not do page break for labels. ... next-column end-select END-PROCEDURE Please show me how to control page break as above example. Thank you for your help. Ben. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Wed Feb 21 16:28:04 1996 Date: Wed, 21 Feb 1996 11:59:35 PST From: johnk@SUN4.MITI.COM Subject: Re: Page Break With SQR version 3, you can declare multiple report formats in the same SQR program and then use the input from the user to decide which output format to produce. It would even be possible to produce both output formats during the same data selection if the program is coded correctly. For example: begin-setup declare-layout labels paper-size=(8.5,2) ! values are in inches formfeed=no end-declare declare-layout list paper-size=(8.5,11) ! values are in inches end-declare declare-report labels layout=labels end-declare declare-report list layout=list end-declare end-setup begin-program input $option 'Enter LIST or LABEL ' evaluate $option when = 'LIST' use-report list do list_query when = 'LABEL' use-report labels do label_query end-evaluate ... end-program John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Page Break Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 21/02/96 10:07 AM Hi SQRers: I might confused you with my previous help message. This is more clear I think. I writing a program with combination of listing and labels. There is a parameter option for user to choose either producing listing or labels. The problem is page breaking. If listing, I want to have a page break at 55 lines. If labes then do not do page break. If I put 'no-formfeed' command at BEGIN-SETUP then listing will not do a page break. Without 'no-formfeed' command, labels will do page break after each label print. Here is an example: !------------------------------------------- BEGIN-SETUP page-size {numlines} 133 no-formfeed END-SETUP !------------------------------------------- BEGIN-PROCEDURE start-up input $option 'Enter LIST or LABEL ' evaluate $option when = 'LIST' #define numlines 55 do list_query break when = 'LABEL' #define numlines 6 do label_query break end-evaluate END-PROCEDURE !------------------------------------------- BEGIN-PROCEDURE list_query begin-select spriden_id &id ... from ... where ... print &id (+1,1) ... if (#current-line = 55) ! Do page break at 55 lines for listing. new-page ! Since 'no-formfeed' at BEGIN-SETUP, it won't end-if ! do form feed here ??? end-select END-PROCEDURE !------------------------------------------- BEGIN-PROCEDURE labe_query columns 1 35 69 103 begin-select spvadds_street_line1 &ad1 ... from ... where ... print &ad1 (+1,1) ! Do not do page break for labels. ... next-column end-select END-PROCEDURE Please show me how to control page break as above example. Thank you for your help. Ben. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Fri Feb 23 19:54:46 1996 Date: Fri, 23 Feb 1996 15:54:05 -0800 From: Benjamin Le Subject: Sorting Hi there I don't know if this is the right place to get help about this situation. How do you sort the last word in a field which has first name, middle(some none middle) and last name separated by space in the begin-select query: begin-procedure main begin-select shbdipl_name &diploma_name print &diploma_name (+1,1) from saturn.shbdipl where ... ORDER BY ??? end-select end-procedure SHBDIPL_NAME is student full name field. What I want is sort that field by the last word(last name). I'm really strugling with this. Your help is appreciated. Exp: Benjamin Le John B. Adams Smith J. Johnson How do you sort by Le, Adams and Johnson? Thanks. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Fri Feb 23 20:40:58 1996 Date: Fri, 23 Feb 1996 16:45:43 PST From: Andrew Zitelli Subject: Re: Sorting Benjamin Le wrote: > How do you sort the last word in a field which has first name, middle > (some none middle) and last name separated by space in the begin-select > query: > > begin-procedure main > begin-select > shbdipl_name &diploma_name > print &diploma_name (+1,1) > from saturn.shbdipl > where ... > ORDER BY ??? > end-select > end-procedure > > SHBDIPL_NAME is student full name field. What I want is sort that field by > the last word (last name). I'm really struggling with this. Your help is > appreciated. Example: > Benjamin Le > John B. Adams > Smith J. Johnson > How do you sort by Le, Adams and Johnson? In Oracle, the SQL syntax would be: select substr (name, (instr (name, ' ', -1) + 1)) last_name, name from x where name is not null order by last_name; I haven't tried to use anything like this in SQR. If you are unable to easily do this directly, SQR can easily create a database view based on this query, generate the desired listing, and then delete the view. The instr function will return the position of the last blank, or zero if there is none. This will fail for names like "Benjamin Le, Jr." where it will sort on the "Jr.". If you are using an underlying database, the appropriate structure for names is to break out first, middle and last names, as well as titles as separate fields. It is easier to concatenate them when needed than to automatically break them out into separate fields when needed. I hope this is useful. -- Andy Zitelli, Silicon Systems, Inc. From owner-sqr-users@USA.NET Mon Feb 26 09:08:23 1996 Date: Mon, 26 Feb 1996 08:14:52 -0400 From: "He who is satisfied....fails" Subject: Re: Sorting Ben, That is a difficult situation since last name may not be the last word in the field. Two suggestions for a full-proof method: 1. Join the NAME table which has last name as a separate field then sort OR 2. SUBSTR the name field into up to 4 fields (FIRST MIDDLE LAST EXT). I am assuming is the max. Then if your have only TWO not null field, the second one is the last name. If you have FOUR, the third field is the last name. If you have middle name as X., then the rest is easy. Therefore if you have THREE not null fields, check if middle exists. OK. Now you know which field is the last name. SQR "WRITE" this last name field to a file with other needed data (GPA....etc). SORT the file via VMS SORT or other operating system functions (CALL SYSTEM USING.....). The result will be a sorted listing of your table. READ the data from the file for further SQR processing. Good Luck Nick Moscaritolo Sr. Programmer/Analyst II Bentley College Waltham, MA 02154 From owner-sqr-users@USA.NET Mon Feb 26 09:50:33 1996 Date: Mon, 26 Feb 1996 08:58:26 EST From: Al Snodgrass Subject: Re: Sorting I think you would need to create an expression in the SQL that would attempt to separate out the last name. Even if you did not want to print it, once the expression exists you can sort on it. Locate the last space by and substring the column starting at the position after the space to the end of the column. Thanks, Al _________________________________ >From the desk of Al Snodgrass Internet: asnodgrass@banyan.com CompuServe: 74512,646 Voice: 508-836-2866 ------------- Original Text From: Benjamin Le , on 2/23/96 3:54 PM: To: "Multiple recipients of list SQR-USERS" Hi there I don't know if this is the right place to get help about this situation. How do you sort the last word in a field which has first name, middle(some none middle) and last name separated by space in the begin-select query: begin-procedure main begin-select shbdipl_name &diploma_name print &diploma_name (+1,1) from saturn.shbdipl where ... ORDER BY ??? end-select end-procedure SHBDIPL_NAME is student full name field. What I want is sort that field by the last word(last name). I'm really strugling with this. Your help is appreciated. Exp: Benjamin Le John B. Adams Smith J. Johnson How do you sort by Le, Adams and Johnson? Thanks. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Thu Feb 29 11:27:49 1996 Date: Thu, 29 Feb 1996 05:35:59 -0500 From: John Palmieri Subject: Dynamic Query Variables I am trying to use Dynamic Query Variables in the following way: Begin-Procedure main let $from_table='company' begin-select co_nbr from [$from_table] end-select End-Procedure main I receive the following message: (SQR 5528) Sybase DBSQLEXEC error in cursor 1: (156) Incorrect syntax near the keyword 'where'. SQL: select co_nbr from where 1 = 2 Error on line 76: (SQR 3716) Error in SQL statement. Errors were found in the program file. SQR: Program Aborting. Why doesen't this work? The column co_nbr is a column in the company table. I tried alot of variations like including the table name in the column expression company.co_nbr, using alaises in the from clause. but it still does not work. I followed the book line by line and I still cannot understand what is wrong. Any help would by appreicated. John Palmieri From owner-sqr-users@USA.NET Thu Feb 29 12:13:30 1996 Date: Thu, 29 Feb 1996 08:57:45 -0700 From: "Sean M. Shaw" Subject: Re: Dynamic Query Variables >Begin-Procedure main >let $from_table='company' >begin-select >co_nbr >from [$from_table] from [existing_table:$from_table] >end-select >End-Procedure main This works on Oracle, I'm not sure about sybase. Insert any existing table name where I put "existing_table". ************************************ * Sean M. Shaw * * Oracle Data Automation Manager * * The University of New Mexico * * Health Sciences Center Library * * Albuquerque, NM 87131-5686 * * Work: 505.277.6109 * * Fax: 505.277.5350 * * EMail: sshaw@biblio.unm.edu * ************************************ From owner-sqr-users@USA.NET Thu Feb 29 12:43:03 1996 Date: Thu, 29 Feb 1996 10:47:34 CST From: Melissa Santamaria Subject: Re: Dynamic Query Variables When you use dynamic tables, you must give it a "known" table to parse the statement with, but when you run it, it will use your dynamic table string. For instance, you would do: begin-select co_nbr from [another_table_name_that_has_co_nbr_column : $from_table] end-select So you must include a static table name with the column you need to query from the dynamic table. See this in the SQR Workbench manual under "dynamic variables -- with table names" (in my version, on page 2.35. Have fun. Melissa SantaMaria > > I am trying to use Dynamic Query Variables in the following way: > > Begin-Procedure main > > let $from_table='company' > > begin-select > > co_nbr > > from [$from_table] > > end-select > > End-Procedure main > > I receive the following message: > > (SQR 5528) Sybase DBSQLEXEC error in cursor 1: > (156) Incorrect syntax near the keyword 'where'. > > SQL: select co_nbr from where 1 = 2 > > Error on line 76: > (SQR 3716) Error in SQL statement. > > Errors were found in the program file. > > SQR: Program Aborting. > > Why doesen't this work? > > The column co_nbr is a column in the company table. > I tried alot of variations like including the table name in the column > expression company.co_nbr, using alaises in the from clause. but it still does > not work. > I followed the book line by line and I still cannot understand what is wrong. > > Any help would by appreicated. > > John Palmieri > From owner-sqr-users@USA.NET Fri Mar 1 13:23:52 1996 Date: Fri, 1 Mar 1996 08:56:21 PST From: johnk@SUN4.MITI.COM Subject: Re: Dynamic Query Variables Pre-V3 SQR does require a static table name on the left side of a dynamic table specification as other respondents have mentioned. After V3, the code you have here should work. John L. Kellogg MITI Tehnical Support Manager ______________________________ Reply Separator _________________________________ Subject: Dynamic Query Variables Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 01/03/96 5:39 AM I am trying to use Dynamic Query Variables in the following way: Begin-Procedure main let $from_table='company' begin-select co_nbr from [$from_table] end-select End-Procedure main I receive the following message: (SQR 5528) Sybase DBSQLEXEC error in cursor 1: (156) Incorrect syntax near the keyword 'where'. SQL: select co_nbr from where 1 = 2 Error on line 76: (SQR 3716) Error in SQL statement. Errors were found in the program file. SQR: Program Aborting. Why doesen't this work? The column co_nbr is a column in the company table. I tried alot of variations like including the table name in the column expression company.co_nbr, using alaises in the from clause. but it still does not work. I followed the book line by line and I still cannot understand what is wrong. Any help would by appreicated. John Palmieri From owner-sqr-users@USA.NET Thu Mar 7 22:47:28 1996 Date: Thu, 7 Mar 1996 18:56:31 -0800 From: Mara L Wells Subject: SQR and OPS$ Accounts I am having a problem with an item I found in the FAQ section of the SQR Users web site. Q: Are ORACLE OPS$ accounts supported in a connect string for SQR? A: Yes. After login as an OPS$ user, the SQR command is: sqr report /@t:machine:database What follows are the results of several tests I ran to determine how SQR and the OPS$ accounts were set up on the system I am using. Null inputs (i.e. tapping enter as a response) are annotated as . -------------------------------------------------------------------- TEST 1: :/home> sqlplus / SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:45:29 1996 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. Connected to: Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production SQL> exit Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production :/home> ------------------------------------------------------------------------ TEST 2: :/home> sqlplus /@t:corpdev1:new7 SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:46:47 1996 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. ERROR: ORA-01004: default username feature not supported; logon denied ORA-01988: remote os logon is not allowed Enter user-name: Connected to: Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production SQL> exit Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production :/home> ------------------------------------------------------------------------ TEST 3: :/home> sqlplus SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:47:59 1996 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. Enter user-name: 12345 Enter password: Connected to: Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production SQL> exit Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production :/home> ------------------------------------------------------------------------ TEST 4: :/home> sqr dropall.sqr / SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. (SQR 5528) ORACLE ORLON error -1004 in cursor 0: ORA-01004: default username feature not supported; logon denied (SQR 4701) Can't logon to the database. SQR: Program Aborting. :/home> ----------------------------------------------------------------------- TEST 5: :/home> sqr dropall.sqr /@t:corpdev1:new7 SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. (SQR 5528) ORACLE ORLON error -1004 in cursor 0: ORA-01004: default username feature not supported; logon denied (SQR 4701) Can't logon to the database. SQR: Program Aborting. :/home> ------------------------------------------------------------------------ TEST 6: :/home> sqr dropall.sqr Enter Username: Enter Password: SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. (SQR 5528) ORACLE ORLON error -1004 in cursor 0: ORA-01004: default username feature not supported; logon denied (SQR 4701) Can't logon to the database. SQR: Program Aborting. :/home> ----------------------------------------------------------------------- TEST 7: :/home> sqr dropall.sqr Enter Username: 12345 Enter Password: SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. SQR: End of Run. :/home> --------------------------- After trying these combinations of the suggested command line, I was still at a loss as to what the system was expecting. My question to the learned peoples who read this list is this. What can be done to get the OPS$ accounts work with SQR? Is it the SQR setup? Is it the Oracle database setup? Is it the UNIX setup? Or possibly a combination of all 3? Mara L. Wells Senior Consultant REALOGIC, Inc. From owner-sqr-users@USA.NET Fri Mar 8 09:58:42 1996 Date: Fri, 8 Mar 1996 08:57:50 EST From: "Gayle L. Masters" Subject: Re: SQR and OPS$ Accounts The remote login feature error message is a function of the ORACLE setup. There is a parameter that must be turned on in the init.ora file. The parameter is REMOTE_OS_AUTHENT=TRUE This will allow remote login using the /. ______________________________ Reply Separator _________________________________ Subject: SQR and OPS$ Accounts Author: SQR-USERS@USA.NET at MRA Date: 3/7/96 10:43 PM I am having a problem with an item I found in the FAQ section of the SQR Users web site. Q: Are ORACLE OPS$ accounts supported in a connect string for SQR? A: Yes. After login as an OPS$ user, the SQR command is: sqr report /@t:machine:database What follows are the results of several tests I ran to determine how SQR and the OPS$ accounts were set up on the system I am using. Null inputs (i.e. tapping enter as a response) are annotated as . -------------------------------------------------------------------- TEST 1: :/home> sqlplus / SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:45:29 1996 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. Connected to: Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production SQL> exit Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production :/home> ------------------------------------------------------------------------ TEST 2: :/home> sqlplus /@t:corpdev1:new7 SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:46:47 1996 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. ERROR: ORA-01004: default username feature not supported; logon denied ORA-01988: remote os logon is not allowed Enter user-name: Connected to: Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production SQL> exit Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production :/home> ------------------------------------------------------------------------ TEST 3: :/home> sqlplus SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:47:59 1996 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. Enter user-name: 12345 Enter password: Connected to: Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production SQL> exit Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production :/home> ------------------------------------------------------------------------ TEST 4: :/home> sqr dropall.sqr / SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. (SQR 5528) ORACLE ORLON error -1004 in cursor 0: ORA-01004: default username feature not supported; logon denied (SQR 4701) Can't logon to the database. SQR: Program Aborting. :/home> ----------------------------------------------------------------------- TEST 5: :/home> sqr dropall.sqr /@t:corpdev1:new7 SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. (SQR 5528) ORACLE ORLON error -1004 in cursor 0: ORA-01004: default username feature not supported; logon denied (SQR 4701) Can't logon to the database. SQR: Program Aborting. :/home> ------------------------------------------------------------------------ TEST 6: :/home> sqr dropall.sqr Enter Username: Enter Password: SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. (SQR 5528) ORACLE ORLON error -1004 in cursor 0: ORA-01004: default username feature not supported; logon denied (SQR 4701) Can't logon to the database. SQR: Program Aborting. :/home> ----------------------------------------------------------------------- TEST 7: :/home> sqr dropall.sqr Enter Username: 12345 Enter Password: SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. SQR: End of Run. :/home> --------------------------- After trying these combinations of the suggested command line, I was still at a loss as to what the system was expecting. My question to the learned peoples who read this list is this. What can be done to get the OPS$ accounts work with SQR? Is it the SQR setup? Is it the Oracle database setup? Is it the UNIX setup? Or possibly a combination of all 3? Mara L. Wells Senior Consultant REALOGIC, Inc. The following is an attached File item from cc:Mail. It contains information that had to be encoded to ensure successful transmission through various mail systems. To decode the file use the UUDECODE program. --------------------------------- Cut Here --------------------------------- begin 644 rfc822.txt M4F5C96EV960Z(&)Y(&-C;6%I;"!F"YN971C;VTN8V]M("AI M>#$P+FEX+FYE=&-O;2YC;VT@6S$Y.2XQ.#(N,3(P+C$P72D@8GD-"B`@("`@ M("`@("!M86EL+G5S82YN970@*#@N-BXQ,"\X+C8N,3`I('=I=&@@15--5%`@ M:60@5$%!,3$S,C<@9F]R#0H@("`@("`@("`@/%-14BU54T524T!54T$N;F5T M/CL@5&AU+"`W($UA"YN971C;VTN8V]M("@X+C8N,3,O4TU)+30N,2]. M971C;VTI(&ED(%-!03$Q-3@Y.R!4:'4L#0H@("`@("`@("`@-R!-87(@,3DY M-B`Q.#HU-CHS,2`M,#@P,`T*365S"YN971C;VTN8V]M/@T*1&%T93H@("`@("`@("!4 M:'4L(#<@36%R(#$Y.38@,3@Z-38Z,S$@+3`X,#`-"E)E<&QY+51O.B!345(M M55-%4E-`55-!+DY%5`T*4V5N9&5R.B`B1&ES8W5S. -------------------------------------------------------------------- TEST 1: :/home> sqlplus / SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:45:29 1996 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. Connected to: Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production SQL> exit Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production :/home> ------------------------------------------------------------------------ TEST 2: :/home> sqlplus /@t:corpdev1:new7 SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:46:47 1996 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. ERROR: ORA-01004: default username feature not supported; logon denied ORA-01988: remote os logon is not allowed Enter user-name: Connected to: Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production SQL> exit Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production :/home> ------------------------------------------------------------------------ TEST 3: :/home> sqlplus SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:47:59 1996 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. Enter user-name: 12345 Enter password: Connected to: Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production SQL> exit Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release With the distributed and parallel query options PL/SQL Release 2.1.4.3.0 - Production :/home> ------------------------------------------------------------------------ TEST 4: :/home> sqr dropall.sqr / SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. (SQR 5528) ORACLE ORLON error -1004 in cursor 0: ORA-01004: default username feature not supported; logon denied (SQR 4701) Can't logon to the database. SQR: Program Aborting. :/home> ----------------------------------------------------------------------- TEST 5: :/home> sqr dropall.sqr /@t:corpdev1:new7 SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. (SQR 5528) ORACLE ORLON error -1004 in cursor 0: ORA-01004: default username feature not supported; logon denied (SQR 4701) Can't logon to the database. SQR: Program Aborting. :/home> ------------------------------------------------------------------------ TEST 6: :/home> sqr dropall.sqr Enter Username: Enter Password: SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. (SQR 5528) ORACLE ORLON error -1004 in cursor 0: ORA-01004: default username feature not supported; logon denied (SQR 4701) Can't logon to the database. SQR: Program Aborting. :/home> ----------------------------------------------------------------------- TEST 7: :/home> sqr dropall.sqr Enter Username: 12345 Enter Password: SQR: Structured Query Report Writer V3.0.7 Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. SQR: End of Run. :/home> --------------------------- After trying these combinations of the suggested command line, I was still at a loss as to what the system was expecting. My question to the learned peoples who read this list is this. What can be done to get the OPS$ accounts work with SQR? Is it the SQR setup? Is it the Oracle database setup? Is it the UNIX setup? Or possibly a combination of all 3? Mara L. Wells Senior Consultant REALOGIC, Inc. From owner-sqr-users@USA.NET Fri Mar 8 13:39:09 1996 Date: Fri, 8 Mar 1996 11:23:40 -0600 From: johng@RMF41.USACE.ARMY.MIL Subject: Reply to SQR and OPS$ Accounts > I am having a problem with an item I found in the FAQ section of the > SQR Users web site. > > Q: Are ORACLE OPS$ accounts supported in a connect string for SQR? > A: Yes. After login as an OPS$ user, the SQR command is: > sqr report /@t:machine:database > > What follows are the results of several tests I ran to determine how > SQR and the OPS$ accounts were set up on the system I am using. Null > inputs (i.e. tapping enter as a response) are annotated as input>. > > -------------------------------------------------------------------- > > TEST 1: > > :/home> sqlplus / > > SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:45:29 1996 > > Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. > > Connected to: > Oracle7 Server Release 7.1.4.3.0 - Production Release > With the distributed and parallel query options > PL/SQL Release 2.1.4.3.0 - Production > *** above, you connected to a LOCAL data base as ops$, as expected > SQL> exit > Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release > With the distributed and parallel query options > PL/SQL Release 2.1.4.3.0 - Production > :/home> > > ------------------------------------------------------------------------ > > TEST 2: > > :/home> sqlplus /@t:corpdev1:new7 > > SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:46:47 1996 > > Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. > > ERROR: ORA-01004: default username feature not supported; logon denied > ORA-01988: remote os logon is not allowed > *** above, you failed to connect to a REMOTE data base as ops$, I believe due to the fact that REMOTE_OS_AUTHENT (sp?) was not enabled in that data base's init.ora file > Enter user-name: > > Connected to: > Oracle7 Server Release 7.1.4.3.0 - Production Release > With the distributed and parallel query options > PL/SQL Release 2.1.4.3.0 - Production > *** above was connection to LOCAL data base again, same as in test 1 above, since you provided no '@t:corpdev1:new7' sqlnet connect string, just null input > SQL> exit > Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release > With the distributed and parallel query options > PL/SQL Release 2.1.4.3.0 - Production > :/home> > > ------------------------------------------------------------------------ > > TEST 3: > > :/home> sqlplus > > SQL*Plus: Release 3.1.3.5.1 - Production on Thu Mar 7 14:47:59 1996 > > Copyright (c) Oracle Corporation 1979, 1994. All rights reserved. > > Enter user-name: 12345 > Enter password: > > Connected to: > Oracle7 Server Release 7.1.4.3.0 - Production Release > With the distributed and parallel query options > PL/SQL Release 2.1.4.3.0 - Production > *** above, you connected to a LOCAL data base as 12345 user, as expected > SQL> exit > Disconnected from Oracle7 Server Release 7.1.4.3.0 - Production Release > With the distributed and parallel query options > PL/SQL Release 2.1.4.3.0 - Production > :/home> > > ------------------------------------------------------------------------ > > TEST 4: > > :/home> sqr dropall.sqr / > SQR: Structured Query Report Writer V3.0.7 > Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. > > (SQR 5528) ORACLE ORLON error -1004 in cursor 0: > ORA-01004: default username feature not supported; logon denied > (SQR 4701) Can't logon to the database. > > SQR: Program Aborting. > :/home> > *** Above should have been a connection to a LOCAL data base as ops$ user. What you see though is a problem we experienced when upgrading to Oracle7 v7.1.4 from Oracle v6.0.33, and using SQR v2.5.7 as was delivered on the SQR install tape. For whatever reason, the sqr executable delivered required that REMOTE_OS_AUTHENT be enabled in the data base init.ora file, even for LOCAL ops$ connects. We finallly solved this by relinking the sqr executable which picked up new libraries from the new Oracle version we had installed (our and Oracle's opinion), after which we were able to do local ops$ sqr sessions without REMOTE_OS_AUTHENT being enabled on out local data base, which could have been a real security problem!!! > ----------------------------------------------------------------------- > > TEST 5: > > :/home> sqr dropall.sqr /@t:corpdev1:new7 > SQR: Structured Query Report Writer V3.0.7 > Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. > > (SQR 5528) ORACLE ORLON error -1004 in cursor 0: > ORA-01004: default username feature not supported; logon denied > (SQR 4701) Can't logon to the database. > *** Above is the same failure to log on to a REMOTE data base that was exhibited in the first part of test 2 above, where REMOTE_OS_AUTHENT is not enabled in the remote data base. > SQR: Program Aborting. > :/home> > > ------------------------------------------------------------------------ > > TEST 6: > > :/home> sqr dropall.sqr > Enter Username: > Enter Password: > > SQR: Structured Query Report Writer V3.0.7 > Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. > > (SQR 5528) ORACLE ORLON error -1004 in cursor 0: > ORA-01004: default username feature not supported; logon denied > (SQR 4701) Can't logon to the database. > *** above is same problem as in test 4, the bug in SQR requiring that REMOTE_OS_AUTHENT be enabled even for local ops$ logins. > SQR: Program Aborting. > :/home> > > ----------------------------------------------------------------------- > > TEST 7: > > :/home> sqr dropall.sqr > Enter Username: 12345 > Enter Password: > > SQR: Structured Query Report Writer V3.0.7 > Copyright (C) MITI, 1994, 1995. All Worldwide Rights Reserved. > *** above was not an ops$ login to a LOCAL data base, so every thing is cool... no OS authentication involved.. > SQR: End of Run. > :/home> > > --------------------------- > > After trying these combinations of the suggested command line, I was > still at a loss as to what the system was expecting. > > My question to the learned peoples who read this list is this. What > can be done to get the OPS$ accounts work with SQR? Is it the SQR > setup? Is it the Oracle database setup? Is it the UNIX setup? Or > possibly a combination of all 3? > > Mara L. Wells > Senior Consultant > REALOGIC, Inc. My suggestion, Mara, is to follow the instructions that came with your SQR install kit, and relink the sqr executable, making sure that your environment points to the correct Oracle home for the Oracle version you are targeting. This should correct SQR logins in tests 4 and 6. If you really want to use ops$ logins to remote data bases (t:corpdev1:new7) then on those data bases you would need to set REMOTE_OS_AUTHENT on in the init.ora file. (This was over a year ago, and I don't have my notes handy, so the name may be slightly different.) Be aware of the security hole this opens, as a user anywhere on the network (internet???) running sql net (asssuming they know your host name and data base name) can connect to your data base if there is an ops$ account set up for that same user name. Good luck, let me know if I can answer any questions. ------------------------------------------------------------------------ John Griffin (205) 890-2401 | A TTTTTTT SSSSS Advanced Technology Systems (ATS), Inc. | A A T S 4801 University Square, Suite 2 | AaaaA T SSSSS Huntsville, AL 35816-3431 | A A T S johng@rmf41.usace.army.mil | A A T SSSSS ------------------------------------------------------------------------ From owner-sqr-users@USA.NET Mon Mar 11 14:23:19 1996 Date: Mon, 11 Mar 1996 13:22:08 EST From: Benjamin GUINEBERTIERE <100604.544@COMPUSERVE.COM> Subject: time to delevelop a report How long is it to develop a report with SQR using SQLWindows? Is it between 2 and 5 days or between 2 and 5 hours ? What are the main differences between SQR and other tools such as - ReportWindows - Access - Crystal Report - Word - Excel ... Thank's in advance ****************************************************************** * Benjamin GUINEBERTIERE * * Paris, France e-mail: 100604.544@compuserve.com * ****************************************************************** From owner-sqr-users@USA.NET Mon Mar 11 18:37:14 1996 Date: Mon, 11 Mar 1996 17:51:54 -0500 From: Ray Ontko Subject: Re: time to delevelop a report > How long is it to develop a report with SQR using SQLWindows? > Is it between 2 and 5 days or between 2 and 5 hours ? Benjamin, If you know SQR, and you know the database and data that you're using, and you know the requirements/layout of the report to be developed, 2-5 hours is about right. Add extra for serious testing or documentation. As a consultant, I frequently run into situations where the client doesn't really have a good understanding of the underlying data or the real needs of the end users of the report. Under these circumstances, I use 2-5 days in my estimates. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB." rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Mar 12 09:38:00 1996 Date: Tue, 12 Mar 1996 08:27:00 -0500 From: John Douglas Subject: Re: time to delevelop a report Benjamin, Yesterday, I developed an SQR that reads three fields from an input file, moves values to five $variables and performs a SQL insert into one PeopleSoft table. I had it working (and de-bugged) in about five hours. I began with an existing SQR, the SQR user guide and no experience in creating an upload (SQU). I do have about six months experience creating reports with SQR for windows. I believe an experienced person can create simple reports in two to five hours. I have no experience on the other query tools you mentioned. The only thing I've heard is SQR runs faster than most others in an ORACLE environment. I don't think SQR is for the end-user...like crystal for instance. I know of one company that uses Access and intends to continue same. Hope this helps you. John Douglas Lockheed Martin Utility Services From owner-sqr-users@USA.NET Tue Mar 12 15:27:22 1996 Date: Tue, 12 Mar 1996 11:16:16 PST From: Marcie Hague Subject: WRAP Command I am trying to print two multiline text fields side by side on a report. I am using the statements: print &id (+1,40) print &desc (0,50) wrap 30 5 ON=<13> STRIP=<10> print &res (0,85) wrap 30 5 ON=<13> STRIP=<10> The first multiline field prints fine, but the next multiline field prints on the row where the first field ends. I want them to appear in columns, both sarting on the same row. I experimented a bit with fixed positioning, but was unable to get this to work. Here is my goal: ID Description Resolution -- ----------- ---------- 54321 This is a test This is a test to to demonstrate demonstrate how I how I would like would like the the description resolution text to text to be be displayed. displayed. This is what I am getting with the above mentioned statements: ID Description Resolution -- ----------- ---------- 54321 This is a test to demonstrate how I would like the description text to be displayed. This is a test to demonstrate how I would like the resolution text to be displayed. Is it possible for this to work using the wrap command? I have resolved a problem like this before by using 'unstring' and printing each line individually, but I think there must be a better way. Thank you, Marcie Hague MicroSim Corporation Irvine, CA From owner-sqr-users@USA.NET Tue Mar 12 16:24:28 1996 Date: Tue, 12 Mar 1996 14:39:25 -0600 From: Johnny Ravela Subject: Reply to WRAP Command > I am trying to print two multiline text fields side by side on a report. I am > using the statements: > > print &id (+1,40) > print &desc (0,50) wrap 30 5 ON=<13> STRIP=<10> > print &res (0,85) wrap 30 5 ON=<13> STRIP=<10> > Here is the fix to your problem. And anybody who wants to see a simple sqr program. ! !!!!!!!!!!!!!!!!!!! This is an SQR program ! !!!!!!!!!!!!!!!!!!! begin-report do 001-setup-stuff end-report begin-procedure 001-setup-stuff let $id = 'JOHNNY1234' let $desc = 'The first multiline field prints fine, but the next one may not print well.' let $res = 'Looks like the second multiline field prints fine as well.' print $id (+1,7) print $desc (,20) wrap 15 6 ON = <13> STRIP = <10> keep-top print $res (,50) wrap 15 6 ON = <13> STRIP = <10> keep-top ! keep-top retains the current line position except if a page break ! occurs, in which case line 1 is used as the current line. new-page ! gotta flush............ end-procedure ! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!! Here is the listing file (.lis) ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!! JOHNNY1234 The first Looks like the multiline field second prints fine, multiline field but the next prints fine as one may not well. print well. From owner-sqr-users@USA.NET Tue Mar 12 16:56:37 1996 Date: Tue, 12 Mar 1996 16:16:15 -0500 From: Ray Ontko Subject: Re: WRAP Command Try using the WRAP option KEEP-TOP. This will cause the current position to be on the line which began the wrapped portion. Ray > I am trying to print two multiline text fields side by side on a report. I am > using the statements: > > print &id (+1,40) > print &desc (0,50) wrap 30 5 ON=<13> STRIP=<10> > print &res (0,85) wrap 30 5 ON=<13> STRIP=<10> > > The first multiline field prints fine, but the next multiline field prints on > the row where the first field ends. I want them to appear in columns, both > sarting on the same row. I experimented a bit with fixed positioning, but > was unable to get this to work. > Here is my goal: > > > ID Description Resolution > -- ----------- ---------- > 54321 This is a test This is a test to > to demonstrate demonstrate how I > how I would like would like the > the description resolution text to > text to be be displayed. > displayed. > > This is what I am getting with the above mentioned statements: > > ID Description Resolution > -- ----------- ---------- > 54321 This is a test > to demonstrate > how I would like > the description > text to be > displayed. This is a test to > demonstrate how I > would like the > resolution text to > be displayed. > > Is it possible for this to work using the wrap command? I have resolved a > problem like this before by using 'unstring' and printing each line > individually, but I think there must be a better way. > > Thank you, > > Marcie Hague > MicroSim Corporation > Irvine, CA > ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB." rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Mar 12 16:58:21 1996 Date: Tue, 12 Mar 1996 16:10:48 -0400 From: DCHOLAGH@BENTLEY.EDU Subject: WRAP In order to retain the current line position use KEEP-TO option on the PRINT statement: PRINT &id (+1,1) PRINT &desc (0,50) WRAP 30 5 KEEP-TOP PRINT &res (0,85) WRAP 30 5 David Cholaghian Bentley College Waltham, MA From owner-sqr-users@USA.NET Tue Mar 12 18:30:22 1996 Date: Tue, 12 Mar 1996 16:31:08 -0600 From: johng@RMF41.USACE.ARMY.MIL Subject: Reply to WRAP Command > I am trying to print two multiline text fields side by side on a report. I am > using the statements: > > print &id (+1,40) > print &desc (0,50) wrap 30 5 ON=<13> STRIP=<10> > print &res (0,85) wrap 30 5 ON=<13> STRIP=<10> > > The first multiline field prints fine, but the next multiline field prints on > the row where the first field ends. I want them to appear in columns, both > sarting on the same row. I experimented a bit with fixed positioning, but > was unable to get this to work. > Here is my goal: > > > ID Description Resolution > -- ----------- ---------- > 54321 This is a test This is a test to > to demonstrate demonstrate how I > how I would like would like the > the description resolution text to > text to be be displayed. > displayed. > > This is what I am getting with the above mentioned statements: > > ID Description Resolution > -- ----------- ---------- > 54321 This is a test > to demonstrate > how I would like > the description > text to be > displayed. This is a test to > demonstrate how I > would like the > resolution text to > be displayed. > > Is it possible for this to work using the wrap command? I have resolved a > problem like this before by using 'unstring' and printing each line > individually, but I think there must be a better way. > > Thank you, > > Marcie Hague > MicroSim Corporation > Irvine, CA Everyone was right about the keep-top option of the wrap command, but you also need to have a mechanism to allow the next id value to print below the longest wrapped set of text. The NEXT-LISTING command allows this, keeping track of the lowest line already printed on the page, and postioning the current line number and absolute line number also below that. Since absolute line number is reset, you can actully print the &desc and &res columns using absolute line numbers without using keep-top. The need= option of next-listing will allow you to reserve some room to process the next item on a page, without unnecessary splitting across pages. Something like this print &id (1,40) ! absolute line allowed by using next-listing print &desc (1,50) wrap 30 5 ON=<13> STRIP=<10> print &res (1,85) wrap 30 5 ON=<13> STRIP=<10> next-listing skiplines=1 need=5 ! skip a line between id's ! ensure min of 5 lines for next id ------------------------------------------------------------------------ John Griffin (205) 890-2401 | A TTTTTTT SSSSS Advanced Technology Systems (ATS), Inc. | A A T S 4801 University Square, Suite 2 | AaaaA T SSSSS Huntsville, AL 35816-3431 | A A T S johng@rmf41.usace.army.mil | A A T SSSSS ------------------------------------------------------------------------ From owner-sqr-users@USA.NET Wed Mar 13 11:16:04 1996 Date: Wed, 13 Mar 1996 07:20:53 PST From: Marcie Hague Subject: Re: Reply to WRAP Command Thank you all very much! I was getting a bit frustrated when the 'keep-top' option that everyone recommended wouldn't work. After I added 'NEXT_LISTING', however, it worked fine! Thanks again everyone! Thank you John!! Marcie ______________________________ Reply Separator _________________________________ Subject: Reply to WRAP Command Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet-Mail Date: 3/12/96 5:37 PM > I am trying to print two multiline text fields side by side on a report. I am > using the statements: > > print &id (+1,40) > print &desc (0,50) wrap 30 5 ON=<13> STRIP=<10> > print &res (0,85) wrap 30 5 ON=<13> STRIP=<10> > > The first multiline field prints fine, but the next multiline field prints on > the row where the first field ends. I want them to appear in columns, both > sarting on the same row. I experimented a bit with fixed positioning, but > was unable to get this to work. > Here is my goal: > > > ID Description Resolution > -- ----------- ---------- > 54321 This is a test This is a test to > to demonstrate demonstrate how I > how I would like would like the > the description resolution text to > text to be be displayed. > displayed. > > This is what I am getting with the above mentioned statements: > > ID Description Resolution > -- ----------- ---------- > 54321 This is a test > to demonstrate > how I would like > the description > text to be > displayed. This is a test to > demonstrate how I > would like the > resolution text to > be displayed. > > Is it possible for this to work using the wrap command? I have resolved a > problem like this before by using 'unstring' and printing each line > individually, but I think there must be a better way. > > Thank you, > > Marcie Hague > MicroSim Corporation > Irvine, CA Everyone was right about the keep-top option of the wrap command, but you also need to have a mechanism to allow the next id value to print below the longest wrapped set of text. The NEXT-LISTING command allows this, keeping track of the lowest line already printed on the page, and postioning the current line number and absolute line number also below that. Since absolute line number is reset, you can actully print the &desc and &res columns using absolute line numbers without using keep-top. The need= option of next-listing will allow you to reserve some room to process the next item on a page, without unnecessary splitting across pages. Something like this print &id (1,40) ! absolute line allowed by using next-listing print &desc (1,50) wrap 30 5 ON=<13> STRIP=<10> print &res (1,85) wrap 30 5 ON=<13> STRIP=<10> next-listing skiplines=1 need=5 ! skip a line between id's ! ensure min of 5 lines for next id ------------------------------------------------------------------------ John Griffin (205) 890-2401 | A TTTTTTT SSSSS Advanced Technology Systems (ATS), Inc. | A A T S 4801 University Square, Suite 2 | AaaaA T SSSSS Huntsville, AL 35816-3431 | A A T S johng@rmf41.usace.army.mil | A A T SSSSS ------------------------------------------------------------------------ From owner-sqr-users@USA.NET Wed Mar 13 22:10:20 1996 Date: Wed, 13 Mar 1996 21:16:47 -0500 From: "Mara L. Wells" Subject: SQR Workbench -- [ From: Mara L. Wells * EMC.Ver #2.5.02 ] -- The client I am currently working for is considering acquiring SQR Workbench for the SQR report developers. Sometimes GUI front ends are more cumbersome than those that use the command line as the interface. How does workbench development compare with UNIX vi development? All comments welcome. Mara Wells Senior Consultant REALOGIC, Inc. From owner-sqr-users@USA.NET Thu Mar 14 07:20:17 1996 Date: Thu, 14 Mar 1996 12:33:57 +0100 From: Thierry Delhaye Subject: SQR output formats Hello, I would like to produce reports in HTML format, including simple tabular = formats=20 but also pie charts and other graphical objects. The data will be extracted from an Oracle7 database. I plan to use SQR to generate an ASCII output of my non-graphical = reports, then=20 include them in a HTML page. My question is: as SQR3 can produce graphics, is there a way to generate = them =20 in gif format (or any other format supported by a web browser) that I = can=20 include later in my HTML page ? Thanks in advance, Thierry DELHAYE BIM Engineering Europe td@bim.be From owner-sqr-users@USA.NET Thu Mar 14 09:28:59 1996 Date: Thu, 14 Mar 1996 08:20:00 -0500 From: james rader Subject: Re: SQR Workbench Mara, At INTELSAT our developers routinely develop SQR programs on our Windows boxes and then FTP them to the UNIX boxes for execution. Beyond the fact that this gives us such benefits of client server development as: - Use of cheap boxes to develop - Isolation of developing code from production - Ability of developers to tailor their environments to fit their own personnal quirks, etc the Workbench environment provides a nifty windowing paradigm for our work. We can see source, results, and errors all in a unified world. (I know UNIX people are used to a lot of this but in the restrictive Microsoft Windows 3.1 world this is great.) The flip side for on-UNIX development is, how do you explain cluttering up the process table and burning all those resources to your system administrator? On a PC, we don't care. The bottom line is that our gang always have a choice, vi or on-PC with ReportMate and they've crossed over heavily to ReportMate. N.B. Even for top programmers, ReportMate is great for generating quick-starts on development jobs. If you want to persue this further I am: Jim Rader Internet Email: james.rader@intelsat.int ------------- Original Text >From MLWELLS@SMTPGATE (Mara L. Wells) {mlwells%IX.NETCOM.COM.@intelsat1.intelsat.int}, on 13/3/96 9:16 PM: To: SQR-USER@SMTPGATE (Multiple recipients of list SQR-USERS) {SQR-USERS@USA.NET} -- [ From: Mara L. Wells * EMC.Ver #2.5.02 ] -- The client I am currently working for is considering acquiring SQR Workbench for the SQR report developers. Sometimes GUI front ends are more cumbersome than those that use the command line as the interface. How does workbench development compare with UNIX vi development? All comments welcome. Mara Wells Senior Consultant REALOGIC, Inc. From owner-sqr-users@USA.NET Thu Mar 14 13:02:01 1996 Date: Thu, 14 Mar 1996 11:59:08 -0500 From: Nathan Treadway Subject: Re: SQR Workbench > The client I am currently working for is considering acquiring SQR Workbench > for the SQR report developers. Sometimes GUI front ends are more cumbersome > than those that use the command line as the interface. How does workbench > development compare with UNIX vi development? We have been very pleased with the latest version of SQR for Windows (i.e. SQR ReportMate v3.5). It has an integrated editor, SPF file viewer, and output window. You can edit, run, and view the output quickly and easily from within one Windows application. The integrated editor knows about SQR, so it can highlight keywords, comments, etc. You can pass a full command line to the program when you execute it, so you don't loose any of the flexibility of the command line versions. The older version for SQR for Windows (v3.0) did not have an integrated editor and SPF viewer; it was not a good development environment. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Mon Mar 18 14:20:44 1996 Date: Mon, 18 Mar 1996 13:47:25 -0500 From: Adam Hoffman Subject: Re: Upper/Lower If you are using ORACLE you can use the initcap function. At 01:05 PM 3/18/96 EST, you wrote: >I've noticed there is an upper and a lower function in SQR. Is there a what is >sometimes called a 'proper' function that will capitalize just the first >character. > >Thanks! > > Adam Hoffman Consultant Still-Life With Systems Inc. RPI Phone: (518) 276-3095 RPI Email: hoffma@rpi.edu From owner-sqr-users@usa.net Mon Mar 18 14:40:11 1996 Date: Mon, 18 Mar 1996 13:05:40 EST From: Dawn Dennis <76105.3147@COMPUSERVE.COM> Subject: Upper/Lower I've noticed there is an upper and a lower function in SQR. Is there a what is sometimes called a 'proper' function that will capitalize just the first character. Thanks! From owner-sqr-users@USA.NET Mon Mar 18 15:35:05 1996 Date: Mon, 18 Mar 1996 14:22:45 -0800 From: Bruce Tobin Subject: Restarts? Does SQR offer any kind of built-in restart capability? If not, has anyone written any code to implement such a capability? Thanks. From owner-sqr-users@USA.NET Mon Mar 18 16:42:57 1996 Date: Mon, 18 Mar 1996 11:42:43 PST From: johnk@SUN4.MITI.COM Subject: Re[2]: Upper/Lower This can be done in SQR with the following command: let $str = upper(substr($str,1,1)) || substr($str,2,length($str) -1) This appeared in Volume 5, Number 3 of the MITI Forum newsletter. ______________________________ Reply Separator _________________________________ Subject: Re: Upper/Lower Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 18/03/96 11:33 AM If you are using ORACLE you can use the initcap function. At 01:05 PM 3/18/96 EST, you wrote: >I've noticed there is an upper and a lower function in SQR. Is there a what is >sometimes called a 'proper' function that will capitalize just the first >character. > >Thanks! > > Adam Hoffman Consultant Still-Life With Systems Inc. RPI Phone: (518) 276-3095 RPI Email: hoffma@rpi.edu From owner-sqr-users@USA.NET Mon Mar 18 17:05:31 1996 Date: Mon, 18 Mar 1996 16:35:46 -0500 From: Nathan Treadway Subject: Re: Upper/Lower > >I've noticed there is an upper and a lower function in SQR. Is there a what is > >sometimes called a 'proper' function that will capitalize just the first > >character. > > If you are using ORACLE you can use the initcap function. > Yes, if you are using Oracle you can use Oracle's Initcap function in your begin-select section. Unfortunately, there is no such a function within SQR itself -- if you have a $variable, you can't just say "let $variable_initcap = initcap($variable)". A workaround is to select from dual -- the code fragment -------------------------------------------------- let $test_lower = 'hello there everyone' begin-select initcap($test_lower) &test_initcap from dual end-select display &test_initcap ---------------------------------------------------- will produce the output "Hello There Everyone". Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Mar 20 21:03:12 1996 Date: Tue, 19 Mar 1996 23:34:57 +0000 From: Steve Subject: Re: Upper/Lower This method within SQR is better because, unless you can do the processing within a select statement in the first place, it's better to manipulate data within SQR than opening a database cursor just to carry out something like this. (It also shows the power of the SQR functions in string manipulations - even if it appears that you cannot do some of the things SQL can do, you can sort it out within SQR using the string functions - long-winded perhaps but it does the job very well in my experience.) Steve Nicholas -------------------------------------------------------------------- >This can be done in SQR with the following command: > > let $str = upper(substr($str,1,1)) || substr($str,2,length($str) -1) > >This appeared in Volume 5, Number 3 of the MITI Forum newsletter. > > >If you are using ORACLE you can use the initcap function. > >At 01:05 PM 3/18/96 EST, you wrote: >>I've noticed there is an upper and a lower function in SQR. Is there a what is >>sometimes called a 'proper' function that will capitalize just the first >>character. >> >>Thanks! >> >> > >Adam Hoffman >Consultant >Still-Life With Systems Inc. >RPI Phone: (518) 276-3095 >RPI Email: hoffma@rpi.edu From owner-sqr-users@USA.NET Wed Mar 20 22:29:43 1996 Date: Wed, 20 Mar 1996 21:41:50 -0500 From: Nathan Treadway Subject: Re: Upper/Lower > > This method within SQR is better because, unless you can do the > processing within a select statement in the first place, it's better to > manipulate data within SQR than opening a database cursor just to carry > out something like this. [...] > > >This can be done in SQR with the following command: > > > > let $str = upper(substr($str,1,1)) || substr($str,2,length($str) -1) One important point: this will uppercase the first character in the string, while using the Oracle "initcap" function uppercases the first character *of each word* in the string. Also, initcap will make all the other characters in the string lower case (e.g. "hELLO tHerE" becomes "Hello There"). This kind of processing isn't easy to do within SQR itself. Staying within SQR is definitly preferable, both in order to avoid opening a new cursor and so that the SQR program can be portable across databases. It would be nice if MITI added a "proper"/"initcap" function to the language for those situations when you want to capitalize all the words in a string (rather than just the first one), such as printing a $variable as a title of a report. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Fri Mar 22 00:18:23 1996 Date: Thu, 21 Mar 1996 23:20:33 -0500 From: "Matthew F. Reagan" Subject: Re: Upper/Lower >Staying within SQR is definitly preferable, both in order to avoid opening a >new cursor and so that the SQR program can be portable across databases. >It would be nice if MITI added a "proper"/"initcap" function to the >language for those situations when you want to capitalize all the words in >a string (rather than just the first one), such as printing a $variable as a >title of a report. Gee, Nathan, I smell an article. One of the really powerful capabilities of SQR is the ability to add user written functions. Write a function in C, add it to ufunc.c, compile it, relink the SQR executable, and voila, you have a new function that can be used in LET, WHILE, IF, etc. Just imagine: let $newstring = initcap($oldstring) This would be even better than Oracle's initcap function, in that SQR doesn't care if it is a LONG datatype or not. I haven't done this in years, and it was done in Vax C (not ANSI by a long shot) on a Vax under VMS 5.5, but the basic capability still exists on all platforms currently supported. Has anyone done something similar? Can we assemble enough people to do it here? The gauntlet has been thrown down... will someone accept the challenge? I will dredge my old 8" floppies for the notes, if someone will volunteer the C knowledge (of which I am sorely lacking). Matt... From owner-sqr-users@USA.NET Fri Mar 22 04:06:32 1996 Date: Fri, 22 Mar 1996 03:43:07 -0500 From: Wes Bailey Subject: Re: Upper/Lower I believe the Language Tutorial (not the Reference Manual) which accompanies SQR3.0 shows how to do what you have suggested with the initcap function as its example. Wes Bailey Consultant Ray Ontko & Co. ---------------------------------------------------------------------- Gee, Nathan, I smell an article. One of the really powerful capabilities of SQR is the ability to add user written functions. Write a function in C, add it to ufunc.c, compile it, relink the SQR executable, and voila, you have a new function that can be used in LET, WHILE, IF, etc. Just imagine: let $newstring = initcap($oldstring) This would be even better than Oracle's initcap function, in that SQR doesn't care if it is a LONG datatype or not. I haven't done this in years, and it was done in Vax C (not ANSI by a long shot) on a Vax under VMS 5.5, but the basic capability still exists on all platforms currently supported. Has anyone done something similar? Can we assemble enough people to do it here? The gauntlet has been thrown down... will someone accept the challenge? I will dredge my old 8" floppies for the notes, if someone will volunteer the C knowledge (of which I am sorely lacking). Matt... From owner-sqr-users@USA.NET Fri Mar 22 13:29:41 1996 Date: Fri, 22 Mar 1996 12:37:36 -0500 From: Nathan Treadway Subject: Re: Upper/Lower > Gee, Nathan, I smell an article. One of the really powerful > capabilities of SQR is the ability to add user written functions. > Write a function in C, add it to ufunc.c, compile it, relink the > SQR executable, and voila, you have a new function that can be used > in LET, WHILE, IF, etc. Just imagine: > > let $newstring = initcap($oldstring) > As Wes mentioned, the SQR Language Tutorial does give exactly this example in its section on ufuncs. However, relinking SQR is not always possible; it would be nice if fairly standard functions like initcap were avaible in the baseline language. Of course, having someone write a ufuncs to do various string processing would be a first step towards getting them included in the language. I can't relink SQR myself, but I am putting together a list of string functions I'd like to suggest for possible inclusion in SQR. Initcap is one, as is "unstring-into-an-array" for use when you don't know how many "pieces" you'll have after you use unstring. I'll plan to post my list to sqr-users when I get a chance to clean it up. If anyone has particular suggestions for string functions they've needed while programming in SQR, I'd be interested to hear. (Please send them directly to me since I'll be summarizing to the mailing list once I've collected the suggestions.) Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Mar 27 11:24:47 1996 Date: Wed, 27 Mar 1996 10:36:20 EST From: Scott Humphrey Subject: HPLASER type printing We've been using SQR V3.0.5 for some time now and the the ability to use laserjet and postscript printing is very useful. The major problem I am encountering now is that while my print jobs print fine on our HP Laserjet 4Si printers, the output is a mess on any laserjet lower than a 4Si. Page breaks occur at points where they shouldn't be and at time one line wil print per page. Does anyone know how to make these reports print on older laserjets since the vast majority of printers we have on site here are older models. I've tried all of the "-o raw" stuff but that has no effect. Thanks, Scott xsah1@sunyit.edu From owner-sqr-users@USA.NET Thu Mar 28 13:48:34 1996 Date: Thu, 28 Mar 1996 08:29:39 PST From: johnk@SUN4.MITI.COM Subject: Re: HPLASER type printing Scott, We have some cases in our database where output printed from a Unix host to an HPLaserjet printer splits over many pages. The -oraw option has worked in most situations. How much memory does your typical HPLasejet 3 printer have? I would recommend a minimum of 2MB, but 4MB would probably be better. If you would like to e-mail me a .lis file, I can try printing it here on my HPLJ3 off of a sun host. John L. Kellogg MITI Technical Support Manager send e-mail to: support@miti.com ______________________________ Reply Separator _________________________________ Subject: HPLASER type printing Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 27/03/96 10:35 AM We've been using SQR V3.0.5 for some time now and the the ability to use laserjet and postscript printing is very useful. The major problem I am encountering now is that while my print jobs print fine on our HP Laserjet 4Si printers, the output is a mess on any laserjet lower than a 4Si. Page breaks occur at points where they shouldn't be and at time one line wil print per page. Does anyone know how to make these reports print on older laserjets since the vast majority of printers we have on site here are older models. I've tried all of the "-o raw" stuff but that has no effect. Thanks, Scott xsah1@sunyit.edu From owner-sqr-users@USA.NET Sun Mar 31 21:15:23 1996 Date: Sun, 31 Mar 1996 17:16:52 PST From: Mark Johnson Subject: Re: SQR output formats Thierry, I don't believe there is a way to create GIF files from SQR, short of a screen capture. A solution that may work for you is to create SPF files and have the web users associate the SQR Viewer with their browser. An other solution would be to generate Postscript, and have it converted to Adobe's PDF format, so that it could be viewed by Acrobat. Mark >Hello, > >I would like to produce reports in HTML format, including simple tabular = >formats=20 >but also pie charts and other graphical objects. > >The data will be extracted from an Oracle7 database. > >I plan to use SQR to generate an ASCII output of my non-graphical = >reports, then=20 >include them in a HTML page. > >My question is: as SQR3 can produce graphics, is there a way to generate = >them =20 >in gif format (or any other format supported by a web browser) that I = >can=20 >include later in my HTML page ? > >Thanks in advance, > >Thierry DELHAYE >BIM Engineering Europe >td@bim.be > From owner-sqr-users@USA.NET Tue Apr 2 14:34:13 1996 Date: Tue, 2 Apr 1996 13:38:56 -0400 From: "He who is satisfied....fails" Subject: Problem with SQR procedure using MAX in select Question: What does this procedure return? After running this procedure, it returns NULL to the variable $max_seqno. I think it should return the character '0'. The WHERE brings back NO rows but the MAX function seems to put NULL in &col_max_seqno and in turn MOVES NULL to $max_seqno. Is this right ? BEGIN-PROCEDURE get_seqno move '0' to $max_seqno BEGIN-SELECT max(sarappd_seq_no) + 1 &col_max_seqno move &col_max_seqno to $max_seqno FROM saturn.sarappd WHERE sarappd_pidm = $pidm AND sarappd_term_code_entry = $term AND sarappd_appl_no = $appl_no END-SELECT END-PROCEDURE Please let me know ! NICK MOSCARITOLO Sr P/A II Bentley College From owner-sqr-users@USA.NET Tue Apr 2 14:52:13 1996 Date: Tue, 2 Apr 1996 12:06:29 -0700 From: "Sean M. Shaw" Subject: Re: Problem with SQR procedure using MAX in select >BEGIN-PROCEDURE get_seqno > move '0' to $max_seqno >BEGIN-SELECT >max(sarappd_seq_no) + 1 &col_max_seqno Oracle will always return a record when you use the min, max, avg, etc., functions, even if the where clause excludes all records. In this case, it will return a "null" value and a "null" + 1 is still null. One way to handle this is: nvl(max(sarappd_seq_no),0) + 1 &col_max_seqno Although a "sequence" would probably serve you better if it is just a "sequential" number that you are looking for. ************************************ * Sean M. Shaw * * Oracle Data Automation Manager * * The University of New Mexico * * Health Sciences Center Library * * Albuquerque, NM 87131-5686 * * Work: 505.277.6109 * * Fax: 505.277.5350 * * EMail: sshaw@biblio.unm.edu * ************************************ From owner-sqr-users@USA.NET Tue Apr 2 18:05:27 1996 Date: Tue, 2 Apr 1996 17:23:40 EST From: "Suresh P. Reddy" <74634.400@COMPUSERVE.COM> Subject: End of Communication Channel I was running a SQR report and encountered ORA-03113 END OF COMMUNICATION CHANNEL. Can somebody tell me how to solve this problem or what makes this happen. Thank you for your help. From owner-sqr-users@USA.NET Wed Apr 3 07:09:40 1996 Date: Wed, 3 Apr 1996 13:23:00 -0800 From: =D6rjan Nordlund Subject: Select Columns in Left Margin Does anyone know why you have to place column names at the left margin in SELECT paragraphs? The User's Guide explains that it is to differentiate column names and commands. Couldn't there be a more aesthetical solution? A structured program in SQR is because of this an oxymoron... Have I perhaps overlooked any "work around" of this matter? Orjan Nordlund National Council for Crime Prevention Sweden From owner-sqr-users@USA.NET Wed Apr 3 07:52:00 1996 Date: Wed, 3 Apr 1996 07:23:01 -0500 From: Ray Ontko Subject: Re: End of Communication Channel > I was running a SQR report and encountered ORA-03113 END OF COMMUNICATION > CHANNEL. Can somebody tell me how to solve this problem or what makes this > happen. Thank you for your help. I recall that this is either a problem with SQL*Net or, if you're running VMS, your BYTLM (or some other process parameter) is too small. One of the DBAs out there should be able to answer the question. Try asking on ORACLE-L or comp.databases.oracle. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB." rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Apr 3 09:43:01 1996 Date: Wed, 3 Apr 1996 06:52:41 CST From: Murthy Patamalla Subject: Re: End of Communication Channel I recall that this error is usually due to a failure on the SQL*net connection. Make sure that the SQL*net connection is working right and in some cases you need to bring SQL*net down and up again. This may solve your problem. Another aspect to look at is the size of the Rollback segments and the operation that is being performed. Good luck!!! Murthy ______________________________ Reply Separator _________________________________ Subject: End of Communication Channel Author: SQR-USERS@usa.net at INTERNET-HUB Date: 4/2/96 4:30 PM I was running a SQR report and encountered ORA-03113 END OF COMMUNICATION CHANNEL. Can somebody tell me how to solve this problem or what makes this happen. Thank you for your help. From owner-sqr-users@USA.NET Wed Apr 3 10:03:59 1996 Date: Wed, 3 Apr 1996 09:17:00 -0500 From: John Douglas Subject: Leap Year Problem? Greetings from southeastern Ohio. We are running SQRW V2.3.1 on Oracle7.0.15. We have an SQR that reports employee status changes, like transfers and promotions, between a user specified start date and end date. When the user answers the related start date and end date prompts with 01-FEB-96 and 29-FEB-96 respectively, the query returns about half of the records it should return. The user gets all records by running the query twice; first with the 01-FEB-96 start date and 28-FEB-96 end date; and then with a start date AND end date of 29-FEB-96. Does this have anything to do with leap year? Here is the code: FROM ps_personal_data p1, ps_job j2, ps_job j WHERE ((j1.effdt between $start_date and $end_date) or ((j1.action_dt between $start_date and $end_date) and (j1.effdt between $end_dt_minus_2yrs and $end_date))) AND j1.action = $transfer AND length(j1.deptid) = 6 AND length(j2.deptid) = 6 AND ((substr(j1.deptid,1,3) = $SlctLoc) or (substr(j2.deptid,1,3) = $SlctLoc)) AND j2.emplid = j1.emplid AND j2.effdt = (select MAX(j3.effdt) from ps_job j3 where j3.emplid = j2.emplid and j3.deptid <> j1.deptid and j3.effdt < j1.effdt) AND j2.effseq = (select MAX(j4.effseq) from ps_job j4 where j4.emplid = j2.emplid and j4.deptid = j2.deptid and j4.effdt = j2.effdt) AND p1.emplid = j1.emplid ORDER BY j1.effdt, j1.effseq desc, j1.emplid END-SELECT Any ideas? Thanks, John Douglas Lockheed Martin Utility Services Piketon, Ohio From owner-sqr-users@USA.NET Wed Apr 3 10:22:00 1996 Date: Wed, 3 Apr 1996 08:54:13 -0600 From: johng@RMF41.USACE.ARMY.MIL Subject: Reply to Select Columns in Left Margin > Does anyone know why you have to place column names at the left margin in > SELECT paragraphs? The User's Guide explains that it is to differentiate > column names and commands. Couldn't there be a more aesthetical solution? A > structured program in SQR is because of this an oxymoron... > > Have I perhaps overlooked any "work around" of this matter? > > Orjan Nordlund > National Council for Crime Prevention Sweden Only the first column name needs to be indented, if you are using only column names and &aliases, provided you use comma separators between the column/alias pairs, and there is no intermixed SQR code. Assuming you put all column specs first within the begin-select, followed by the sqr code, then there is only 1 "sore thumb" in your structured listing. IHMO, structured-listings don't mean structured programs, although they can help in reading one. They can also hide logic flaws... hence, lack of indentation within the begin-selects doesn't bother me. ------------------------------------------------------------------------ John Griffin (205) 890-2401 | A TTTTTTT SSSSS Advanced Technology Systems (ATS), Inc. | A A T S 4801 University Square, Suite 2 | AaaaA T SSSSS Huntsville, AL 35816-3431 | A A T S johng@rmf41.usace.army.mil | A A T SSSSS ------------------------------------------------------------------------ From owner-sqr-users@USA.NET Wed Apr 3 10:38:47 1996 Date: Wed, 3 Apr 1996 10:06:28 -0500 From: Gary Gallup - Sys Mgr/DBA Subject: SQR Upgrade I've had SQR running here for several years, first on a VAX, then on a Dec 5900 running Ulrix. My database is Oracle. When I moved from the VAX to the 5900, the license transfer was very reasonable. Now I'm moveing to a Digital Alpha 2100 on unix, and have found that the license transfer fee is huge. I would like to know if others with SQR have had similar experiences or if you are looking at any other products to replace SQR? Thanks. __________________________________________________________________ \ Gary Gallup Information Technology Services_/ | Systems+Database+Network Northwestern Michigan College _/ | gary@nmc.edu Traverse City, MI 49684 _____/ \_______________________________________________________/ From owner-sqr-users@USA.NET Wed Apr 3 12:09:00 1996 Date: Wed, 3 Apr 1996 10:41:31 EDT From: geetter@UHAVAX.HARTFORD.EDU Subject: REMOVING INSERT, DELETE, UPDATE FUNCTIONALITY I am a new SQR user and would like to know how, if possible, to prevent almost all SQR users from inserting, deleting or updating data via SQR. All users are assigned ORACLE table grants via ROLES and these roles do have grants to many tables that include INSERT, DELETE, and UPDATE. The grants are necessary to use ORACLE FORMS in our systems and use of the FORMS through a FORMS security interface controls our users in there ability to use the FORMS in query mode only or update mode. These underlying grants leave us vulnerable to uses being able to write SQR processes which could update, delete or add data to our database. On the other hand, we do want this funtionality for our development staff. Another question I have is, is there a way to allow only specific accounts to have access to SQR? Please answer direcdtly if you prefer to geetter@uhavax.hartford.edu . Any help would be most appreciated. Allan Geetter Data Security Administrator University of Hartford West Hartford, CT 06117 Voice (860) 768-4889 FAX (860) 768-4907 From owner-sqr-users@USA.NET Wed Apr 3 12:18:53 1996 Date: Wed, 3 Apr 1996 09:50:34 -0600 From: "Jeff T. Orwick [C]" Subject: Re: Select Columns in Left Margin No you haven't over looked anything its the way the parser works. You can however place more than one column on the same line if separated by a comma. I've been using SQR for 3 years now and WOULD NOT recommend this solution. The best way to deal with it esthetically that I've found is this. begin-procedure proc_name begin-select table.column1 &co1 table.column2 &co2 to_char(table.column3) &co3 print &co1 (+1,1,10) print &co2 (,+1,20) print &co3 (,+1,9) from table where ... end-select end-procedure I know it's not what you're hoping for, but, if you're consistent, your eye quickly learns to distinguish the pieces. -- Jeff T. Orwick orwickj@tusc.com <- Full time address http://www.tusc.com From owner-sqr-users@USA.NET Wed Apr 3 12:31:56 1996 Date: Wed, 3 Apr 1996 10:04:40 -0600 From: "Jeff T. Orwick [C]" Subject: Re: Leap Year Problem? Do you have this same problem for any other date ranges? And what's the date on the missing records if you specify the full range of dates. You may want to consider doing an explicit to_date on your end_date value to force the date to the last second of Feb-29 (i.e. to_date($end_date||' 23:59:59','DD-MON-RR HH24:MI:SS') ) If you don't specify the hours minutes seconds oracle converts it to 00:00:00 of that day. Remember oracle dates always store the time in the database. If the field you're checking was populated by SYSDATE it will have time in it and not be defaulted to 00:00:00. Because 29-FEB-96 00:00:00 occurs before 29-FEB-96 08:00:00 these records would NOT be returned. That said, I've also noticed that when using between and dates that or the same day on each side without specifying times seems to return everything that happend that day. Hope this helps you. Jeff Orwick TUSC On Apr 3, 9:17am, John Douglas wrote: > Subject: Leap Year Problem? > Greetings from southeastern Ohio. > > We are running SQRW V2.3.1 on Oracle7.0.15. > > We have an SQR that reports employee status changes, like transfers > and promotions, between a user specified start date and end date. > > When the user answers the related start date and end date prompts with > 01-FEB-96 and 29-FEB-96 respectively, the query returns about half of the > records it should return. The user gets all records by running the query twice; > first with the 01-FEB-96 start date and 28-FEB-96 end date; and then with a > start date AND end date of 29-FEB-96. Does this have anything to do with leap > year? > > Here is the code: > > FROM ps_personal_data p1, ps_job j2, ps_job j > WHERE ((j1.effdt between $start_date and $end_date) > or ((j1.action_dt between $start_date and $end_date) > and (j1.effdt between $end_dt_minus_2yrs and $end_date))) > AND j1.action = $transfer > AND length(j1.deptid) = 6 > AND length(j2.deptid) = 6 > AND ((substr(j1.deptid,1,3) = $SlctLoc) or > (substr(j2.deptid,1,3) = $SlctLoc)) > AND j2.emplid = j1.emplid > AND j2.effdt = (select MAX(j3.effdt) > from ps_job j3 > where j3.emplid = j2.emplid > and j3.deptid <> j1.deptid > and j3.effdt < j1.effdt) > AND j2.effseq = (select MAX(j4.effseq) > from ps_job j4 > where j4.emplid = j2.emplid > and j4.deptid = j2.deptid > and j4.effdt = j2.effdt) > AND p1.emplid = j1.emplid > ORDER BY j1.effdt, j1.effseq desc, j1.emplid > END-SELECT > > Any ideas? > > Thanks, > > John Douglas > Lockheed Martin Utility Services > Piketon, Ohio >-- End of excerpt from John Douglas -- Jeff T. Orwick orwickj@tusc.com <- Full time address http://www.tusc.com From owner-sqr-users@USA.NET Wed Apr 3 12:57:24 1996 Date: Wed, 3 Apr 1996 07:59:30 PST From: johnk@SUN4.MITI.COM Subject: Re: Leap Year Problem? Do you get the same problem when running the query in SQL*Plus? If so, it would be an Oracle problem. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Leap Year Problem? Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 03/04/96 7:25 AM Greetings from southeastern Ohio. We are running SQRW V2.3.1 on Oracle7.0.15. We have an SQR that reports employee status changes, like transfers and promotions, between a user specified start date and end date. When the user answers the related start date and end date prompts with 01-FEB-96 and 29-FEB-96 respectively, the query returns about half of the records it should return. The user gets all records by running the query twice; first with the 01-FEB-96 start date and 28-FEB-96 end date; and then with a start date AND end date of 29-FEB-96. Does this have anything to do with leap year? Here is the code: FROM ps_personal_data p1, ps_job j2, ps_job j WHERE ((j1.effdt between $start_date and $end_date) or ((j1.action_dt between $start_date and $end_date) and (j1.effdt between $end_dt_minus_2yrs and $end_date))) AND j1.action = $transfer AND length(j1.deptid) = 6 AND length(j2.deptid) = 6 AND ((substr(j1.deptid,1,3) = $SlctLoc) or (substr(j2.deptid,1,3) = $SlctLoc)) AND j2.emplid = j1.emplid AND j2.effdt = (select MAX(j3.effdt) from ps_job j3 where j3.emplid = j2.emplid and j3.deptid <> j1.deptid and j3.effdt < j1.effdt) AND j2.effseq = (select MAX(j4.effseq) from ps_job j4 where j4.emplid = j2.emplid and j4.deptid = j2.deptid and j4.effdt = j2.effdt) AND p1.emplid = j1.emplid ORDER BY j1.effdt, j1.effseq desc, j1.emplid END-SELECT Any ideas? Thanks, John Douglas Lockheed Martin Utility Services Piketon, Ohio From owner-sqr-users@USA.NET Wed Apr 3 13:01:42 1996 Date: Wed, 3 Apr 1996 11:14:19 -0600 From: "Jeff T. Orwick [C]" Subject: Re: REMOVING INSERT, DELETE, UPDATE FUNCTIONALITY RE: Your second question. Another question I have is, is there a way to allow only specific accounts to have access to SQR? If you're on unix only give access execute sqr to the unix groups you want to have those privelages. As for your first question your DBA may be able to restrict access based on the tool accessing the data-base. I seem to remember that ability at some level covered in an Oracle 6 DBA class. I don't think you could specifiy restrictions to update, delete, etc. at the table level, AND I don't know if that functionality extended to third party products or not. -- Jeff T. Orwick orwickj@tusc.com <- Full time address http://www.tusc.com From owner-sqr-users@USA.NET Wed Apr 3 13:25:49 1996 Date: Wed, 3 Apr 1996 12:50:57 -0500 From: Wes Bailey Subject: Re: Leap Year Problem? Due to the timestamp on the date in the database, all the dates on the 29th are being lost because the following example relation is true: j1.effdt $end_date 1996:04:04:08:00:00 > 1996:04:04:00:00:00 using the TRUNC function should eliminate your problem. Here is how the WHERE clause should be written: where ((trunc(j1.effdt) between to_date($start_date) and to_date($end_date))) or ((trunc(j1.action_dt) between to_date($start_date) and to_date($end_date))) or ((trunc(j1.effdt) between to_date($end_dt_minus_2yrs) and to_date($end_date))) ... Wes Bailey Consultant Ray Ontko & Co. ---------------------------------------------------------------------- > Subject: Leap Year Problem? > Greetings from southeastern Ohio. > > We are running SQRW V2.3.1 on Oracle7.0.15. > > We have an SQR that reports employee status changes, like transfers > and promotions, between a user specified start date and end date. > > When the user answers the related start date and end date prompts with > 01-FEB-96 and 29-FEB-96 respectively, the query returns about half of the > records it should return. The user gets all records by running the query twice; > first with the 01-FEB-96 start date and 28-FEB-96 end date; and then with a > start date AND end date of 29-FEB-96. Does this have anything to do with leap > year? > > Here is the code: > > FROM ps_personal_data p1, ps_job j2, ps_job j > WHERE ((j1.effdt between $start_date and $end_date) > or ((j1.action_dt between $start_date and $end_date) > and (j1.effdt between $end_dt_minus_2yrs and $end_date))) > AND j1.action = $transfer > AND length(j1.deptid) = 6 > AND length(j2.deptid) = 6 > AND ((substr(j1.deptid,1,3) = $SlctLoc) or > (substr(j2.deptid,1,3) = $SlctLoc)) > AND j2.emplid = j1.emplid > AND j2.effdt = (select MAX(j3.effdt) > from ps_job j3 > where j3.emplid = j2.emplid > and j3.deptid <> j1.deptid > and j3.effdt < j1.effdt) > AND j2.effseq = (select MAX(j4.effseq) > from ps_job j4 > where j4.emplid = j2.emplid > and j4.deptid = j2.deptid > and j4.effdt = j2.effdt) > AND p1.emplid = j1.emplid > ORDER BY j1.effdt, j1.effseq desc, j1.emplid > END-SELECT > > Any ideas? > > Thanks, > > John Douglas > Lockheed Martin Utility Services > Piketon, Ohio From owner-sqr-users@USA.NET Wed Apr 3 14:16:38 1996 Date: Wed, 3 Apr 1996 13:21:00 -0500 From: John Douglas Subject: Subscription procedure. Please send me the proper address and procedure a person needs to use to subscribe to SQR-USERS...I had this person send his subscribe request to SQR-USERS@USA.net He got a response that seems to indicate he is sending his request to the wrong address. Thanks, John Douglas. Lockheed Martin Utility Services DOUGLASJG@ORNL.GOV PS. Thanks for the feedback on the Leap Year problem. From owner-sqr-users@USA.NET Wed Apr 3 15:28:48 1996 Date: Wed, 3 Apr 1996 13:39:16 -0600 From: "Jeff T. Orwick [C]" Subject: Re: Leap Year Problem? DON'T USE TRUNC on dates. Any function on a column throws away any indexes that is available for use now or in the future. Instead use to_date on your variables to insure they cover the entire day in your range. On Apr 3, 12:50pm, Wes Bailey wrote: > Subject: Re: Leap Year Problem? > Due to the timestamp on the date in the database, all the dates on the > 29th are being lost because the following example relation is true: > > j1.effdt $end_date > 1996:04:04:08:00:00 > 1996:04:04:00:00:00 > > using the TRUNC function should eliminate your problem. Here is how > the WHERE clause should be written: > > where ((trunc(j1.effdt) between to_date($start_date) > and > to_date($end_date))) > or ((trunc(j1.action_dt) between to_date($start_date) > and > to_date($end_date))) > or ((trunc(j1.effdt) between to_date($end_dt_minus_2yrs) > and > to_date($end_date))) > ... > > Wes Bailey > Consultant > Ray Ontko & Co. > > ---------------------------------------------------------------------- > > Subject: Leap Year Problem? > > Greetings from southeastern Ohio. > > > > We are running SQRW V2.3.1 on Oracle7.0.15. > > > > We have an SQR that reports employee status changes, like transfers > > and promotions, between a user specified start date and end date. > > > > When the user answers the related start date and end date prompts with > > 01-FEB-96 and 29-FEB-96 respectively, the query returns about half of the > > records it should return. The user gets all records by running the query > twice; > > first with the 01-FEB-96 start date and 28-FEB-96 end date; and then with a > > start date AND end date of 29-FEB-96. Does this have anything to do with leap > > year? > > > > Here is the code: > > > > FROM ps_personal_data p1, ps_job j2, ps_job j > > WHERE ((j1.effdt between $start_date and $end_date) > > or ((j1.action_dt between $start_date and $end_date) > > and (j1.effdt between $end_dt_minus_2yrs and $end_date))) > > AND j1.action = $transfer > > AND length(j1.deptid) = 6 > > AND length(j2.deptid) = 6 > > AND ((substr(j1.deptid,1,3) = $SlctLoc) or > > (substr(j2.deptid,1,3) = $SlctLoc)) > > AND j2.emplid = j1.emplid > > AND j2.effdt = (select MAX(j3.effdt) > > from ps_job j3 > > where j3.emplid = j2.emplid > > and j3.deptid <> j1.deptid > > and j3.effdt < j1.effdt) > > AND j2.effseq = (select MAX(j4.effseq) > > from ps_job j4 > > where j4.emplid = j2.emplid > > and j4.deptid = j2.deptid > > and j4.effdt = j2.effdt) > > AND p1.emplid = j1.emplid > > ORDER BY j1.effdt, j1.effseq desc, j1.emplid > > END-SELECT > > > > Any ideas? > > > > Thanks, > > > > John Douglas > > Lockheed Martin Utility Services > > Piketon, Ohio >-- End of excerpt from Wes Bailey -- Jeff T. Orwick orwickj@tusc.com <- Full time address http://www.tusc.com From owner-sqr-users@USA.NET Wed Apr 3 18:12:01 1996 Date: Wed, 3 Apr 1996 13:51:04 PST From: johnk@SUN4.MITI.COM Subject: Re: Select Columns in Left Margin The need to differentiate column names from SQR command is indeed the main reason that column names are required to be placed at the left margin. The need arises from SQRs ability to allow commands to be embedded in select blocks. For example: begin-select column let #variable = #variable + &column print #variable (+1,1) from table end-select We are looking at an enhancement that would allow indentation of the begin-select block, thus re-defining the left margin for that select block only. The code could look like this: begin-procedure main1 do main2 end-procedure begin-procedure main2 begin-select column let #variable = #variable + &column from table end-select end-procedure John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Select Columns in Left Margin Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 03/04/96 5:24 AM Does anyone know why you have to place column names at the left margin in SELECT paragraphs? The User's Guide explains that it is to differentiate column names and commands. Couldn't there be a more aesthetical solution? A structured program in SQR is because of this an oxymoron... Have I perhaps overlooked any "work around" of this matter? Orjan Nordlund National Council for Crime Prevention Sweden From owner-sqr-users@USA.NET Thu Apr 4 01:08:53 1996 Date: Thu, 4 Apr 1996 00:28:40 -0500 From: Nathan Treadway Subject: Re: Leap Year Problem? >When the user answers the related start date and end date prompts with >01-FEB-96 and 29-FEB-96 respectively, the query returns about half of the >records it should return. The user gets all records by running the query twice; >first with the 01-FEB-96 start date and 28-FEB-96 end date; and then with a >start date AND end date of 29-FEB-96. Does this have anything to do with leap >year? > >Here is the code: > >FROM ps_personal_data p1, ps_job j2, ps_job j >WHERE ((j1.effdt between $start_date and $end_date) > or ((j1.action_dt between $start_date and $end_date) > and (j1.effdt between $end_dt_minus_2yrs and $end_date))) [...] The comments on the list about using an explicit to_date($end_date||'23:59:59'...) for date comparisions are true, but I don't think they completely explain the stated problem. There are three date ranges mentioned in the message: A 01-FEB-96 to 29-FEB-96 B1 01-FEB-96 to 28-FEB-96 B2 29-FEB-96 to 29-FEB-96 Without the explicit to_date calls, range A would return *at least as many* records as B1 and B2 together. This is because times between 28-FEB-96 00:00:01 and 28-FEB-96 23:59:59 would not be returned for either B1 or B2, but would be for A. All other records would be treated the same by A and (B1 and B2) (e.g. the records from 29-FEB-96 that are being skipped because of the missing to_date will be skipped in both cases). On the other hand, the message states that A is returning *fewer* records than B1 and B2 together. 1 WHERE ((j1.effdt between $start_date and $end_date) 2 or ((j1.action_dt between $start_date and $end_date) 3 and (j1.effdt between $end_dt_minus_2yrs and $end_date))) I can't say for sure without knowing what happens for other date ranges, but my guess is that the records missing from A but found in B2 have '29-FEB-96 00:00:00' in action_dt (i.e. have times already truncated) but some other value in effdt (probably 29-FEB-96 with some time value). If this is true, then line 1 would reject and line 2 would match all those records in both A and B2; the difference between the results would possibly due to the calculation of $end_dt_minus_2yrs for A. Mr. Douglas, perhaps you could let us know how this is calculated, as well as results you get from other pairs of date ranges. (Also, are all the records missing from A found in B2, or are there some also found in B1? Are there any records in B2 that *are* found in A?) If you've already solved the problem, what was causing it? Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Thu Apr 4 01:46:17 1996 Date: Thu, 4 Apr 1996 12:17:40 +0530 From: Deepak Sharma Subject: Re: End of Communication Channel I faced the same problem a few times. I got to know from someone that there is a patch available which solves it. Otherwise the only solution is to restart the SQL*Net listener. > > I was running a SQR report and encountered ORA-03113 END OF COMMUNICATION > CHANNEL. Can somebody tell me how to solve this problem or what makes this > happen. Thank you for your help. > BRgds, + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - Deepak Sharma +-----------------------------+ Tel : 0091118562585 Sr. Lead Analyst / ####### ## ## ## / 88-92 Tata Unisys Limited / ## ## ## ## / NEPZ / ## ## ## ## / Fax : 0091118562584 Noida / ## ## ## ## / INDIA / ## ######## ####### / +-----------------------------+ Tlx : 05905211TULNIN deepak@tulnepz.unisys.com + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - From owner-sqr-users@USA.NET Thu Apr 4 14:28:08 1996 Date: Thu, 4 Apr 1996 09:51:07 PST From: johnk@SUN4.MITI.COM Subject: Re: SQR Upgrade Here is a reply from MITI's Direct Sales Manager: "SQR license fees are based on multiple variables, not solely geared toward hardware platforms. MITI does attempt to gear the pricing as precisely as we can to specific computing environments. We welcome users to contact us at any time for information related to their unique configurations." "Regarding license transference, the MITI policy is to apply full credit for the existing license, thus allowing users to retain their full investment in SQR. This is not necessarily the standard practice in the industry, but we feel that this flexibility is a valuable benefit to our users who employ SQR as an enterprise reporting tool." Regards, John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: SQR Upgrade Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 03/04/96 8:59 AM I've had SQR running here for several years, first on a VAX, then on a Dec 5900 running Ulrix. My database is Oracle. When I moved from the VAX to the 5900, the license transfer was very reasonable. Now I'm moveing to a Digital Alpha 2100 on unix, and have found that the license transfer fee is huge. I would like to know if others with SQR have had similar experiences or if you are looking at any other products to replace SQR? Thanks. __________________________________________________________________ \ Gary Gallup Information Technology Services_/ | Systems+Database+Network Northwestern Michigan College _/ | gary@nmc.edu Traverse City, MI 49684 _____/ \_______________________________________________________/ From owner-sqr-users@USA.NET Fri Apr 5 10:58:18 1996 Date: Fri, 5 Apr 1996 10:00:21 -0500 From: Ray Ontko Subject: Re: SQR Upgrade John, I'm not sure how you value the existing license, but if your prices have gone up substantially since the original purchase (say 5 years ago), then the perceived cost is very high. I know of at least one other customer that was very frustrated on this count. They upgraded from a Vax to an alpha, and the cost to upgrade their SQR license would have been MORE than the cost of the machine, operating system, and Oracle license combined. Applying full credit for the existing license is great, but where does that leave your existing customers given your current pricing strategy? Ray > > Here is a reply from MITI's Direct Sales Manager: > > "SQR license fees are based on multiple variables, not solely > geared toward hardware platforms. MITI does attempt to gear the > pricing as precisely as we can to specific computing environments. We > welcome users to contact us at any time for information related to > their unique configurations." > > "Regarding license transference, the MITI policy is to apply full > credit for the existing license, thus allowing users to retain their > full investment in SQR. This is not necessarily the standard practice > in the industry, but we feel that this flexibility is a valuable > benefit to our users who employ SQR as an enterprise reporting tool." > > Regards, > > John L. Kellogg > MITI Technical Support Manager > > ______________________________ Reply Separator _________________________________ > Subject: SQR Upgrade > Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet > Date: 03/04/96 8:59 AM > > > I've had SQR running here for several years, first on a VAX, then on a Dec 5900 > running Ulrix. My database is Oracle. When I moved from the VAX to the 5900, the > license transfer was very reasonable. Now I'm moveing to a Digital Alpha 2100 on > unix, and have found that the license transfer fee is huge. I would like to know > if others with SQR have had > similar experiences or if you are looking at any other products to replace SQR? > Thanks. > > __________________________________________________________________ \ Gary Gallup > Information Technology Services_/ | Systems+Database+Network > Northwestern Michigan College _/ | gary@nmc.edu Traverse > City, MI 49684 _____/ \_______________________________________________________/ > ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB." rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Fri Apr 5 13:35:56 1996 Date: Fri, 5 Apr 1996 20:42:48 -0100 From: Edwin Kampshoff Subject: Printing .LIS files I am planning on using SQR 3.0.10 for Windows NT. This will be used for c= reating several reports during a night batch. The SQR programs are starte= d by a separate scheduler and will only produce a .LIS file. The printing= of these .LIS file will also be controlled by that scheduler. When testi= ng this, I found the following problem: I am using different type of TrueType fonts in my report. The printer I'm= using is a HP-Laserjet IV. Printing the .LIS file directly doesn't work = because the lettertypes are not recognised by the printer. Using a .SPF f= ile and printing through SQR Viewer works correctly, but cannot be schedu= led. Therefore using the command line option to print directly under Wind= ows is also not an option. What kind of solutions are there for printing .LIS file (or .SPF files) w= ith TrueType fonts via an external schedule program. Thanks, Edwin Kampshoff Info Support, The Netherlands From owner-sqr-users@USA.NET Fri Apr 5 14:58:59 1996 Date: Fri, 5 Apr 1996 09:28:58 PST From: jays@SUN4.MITI.COM Subject: Re: Select Columns in Left Margin I know this has been out in the listserv a while, but I'd like to offer additional information beyond what's already been said (in short, that this is the way it is, and that MITI might be fixing it in a future version, at least a little bit). Along with the 'inches only' problem often brought up by our international clients, the 'silly indentation rule' is something I hear about quite often. A not-too-difficult resolution is to create a simple SQR preprocessor which accepts SQR in a slightly different format and then reformats it into standard SQR. This would be utterly trivial to write, depending of course on exactly how you chose the preprocessor rules. If you did this, then you would _write_ SQR like this: begin-setup declare-layout abc paper-size=(~CM~21.6, ~CM~27.94) end-declare end-setup ! should be 8.5x11.0 if I remember my conversions right . . . begin-select +firstcol +secondcol add 1 to #cntr from tabname end-select . . . The preprocessor would look for that ~CM~ and the + at start of line inside begin-select/end-select paragraphs. These don't have to be the symbols used, (~CM~ and +). They are simply a suggestion. It could make the code more readable. To run, simply write a script or batch or command proc and have it run the preprocessor and then SQR. Easy, really! I find this solution quite appealing especially for companies that consult with SQR (or have their own customers for whom they use SQR). The preprocessor adds some convenience and makes the company look good to the customer (e.g. the preprocessor would mention the company's name at run time). Jay Sax Manager of Education, MITI ______________________________ Reply Separator _________________________________ Subject: Select Columns in Left Margin Author: SQR-USERS@usa.net at Internet Date: 4/3/96 5:24 AM Does anyone know why you have to place column names at the left margin in SELECT paragraphs? The User's Guide explains that it is to differentiate column names and commands. Couldn't there be a more aesthetical solution? A structured program in SQR is because of this an oxymoron... Have I perhaps overlooked any "work around" of this matter? Orjan Nordlund National Council for Crime Prevention Sweden From owner-sqr-users@USA.NET Fri Apr 5 19:26:02 1996 Date: Fri, 5 Apr 1996 15:10:53 PST From: gadiy@SUN4.MITI.COM Subject: Re: Printing .LIS files A possible solution is to generate a .SPF file. The scheduler can use SQRWP.EXE to print the SPF file by invoking the command SQRWP.EXE myfile.spf -printer:wp Gadi Yedwab MITI ______________________________ Reply Separator _________________________________ Subject: Printing .LIS files Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 4/5/96 11:25 AM I am planning on using SQR 3.0.10 for Windows NT. This will be used for c= reating several reports during a night batch. The SQR programs are starte= d by a separate scheduler and will only produce a .LIS file. The printing= of these .LIS file will also be controlled by that scheduler. When testi= ng this, I found the following problem: I am using different type of TrueType fonts in my report. The printer I'm= using is a HP-Laserjet IV. Printing the .LIS file directly doesn't work = because the lettertypes are not recognised by the printer. Using a .SPF f= ile and printing through SQR Viewer works correctly, but cannot be schedu= led. Therefore using the command line option to print directly under Wind= ows is also not an option. What kind of solutions are there for printing .LIS file (or .SPF files) w= ith TrueType fonts via an external schedule program. Thanks, Edwin Kampshoff Info Support, The Netherlands From owner-sqr-users@usa.net Mon Apr 8 13:12:26 1996 Date: Mon, 8 Apr 1996 12:20:53 EDT From: Jill Snider Parr <72604.3113@COMPUSERVE.COM> Subject: SCO & Oracle v6 Upgrade Hello all, I will be upgrading from Oracle V6.0.36 to V7.?.? on SCO Unix 3.2v4.2 soon. What is the recomended Oracle version to use with SQR v3.0.8 Workbench for SCO? Any help would be greatly appreciated. Thanks, Jill Parr From owner-sqr-users@USA.NET Mon Apr 8 16:20:02 1996 Date: Mon, 8 Apr 1996 12:05:56 PST From: johnk@SUN4.MITI.COM Subject: Re: SCO & Oracle v6 Upgrade We don't recommend using any specific Oracle version. The executables we provide with SQR 3.0.8 for SCO Unix were linked with Oracle version 7.1.3 because that is what was available at the time. Using the most current Oracle release available would be the best idea. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: SCO & Oracle v6 Upgrade Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 08/04/96 10:46 AM Hello all, I will be upgrading from Oracle V6.0.36 to V7.?.? on SCO Unix 3.2v4.2 soon. What is the recomended Oracle version to use with SQR v3.0.8 Workbench for SCO? Any help would be greatly appreciated. Thanks, Jill Parr From owner-sqr-users@USA.NET Tue Apr 9 11:16:28 1996 Date: Tue, 9 Apr 1996 11:49:00 EST From: Lori Reed Subject: STOP IN VERSION 3 With SQR version 3 we have encountered a problem using the command STOP. Seems that STOP fails to return to the host operating system the value previously set with the reserved word #return-status. We use the following procedure when a sql-error is encounterd which caused the program to abort thus notifying the host operating system with a fatal error message. With our VMS operating system this is helpful when running SQR thru a command procedure : $ SET ON $ ON ERROR GOTO ERROR_RTN Failure to return error-status to the host operating system does not cause the jump to the ERROR_RTN routine in the command procedure. When a command procedure has more than one process/program to run, this causes a bigger problem because the job should abort but goes on to the next process. We are writing around some of this but wondered why this "abrupt" stop command would be changed so. It seems that the stop command is interpreting the successful completion of the sqr program and returning good status to the host operating system regardless of setting of the reseved word #return-status. The stop in the following procedure overrides the #return-status = 1076. The message is still displayed (printed in program .log file but any indication to our operators is not present) BEGIN-PROCEDURE ERROR-HANDLER let #return-status = 1076 Display 'Program had completed abnormally - Error below' Display $sql-error stop END-PROCEDURE We have also noticed that in previous versions of SQR the default oracle error routine would return to the host operating system the contents of #return-status. It seems that if no ON-ERROR is declared in SQR programs the default routine returns the oracle error but returns good status to the operating system. Has anyone else had any encounters with this ? ********************************************************************************** Lori Reed phone: (315)341-3513 Senior Programmer/Analyst email: reed@soswvb.oswego.edu Administrative Computer Center fax: (315)341-5799 102 Culkin Hall State University of New York at Oswego Oswego NY, 13126 ********************************************************************************** From owner-sqr-users@USA.NET Tue Apr 9 14:20:31 1996 Date: Tue, 9 Apr 1996 09:13:59 PST From: johnk@SUN4.MITI.COM Subject: Printing double sided reports Does anyone have experience printing double sided reports to either an IBM 3160 or Xerox 4250 printer? Can you switch from single sided to double sided in the middle of a report? Any code sample would be helpful. John L. Kellogg MITI Technical Support Manager support@miti.com From owner-sqr-users@USA.NET Tue Apr 9 14:23:15 1996 Date: Tue, 9 Apr 1996 10:44:12 PST From: johnk@SUN4.MITI.COM Subject: Re: Printing .LIS files Using -printer:wp when running SQRW or SQRWP will give you the same results as bringing the SPF file up in the Viewer and printing from there. Why is this not an option? John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Printing .LIS files Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 05/04/96 11:25 AM I am planning on using SQR 3.0.10 for Windows NT. This will be used for c= reating several reports during a night batch. The SQR programs are starte= d by a separate scheduler and will only produce a .LIS file. The printing= of these .LIS file will also be controlled by that scheduler. When testi= ng this, I found the following problem: I am using different type of TrueType fonts in my report. The printer I'm= using is a HP-Laserjet IV. Printing the .LIS file directly doesn't work = because the lettertypes are not recognised by the printer. Using a .SPF f= ile and printing through SQR Viewer works correctly, but cannot be schedu= led. Therefore using the command line option to print directly under Wind= ows is also not an option. What kind of solutions are there for printing .LIS file (or .SPF files) w= ith TrueType fonts via an external schedule program. Thanks, Edwin Kampshoff Info Support, The Netherlands From owner-sqr-users@USA.NET Tue Apr 9 14:43:00 1996 Date: Tue, 9 Apr 1996 09:39:10 PST From: johnk@SUN4.MITI.COM Subject: Re: STOP IN VERSION 3 I tested this here with version 3.0.12.2 for VAX/VMS. I ran the following program: begin-report move 1076 to #return-status stop end-report I then did: 'show sym $status', and got back: $STATUS == "%X00000434" Hex 434 is equal to decimal 1076. What version of SQR are you running and what platform and OS are you on (VAX, Alpha, VMS or OpenVMS)? We did have a bug in earlier versions of SQR 3 where the value returned to the OS was 1 instead of 0x2652 when a compilation error occurred. Since the program had not even started executing, the problem was not after doing a STOP command. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: STOP IN VERSION 3 Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 09/04/96 8:24 AM With SQR version 3 we have encountered a problem using the command STOP. Seems that STOP fails to return to the host operating system the value previously set with the reserved word #return-status. We use the following procedure when a sql-error is encounterd which caused the program to abort thus notifying the host operating system with a fatal error message. With our VMS operating system this is helpful when running SQR thru a command procedure : $ SET ON $ ON ERROR GOTO ERROR_RTN Failure to return error-status to the host operating system does not cause the jump to the ERROR_RTN routine in the command procedure. When a command procedure has more than one process/program to run, this causes a bigger problem because the job should abort but goes on to the next process. We are writing around some of this but wondered why this "abrupt" stop command would be changed so. It seems that the stop command is interpreting the successful completion of the sqr program and returning good status to the host operating system regardless of setting of the reseved word #return-status. The stop in the following procedure overrides the #return-status = 1076. The message is still displayed (printed in program .log file but any indication to our operators is not present) BEGIN-PROCEDURE ERROR-HANDLER let #return-status = 1076 Display 'Program had completed abnormally - Error below' Display $sql-error stop END-PROCEDURE We have also noticed that in previous versions of SQR the default oracle error routine would return to the host operating system the contents of #return-status. It seems that if no ON-ERROR is declared in SQR programs the default routine returns the oracle error but returns good status to the operating system. Has anyone else had any encounters with this ? ******************************************************************************* * ** Lori Reed phone: (315)341-3513 Senior Programmer/Analyst email: reed@soswvb.oswego.edu Administrative Computer Center fax: (315)341-5799 102 Culkin Hall State University of New York at Oswego Oswego NY, 13126 ******************************************************************************* * ** From owner-sqr-users@usa.net Thu Apr 11 15:46:42 1996 Date: Thu, 11 Apr 1996 10:59:14 -0700 From: Benjamin Le Subject: Fwd: Role security using SQR Just forwarding a message from a user of SQR ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ ---- Included Message ---- Received: 04-11-96 01:50 Sent: 04-11-96 16:57 From: ORUNIX:owner-boracle@sctcorp.com To: boracle@sctcorp.com Subject: Role security using SQR Reply-To: ORUNIX:owner-boracle@sctcorp.com Return-Path: Reply-To: boracle@sctcorp.com Sender: owner-boracle@sctcorp.com Precedence: bulk Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailer: ELM [version 2.4 PL25] X-Listprocessor-Version: 7.2 -- ListProcessor by CREN Hi all, We are in the process of upgrading to Banner 2.0, and I have decided to implement role based security. All the users will have a default role of CONNECT only, and when they log into Banner thru GUAINIT, the SET ROLE command will be run, which will give the user full object access. This role is password protected. Now, I have used a packaged procedure to get the role password which is then passed back to the form, which then does the SET ROLE. This works great - everything is nicely hidden. However, my big problem is SQR and ESQR. Even if I compile the SQR program, the SQT is still reasonably readable, especially the commands in the begin-sql and end-sql block. Within ESQR, a knowledgable user could 'edit' or 'view' that sqt file, pick up the appropriate code piece, then create their own SQR program (still within ESQR) with the code in it, and then run that SQR, which will set the role for them so that they have full database access. I have been unable to think of any real solution to this problem, other than the possibility of removing SQR itself (only leaving SQRT and ESQR), but that is not acceptable to our User Support group. Has anyone considered this problem at all? Even if you are already using 2.1.5 and have SQR, I would appreciate any help or solutions that you have. I do not have 2.1.5 here yet, so if there is something in 2.1.5 that will help, please tell me about it. Thanks in advance Karen --------------------------------------------------- Karen Payten Database Administrator Computing and Communication Services University of New England, Armidale NSW AUSTRALIA Email: karen@metz.une.edu.au Phone: +61 67 733549 --------------------------------------------------- From owner-sqr-users@USA.NET Fri Apr 12 01:47:02 1996 Date: Thu, 11 Apr 1996 23:36:53 -0700 From: Sean Carroll Subject: Formatting Problem with text files I am writing a SQR which writes records to be used in a Microsoft Word mail-merge. The SQR filename is 'report.sqr', so it creates a text file called 'report.lis'. I wish to verify and reuse the data in report.lis, so I open the .lis file and write to another text file. When I write to this file, I get a blank line between every line of data. sample code: open {outputfile} as 1 for-reading record=1200:vary #status open {mergedata} as 2 for-writing record=1200:vary #status let $Line = ' ' while 1=1 read 1 into $Line:1200 if #end-file = 1 break end-if if rtrim($Line, ' ') != '' ! if line is not blank write 2 from $Line end-if end-while close 1 close 2 notes: {outputfile} is a substitution variable for report.lis {mergedata} is a substitution variable for the mailmerge data file Does anyone know how to write text records to a file without adding a blank line? Sean Carroll PeopleSoft Australia From owner-sqr-users@USA.NET Fri Apr 12 03:25:19 1996 Date: Fri, 12 Apr 1996 00:45:00 -0700 From: Sean Carroll Subject: Formatting Problem with text files I am writing a SQR which writes records to be used in a Microsoft Word mail-merge. The SQR filename is 'report.sqr', so it creates a text file called 'report.lis'. I wish to verify and reuse the data in report.lis, so I open the .lis file and write to another text file. When I write to this file, I get a blank line between every line of data. sample code: open {outputfile} as 1 for-reading record=1200:vary #status open {mergedata} as 2 for-writing record=1200:vary #status let $Line = ' ' while 1=1 read 1 into $Line:1200 if #end-file = 1 break end-if if rtrim($Line, ' ') != '' ! if line is not blank write 2 from $Line end-if end-while close 1 close 2 notes: {outputfile} is a substitution variable for report.lis {mergedata} is a substitution variable for the mailmerge data file Does anyone know how to write text records to a file without adding a blank line? Sean Carroll PeopleSoft Australia From owner-sqr-users@USA.NET Fri Apr 12 11:24:53 1996 Date: Fri, 12 Apr 1996 08:19:17 -0400 From: John Palmieri Subject: Using Stored Procedures within SQR with temp_tables. I have a question about using stored procs within SQR with temp_tables. Here is my problem. I have one stored proc that manipulates several temp_ tables. When the stored proc finishes I have 2 temp tables. I then want to step through the first temp_table and while I am stepping through that table I want to call a SQR procedure that will then step through the second table. I have a one to many relationship between the two tables. in code it looks something like this.. begin-sql -C1 create table ##table1 create table ##table2 end-sql execute -C1 @#rc = my_proc I then want to enter a begin-select statment begin-select -C1 company &company do process_table2 from ##table1 end-select Begin-Procedure begin-select -C1 more_data &more_data from ##table2 where company=&company end-select End-Procedure what happens is I get an error message back saying that: requested -C database connection is already active. I understand what the problem is, I am trying to enter two begin-selects with the same connection number (C1). I would like to know if there is a way I can make this work ! I tried creating the two tables with different connections, but there is know way to tell the stored proc that I want to use two connections. So the stored proc call bombs out saying that it can't find one of the tables. I am running SQR 3.0.8 under SYBASE. 10.0.2. Any help would be greatly appreciated. Thanks, John Palmieri From owner-sqr-users@USA.NET Fri Apr 12 11:51:07 1996 Date: Fri, 12 Apr 1996 11:08:31 -0500 From: "Jeff T. Orwick [C]" Subject: Re: Formatting Problem with text files I'll bet that the text you're reading from the .lis file contains a ctrl-M (return character) and that combined with the return generated when write to the file create the blank lines. Try this: encode '<10>' into $return inside loop: Let $Line = translate($Line,$return,'') If $Line does contain a return this should remove it. On Apr 11, 11:36pm, Sean Carroll wrote: > Subject: Formatting Problem with text files > I am writing a SQR which writes records to be used in a Microsoft Word > mail-merge. > > The SQR filename is 'report.sqr', so it creates a text file called > 'report.lis'. I wish to verify and reuse the data in report.lis, so I open the > .lis file and write to another text file. > > When I write to this file, I get a blank line between every line of data. > > sample code: > > open {outputfile} as 1 for-reading record=1200:vary #status > open {mergedata} as 2 for-writing record=1200:vary #status > > let $Line = ' ' > while 1=1 > read 1 into $Line:1200 > if #end-file = 1 > break > end-if > if rtrim($Line, ' ') != '' ! if line is not blank > write 2 from $Line > end-if > end-while > > close 1 > close 2 > > > notes: > > {outputfile} is a substitution variable for report.lis > {mergedata} is a substitution variable for the mailmerge data file > > Does anyone know how to write text records to a file without adding a blank > line? > > Sean Carroll > PeopleSoft Australia >-- End of excerpt from Sean Carroll -- Jeff T. Orwick orwickj@tusc.com <- Full time address http://www.tusc.com From owner-sqr-users@USA.NET Fri Apr 12 13:50:38 1996 Date: Fri, 12 Apr 1996 09:55:45 PST From: johnk@SUN4.MITI.COM Subject: Re: Fwd: Role security using SQR Can you set the environment variable ESQRUSESQR to NO so that Easy SQR users do not have permission to run SQR programs? In addition can you not define ESQREDITOR so that they are not allowed to use the editor in Easy SQR to see the SQT files? John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Fwd: Role security using SQR Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 11/04/96 3:23 PM Just forwarding a message from a user of SQR ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ ---- Included Message ---- Received: 04-11-96 01:50 Sent: 04-11-96 16:57 From: ORUNIX:owner-boracle@sctcorp.com To: boracle@sctcorp.com Subject: Role security using SQR Reply-To: ORUNIX:owner-boracle@sctcorp.com Return-Path: Reply-To: boracle@sctcorp.com Sender: owner-boracle@sctcorp.com Precedence: bulk Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailer: ELM [version 2.4 PL25] X-Listprocessor-Version: 7.2 -- ListProcessor by CREN Hi all, We are in the process of upgrading to Banner 2.0, and I have decided to implement role based security. All the users will have a default role of CONNECT only, and when they log into Banner thru GUAINIT, the SET ROLE command will be run, which will give the user full object access. This role is password protected. Now, I have used a packaged procedure to get the role password which is then passed back to the form, which then does the SET ROLE. This works great - everything is nicely hidden. However, my big problem is SQR and ESQR. Even if I compile the SQR program, the SQT is still reasonably readable, especially the commands in the begin-sql and end-sql block. Within ESQR, a knowledgable user could 'edit' or 'view' that sqt file, pick up the appropriate code piece, then create their own SQR program (still within ESQR) with the code in it, and then run that SQR, which will set the role for them so that they have full database access. I have been unable to think of any real solution to this problem, other than the possibility of removing SQR itself (only leaving SQRT and ESQR), but that is not acceptable to our User Support group. Has anyone considered this problem at all? Even if you are already using 2.1.5 and have SQR, I would appreciate any help or solutions that you have. I do not have 2.1.5 here yet, so if there is something in 2.1.5 that will help, please tell me about it. Thanks in advance Karen --------------------------------------------------- Karen Payten Database Administrator Computing and Communication Services University of New England, Armidale NSW AUSTRALIA Email: karen@metz.une.edu.au Phone: +61 67 733549 --------------------------------------------------- From owner-sqr-users@USA.NET Fri Apr 12 15:21:12 1996 Date: Fri, 12 Apr 1996 11:35:45 PST From: johnk@SUN4.MITI.COM Subject: Re: Using Stored Procedures within SQR with temp_tables. Since you have two temporary tables that are accessed by the same stored procedure, you are forced to create the temp tables under the same connection (-C1). However, a nested select statement is not allowed to use the same connection number as a parent query which is why you get the error. I would recommend creating only one temp table that manages to join the data from the original two tables and thus allows the nested query to be eliminated or allows both queries to access the same table. For example, if the temp tables originally looked like this: Table1 Table2 ------ ------ col1 col1 col2 col3 col4 Create the one table as: Table1 ------ col1 col2 col3 col4 Since there was a one to many relationship when having two tables, the data might have looked like this: Table 1 Table2 ------- ------ 1 2 1 3 4 1 3 5 2 2 2 3 4 2 3 5 2 3 6 The data would now look like this: Table1 ------ 1 2 3 4 1 2 3 5 2 2 3 4 2 2 3 5 2 2 3 6 Regards, John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Using Stored Procedures within SQR with temp_tables. Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 12/04/96 10:26 AM I have a question about using stored procs within SQR with temp_tables. Here is my problem. I have one stored proc that manipulates several temp_ tables. When the stored proc finishes I have 2 temp tables. I then want to step through the first temp_table and while I am stepping through that table I want to call a SQR procedure that will then step through the second table. I have a one to many relationship between the two tables. in code it looks something like this.. begin-sql -C1 create table ##table1 create table ##table2 end-sql execute -C1 @#rc = my_proc I then want to enter a begin-select statment begin-select -C1 company &company do process_table2 from ##table1 end-select Begin-Procedure begin-select -C1 more_data &more_data from ##table2 where company=&company end-select End-Procedure what happens is I get an error message back saying that: requested -C database connection is already active. I understand what the problem is, I am trying to enter two begin-selects with the same connection number (C1). I would like to know if there is a way I can make this work ! I tried creating the two tables with different connections, but there is know way to tell the stored proc that I want to use two connections. So the stored proc call bombs out saying that it can't find one of the tables. I am running SQR 3.0.8 under SYBASE. 10.0.2. Any help would be greatly appreciated. Thanks, John Palmieri From owner-sqr-users@USA.NET Tue Apr 16 13:28:31 1996 Date: Tue, 16 Apr 1996 13:20:29 -0500 From: Carol Kohn Subject: CREATING A HEADER FOR A TXT FILE I am creating a txt file by doing the following: open '{FILEPREFIX}filename.txt{FILESUFFIX}' as 1 for-writing record=132:fixed I do my select and output as follows: write 1 from $FILLER:45 $DED_AMT:7 $PAY_End_DT:6 $BIRTHDATE:6 $NAME:26 This works fine by giving be a list of data. Here come the problem. I now need to create a header (summary) record line to preceed the data dump. Please help.. TY, CK From owner-sqr-users@USA.NET Tue Apr 16 16:14:21 1996 Date: Tue, 16 Apr 1996 16:24:34 -0700 From: CAROL KOHN Subject: CREATING A HEADER RECORD ON A TEXT FILE. I am creating a txt file by doing the following: open '{FILEPREFIX}filename.txt{FILESUFFIX}' as 1 for-writing record=132:fixed I do my select and output as follows: write 1 from $FILLER:45 $DED_AMT:7 $PAY_End_DT:6 $BIRTHDATE:6 $NAME:26 This works fine by giving be a list of data. Here comes the problem. I now need to create a header (summary) record line to preceed the data dump. Do I create two write 1 from lines? Or is there a better way? Please help...TY, CK From owner-sqr-users@usa.net Tue Apr 16 18:33:13 1996 Date: Tue, 16 Apr 1996 16:29:34 -0500 From: "Jeff T. Orwick [C]" Subject: Re: CREATING A HEADER RECORD ON A TEXT FILE. I'm assuming that your (summary) record has data based on the rows returned in the detail. If this is the case, you have two choices. One: get all the summary information prior to writing your first line. Write your summary record, then all the details. This does mean that you'll have to read all, or most, of your data twice or store it in an array until you're able to write it the file. If this is a lot of data that may not be the best solution. Two: Write all the detail to a temp file and calculate your summary information along the way. When all the details have been written the temp file close it. Open another file and write your summary header. At this point your best alternative is to close the summary file and "call system using" <-- see your manual and use the operating system to con-cat the detail to bottom of the summary file. -- Jeff T. Orwick orwickj@tusc.com <- Full time address http://www.tusc.com From owner-sqr-users@USA.NET Wed Apr 17 01:22:01 1996 Date: Wed, 17 Apr 1996 11:53:47 +0800 From: Raymond Yip Subject: precision of numeric variables I encountered a strange thing in SQR3 with Sybase. My program select a numeric column from a table. When I display it it shows -442.11. However when I insert the value into a numeric column of another table, it raises error 241 "Scale error during implicit conversion of NUMERIC value '-442.110000000000010' to a NUMERIC field". Somehow SQR passes the numeric value as -442.110000000000010 instead of -442.11 to Sybase and causes the error. I know that SQR stores numeric data as floating point number. I was wondering if this kind of precision lost is intrinsic in SQR and what can I do for it? Raymond Yip MTRC From owner-sqr-users@USA.NET Wed Apr 17 11:04:47 1996 Date: Wed, 17 Apr 1996 08:17:10 PST From: johnk@SUN4.MITI.COM Subject: Re: precision of numeric variables We had a case with this same problem before. There are two ways to get around the problem. 1) Use the -XP flag on SQL statements that insert into a Sybase numeric or decimal column. This will stop SQR from creating a stored procedure for this SQL statement. The Sybase error only occurs when using stored procedures. 2) Use the CT-Lib version of SQR instead of the DB-Lib version. Sybase has corrected the 'Scale error during implict conversion' error with the CT-Lib interface. When inserting into a numeric or decimal column, decimal places past what is expected are truncated. SQR version 4 will address the roundoff problem associated with floating point representation of numeric values. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: precision of numeric variables Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 17/04/96 5:22 AM I encountered a strange thing in SQR3 with Sybase. My program select a numeric column from a table. When I display it it shows -442.11. However when I insert the value into a numeric column of another table, it raises error 241 "Scale error during implicit conversion of NUMERIC value '-442.110000000000010' to a NUMERIC field". Somehow SQR passes the numeric value as -442.110000000000010 instead of -442.11 to Sybase and causes the error. I know that SQR stores numeric data as floating point number. I was wondering if this kind of precision lost is intrinsic in SQR and what can I do for it? Raymond Yip MTRC From owner-sqr-users@usa.net Wed Apr 17 12:23:08 1996 Date: Wed, 17 Apr 1996 08:22:10 PST From: johnk@SUN4.MITI.COM Subject: Re: precision of numeric variables One other thing to mention. Temporary tables are not supported in the CT-Lib version of SQR until version 3.0.12.3. If your SQR programs use temp tables, you would not want to use the CT-Lib version unless you have this version. 3.0.12.3 is currently available on AIX, HP-UX, Solaris, and Windows (3.5 ReportMate with SQR 3.0.12.2). It will be available soon on SunOS. If your host is other than those listed, using the -XP workaround may be better. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: precision of numeric variables Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 17/04/96 5:22 AM I encountered a strange thing in SQR3 with Sybase. My program select a numeric column from a table. When I display it it shows -442.11. However when I insert the value into a numeric column of another table, it raises error 241 "Scale error during implicit conversion of NUMERIC value '-442.110000000000010' to a NUMERIC field". Somehow SQR passes the numeric value as -442.110000000000010 instead of -442.11 to Sybase and causes the error. I know that SQR stores numeric data as floating point number. I was wondering if this kind of precision lost is intrinsic in SQR and what can I do for it? Raymond Yip MTRC From owner-sqr-users@USA.NET Wed Apr 17 21:23:05 1996 Date: Thu, 18 Apr 1996 09:39:18 +0800 From: Raymond Yip Subject: Re: precision of numeric variables -Reply Thanks for your reply. But I want to clarify that actually the reverse of what you have said is true. Using the -XP flag causes the error. The Sybase error does not occur when creating temporary stored procedure. Using CT-Lib version of SQR caused other problems, like variables are not allowed in the having clause of a select statement. My current workaround is to explicitly convert the value to the precision of the column by the Sybase convert function. For example, begin-sql insert into tableA(cola, colb) values(convert(numeric(13,2), #vara), $varb) end-sql It is cumbersome, but it works. By the way, what is the schedule of SQR version 4, and what are the new features? Raymond Yip System Analyst MTRC Hong Kong >>> Apr 18, 1996 >>> We had a case with this same problem before. There are two ways to get around the problem. 1) Use the -XP flag on SQL statements that insert into a Sybase numeric or decimal column. This will stop SQR from creating a stored procedure for this SQL statement. The Sybase error only occurs when using stored procedures. 2) Use the CT-Lib version of SQR instead of the DB-Lib version. Sybase has corrected the 'Scale error during implict conversion' error with the CT-Lib interface. When inserting into a numeric or decimal column, decimal places past what is expected are truncated. SQR version 4 will address the roundoff problem associated with floating point representation of numeric values. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: precision of numeric variables Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet I encountered a strange thing in SQR3 with Sybase. My program select a numeric column from a table. When I display it it shows -442.11. However when I insert the value into a numeric column of another table, it raises error 241 "Scale error during implicit conversion of NUMERIC value '-442.110000000000010' to a NUMERIC field". Somehow SQR passes the numeric value as -442.110000000000010 instead of -442.11 to Sybase and causes the error. I know that SQR stores numeric data as floating point number. I was wondering if this kind of precision lost is intrinsic in SQR and what can I do for it? Raymond Yip MTRC From owner-sqr-users@USA.NET Thu Apr 18 04:34:07 1996 Date: Thu, 18 Apr 1996 10:57:17 +0100 From: orjno@BROTTSFOREBYGGANDERADET.SE Subject: Explicit Variable Declaration I would appreciate an "explicit variable declaration option" and a=20 declaration possibility in SQR to force the programmer to declare his/her=20 variables. This would reduce hard-to-locate erroneous variable introduction= s=20 by misspelling. I know that some people find it convenient to be able to drop new=20 undocumented variables in the code in any moment and that others are very=20 disciplined. My experience is that I make less stupid errors in languages=20 like C, VB and SQL Windows, where I am (sometimes optionally) forced to=20 declare and specify type for the variables/procedures, than in languages=20 like SAS, SQR or (earlier) Basic where I have full freedom of variable=20 usage. I am really a rookie in SQR programming so I would like to know if any one=20 else share my thoughts or if my ideas are totally irrelevant. /=D6rjan Nordlund National Council for Crime Prevention in Sweden=20 From owner-sqr-users@USA.NET Thu Apr 18 09:13:15 1996 Date: Thu, 18 Apr 1996 08:23:37 -0500 From: johng@RMF41.USACE.ARMY.MIL Subject: Reply to Explicit Variable Declaration > I would appreciate an "explicit variable declaration option" and a=20 > declaration possibility in SQR to force the programmer to declare his/her=20 > variables. This would reduce hard-to-locate erroneous variable introduction= > s=20 > by misspelling. > > I know that some people find it convenient to be able to drop new=20 > undocumented variables in the code in any moment and that others are very=20 > disciplined. My experience is that I make less stupid errors in languages=20 > like C, VB and SQL Windows, where I am (sometimes optionally) forced to=20 > declare and specify type for the variables/procedures, than in languages=20 > like SAS, SQR or (earlier) Basic where I have full freedom of variable=20 > usage. > > I am really a rookie in SQR programming so I would like to know if any one=20 > else share my thoughts or if my ideas are totally irrelevant. > > /=D6rjan Nordlund > National Council for Crime Prevention in Sweden=20 I have been working with SQR for over 4 years now, and I would heartily endorse such an option! After this many years of debugging SQR programs, misspelling of variables is often the first thing I look for, but it would be a great time-save if the compiler would provide that function for me, and would be invaluable to novice SQR users who are not yet accustomed to the "opportunities" provided by such non-typed languages. ------------------------------------------------------------------------ John Griffin (205) 890-2401 | A TTTTTTT SSSSS Advanced Technology Systems (ATS), Inc. | A A T S 4801 University Square, Suite 2 | AaaaA T SSSSS Huntsville, AL 35816-3431 | A A T S johng@rmf41.usace.army.mil | A A T SSSSS ------------------------------------------------------------------------ From owner-sqr-users@USA.NET Thu Apr 18 09:46:08 1996 Date: Thu, 18 Apr 1996 16:03:01 +0200 From: Ronald de Vries Subject: Report Writers At the moment we're looking to several report writers. Is there anybody who can tell me where i can find interesting news and information about these tools (newsgroups or sites). Are there any figures/test or do's and dont's written over several report writers ? What are the experiences of the tool you're using at the moment ? Some specifications are: - the application can activate the report writer (or query) with variables or parameters. - differences in end user and programmer level. - integration with MS-line - use of ODBC - own data dictionary - archive posibilities of the printed documents - unix character based posibilities (use only one procedure for several OS) I'm looking forward to your reply. Ronald de Vries Minihouse Groningen BV email: rdv@mhg.iaf.nl From owner-sqr-users@USA.NET Thu Apr 18 11:03:16 1996 Date: Thu, 18 Apr 1996 11:06:02 -0500 From: MERCADTF@SPLAVA.CC.PLATTSBURGH.EDU Subject: Re: Explicit Variable Declaration Date sent: 18-APR-1996 11:04:16 Hello All, I second Sean Shaw's vote. As long as it IS NOT MANDATORY it would be OK. Otherwise, we would be back to COBOL type restrictions. I thought that MITI had a cross-reference debugging tool for reporting things like this? Tom > >>I would appreciate an "explicit variable declaration option" and a >>declaration possibility in SQR to force the programmer to declare his/her >>variables. This would reduce hard-to-locate erroneous variable introductions >>by misspelling. > >From my perspective, as long as this isn't MANDATORY, I think that's fine. >Personally, I love not having to declare my variables. >************************************ >* Sean M. Shaw * >* Oracle Data Automation Manager * >* The University of New Mexico * >* Health Sciences Center Library * >* Albuquerque, NM 87131-5686 * >* Work: 505.277.6109 * >* Fax: 505.277.5350 * >* EMail: sshaw@biblio.unm.edu * >************************************ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % Tom Mercadante % % Database Administrator % % SUNY Plattsburgh % % % % BITNET : MERCADTF@SNYPLAVB.BITNET % % INTERNET : MERCADTF@SPLAVA.CC.PLATTSBURGH.EDU Computer Systems Center % % PHONE : (518)564-3013 Kehoe 507 % % FAX : (518)564-4415 Plattsburgh, NY 12901 % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From owner-sqr-users@USA.NET Thu Apr 18 11:27:43 1996 Date: Thu, 18 Apr 1996 07:58:44 +0000 From: Scott Burgy Subject: Re: Explicit Variable Declaration I sure do hope this does not catch on. Please use C, C++, COBOL, SQL or whatever if you want to explicitly declare variables. Please do not try to convert an excellant product such as SQR into another mundane programming language. Besides, you can declare (define) all you want with SQR currently. You asked... Just my two cents worth... Scott Burgy - Systems Analyst Cal State Univ., Bakersfield Voice: (805) 664-3426 9001 Stockdale Highway FAX: (805) 664-2099 Bakersfield, Ca. 93311-1099 EMAIL: sburgy@csubak.edu -- From owner-sqr-users@USA.NET Thu Apr 18 11:29:13 1996 Date: Thu, 18 Apr 1996 08:08:03 PST From: johnk@SUN4.MITI.COM Subject: Re[2]: precision of numeric variables -Reply Your right. I looked again at the original case and I had the -XP part backwords. When using a stored procedure, the argument is defined as a float and that is why it works. Another workaround mentioned in the case was to use the convert command similar to how you do except to convert to a float. For example: begin-sql insert into tableA(cola,colb) values (convert(float,#vara),$varb) end-sql The schedule for version 4 is not available yet. I am hearing that beta will begin during the summer. Some of the features are: 1. Improved national lanuage support 2. Date arithmetic 3. Precise math Regards, John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Re: precision of numeric variables -Reply Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 17/04/96 9:22 PM Thanks for your reply. But I want to clarify that actually the reverse of what you have said is true. Using the -XP flag causes the error. The Sybase error does not occur when creating temporary stored procedure. Using CT-Lib version of SQR caused other problems, like variables are not allowed in the having clause of a select statement. My current workaround is to explicitly convert the value to the precision of the column by the Sybase convert function. For example, begin-sql insert into tableA(cola, colb) values(convert(numeric(13,2), #vara), $varb) end-sql It is cumbersome, but it works. By the way, what is the schedule of SQR version 4, and what are the new features? Raymond Yip System Analyst MTRC Hong Kong >>> Apr 18, 1996 >>> We had a case with this same problem before. There are two ways to get around the problem. 1) Use the -XP flag on SQL statements that insert into a Sybase numeric or decimal column. This will stop SQR from creating a stored procedure for this SQL statement. The Sybase error only occurs when using stored procedures. 2) Use the CT-Lib version of SQR instead of the DB-Lib version. Sybase has corrected the 'Scale error during implict conversion' error with the CT-Lib interface. When inserting into a numeric or decimal column, decimal places past what is expected are truncated. SQR version 4 will address the roundoff problem associated with floating point representation of numeric values. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: precision of numeric variables Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet I encountered a strange thing in SQR3 with Sybase. My program select a numeric column from a table. When I display it it shows -442.11. However when I insert the value into a numeric column of another table, it raises error 241 "Scale error during implicit conversion of NUMERIC value '-442.110000000000010' to a NUMERIC field". Somehow SQR passes the numeric value as -442.110000000000010 instead of -442.11 to Sybase and causes the error. I know that SQR stores numeric data as floating point number. I was wondering if this kind of precision lost is intrinsic in SQR and what can I do for it? Raymond Yip MTRC From owner-sqr-users@USA.NET Thu Apr 18 11:45:59 1996 Date: Thu, 18 Apr 1996 08:39:40 -0600 From: "Sean M. Shaw" Subject: Re: Explicit Variable Declaration >I would appreciate an "explicit variable declaration option" and a >declaration possibility in SQR to force the programmer to declare his/her >variables. This would reduce hard-to-locate erroneous variable introductions >by misspelling. >From my perspective, as long as this isn't MANDATORY, I think that's fine. Personally, I love not having to declare my variables. ************************************ * Sean M. Shaw * * Oracle Data Automation Manager * * The University of New Mexico * * Health Sciences Center Library * * Albuquerque, NM 87131-5686 * * Work: 505.277.6109 * * Fax: 505.277.5350 * * EMail: sshaw@biblio.unm.edu * ************************************ From owner-sqr-users@USA.NET Thu Apr 18 12:11:46 1996 Date: Thu, 18 Apr 1996 18:32:16 +0100 From: orjno@BROTTSFOREBYGGANDERADET.SE Subject: Re: Explicit Variable Declaration I'm sure that the creators of the languages where variables are explicitly declared had some reasons to introduce the feature. I think variable declarations help to document the programmer's intention and give hints to the program reader about the meaning of the program. I also think a language without explicit declarations allow programmer errors which result in legal but incorrect programs. Of course it is possible for many (unfortunatly not even close to all) programmers to write perfectly readable and documented code in SQR but why say no to a helping hand. Arguments against variable declaration and other programming language restrictions seem to come from old time programmers who are stuck in their irrefutable habits or more fresh ones who don't know anything else. I have never heard a negative word about it among code reviewers, people responsible for larger development projects. But don't make a hen of a feather (or what the proverb says). I really don't care so much about the SQR language just because I use it (and have no other choice). In my opinion SQR is neither mundane nor out of this world. /Orjan Nordlund National Council for Crime Prevention, Sweden ---------- I sure do hope this does not catch on. Please use C, C++, COBOL, SQL or whatever if you want to explicitly declare variables. Please do not try to convert an excellant product such as SQR into another mundane programming language. Besides, you can declare (define) all you want with SQR=20 currently. You asked... Just my two cents worth... Scott Burgy - Systems Analyst Cal State Univ., Bakersfield Voice: (805) 664-3426 9001 Stockdale Highway FAX: (805) 664-2099 Bakersfield, Ca. 93311-1099 EMAIL: sburgy@csubak.edu From owner-sqr-users@USA.NET Thu Apr 18 12:12:32 1996 Date: Thu, 18 Apr 1996 09:20:02 CDT From: Melissa Santamaria Subject: Re: Reply to Explicit Variable Declaration I support your idea in theory but, as an experienced SQR developer, I don't know that I'd ever want to turn this option "on" as it is very restrictive -- especially with regard to on the fly debugging, etc. Have you tried using the SQR Workbench XREF utility on your SQR code to track down orphan variables? This might help you reveal problems in your code before it becomes productional (but if you have misspelled a variable TWICE, then you'll get no-where with this tool, because it will no longer be identified as an orphan). Good Luck. M.SantaMaria > > > I would appreciate an "explicit variable declaration option" and a=20 > > declaration possibility in SQR to force the programmer to declare his/her=20 > > variables. This would reduce hard-to-locate erroneous variable introduction= > > s=20 > > by misspelling. > > > > I know that some people find it convenient to be able to drop new=20 > > undocumented variables in the code in any moment and that others are very=20 > > disciplined. My experience is that I make less stupid errors in languages=20 > > like C, VB and SQL Windows, where I am (sometimes optionally) forced to=20 > > declare and specify type for the variables/procedures, than in languages=20 > > like SAS, SQR or (earlier) Basic where I have full freedom of variable=20 > > usage. > > > > I am really a rookie in SQR programming so I would like to know if any one=20 > > else share my thoughts or if my ideas are totally irrelevant. > > > > /=D6rjan Nordlund > > National Council for Crime Prevention in Sweden=20 > > I have been working with SQR for over 4 years now, and I would heartily > endorse such an option! After this many years of debugging SQR programs, > misspelling of variables is often the first thing I look for, but it would > be a great time-save if the compiler would provide that function for me, and > would be invaluable to novice SQR users who are not yet accustomed to the > "opportunities" provided by such non-typed languages. > ------------------------------------------------------------------------ > John Griffin (205) 890-2401 | A TTTTTTT SSSSS > Advanced Technology Systems (ATS), Inc. | A A T S > 4801 University Square, Suite 2 | AaaaA T SSSSS > Huntsville, AL 35816-3431 | A A T S > johng@rmf41.usace.army.mil | A A T SSSSS > ------------------------------------------------------------------------ > From owner-sqr-users@USA.NET Thu Apr 18 14:03:31 1996 Date: Thu, 18 Apr 1996 20:16:01 +0100 From: orjno@BROTTSFOREBYGGANDERADET.SE Subject: Re: Re(2): Explicit Variable Declaration I am sorry about this no level discussion. /Orjan Nordlund National Council for Crime Prevention, Sweden Scott Burgy tells me/us: ---------- So this makes it right... and the world is flat too... guess we all should learn assembler language and return to coding in FORTRAN, BASIC and RPG... If this is truly an "OPTION" to be turned on and/or off by the end user, no problem, more power to you... Don't leave much room for people in your groupings do you? Again, you=20 asked, why flame me? Sorry to hear that this is your one and only choice for a programming language. Boy, you really are in trouble. Wow, to think you are=20 responsible for "larger development projects"! I'm impressed... now, let's see, SQR=20 was developed as a major production programming langauge to be used in the development of business applications and transaction driven processes?!?!?!= ?=20 Yeah, right... Seeing as you "have no other choice", one could only assume that "SQR is neither mundane nor out of this world". Come talk to me when=20 the water behind your ears drys up and your nose stops running... From owner-sqr-users@USA.NET Fri Apr 19 08:28:29 1996 Date: Fri, 19 Apr 1996 08:36:48 -0400 From: Bill Mancini Subject: Debugger for 2.5?? To Whom It May Concern: Could you please tell me if there is a tool available to help with = debugging SQR 2.5??? I know there is such a thing for 3.0, but we are = currently developing in 2.5 for reasons of revision integrity accross = platforms. Thanks, GM From owner-sqr-users@USA.NET Fri Apr 19 10:11:41 1996 Date: Fri, 19 Apr 1996 09:17:27 -0500 From: Ray Ontko Subject: Re: Debugger for 2.5?? > To Whom It May Concern: > Could you please tell me if there is a tool available to help with = > debugging SQR 2.5??? I know there is such a thing for 3.0, but we are = > currently developing in 2.5 for reasons of revision integrity accross = > platforms. > Thanks, In the past I have written a few simple programs which help with tracing SQR program execution. I don't have source code, but you might be able to whip something up yourself pretty quickly. The general approach is to write an SQR program which reads a program and looks for procedure declarations or other "interesting" statements. The program generates a new version of the source file which has "DISPLAY" statements or #DEBUG statements added. I then run the generated program and watch the execution flow go by. A slightly enhanced version of the above idea is to have the program insert a call to a routine which allows more interactive control of the execution. This approach is left as an exercise for the reader. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB." rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@usa.net Mon Apr 22 11:39:03 1996 Date: Mon, 22 Apr 1996 08:12:20 PST From: johnk@SUN4.MITI.COM Subject: Re: Debugger for 2.5?? The HIERARCH, TRACE, and XREF utilities were available for most platforms on version 2.5. Due to memory contraints, they were not available on PCs for either V2.5 or V3. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Debugger for 2.5?? Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 19/04/96 8:01 AM To Whom It May Concern: Could you please tell me if there is a tool available to help with = debugging SQR 2.5??? I know there is such a thing for 3.0, but we are = currently developing in 2.5 for reasons of revision integrity accross = platforms. Thanks, GM From owner-sqr-users@usa.net Mon Apr 22 21:25:59 1996 Date: Mon, 22 Apr 1996 08:12:20 PST From: johnk@SUN4.MITI.COM Subject: Re: Debugger for 2.5?? The HIERARCH, TRACE, and XREF utilities were available for most platforms on version 2.5. Due to memory contraints, they were not available on PCs for either V2.5 or V3. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Debugger for 2.5?? Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet Date: 19/04/96 8:01 AM To Whom It May Concern: Could you please tell me if there is a tool available to help with = debugging SQR 2.5??? I know there is such a thing for 3.0, but we are = currently developing in 2.5 for reasons of revision integrity accross = platforms. Thanks, GM From owner-sqr-users@USA.NET Tue Apr 23 16:53:05 1996 Date-warning: Date header was inserted by NAUVAX.UCC.NAU.EDU Date: Tue, 23 Apr 1996 14:19:22 -0700 From: Andy Beecham Subject: A Developer's Utility for Windows SQR Workbench This message is to announce the release of a shareware utility to the PeopleSoft and general SQR development community:=20 DUSQRW.EXE Version 1.1 A Developer's Utility for Windows SQR Workbench=20 by Jan Jerabek and Andy Beecham Human Resources Information Systems=20 Northern Arizona University.=20 Copyright =A9 1996, Northern Arizona University.=20 DUSQRW.EXE is a 16-bit Windows application. It acts as a centralized menu for creating and running SQR's and viewing and printing SQR output. A parameter screen allows the developer to enter and easily change values such= as: -SQR report path and filename=20 -Output path and filename -Editor path and filename -Database name and logon parameters More information, including links for downloading, installing and operating the free shareware version may be obtained by viewing the URL: http://www.nau.edu/~hr/hris/readme.htm This URL also contains instructions for registering the Developer's Utility. My apologies to those who have received this message multiple times due to cross-postings. Andy Beecham Northern Arizona University HRIS User Services From owner-sqr-users@USA.NET Fri Apr 26 11:43:47 1996 Date: Fri, 26 Apr 1996 09:10:01 -600 From: Larry Heidkamp Subject: Print labels and reports in one program Is there a way to produce both 3-up labels and a report in one SQR 2.5 program. We don't know how to get around the different setup requirements for the different formats. Thanks, Larry Heidkamp ---------------------------------------------------------------------------- Larry Heidkamp Roosevelt University, Chicago IL 60625 SCT Applications Manager voice: (312) 341-3586 email: heidkal@admrs6k.roosevelt.edu From owner-sqr-users@USA.NET Wed Jun 5 12:04:13 1996 Date: Wed, 5 Jun 1996 11:19:55 CST From: Terry Davlin Subject: Re; Random Numbers Hi, I'm looking for an easy way to generate a random number within an SQR application. Currently, here is the solution I am using: The SQR code: begin-report move 100 to #array_size let $command = '/home/burtk/bin/rnd ' || to_char(#array_size) call system using $command #random show #random end-report The problem I'm trying to solve is this: What code can be placed in the string $command that will return a random number in the range of 0 to n-1, without using an external script? Any ideas? Thanks... ____________________________________________________________________ Terry Davlin Database & Systems Director MEDIANET Inc. terryd@medianet.com P.O. Box 203218 Austin, TX. 78720-3218 From owner-sqr-users@USA.NET Wed Jun 5 14:20:37 1996 Date: Wed, 5 Jun 1996 10:53:11 PST From: John Kellogg Subject: Re: Re; Random Numbers Terry, Here is a section from the future V4 Commands Reference manual that shows how to add a random function to ufunc.c. John L. Kellogg MITI Technical Support Manager For this example, the C function random, which returns a random number will be added to ufunc.c. The function accepts a parameter which will be used as the seed to start a new sequence of numbers. If the seed is zero, then the same sequence is used. When adding functions to UFUNC, you must consider the following: For string functions the following arguments are required: 1. (int) Number of arguments. 2. (char *) or (double *) Array of argument pointers, to either char[ ] or double. 3. (char *) Address for result string. If unchanged, function will return a NULL string. 4. (int) Maximum length of result string, in bytes. For numeric functions the following arguments are required: 1. (int) Number of arguments. 2. (char *) or (double *) Array of argument pointers, to either char[ ] or double. 3. (double *) Address for result numeric value. If unchanged, function will return zero. In order to add the random function to SQR, the following modifications are needed to the UFUNC.C file, which was provided with SQR. 1. Add the prototype for the random function: static void random CC_ARGS((char *, char *)); 2. Add the function name to the declaration list. The name of the function called from sqr is "random". The return type is "n" for numeric. The number of arguments passed is "1", and the argument type is "n" numeric. The function name in UFUNC.C is "random". The characters" PVR" must be entered before the function name. Name Return_type Number of Arguments Arg_Types Function ---- ----------- ------------------- --------- -------- "max", 'n', 0, "n", PVR max, "split", 'n', 0, "C", PVR split, "printarray",'n', 4, "cnnc", PVR printarray, "random", 'n', 1, "n", PVR random, /* Last entry must be NULL -- do not change */ "", '\0', 0, "", 0 }; 3. At the end the of UFUNC.C file, add the random routine listed below. The routine name must be lowercase; however, in your SQR program it can be referenced either upper or lower case. static void random CC_ARGL((argc, argv, result)) CC_ARG(int, argc) /* The number arguments passed */ CC_ARG(double *, argv[]) /* The argument list */ CC_LARG(double *, result) /* Where to store result */ { if (*argv[0] != 0) srand(*argv[0]); *result = rand(); return; } After these modifications, recompile UFUNC.C and relink SQR. See the Programmer's Reference Manual for details for your particular machine. Finally, the following is an example of a simple SQR program which uses the random function: begin-program do get-random-number do process-calculations end-program begin-procedure let #seed = 44 let #ran = random(#seed) end-procedure begin-procedure process-calculations . . . ______________________________ Reply Separator _________________________________ Subject: Re; Random Numbers Author: SQR-USERS@USA.NET at Internet Date: 05/06/96 10:28 AM Hi, I'm looking for an easy way to generate a random number within an SQR application. Currently, here is the solution I am using: The SQR code: begin-report move 100 to #array_size let $command = '/home/burtk/bin/rnd ' || to_char(#array_size) call system using $command #random show #random end-report The problem I'm trying to solve is this: What code can be placed in the string $command that will return a random number in the range of 0 to n-1, without using an external script? Any ideas? Thanks... ____________________________________________________________________ Terry Davlin Database & Systems Director MEDIANET Inc. terryd@medianet.com P.O. Box 203218 Austin, TX. 78720-3218 From owner-sqr-users@USA.NET Fri Jun 7 14:23:47 1996 Date: Fri, 7 Jun 1996 17:43:26 -0400 From: Sharon Lefkowitz Subject: Printing to HP LaserJets from Workbench 3.5 I am converting a version 2 report to Workbench 3.5. In the version 2 report I used a printer-init string to set the HP printer in the following mode: ISO 8859-1 symbol set, Landscape mode, 8 lines per inch, top margin 5 lines, line printer font, and legal size paper. In Workbench 3.5 I have been playing with the SQR commands, DECLARE-PRINTER, DECLARE-LAYOUT, PRINT-DIRECT, and ENCODE in trying to get my report to print correctly. I cannot find the right combination of commands to match what the printer-init command could do. I spent over an hour with SQR support and they did not have any luck either Can some one help me Thanks From owner-sqr-users@USA.NET Mon Jun 10 13:50:28 1996 Date: Mon, 10 Jun 1996 14:39:50 -0400 From: "Louise J. Weiler" Subject: ora7win.dll HI! I just got a brand new PC -- and had to reinstall SQR Workbench 3 for Windows. Running under Windows for Workgroups 3.1, I had no problems. Now, when I try to start up SQR, I get the following error message: Cannot find ora7win.dll. Windows needs this file to run c:\sqrw\ora\workbnch\bin\sqrw.exe. c:\orawin\bin\ora7win.dll does exist. The clincher in all this is that one of my officemates, running windows for workgroups 3.1, is also getting the same message. Any ideas would be appreciated! Thanks. Louise Louise J Weiler Programmer/Analyst Rensselaer Polytechnic Institute Troy, NY 12180-3590 (518) 276-8446 johnsl2@rpi.edu From owner-sqr-users@USA.NET Mon Jun 10 16:16:34 1996 Date: Mon, 10 Jun 1996 17:05:52 -0400 From: "Matthew F. Reagan" Subject: Re: ora7win.dll Louise, I have come across this problem a couple of times. That file is installed as part of SQL*Net or as part of a PO7 installation (I believe). If you are reinstalling SQR Workbench, you need to reinstall either SQL*Net or PO7 in order to talk to a given database. I'm not sure if that is the dll that comes with V 7.0, 7.1, or 7.2, but changing Oracle versions may also bring up that error message. Give that a shot and let me/us know the result. Also, let me know what version of Oracle kernel and SQL*Net you used to run/are now running. Matt... >HI! > >I just got a brand new PC -- and had to reinstall SQR Workbench 3 for >Windows. Running under Windows for Workgroups 3.1, I had no problems. Now, >when I try to start up SQR, I get the following error message: > >Cannot find ora7win.dll. Windows needs this file to run >c:\sqrw\ora\workbnch\bin\sqrw.exe. > >c:\orawin\bin\ora7win.dll does exist. > >The clincher in all this is that one of my officemates, running windows for >workgroups 3.1, is also getting the same message. > >Any ideas would be appreciated! > >Thanks. > >Louise > >Louise J Weiler >Programmer/Analyst >Rensselaer Polytechnic Institute >Troy, NY 12180-3590 >(518) 276-8446 >johnsl2@rpi.edu > From owner-sqr-users@USA.NET Mon Jun 10 19:59:52 1996 Date: Mon, 10 Jun 1996 16:56:51 PST From: John Kellogg Subject: Re: ora7win.dll I assume you are now running Oracle version 7.1.x or 7.2.x. The ORA7WIN.DLL file was Oracle's DLL for version 7.0.x. For 7.1.x they now have ORA71WIN.DLL and for 7.2.x they have ORA72WIN.DLL. You can either load the required support files that would include the ORA7WIN.DLL file, or try copying whichever of the other DLLs you have to ORA7WIN.DLL. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: ora7win.dll Author: SQR-USERS@USA.NET at Internet Date: 10/06/96 4:21 PM HI! I just got a brand new PC -- and had to reinstall SQR Workbench 3 for Windows. Running under Windows for Workgroups 3.1, I had no problems. Now, when I try to start up SQR, I get the following error message: Cannot find ora7win.dll. Windows needs this file to run c:\sqrw\ora\workbnch\bin\sqrw.exe. c:\orawin\bin\ora7win.dll does exist. The clincher in all this is that one of my officemates, running windows for workgroups 3.1, is also getting the same message. Any ideas would be appreciated! Thanks. Louise Louise J Weiler Programmer/Analyst Rensselaer Polytechnic Institute Troy, NY 12180-3590 (518) 276-8446 johnsl2@rpi.edu From owner-sqr-users@USA.NET Tue Jun 11 19:23:44 1996 Date: Tue, 11 Jun 1996 16:48:24 -0700 From: Benjamin Le Subject: Print Question How do you print a title at the middle of report by using sub-query? What I want is to print a sub-title one time for a set of records. If I put print statement before end-select then if no record selected, it prints title. That I don't want to happen. If I put print statement in the middle of sub-query then it prints title for each record printed. Any help is appreciated. Thanks. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Wed Jun 12 01:22:53 1996 Date: Wed, 12 Jun 1996 15:22:14 PDT From: Andrew Barnett Subject: Re: Print Question >How do you print a title at the middle of report by using sub-query? What I >want is to print a sub-title one time for a set of records. If I put print >statement before end-select then if no record selected, it prints title. >That I don't want to happen. If I put print statement in the middle of >sub-query then it prints title for each record printed. Any help is >appreciated. Thanks. You can do something like let #first_time = 1 begin-select ... if #first_time print 'Title Stuff' (x,y) let #first_time = 0 end-if ... from table or use the ON-BREAK format command in PRINT begin-select 'constant_text' &zzz () on-break level=1 before=print_title print=never column_name1 column_name2 ... print &column_name1 (+1,1) ... begin-procedure print_title print 'Title Stuff' (x,y) end-procedure Andrew -------------------------------------------------------- Andrew Barnett abarnett@isd.hih.com.au - Wizzard -------------------------------------------------------- From owner-sqr-users@USA.NET Wed Jun 12 01:33:14 1996 Date: Wed, 12 Jun 1996 02:05:08 -0400 From: Paul Baker Subject: Re: Print Question Have you Tried On Break? From owner-sqr-users@USA.NET Wed Jun 12 10:24:21 1996 Date: Wed, 12 Jun 1996 10:51:35 -0700 From: Duncan MacLean Subject: SQR vs Crystal Reports We are currently evaluating a reporting tool for developing "batch" reports. We will be accessing an HP-Oracle database through IW. We will also be developing a Visual Basic 4.0 "front-end" for selecting options to pass to the query tool. Our users will be on Windows NT 3.5.1 - using a 16Bit ODBC driver. We require complex multiple queries per-report, graphing ability, printing, view on screen, and, if possible "cut and paste" from the screen output to the Windows clipboard. What are the benefits of either of these tools for a project such as this? Thanks in advance for any information... -Duncan MacLean (send Email to DUNCANMACLEAN@WORLDNET.ATT.NET) From owner-sqr-users@USA.NET Wed Jun 12 12:48:11 1996 Date: Wed, 12 Jun 1996 11:15:50 -0700 From: Bill Spence Subject: Sorting sequentil files I have a report requirement which must be sorted by a calculated value base on the input records from the database. I read the data from the database,calculate the value and write it to a file. Is there any method for sorting the file or any third party software available. From owner-sqr-users@USA.NET Wed Jun 12 13:21:34 1996 Date: Wed, 12 Jun 1996 10:55:10 -0700 From: Benjamin Le Subject: Thanks Thanks every ones for information about printing 'sub-query title'. Especially thank to Andrew. You guys are great! Ben. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Wed Jun 12 14:26:13 1996 Date: Wed, 12 Jun 1996 11:55:49 PST From: John Kellogg Subject: Re: Sorting sequentil files If you are using a Unix host, you can call the Unix sort utility with the SQR 'call system' command. For example: call system using 'sort file1.out > file2.out' #status John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Sorting sequentil files Author: SQR-USERS@USA.NET at Internet Date: 12/06/96 11:21 AM I have a report requirement which must be sorted by a calculated value base on the input records from the database. I read the data from the database,calculate the value and write it to a file. Is there any method for sorting the file or any third party software available. From owner-sqr-users@USA.NET Wed Jun 12 14:53:34 1996 Date: Wed, 12 Jun 1996 12:45:05 -0700 From: Timothy Harris Subject: Re: Sorting sequentil files Since I don't know what database or operating system you're using, I'll relate a similar problem I had writing a report with SQR on Oracle and VMS: I was given a file with SSN's and needed to output database information on this set of people in ZIP order for bulk mailing purposes. Since I had to read the SSN's in 1 at a time and the zip info was coming from the database, I had to do this in several steps... 1) read in each SSN and get address info(and name, etc..) for each person. I wrote this information out to another flat file. 2) do *an operating system sort on this file*(VMS sorts are blistering fast). 3) read back in the sorted file and write the report(actually letters) for each person. Here's the two line call I used for the VMS sort: LET $system-call = 'SORT ' || $outfilename || ' ' || $outfilename CALL SYSTEM USING $system-call #call-status Note that you have to build the command before issuing the call command. Both UNIX and DOS have operating system level sorts that could probably be used in a similar fashion. Tim Harris Systems Analyst Oregon State University harrist@ccmail.orst.edu On Wed, 12 Jun 1996, Bill Spence wrote: > I have a report requirement which must be sorted by a > calculated value base on the input records from the > database. > I read the data from the database,calculate the value and > write it to a file. Is there any method for sorting the file > or any third party software available. > From owner-sqr-users@USA.NET Wed Jun 12 16:39:32 1996 Date: Wed, 12 Jun 1996 14:05:25 -0700 From: Alan Rosenthal Subject: Re: Sorting sequentil files Can you use the database's select statement to do the calculation for you? If so then you can sort on this field. alan ====================================================== At 11:15 AM 6/12/96 -0700, you wrote: > I have a report requirement which must be sorted by a > calculated value base on the input records from the > database. > I read the data from the database,calculate the value and > write it to a file. Is there any method for sorting the file > or any third party software available. > > -------------------------------------------------------------------- | Alan Rosenthal :o) email ahr@msi.com | | Biosym/MSI voice 619 597-9732 | | Management Information Systems fax 619 458-0136 | -------------------------------------------------------------------- | I have a simple philosophy. Fill what's empty. | | Empty what's full. Scratch where it itches. | | -- Alice Roosevelt Longworth (1884-1980) | -------------------------------------------------------------------- From owner-sqr-users@USA.NET Wed Jun 12 16:51:24 1996 Date: Wed, 12 Jun 1996 13:22:39 -0700 From: Mark Britton Subject: Re: Sorting sequentil files Bill Spence wrote: > > I have a report requirement which must be sorted by a > calculated value base on the input records from the > database. > I read the data from the database,calculate the value and > write it to a file. Is there any method for sorting the file > or any third party software available. I didn't catch what platform you are running on, but you can use the Unix sort command to sort a file... MB From owner-sqr-users@USA.NET Thu Jun 13 11:14:59 1996 Date: Thu, 13 Jun 1996 08:28:43 PST From: Gadi Yedwab Subject: Re: SQR vs Crystal Reports Duncan, Does "IW" stand for the HP Intelligent Warehouse? If so, SQR supports HP's Intelligent Warehouse directly. You can run real batch reports on your HP and not through a 16-bit ODBC driver. Gadi Yedwab, MITI (gadi@miti.com) ______________________________ Reply Separator _________________________________ Subject: SQR vs Crystal Reports Author: SQR-USERS@USA.NET at Internet Date: 6/12/96 9:24 AM We are currently evaluating a reporting tool for developing "batch" reports. We will be accessing an HP-Oracle database through IW. We will also be developin g a Visual Basic 4.0 "front-end" for selecting options to pass to the query tool. Our users will be on Windows NT 3.5.1 - using a 16Bit ODBC driver. We require complex multiple queries per-report, graphing ability, printing, view on screen, and, if possible "cut and paste" from the screen output to the Windows clipboard. What are the benefits of either of these tools for a project such as this? Thanks in advance for any information... -Duncan MacLean (send Email to DUNCANMACLEAN@WORLDNET.ATT.NET) From owner-sqr-users@USA.NET Thu Jun 13 12:46:42 1996 Date: Thu, 13 Jun 1996 13:13:50 -0400 From: Huguely Juliane Subject: SQR opportunities Hello! PRC Inc's PeopleSoft Consulting group has some great opportunities for you! PeopleSoft has selected PRC Inc. as its partner to provide systems integration and implementation support for its products. PRC is currently the only systems integrator, recognized by PeopleSoft, to implement the full line of PeopleSoft products and use the full line of PeopleSoft products for its own internal Human Resources, Payroll, General Ledger, Accounts Payable, Accounts Receivable, Asset Management and Purchase Order automation support. PRC has an immediate need for all levels of SQR programmers. Experience with PeopleSoft is a plus but not mandatory. These position will require travel. If you are interested, please send your resume to huguely_juliane@prc.com, fax (703) 556-2845. Thanks!! From owner-sqr-users@USA.NET Sat Jun 15 09:06:48 1996 Date: Fri, 14 Jun 1996 22:47:43 ... From: John Buginas Subject: Very long text fields. I am using Sybase and SQR 2.5. Is there an easy way to detect how long a text field will be, and to control precisely when the field will wrap, and what to do when it wraps? I'm constructing a fax cover letter that has an 'open ended' comment. I need to be able to let the open ended comment start on page one and run on through subsequent pages. Thank you. From owner-sqr-users@USA.NET Sat Jun 15 09:45:19 1996 Date: Sat, 15 Jun 1996 09:21:36 -0500 From: Ray Ontko Subject: Re: Very long text fields. > > I am using Sybase and SQR 2.5. > > Is there an easy way to detect how long a text field will be, and to control > precisely when the field will wrap, and what to do when it wraps? > > I'm constructing a fax cover letter that has an 'open ended' comment. I need to > be able to let the open ended comment start on page one and run on through > subsequent pages. I'm not sure what you mean by controlling when it will wrap, but you can say ON=<13><10> if you want it to wrap on a carriage return or a line feed. It will always wrap to the left edge of the field on the next line, and if you're at the bottom of the page will go to the top of the next. On an engagement long ago, (in a town far, far away) I needed to know how long two wrapped fields were so I would know which to print first (so that the longer one didn't wrap to a second page causing the first one to start on the second page instead of on the first), and so that if both would wrap I could know how much to print on the first page and then how much on the second. It was a real pain in the rear. Don't know if this is the question you were asking, but hope this helps. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the web" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Sat Jun 15 11:48:35 1996 Date: Thu, 13 Jun 1996 21:46:21 +0100 From: Steve Nicholas Subject: Re: SQR opportunities Reply: WHERE???????? >Hello! PRC Inc's PeopleSoft Consulting group has some great >opportunities for you!........... -- Steve Nicholas (freelance contractor (tons of SQR experience), London, UK) From owner-sqr-users@USA.NET Mon Jun 17 11:55:03 1996 Date: Mon, 17 Jun 1996 07:59:51 ... From: John Buginas Subject: Re[2]: Very long text fields. > > I am using Sybase and SQR 2.5. > > Is there an easy way to detect how long a text field will be, and to control > precisely when the field will wrap, and what to do when it wraps? > > I'm constructing a fax cover letter that has an 'open ended' comment. I need to > be able to let the open ended comment start on page one and run on through > subsequent pages. >On an engagement long ago, (in a town far, far away) I needed to >know how long two wrapped fields were so I would know which to >printfirst (so that the longer one didn't wrap to a second page causing >the first one to start on the second page instead of on the first), and >so that if both would wrap I could know how much to print on >the first page and then how much on the second. It was a real pain >in the rear. I have "open ended" data fields that could be longer than one page, or even 2. I am printing a cover letter to pass to a fax server, so my reports are only one 'record' long. I think the wrap command messes up if the total length of the field extends past the end of a page. I may have to mess around with setting the page length to 100 Meters and truncate the trailing white space. Thanks From owner-sqr-users@USA.NET Mon Jun 17 14:20:56 1996 Date: Mon, 17 Jun 1996 10:52:36 -0400 From: "He who is satisfied....fails" Subject: Printing Multiple Reports Hello SQR users, Got a question, I want to produce MULTIPLE (4) output files within the same SQR but write to each file at the same time (can't use NEW-REPORT). I understand that I can DECLARE-REPORT and USE-REPORT to write to files BUT I want the file names to be SPECIFIC names not defaults (.LIS,.L01,.L02.....). I could just CALL SYSTEM USING rename filename at the end of the SQR program but thats messy. Is there a way to use the "-F" flag to name the output files. Thanks NICK MOSCARITOLO Bentley College From owner-sqr-users@USA.NET Mon Jun 17 15:29:12 1996 Date: Mon, 17 Jun 1996 12:58:10 ... From: John Buginas Subject: Re[3]: Very long text fields. > > I am using Sybase and SQR 2.5. > > Is there an easy way to detect how long a text field will be, and to control > precisely when the field will wrap, and what to do when it wraps? > > I'm constructing a fax cover letter that has an 'open ended' comment. I need to > be able to let the open ended comment start on page one and run on through > subsequent pages. I finally worked around the wrap commands inability to have page-spanning text fields by by: 1). Writing the very long text field to an 80 character wide disk file. 2). Reading the disk file in and print-direct'ing each line to the print file. From owner-sqr-users@USA.NET Mon Jun 17 16:46:56 1996 Date: Mon, 17 Jun 1996 13:37:56 PST From: John Kellogg Subject: Re: Printing Multiple Reports Nick, Use one -F flag for each DECLARE-REPORT. For example: sqr multi_rpt -foutput1.lis -foutput2.lis -foutput3 -lis ... John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Printing Multiple Reports Author: SQR-USERS@USA.NET at Internet Date: 17/06/96 1:23 PM Hello SQR users, Got a question, I want to produce MULTIPLE (4) output files within the same SQR but write to each file at the same time (can't use NEW-REPORT). I understand that I can DECLARE-REPORT and USE-REPORT to write to files BUT I want the file names to be SPECIFIC names not defaults (.LIS,.L01,.L02.....). I could just CALL SYSTEM USING rename filename at the end of the SQR program but thats messy. Is there a way to use the "-F" flag to name the output files. Thanks NICK MOSCARITOLO Bentley College From owner-sqr-users@USA.NET Mon Jun 17 17:34:52 1996 Date: Mon, 17 Jun 1996 18:06:50 -0400 From: "He who is satisfied....fails" Subject: Re: Printing Multiple Reports I would like to thank all who responded to my OUTPUT question. Your suggestions all work. THANKS AGAIN Nick Moscaritolo Bentley College From owner-sqr-users@USA.NET Tue Jun 18 08:11:47 1996 Date: Tue, 18 Jun 1996 09:12:42 -0400 From: Gary Gallup - Sys Mgr/DBA Subject: SQR 3 for windows While waiting for my new Oracle 7 server to be installed, I wondered if its possible to run SQR 3 for windows on Windows95.? Or, when SQR for win95 will be out? __________________________________________________________________ \ Gary Gallup Information Technology Services_/ | Systems+Database+Network Northwestern Michigan College _/ | gary@nmc.edu Traverse City, MI 49684 _____/ \_______________________________________________________/ From owner-sqr-users@USA.NET Tue Jun 18 09:31:45 1996 Date: Tue, 18 Jun 1996 06:57:57 PST From: John Kellogg Subject: Re: SQR 3 for windows SQR version 3.0.12.2 will work with Windows95. It requires that the 16-bit Oracle database support files be installed. A native 32-bit port of SQR that will run on Windows95 is scheduled to be released by the end of this year. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: SQR 3 for windows Author: SQR-USERS@USA.NET at Internet Date: 18/06/96 6:23 AM While waiting for my new Oracle 7 server to be installed, I wondered if its possible to run SQR 3 for windows on Windows95.? Or, when SQR for win95 will be out? __________________________________________________________________ \ Gary Gallup Information Technology Services_/ | Systems+Database+Network Northwestern Michigan College _/ | gary@nmc.edu Traverse City, MI 49684 _____/ \_______________________________________________________/ From owner-sqr-users@USA.NET Tue Jun 18 13:28:54 1996 Date: Tue, 18 Jun 1996 12:22:24 -0600 From: Sean Carroll Subject: Use of single quotes and ! within quotes Dear all, How can I enter a single quote or exclaimation mark (!) within quotes in SQR, so I can print these things out on a report. Adding a sigle quote ends the string, and the system takes everything after ! as a comment. Is there some escape sequence etc to cater for this? Sean Carroll From owner-sqr-users@USA.NET Tue Jun 18 15:01:21 1996 Date: Tue, 18 Jun 1996 15:57:04 -0400 From: Irit Schwager Subject: Re: Use of single quotes and ! within quotes I can answer for single quotes: Use 2 single quotes, for example: print 'Bursar''s Office' (+1,1) I don't know about exclamation marks. Irit Schwager Administrative Programmer/Analyst Teachers College, Columbia U. schwage@cutcsq.tc.columbia.edu From owner-sqr-users@USA.NET Tue Jun 18 15:04:57 1996 Date: Tue, 18 Jun 1996 15:02:02 -0500 From: danian liu Subject: Re: Use of single quotes and ! within quotes Sean: > How can I enter a single quote or exclaimation mark (!) within quotes in SQR, > so I can print these things out on a report. Try '''' !! danian -- As I said before, I never repeat myself. From owner-sqr-users@USA.NET Tue Jun 18 15:18:59 1996 Date: Tue, 18 Jun 1996 13:15:11 -0700 From: Timothy Harris Subject: Re: Use of single quotes and ! within quotes Just type it in twice whereever you want it to show up once. This is hidden very nicely on page xviii of the preface(the page before page 1). It took me a while to find that one myself. While we're on the subject of single quotes, does anyone one know if there's a way to insert a text string that contains a single quote(for Oracle more specifically) from within an insert statement? We're trying to write a fairly generic replacement for SQL*Loader in SQR and it's choking when we want a single quote to appear in the text! Thanks, Tim Harris Systems Analyst Oregon State University harrist@ccmail.orst.edu On Tue, 18 Jun 1996, Sean Carroll wrote: > Dear all, > > How can I enter a single quote or exclaimation mark (!) within quotes in SQR, > so I can print these things out on a report. > > Adding a sigle quote ends the string, and the system takes everything after ! > as a comment. > > Is there some escape sequence etc to cater for this? > > Sean Carroll > From owner-sqr-users@USA.NET Tue Jun 18 15:35:13 1996 Date: Tue, 18 Jun 1996 15:31:57 -0500 From: Nathan Treadway Subject: single quotes in insert > While we're on the subject of single quotes, does anyone one know if there's > a way to insert a text string that contains a single quote(for Oracle more > specifically) from within an insert statement? We're trying to write a > fairly generic replacement for SQL*Loader in SQR and it's choking when we > want a single quote to appear in the text! Can you show us what you are trying and the error you are getting? The following code does insert a string containing a single ' into the varchar2 column "col1", at least with sqr 3.0.8 and Oracle 7.0.16. begin-procedure test let $test = 'I can''t swim' begin-sql insert into ttt (col1) values ($test) end-sql end-procedure Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Jun 18 15:37:14 1996 Date: Tue, 18 Jun 1996 13:31:37 -0500 From: Nathan Treadway Subject: Re: Use of single quotes and ! within quotes > How can I enter a single quote or exclaimation mark (!) within quotes in SQR, > so I can print these things out on a report. You can enter either of these by doubling it in the string. For example: let $temp = ' I can''t swim!!' show $temp will print I can't swim! Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Jun 18 15:48:32 1996 Date: Tue, 18 Jun 1996 11:42:55 -0700 From: Peter Alan Featherstone Subject: Re: Use of single quotes and ! within quotes Sean Carroll wrote: > > Dear all, > > How can I enter a single quote or exclaimation mark (!) within quotes in SQR, > so I can print these things out on a report. > > Adding a sigle quote ends the string, and the system takes everything after ! > as a comment. > > Is there some escape sequence etc to cater for this? Yes, you have to double the character. e.g. print 'Name is ''Report!!''' (2,10) center will put Name is 'Report!' on your report > > Sean Carroll -- Peter Featherstone Nortel-NSM Phone: 1 (604) 244-4002 Fax: 4225 http://www.nortel-nsm.com/ mailto:peter_featherstone@nortel-nsm.com private http://harrier.crest.nt.com/~feather/ mailto:feather@ncrshn03 public http://vanbc.wimsey.com/~peterf/ mailto:peterf@wimsey.com From owner-sqr-users@USA.NET Tue Jun 18 17:26:36 1996 Date: Thu, 18 Jul 1996 17:24:39 -0400 From: Bill Mancini Subject: =?iso-8859-1?Q?Subject=3A_=09Running_Successive_SQR=27s?= Hi All, I am trying to run a series of SQR's against Microsoft SQL Server (v = 4.21) on Windows NT (v 3.51) and am having difficulty in determining = when one SQR ends so that I can begin the next (apparantly you cannot = run two at once in this environment). Ideally, I would like to be able = to write one "master" SQR to accomplish this as a type of driver. Thanks, -Bill Mancini From owner-sqr-users@USA.NET Tue Jun 18 20:03:31 1996 Date: Tue, 18 Jun 1996 19:17:56 -0500 From: Nathan Treadway Subject: Re: Running Successive SQR > I am trying to run a series of SQR's against Microsoft SQL Server (v > 4.21) on Windows NT (v 3.51) and am having difficulty in determining > when one SQR ends so that I can begin the next (apparantly you cannot > run two at once in this environment). Ideally, I would like to be able > to write one "master" SQR to accomplish this as a type of driver. If what you want to do is have several different, stand-alone sqr programs that can also be run one after another by a "driver" program, the following approach might be helpful. --------------------prog1.sqr------------------------------- #ifndef MAIN begin-program do prog1 end-program #endif begin-procedure prog1 !do whatever you want end-procedure !prog1 --------------------prog2.sqr------------------------------- #ifndef MAIN begin-program do prog2 end-program #endif begin-procedure prog2 !do whatever you want end-procedure !prog1 --------------------driver.sqr------------------------------- #define MAIN blah #include 'prog1.sqr' #include 'prog2.sqr' begin-program do prog1 do prog2 end-program ------------------------------------------------------------ Prog1 and Prog2 can each be run separately, or can be run one after the other using Driver. You do need to be careful that none of your programs assume that variables are created empty (or equal to 0) if you use those same variables in more than one of your programs.... Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Jun 18 23:30:31 1996 Date: Tue, 18 Jun 1996 19:20:46 -0700 From: Alan Rosenthal Subject: Re: Subject: Running Successive SQR's Hi, If its any consolation I am having the same trouble in win95. The first execution of SQR opens a window. The second one takes over that window and cancels the first report. Not exactly what I had in mind. I would love to hear any suggestions and ideas. Thanks, alan ================================================================================ At 05:24 PM 7/18/96 -0400, you wrote: >Hi All, > >I am trying to run a series of SQR's against Microsoft SQL Server (v 4.21) on Windows NT (v 3.51) and am having difficulty in determining when one SQR ends so that I can begin the next (apparantly you cannot run two at once in this environment). Ideally, I would like to be able to write one "master" SQR to accomplish this as a type of driver. > >Thanks, > >-Bill Mancini > > -------------------------------------------------------------------- | Alan Rosenthal :o) email ahr@msi.com | | Biosym/MSI voice 619 597-9732 | | Management Information Systems fax 619 458-0136 | -------------------------------------------------------------------- | I have a simple philosophy. Fill what's empty. | | Empty what's full. Scratch where it itches. | | -- Alice Roosevelt Longworth (1884-1980) | -------------------------------------------------------------------- From owner-sqr-users@USA.NET Wed Jun 19 03:08:43 1996 Date: Tue, 18 Jun 1996 14:48:01 PST From: John Kellogg Subject: Re: Use of single quotes and ! within quotes Use double single quotes or double exclamation mark. For example: let $string_with_quotes = '''This string is quoted''' let $string_with_em = 'This string has an exclamation mark!!' John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Use of single quotes and ! within quotes Author: SQR-USERS@USA.NET at Internet Date: 18/06/96 2:13 PM Dear all, How can I enter a single quote or exclaimation mark (!) within quotes in SQR, so I can print these things out on a report. Adding a sigle quote ends the string, and the system takes everything after ! as a comment. Is there some escape sequence etc to cater for this? Sean Carroll From owner-sqr-users@USA.NET Wed Jun 19 09:43:06 1996 Date: Fri, 19 Jul 1996 09:54:52 -0400 From: Bill Mancini Subject: Re: Running Successive SQR ------ =_NextPart_000_01BB7558.59A9E960 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Thanks very much for your help, Nathan. -Bill ---------- From: Nathan Treadway[SMTP:nathant@ONTKO.COM] Sent: Tuesday, June 18, 1996 8:17 PM To: Multiple recipients of list SQR-USERS Subject: Re: Running Successive SQR > I am trying to run a series of SQR's against Microsoft SQL Server (v > 4.21) on Windows NT (v 3.51) and am having difficulty in determining > when one SQR ends so that I can begin the next (apparantly you cannot > run two at once in this environment). Ideally, I would like to be able > to write one "master" SQR to accomplish this as a type of driver. If what you want to do is have several different, stand-alone sqr programs that can also be run one after another by a "driver" program, the following approach might be helpful. --------------------prog1.sqr------------------------------- #ifndef MAIN begin-program do prog1 end-program #endif begin-procedure prog1 !do whatever you want end-procedure !prog1 --------------------prog2.sqr------------------------------- #ifndef MAIN begin-program do prog2 end-program #endif begin-procedure prog2 !do whatever you want end-procedure !prog1 --------------------driver.sqr------------------------------- #define MAIN blah #include 'prog1.sqr' #include 'prog2.sqr' begin-program do prog1 do prog2 end-program ------------------------------------------------------------ Prog1 and Prog2 can each be run separately, or can be run one after the other using Driver. You do need to be careful that none of your programs assume that variables are created empty (or equal to 0) if you use those same variables in more than one of your programs.... Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ ------ =_NextPart_000_01BB7558.59A9E960 Content-Type: application/ms-tnef Content-Transfer-Encoding: base64 eJ8+IgANAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAENgAQAAgAAAAIAAgABBJAG ABABAAABAAAADAAAAAMAADADAAAACwAPDgAAAAACAf8PAQAAAEEAAAAAAAAAgSsfpL6jEBmdbgDd AQ9UAgAAAABTUVItVVNFUlNAVVNBLk5FVABTTVRQAFNRUi1VU0VSU0BVU0EuTkVUAAAAAB4AAjAB AAAABQAAAFNNVFAAAAAAHgADMAEAAAASAAAAU1FSLVVTRVJTQFVTQS5ORVQAAAADABUMAQAAAAMA /g8GAAAAHgABMAEAAAAUAAAAJ1NRUi1VU0VSU0BVU0EuTkVUJwACAQswAQAAABcAAABTTVRQOlNR Ui1VU0VSU0BVU0EuTkVUAAADAAA5AAAAAAsAQDoBAAAAAgH2DwEAAAAEAAAAAAAAA5koAQiABwAY AAAASVBNLk1pY3Jvc29mdCBNYWlsLk5vdGUAMQgBBIABABsAAABSRTogUnVubmluZyBTdWNjZXNz aXZlIFNRUgAlCQEFgAMADgAAAMwHBwATAAkANgA0AAUAZQEBIIADAA4AAADMBwcAEwAJADQALwAF AF4BAQmAAQAhAAAAQThCMDU0RjkzRkUxQ0YxMUJERjkwMDIwQUYxQ0YwNTEASwcBA5AGAOgGAAAS AAAACwAjAAAAAAADACYAAAAAAAsAKQAAAAAAAwA2AAAAAABAADkAAJEE3Hl1uwEeAHAAAQAAABsA AABSRTogUnVubmluZyBTdWNjZXNzaXZlIFNRUgAAAgFxAAEAAAAWAAAAAbt1edvz+VSwqeE/Ec+9 +QAgrxzwUQAAHgAeDAEAAAAFAAAAU01UUAAAAAAeAB8MAQAAABQAAABibWFuY2luaUBydHNpbmMu Y29tAAMABhAfqJeZAwAHEAYGAAAeAAgQAQAAAGUAAABUSEFOS1NWRVJZTVVDSEZPUllPVVJIRUxQ LE5BVEhBTi1CSUxMLS0tLS0tLS0tLUZST006TkFUSEFOVFJFQURXQVlTTVRQOk5BVEhBTlRAT05U S09DT01TRU5UOlRVRVNEQVksAAAAAAIBCRABAAAAawUAAGcFAABHCwAATFpGdYYRpyX/AAoBDwIV AqgF6wKDAFAC8gkCAGNoCsBzZXQyNwYABsMCgzIDxQIAcHJCcRHic3RlbQKDM3cC5AcTAoB9CoAI zwnZO/EWDzI1NQKACoENsQtg4G5nMTAzFFALChRRJQvyYwBAIFQRgG5rhQQgdgSQeSBtdRFwFiAC EAXAeQhhIGhlSGxwLAewYXQbAS7RCoUgLUIDEGwKhQqLIGxpMTgwAtFpLXgxNDQN8AzQIBMLWTGu NgqgA2AT0GMFQC0iN68KhyDrDDAhtkYDYTojPh8htgyCHOUa4BYQYWR3AGF5W1NNVFA6Am4dA3RA T05US8BPLkNPTV0i3yPtLwZgAjAlHyYrVApQc2SDJ8Ac0Ep1bmUgH5ABHNAxOTk2IDg6YDE3IFBN KW8j7VSGbyuvJitNdWx0BSD2bC5AFhBjBSAIkAIwBCA4b2YgH3ATwAYAUVLALVVTRVJTL28qfjh1 Ymoh8TGPJitSZT04IFIuIAMAGRA3oWNjPweQAJAbYDUSHj8fQzM2ByC3GkUhtj4gSSBhmG0gdBuA OoJ0bzPgey4gPtAgEbAIgTSDNSEnmQQgYWcLcTTxTWkFAGxvczSgNQJMBlIbYSAMKHYKhT6gNC4y MRYpNJADoFcLgGRvd4UHoVRC0SAzLjVDwa0AcGQ+0hGAdjqCZAaQ/R/gYzNxG5ALgEYwEcAEkO5t C4A6gUMHdxyQA6ACIPU7UyAJ8GQEIEHgPwARgIsFQD7AYwORYmVnRvEXHRAuQC4weAVAKGFwuwqx KIFsG5AcQUoSbiHQ80MHP7J0dz+QSdECIDrwv0biHRAEAEkhRfADYG4HgOkCMCkuHcBJDbAHQEvg vxzQPsBNkDNwRYAfcGsuQG8/gUpgPtACYGVDBz+BdzcFEBPQSKMiAMATwXIi70jjP4EA0AWgbQtQ BAAb4N9Oc1MwHcA/4UbAcFKxNLDeZAUQG2EdVgqFSTSwSGD/SdFMEiewAjA/ckRQRuAEIP9F0S5A EbAbYQdARjMEkCtxNxzQE8BFYS0HQEiyc3HvBcAhsQnAPuBzCoVJs0oi3wdASYFRQT+ySLJhAYBC sW8AcCHQHJAFwGIbkD/wIv9WBFOAW3Uc0ErCAhAeEERgP0eoS2EDYADQG+BHcGdo9wVAUUEckmYz cFZtCoUiOPMiOFtyMS5bMWSvZywKhR4jBpBEQA3ABdBBSU7/CoVKY2WjW7EKhViRZbMKhftJMWot I0kxBpA7rGnXOvDuZAhwLkBrSiFYkVeCWVJ3V8drnG71IWtKZy9lhTL/Zg92L2gvaT9qT3Tia59s r/9tv27MeqZwL3E/ck9jz4Nc/1YFdT+F33dWDbELgC5AeEJ7SlALYGh3V04ACkANsCD6J2W3J4h/ dNeKFniPeZ//a4Z6P3tOgr+R/5MPhf87u/5QZcJFU5YCEeBKIieAG9H/XUURsEuCE9BQAgWxSiQ/ om8KhV24SsJedHUAkDqRRPtWHwrBWUwhWJEuMAmAUQX/SiAWEGLhSaRMgC4xNKEcQ3NbdlUBc3UH gEmjCoV2/wrABzBRgUDxbzEFACeAE9AvRYAT4AUwG5AoBbFlcfZ1WZE/gTBD0AaQTAObQP+gkkHQ WSE+4FGmoWhG8QRg728xJxOe/1vBLqiRYy8dk/+qL6s/rBsc9JCPro+vn7Cvb7G/Ioom/awSfAfw tGFP5QIwaz+QJiAIUE+AtMDbC4ACEEACIbVQLlQxS0H6dT+ALRYQC1AbkEARG2G+KQqFKEa2WLSy QaBoBGCfREBQIYgQtJMBgHAutleHHNBiQLsQOi8vd7xg/bs4L6jfPE89XyHyCoUVMQIAwWAAAwAQ EAAAAAADABEQAAAAAEAABzBAM0+ReXW7AUAACDBAM0+ReXW7AR4APQABAAAABQAAAFJFOiAAAAAA lTE= ------ =_NextPart_000_01BB7558.59A9E960-- From owner-sqr-users@USA.NET Wed Jun 19 10:11:31 1996 Date: Wed, 19 Jun 1996 10:36:00 -0400 From: John Douglas Subject: Re: Running Successive SQR Nathan, Thanks, your solution may be helpful here too. John Douglas Lockheed Martin Utility Services From owner-sqr-users@USA.NET Wed Jun 19 14:09:49 1996 Date: Wed, 19 Jun 1996 11:30:05 -0700 From: Timothy Harris Subject: Re: single quotes in insert OK, Here's what I'm doing: I'm trying to load a tab-delimited file of values into an oracle table. I'm building the $value_list from each record of the file. Each value has a comma between it and I'm enclosing the character data in single quotes(I'm looking at the data dictionary to get the table definition). The problem is, some of the data fields in the flat file contain single quotes and that screws up the insert statement since it takes the single quote as meaning 'end of field' and then blows up because it then expects a comma to delimit the value. Here's the error I get: ORA-00917: missing comma >From what I can see, Oracle's definition of an expression doesn't allow this and I'm not sure I could implement Nathan's suggestion below the dynamic way this program works with a variable number of fields. Thanks, Tim Harris Systems Analyst Oregon State University PS - Don't suggest changing the single quotes to double quotes. That fixes the problem but I want those darn single quotes! :) Here's the meat of the SQR code I'm using to insert: ***begin SQR code******** LET $cmd_line = 'INSERT INTO ' || $table_owner || '.' || $table_name || ' VALUES (' || $value_list || ')' BEGIN-SQL ON-ERROR=error_handler [$cmd_line] END-SQL ***end SQR code****** On Tue, 18 Jun 1996, Nathan Treadway wrote: > > While we're on the subject of single quotes, does anyone one know if there's > > a way to insert a text string that contains a single quote(for Oracle more > > specifically) from within an insert statement? We're trying to write a > > fairly generic replacement for SQL*Loader in SQR and it's choking when we > > want a single quote to appear in the text! > > Can you show us what you are trying and the error you are getting? > > The following code does insert a string containing a single ' into > the varchar2 column "col1", at least with sqr 3.0.8 and Oracle 7.0.16. > > > begin-procedure test > let $test = 'I can''t swim' > > begin-sql > insert into ttt (col1) values ($test) > end-sql > end-procedure > > > > Nathan > > ---------------------------------------------------------------------------- > Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) > nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ > From owner-sqr-users@USA.NET Wed Jun 19 14:48:22 1996 Date: Wed, 19 Jun 1996 07:02:11 PST From: John Kellogg Subject: Re: =?iso-8859-1?Q?Subject=3A_=09Running_Successive_SQR=27s? Bill, There is a new wait/nowait flag on the CALL command in version 3.0.13.2 on WindowsNT that is described in the release notes as follows: For Windows NT, the CALL command now has an additional parameter: CALL {your_sub} USING{source destination} [Param_literal] [wait/nowait] , This allows calling a subroutine and wait/no wait to proceed with the SQR program. This may be just what you are looking for. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: =?iso-8859-1?Q?Subject=3A_=09Running_Successive_SQR=27s?= Author: SQR-USERS@USA.NET at Internet Date: 19/06/96 6:23 AM Hi All, I am trying to run a series of SQR's against Microsoft SQL Server (v = 4.21) on Windows NT (v 3.51) and am having difficulty in determining = when one SQR ends so that I can begin the next (apparantly you cannot = run two at once in this environment). Ideally, I would like to be able = to write one "master" SQR to accomplish this as a type of driver. Thanks, -Bill Mancini From owner-sqr-users@USA.NET Wed Jun 19 14:51:58 1996 Date: Wed, 19 Jun 1996 09:28:12 -0400 From: Peter Alan Burton Subject: Re: =?iso-8859-1?Q?Subject=3A_=09Running_Successive_SQR=27s?= To all, Under Windows NT 3.51 you can use the command 'start' with the option /wait followed by the program name and arguments. This will cause the program to start and control will not return until the program finishes. Use 'start /?' for more detailed information. Peter Alan Burton Sr. Software Engineer/Architect MITI > From: Bill Mancini , on 07/18/1996 17:24: > Hi All, > > I am trying to run a series of SQR's against Microsoft SQL Server (v 4.21) on Windows NT (v 3.51) and am having difficulty in determining when one SQR ends so that I can begin the next (apparantly you cannot run two at once in this environment). Ideally, I would like to be able to write one "master" SQR to accomplish this as a type of driver. > > Thanks, > > -Bill Mancini > > > From owner-sqr-users@USA.NET Wed Jun 19 15:56:16 1996 Date: Wed, 19 Jun 1996 15:08:16 -0500 From: Nathan Treadway Subject: Re: single quotes in insert > I'm building the $value_list from each record of the file. Each value > has a comma between it and I'm enclosing the character data in single > quotes(I'm looking at the data dictionary to get the table definition). > The problem is, some of the data fields in the flat file contain single > quotes and that screws up the insert statement since it takes the single [...] > Here's the meat of the SQR code I'm using to insert: > ***begin SQR code******** > LET $cmd_line = 'INSERT INTO ' > || $table_owner > || '.' > || $table_name > || ' VALUES (' > || $value_list > || ')' > > BEGIN-SQL ON-ERROR=error_handler > [$cmd_line] > END-SQL > > ***end SQR code****** > Since you are using dynamic SQL, you actually need to have the doubled-up single quotes within the $cmd_line variable itself, so that Oracle can properly parse the SQL command. That is, your $cmd_line variable should contain something like insert into scott.temp values ('can''t swim'); I would guess that the easiest way to to that would be to double all of the "incoming" quotes as you build the contents of $value_list. Unfortunately SQR doesn't have a nice function for doing this, so you have to do something like this: -------------------------------------------------------------------------- begin-procedure double_substring(:$string,$substring) ! This procedure will look for occuences of $substring in $string and ! double them. For example: ! with a substring of ' : can't becomes can''t ! with a substring of ' : 'can' becomes ''can'' ! with a substring of an : can't becomes canan't let #len = length($substring) move 1 to #ind move '' to $result while #ind > 0 let #ind = instr($string,$substring,1) if #ind > 0 let $result = $result || substr($string, 1, #ind+#len -1) || $substring let $string = substr($string, #ind+#len, 99999) end-if end-while let $string = $result || $string end-procedure -------------------------------------------------------------------------- So, say you are reading from the tab-delimited file and then parsing the incoming lines into separate fields, each of which in turn is temporarily stored in $value_in. Before you append $value_in to $value_list, add the line do double_substring($value_in, '''') I think that is all you need to do, but if that doesn't work, "show" the value of $cmd_line and make sure that it's a valid SQL string (i.e. that it is accepted by SQL*Plus). Note that you probably need to do this as you are building $value_list because you don't want to double the single quotes that your program itself adds around character data. Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Jun 19 18:16:34 1996 Date: Wed, 19 Jun 1996 15:44:54 -0700 From: Timothy Harris Subject: Re: single quotes in insert Nathan was right on the money. Thank you, thank you, thank you! Now, MITI, what are the odds that, in the future, you could add an Oracle-like 'REPLACE' command to your baseline functions!?(is REPLACE an ANSI standard SQL function?) Tim Harris Systems Analyst Oregon State University On Wed, 19 Jun 1996, Nathan Treadway wrote: > > I'm building the $value_list from each record of the file. Each value > > has a comma between it and I'm enclosing the character data in single > > quotes(I'm looking at the data dictionary to get the table definition). > > The problem is, some of the data fields in the flat file contain single > > quotes and that screws up the insert statement since it takes the single > [...] > > Here's the meat of the SQR code I'm using to insert: > > ***begin SQR code******** > > LET $cmd_line = 'INSERT INTO ' > > || $table_owner > > || '.' > > || $table_name > > || ' VALUES (' > > || $value_list > > || ')' > > > > BEGIN-SQL ON-ERROR=error_handler > > [$cmd_line] > > END-SQL > > > > ***end SQR code****** > > > > Since you are using dynamic SQL, you actually need to have the doubled-up > single quotes within the $cmd_line variable itself, so that Oracle can > properly parse the SQL command. > > That is, your $cmd_line variable should contain something like > > insert into scott.temp values ('can''t swim'); > > I would guess that the easiest way to to that would be to double all > of the "incoming" quotes as you build the contents of $value_list. > Unfortunately SQR doesn't have a nice function for doing this, so you have > to do something like this: > > -------------------------------------------------------------------------- > begin-procedure double_substring(:$string,$substring) > > ! This procedure will look for occuences of $substring in $string and > ! double them. For example: > ! with a substring of ' : can't becomes can''t > ! with a substring of ' : 'can' becomes ''can'' > ! with a substring of an : can't becomes canan't > > let #len = length($substring) > move 1 to #ind > move '' to $result > > while #ind > 0 > let #ind = instr($string,$substring,1) > if #ind > 0 > let $result = $result || substr($string, 1, #ind+#len -1) || $substring > let $string = substr($string, #ind+#len, 99999) > end-if > end-while > let $string = $result || $string > end-procedure > -------------------------------------------------------------------------- > > So, say you are reading from the tab-delimited file and then parsing the > incoming lines into separate fields, each of which in turn is temporarily > stored in $value_in. Before you append $value_in to $value_list, add the > line > > do double_substring($value_in, '''') > > > I think that is all you need to do, but if that doesn't work, "show" the > value of $cmd_line and make sure that it's a valid SQL string (i.e. that it > is accepted by SQL*Plus). > > Note that you probably need to do this as you are building $value_list > because you don't want to double the single quotes that your program itself > adds around character data. > > Hope this helps. > > > Nathan > > > ---------------------------------------------------------------------------- > Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) > nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ > From owner-sqr-users@USA.NET Wed Jun 19 19:14:04 1996 Date: Thu, 20 Jun 1996 09:40:14 PDT From: Andrew Barnett Subject: Re: single quotes in insert >Now, MITI, what are the odds that, in the future, you could add an >Oracle-like 'REPLACE' command to your baseline functions!?(is REPLACE an >ANSI standard SQL function?) > >Tim Harris >Systems Analyst >Oregon State University Yes please! Also, GREATEST & LEAST overloaded for char/number. Is this the cue for wish lists? I have one about a page long but it probably doesn't describe SQR as we know it. -------------------------------------------------------- Andrew Barnett abarnett@isd.hih.com.au - Wizzard -------------------------------------------------------- From owner-sqr-users@USA.NET Thu Jun 20 09:27:38 1996 Date: Thu, 20 Jun 1996 16:46:45 PDT From: Semech@POBOX.COM Subject: LET expression We are doing upgrade to customer (on VAX) from SQR 2.5 to SQR 3. They have problem with expression like this : LET #X=#X-1 That works fine in SQR 2.5 and get SQR ERROR 4039 in SQR 3. Does anybody have a SQR program to fix this problem ? IT should insert one blank before the minus (#X -1) and take care on LET, IF, WHILE command and all other special cases. Thanks in advance, Arnon Oppenheimer ------------------------------------- Semech Software Marketing LTD. Phone : 972-3-5333144 Fax : 972-3-5333132 Email : semech@pobox.com Date: 20/6/96 Time: 04:46:46 PM ------------------------------------- From owner-sqr-users@USA.NET Thu Jun 20 10:09:15 1996 Date: Thu, 20 Jun 1996 09:56:00 GMT From: "Buckley,Jeff" Subject: I've got a problem with the SQuirTs! Our environment: SQR 3.0.12.3 Sybase System 10 HP 9000 HP-UX 10.01 Anyone have the problem after a reboot (IPL) of the Unix box, the SQT extensions (affectionately known as squirts here) became corrupt? It seems like the files didn't load correctly from the tape backups. Is there a special method of copying, or reloading, them (i.e.. ASCII or Binary)? Thanks Jeff ____________________ Jeff Buckley Technical Analyst CNA Insurance Business: Jeff.Buckley@cna.com (312) 822-7428 W (312) 817-3332 F (800) CNA-2000 TF Personal: jsbexcel@earthlink.net http://home.earthlink.net/~jsbexcel (312) 792-4194 From owner-sqr-users@USA.NET Thu Jun 20 14:07:52 1996 Date: Thu, 20 Jun 1996 10:52:52 -0700 From: Timothy Harris Subject: # variables in SQR We've noticed some strange behavior in SQR when using # variables in SQR. We're selecting a number from an Oracle database into an SQR column variable called &SUMMARY_AMOUNT and are getting some sort of strange approximation effect when we move that value to a SQR # variable(the Oracle field definition is NUMBER(12,2) by the way). Here's basically what I'm doing after getting &SUMMARY_AMOUNT: let #SUMMARY_AMOUNT = &SUMMARY_AMOUNT DISPLAY &SUMMARY_AMOUNT 99999.999999999999999 DISPLAY #SUMMARY_AMOUNT 99999.999999999999999 And here's what the output looks like on several differnt values of &SUMMARY_AMOUNT from the database: -22.500000000000000 <--database value -22.500000000000000 <--#variable value -13.630000000000000 . -13.630000000000001 ...etc -42.050000000000000 -42.049999999999999 -4687.000000000000000 -4687.000000000000000 21.100000000000000 21.100000000000001 20.950000000000000 20.949999999999999 5.000000000000000 5.000000000000000 Sometimes they're equal, sometimes they're not. It sure make things difficult when trying to compare these numbers and the result is not what it seems it should be! Does this mean I should round # variables at all times as a general rule? Thanks, Tim Harris Systems Analyst Oregon State University From owner-sqr-users@USA.NET Thu Jun 20 18:22:38 1996 Date: Thu, 20 Jun 1996 15:00:29 PST From: Gadi Yedwab Subject: Re: # variables in SQR SQR Version 3 uses machine binary floating point numbers which is the cause of this. It means that you do need to round numbers when comparing them. A soon to go beta SQR Version 4 fixes this problem by using exact high precision decimal numbers. If you are interested in beta-testing SQR Version 4 on Solaris, HP, AIX, or PC Windows, please e-mail to diannej@miti.com. Gadi Yedwab MITI ______________________________ Reply Separator _________________________________ Subject: # variables in SQR Author: SQR-USERS@USA.NET at Internet Date: 6/20/96 1:25 PM We've noticed some strange behavior in SQR when using # variables in SQR. We're selecting a number from an Oracle database into an SQR column variable called &SUMMARY_AMOUNT and are getting some sort of strange approximation effect when we move that value to a SQR # variable(the Oracle field definition is NUMBER(12,2) by the way). Here's basically what I'm doing after getting &SUMMARY_AMOUNT: let #SUMMARY_AMOUNT = &SUMMARY_AMOUNT DISPLAY &SUMMARY_AMOUNT 99999.999999999999999 DISPLAY #SUMMARY_AMOUNT 99999.999999999999999 And here's what the output looks like on several differnt values of &SUMMARY_AMOUNT from the database: -22.500000000000000 <--database value -22.500000000000000 <--#variable value -13.630000000000000 . -13.630000000000001 ...etc -42.050000000000000 -42.049999999999999 -4687.000000000000000 -4687.000000000000000 21.100000000000000 21.100000000000001 20.950000000000000 20.949999999999999 5.000000000000000 5.000000000000000 Sometimes they're equal, sometimes they're not. It sure make things difficult when trying to compare these numbers and the result is not what it seems it should be! Does this mean I should round # variables at all times as a general rule? Thanks, Tim Harris Systems Analyst Oregon State University From owner-sqr-users@USA.NET Thu Jun 20 18:29:20 1996 Date: Fri, 21 Jun 1996 09:09:30 PDT From: Andrew Barnett Subject: Re: # variables in SQR >We've noticed some strange behavior in SQR when using # variables in SQR. snip >Sometimes they're equal, sometimes they're not. It sure make things >difficult when trying to compare these numbers and the result is not >what it seems it should be! Does this mean I should round # variables >at all times as a general rule? > >Thanks, >Tim Harris >Systems Analyst >Oregon State University I've struck a problem in the past that is possibly related. I had a simple loop with a counter variable. I wanted to display something every 10 loops so I checked for MOD(#COUNTER, 10) = 0. Sometimes it didn't work when it should have, say when #COUNTER = 20. When I PRINTed or DISPLAYed #COUNTER to as many decimal places as possible it showed as exactly 20. If I subtracted 20 from it I got what looked like exactly zero. However, if I used if #COUNTER = 20 or if (#COUNTER - 20) = 0 they both returned false. #COUNTER had suffered some sort of a rounding error which was so small as to be undisplayable but was there nonetheless. What makes it worse is that I was only incrementing it by exactly 1, no fractions. Rounding did fix the problem. -------------------------------------------------------- Andrew Barnett abarnett@isd.hih.com.au - Wizzard -------------------------------------------------------- From owner-sqr-users@USA.NET Fri Jun 21 04:15:15 1996 Date: Fri, 21 Jun 1996 04:34:36 EDT From: Ian Royle Subject: Re[3]: Very long text fields. What about something like Begin-select field_name DATALENGTH(field_name) &text_length let #NUMBER_OF_LINES = ceil(&text_length/80) print &field_name (+1,1) wrap 80 :#NUMBER_OF_LINES from table end-select or am I missing the point ? Ian Date: Mon, 17 Jun 1996 07:59:51 ... From: John Buginas Subject: Re[2]: Very long text fields. > > I am using Sybase and SQR 2.5. > > Is there an easy way to detect how long a text field will be, and to control > precisely when the field will wrap, and what to do when it wraps? > > I'm constructing a fax cover letter that has an 'open ended' comment. I need to > be able to let the open ended comment start on page one and run on through > subsequent pages. >On an engagement long ago, (in a town far, far away) I needed to >know how long two wrapped fields were so I would know which to >printfirst (so that the longer one didn't wrap to a second page causing >the first one to start on the second page instead of on the first), and >so that if both would wrap I could know how much to print on >the first page and then how much on the second. It was a real pain >in the rear. I have "open ended" data fields that could be longer than one page, or even 2. I am printing a cover letter to pass to a fax server, so my reports are only one 'record' long. I think the wrap command messes up if the total length of the field extends past the end of a page. I may have to mess around with setting the page length to 100 Meters and truncate the trailing white space. Thanks ------------------------------ From owner-sqr-users@USA.NET Fri Jun 21 10:06:33 1996 Date: Fri, 21 Jun 1996 07:55:42 ... From: John Buginas Subject: Re[4]: Very long text fields. What about something like Begin-select field_name DATALENGTH(field_name) &text_length let #NUMBER_OF_LINES = ceil(&text_length/80) print &field_name (+1,1) wrap 80 :#NUMBER_OF_LINES from table end-select or am I missing the point ? Ian ------------------------------ What I ended up doing is write the text field to a disk file, read it back in line for line and wrote it direct (print-direct) to the printer. This preserves whatever carriage returns are already in the data and allows me to write across page boundaries. The problem is if there are more lines in the text area than there are on the page. It seems to overlay on the same page. begin-procedure print-fax do print-fax-header do print-long-fax-message end-procedure begin-procedure print-long-fax-message open $messagefile as 5 for-writing record=8196:vary write 5 from &text ! extra long text field close 5 open $messagefile as 5 for-reading record=80:vary while 1 read 5 into $data:80 if #end-file break end-if print-direct $data end-while close 5 end-procedure This works for me since my report has only one instance. I report only one entity, a fax cover sheet followed by a big long text field. From owner-sqr-users@USA.NET Fri Jun 21 13:04:48 1996 Date: Fri, 21 Jun 1996 10:36:27 ... From: John Buginas Subject: BAR CODES and version 2.5 Dumb question: I have SQR 2.5 installed, but an SQR 3.0 manual. Is the 'print-bar-code' command supported in only 3.0? When I try to use the print-bar-code command, I get an invalid command. I'm not sure if that's because the feature is not supported or if I'm doing something wrong. Thanks. The following is an attached File item from cc:Mail. It contains information that had to be encoded to ensure successful transmission through various mail systems. To decode the file use the UUDECODE program. --------------------------------- Cut Here --------------------------------- begin 644 rfc822.txt M4F5C96EV960Z(&)Y(&-C;6%I;"!F2!54T$N3D54("A,25-44T525BU40U`O25`@0T*("`@("`@("`@(&UA:6PN M=7-A+FYE="`H."XW+C4O."XW+C4I('=I=&@@15--5%`@:60@24%!,C0P-3`@ M9F]R#0H@("`@("`@("`@/'-Q'0-"DUE Subject: Re: LET expression This problem has been reported a few times before. It results from a change that was made in version 3 to eliminate confusion between variable names and mathmatic expressions. Since SQR allows characters such as - in variable names, #X-1 can be both a variable name and an expression. Since version 3, the assumption is made that this is a variable name. If it is actually an expression, it should be written as #x - 1. Our V4 User's Guide defines standards for variable naming conventions and recommends that - not be used in variable names. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: LET expression Author: SQR-USERS@USA.NET at Internet Date: 20/06/96 1:17 PM We are doing upgrade to customer (on VAX) from SQR 2.5 to SQR 3. They have problem with expression like this : LET #X=#X-1 That works fine in SQR 2.5 and get SQR ERROR 4039 in SQR 3. Does anybody have a SQR program to fix this problem ? IT should insert one blank before the minus (#X -1) and take care on LET, IF, WHILE command and all other special cases. Thanks in advance, Arnon Oppenheimer ------------------------------------- Semech Software Marketing LTD. Phone : 972-3-5333144 Fax : 972-3-5333132 Email : semech@pobox.com Date: 20/6/96 Time: 04:46:46 PM ------------------------------------- From owner-sqr-users@USA.NET Fri Jun 21 14:41:42 1996 Date: Fri, 21 Jun 1996 08:30:32 PST From: John Kellogg Subject: Re[2]: single quotes in insert Enhancement request #380 requesting a REPLACE function in the LET command is currently open. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Re: single quotes in insert Author: SQR-USERS@USA.NET at Internet Date: 19/06/96 7:19 PM >Now, MITI, what are the odds that, in the future, you could add an >Oracle-like 'REPLACE' command to your baseline functions!?(is REPLACE an >ANSI standard SQL function?) > >Tim Harris >Systems Analyst >Oregon State University Yes please! Also, GREATEST & LEAST overloaded for char/number. Is this the cue for wish lists? I have one about a page long but it probably doesn't describe SQR as we know it. -------------------------------------------------------- Andrew Barnett abarnett@isd.hih.com.au - Wizzard -------------------------------------------------------- From owner-sqr-users@USA.NET Fri Jun 21 15:54:25 1996 Date: Fri, 21 Jun 1996 13:18:12 ... From: John Buginas Subject: Change font in middle of report v 2.5 The DECLARE PRINTER statement seems to be changing the 'position' of the output cursor on the page when I change font size. Is there a way w/o using raw PCL to change the font size of printed itms during the run of a report. From owner-sqr-users@USA.NET Fri Jun 21 17:53:41 1996 Date: Fri, 21 Jun 1996 14:38:37 PST From: John Kellogg Subject: Re: BAR CODES and version 2.5 The PRINT-BAR-CODE command was introduced in version 3. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: BAR CODES and version 2.5 Author: SQR-USERS@USA.NET at Internet Date: 21/06/96 1:29 PM Dumb question: I have SQR 2.5 installed, but an SQR 3.0 manual. Is the 'print-bar-code' command supported in only 3.0? When I try to use the print-bar-code command, I get an invalid command. I'm not sure if that's because the feature is not supported or if I'm doing something wrong. Thanks. information that had to be encoded to ensure successful transmission through various mail systems. To decode the file use the UUDECODE program. --------------------------------- Cut Here --------------------------------- From owner-sqr-users@USA.NET Fri Jun 21 20:51:44 1996 Date: Fri, 21 Jun 1996 17:39:24 PST From: Gadi Yedwab Subject: Re: Change font in middle of report v 2.5 There's the GRAPHICS FONT command. Gadi. ______________________________ Reply Separator _________________________________ Subject: Change font in middle of report v 2.5 Author: SQR-USERS@USA.NET at Internet Date: 6/21/96 2:23 PM The DECLARE PRINTER statement seems to be changing the 'position' of the output cursor on the page when I change font size. Is there a way w/o using raw PCL to change the font size of printed itms during the run of a report. From owner-sqr-users@USA.NET Sun Jun 23 11:42:07 1996 Date: Sun, 23 Jun 1996 19:30:29 PDT From: Semech@POBOX.COM Subject: Re: LET expression Since no one replay utill now, nothing other left than "do it yourself" (this SQR base on previos workaround from John Kellogg MITI Tech Support) : ---- Start here : begin-report get_input: input $filename 'Enter the name of the file to convert' if $filename = '' stop quiet end-if open $filename as 1 for-reading record=256:vary status=#o if #o <> 0 input $fail 'File does not exist - enter return to try again' goto get_input end-if open 'tmpfile' as 2 for-writing record=256:vary while 1 read 1 into $record:256 add 1 to #rec_num if #end-file break end-if let $record1=upper($record) if instr($record1,'LET',1) or ! line has LET / IF / WHILE instr($record1,'WHILE',1) or instr($record1,'IF',1) let #x=instr($record,'-',1) while #x > 0 let $record=substr($record,1,#x -1)|| ' -'||substr($record,#x+1,256) let #x=instr($record,'-',#x+2) end-while end-if ! let / while / if write 2 from $record end-while close 1 close 2 display 'Total lines in file : ' noline display #rec_num ! change here to rename commands !!!!!! ! let $cmd = 'mv '|| $filename ||' ' || $filename || '.old' !keep old v ! call system using $cmd #status ! let $cmd = 'mv tmpfile ' || $filename ! call system using $cmd #status goto get_input end-report ----- End here Arnon ------------------------------------- Semech Software Marketing LTD. Phone : 972-3-5333144 Fax : 972-3-5333132 Email : semech@pobox.com Date: 23/6/96 Time: 07:30:29 PM ------------------------------------- From owner-sqr-users@USA.NET Mon Jun 24 11:55:09 1996 Date: Mon, 24 Jun 1996 09:15:35 -0700 From: Mallory Stevens Subject: Question about WindowsNT This is not really an SQR specific question, but I was hoping that somebody had experience in this area. We are moving from Solaris to NT and I am concerned that I will not be able to automatically run my reports. I have heard that NT has a cron-like function, but I have heard mixed reviews on how well it works. If you are running under this configuration, have you had problems in this area? Thanks in advance, Mallory ______________________________________________________________________ Mallory J. Stevens Tel. 415-312-0833 Manager, Technical Support Email mallory@visigenic.com Visigenic Software, Inc. Fax 415-286-2464 ______________________________________________________________________ From owner-sqr-users@USA.NET Tue Jun 25 16:52:48 1996 Date: Tue, 25 Jun 1996 15:03:02 -0700 From: Bill Spence Subject: Compiling and printing As a new SQR user I am having trouble compiling a program and printing in landscape rather than portrait. I have reviewed the command line parameters but must be missing something. I am using Windows 3.1 Any help is appreciated. Thanks From owner-sqr-users@USA.NET Tue Jun 25 19:46:06 1996 Date: Tue, 25 Jun 1996 17:53:15 -0700 From: joan Subject: handy utility wanted... Esteemed fellow sqr users-- I'm looking for a flexible, generic data load program which basically would allow a user to upload a pipe delimited flat file into a specified db table, updating records if the record exists, and inserting all data if the record isn't found. I may end up writing this myself, but was hoping someone had something tucked away somewhere. Eventually, we hope to enhance the utility until it will take combination keys and a list of fields which may not be overwitten if the record exists -- perhaps do other tricks as well. We figure with dynamic SQR we ought to be able to make it handle any single table. Has anyone done this? tnx, jdh From owner-sqr-users@USA.NET Wed Jun 26 00:19:50 1996 Date: Wed, 26 Jun 1996 01:05:36 EDT From: Ed Crotty <73747.1247@COMPUSERVE.COM> Subject: bitmaps I am trying to print a bitmap to an intermec thermal printer. Does anyone know how to decode a bitmap file back into the actual bits? I have the file in TIF BMP and EPS formats and need to get to the actual bits strings to load it into this printer. Any help would be greatly appreciated. Thanks!! Ed Crotty - 74747.1247@compuserve.com From owner-sqr-users@USA.NET Wed Jun 26 10:17:51 1996 Date: Wed, 26 Jun 1996 09:31:00 GMT From: "Buckley,Jeff" Subject: Re: Compiling and printing We're using SQR3 v.3.0.12.3 (Unix) and SQR3 v.30.12.2 (Windows). Solution: Declare-Printer Orientation=landscape End-Declare That should work in any environment (Windows or Unix). Also, check your print manager (Windows environment). If it is setup to print one specific way, that could be overriding what you're trying to accomplish. But I doubt it. Just something else to check. Hope that helps Jeff ____________________ Business: Jeff.Buckley@cna.com Technical Analyst CNA Insurance ---------- From: user:owner-sqr-users@USA.NET To: user:SQR-USERS@USA.NET Subject: Compiling and printing Date: Tuesday, June 25, 1996 5:32PM As a new SQR user I am having trouble compiling a program and printing in landscape rather than portrait. I have reviewed the command line parameters but must be missing something. I am using Windows 3.1 Any help is appreciated. Thanks From owner-sqr-users@USA.NET Wed Jun 26 12:18:06 1996 Date: Wed, 26 Jun 1996 10:24:17 -0700 From: Bill Spence Subject: Re[2]: Compiling and printing Thanks for the reply Jeff. I am using SQR3 v.3.0.12.1 and when I try to use 'orientation' it gives me an error (SQR5303) Invalid qualifier. The fact I am at 12.1 rather than 12.2 is likely the difference We're using SQR3 v.3.0.12.3 (Unix) and SQR3 v.30.12.2 (Windows). Solution: Declare-Printer Orientation=landscape End-Declare That should work in any environment (Windows or Unix). Also, check your print manager (Windows environment). If it is setup to print one specific way, that could be overriding what you're trying to accomplish. But I doubt it. Just something else to check. Hope that helps Jeff ____________________ Business: Jeff.Buckley@cna.com Technical Analyst CNA Insurance ---------- From: user:owner-sqr-users@USA.NET To: user:SQR-USERS@USA.NET Subject: Compiling and printing Date: Tuesday, June 25, 1996 5:32PM As a new SQR user I am having trouble compiling a program and printing in landscape rather than portrait. I have reviewed the command line parameters but must be missing something. I am using Windows 3.1 Any help is appreciated. Thanks From owner-sqr-users@USA.NET Wed Jun 26 17:12:38 1996 Date: Wed, 26 Jun 1996 13:32:04 PST From: John Kellogg Subject: Re: Compiling and printing Since you are a new user, I assume you are using version 3. Defining landscape report output is done with the Declare-Layout command. For example: Begin-Setup Declare-Layout default orientation=landscape End-Declare End-Setup Regards, John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Compiling and printing Author: SQR-USERS@USA.NET at Internet Date: 25/06/96 4:22 PM As a new SQR user I am having trouble compiling a program and printing in landscape rather than portrait. I have reviewed the command line parameters but must be missing something. I am using Windows 3.1 Any help is appreciated. Thanks From owner-sqr-users@USA.NET Wed Jun 26 19:44:35 1996 Date: Wed, 26 Jun 1996 10:16:37 ... From: John Buginas Subject: Line drawing, version 2.5 Why might not a graphic () box 1 command work on an HPLASERJET AND POSCRIPT? From owner-sqr-users@USA.NET Wed Jun 26 21:02:52 1996 Date: Thu, 27 Jun 1996 11:36:15 PDT From: Andrew Barnett Subject: Re: Line drawing, version 2.5 > Why might not a > > graphic () box 1 > > command work on an HPLASERJET AND POSCRIPT? > You have not specified a width - if you want a line use vert-line instead. -------------------------------------------------------- Andrew Barnett abarnett@isd.hih.com.au - Wizzard -------------------------------------------------------- From owner-sqr-users@USA.NET Thu Jun 27 10:21:53 1996 Date: Thu, 27 Jun 1996 08:33:25 -0700 From: Michael Price Subject: SQrL : SQR developer's environment I have created an SQR developer's environment, which initiates SQR's in the background and tracks log files, reports, datafiles, and provides automatic archiving. Also includes a scheduler for stacking and running SQR's at a later time. Will work on a single workstation or networked. Records all network SQR activity in a system log. Allows any SQR to be initiated and run on any workstation on a network from any other workstation, or from remote dialup. Very flexible. I rely on this program for all of my SQR development and some of my clients now use it as an SQR user's environment for running, tracking, and archiving production reports. Source code for a flexible report generator included. Windows 3.x beta shareware version available. Windows 95 version in works. Email me if you want to see documentation. From owner-sqr-users@USA.NET Thu Jun 27 17:01:14 1996 Date: Thu, 27 Jun 1996 15:59:00 GMT From: "Buckley,Jeff" Subject: Re: SQrL : SQR developer's environment Love to hear more about this. But... who are you? ____________________ Business: Jeff.Buckley@cna.com Technical Analyst CNA Insurance ---------- From: user:owner-sqr-users@USA.NET To: user:SQR-USERS@USA.NET Subject: SQrL : SQR developer's environment Date: Thursday, June 27, 1996 1:59PM I have created an SQR developer's environment, which initiates SQR's in the background and tracks log files, reports, datafiles, and provides automatic archiving. Also includes a scheduler for stacking and running SQR's at a later time. Will work on a single workstation or networked. Records all network SQR activity in a system log. Allows any SQR to be initiated and run on any workstation on a network from any other workstation, or from remote dialup. Very flexible. I rely on this program for all of my SQR development and some of my clients now use it as an SQR user's environment for running, tracking, and archiving production reports. Source code for a flexible report generator included. Windows 3.x beta shareware version available. Windows 95 version in works. Email me if you want to see documentation. From owner-sqr-users@USA.NET Fri Jun 28 15:41:45 1996 Date: Fri, 28 Jun 1996 09:01:13 -0700 From: Kathi Hardy Subject: Re: SQrL : SQR developer's environment I am interested in seeing the documentation. From owner-sqr-users@USA.NET Fri Jun 28 23:10:25 1996 Date: Sat, 29 Jun 1996 00:06:33 -0400 From: Paul Baker Subject: Re: SQrL : SQR developer's environment I would be intrested in seeing your docs Thanks in Advance Paul Baker From owner-sqr-users@USA.NET Mon Jul 1 11:11:04 1996 Date: Mon, 1 Jul 1996 00:25:15 +0100 From: Steve Nicholas Subject: Re: SQrL : SQR developer's environment Details appreciated! Steve Nicholas, freelance Oracle consultant, UK From owner-sqr-users@USA.NET Mon Jul 1 13:03:00 1996 Date: Mon, 1 Jul 1996 16:54:00 +0100 From: Vaughan Mullins Subject: Basics Currently, I am working in a support analyst programmers role for a large distribution corporation. I am amending existing sqr report files that run on an ORACLE (Version 7) database. I am enquiring to the availability of any tutorials or basic instructions to the creation of sqr reports that I could obtain online or by some means of file transfer. The existing manuals are held at the headquarter site and are inaccessible to myself. Many thanks Vaughan Mullins From owner-sqr-users@USA.NET Mon Jul 1 21:26:42 1996 Date: Mon, 1 Jul 1996 18:50:22 PST From: Kirsten Coleman Subject: Re: SQrL : SQR developer's environment I would like to see a copy of what you have. Thanks, Kirsten Coleman kirstenc@miti.com ______________________________ Reply Separator _________________________________ Subject: SQrL : SQR developer's environment Author: SQR-USERS@USA.NET at Internet Date: 06/27/96 09:22 AM I have created an SQR developer's environment, which initiates SQR's in the backg round and tracks log files, reports, datafiles, and provides automatic archiving. Also includes a scheduler for stacking and running SQR's at a later time. Will work on a single workstation or networked. Records all network SQR activity in a system log. Allows any SQR to be initiated and run on any workstation on a networ k from any other workstation, or from remote dialup. Very flexible. I rely on this program for all of my SQR development and some of m y clients now use it as an SQR user's environment for running, tracking, and archiv ing production reports. Source code for a flexible report generator included. Windows 3.x beta shareware version available. Windows 95 version in works. Email me if you want to see documentation. From owner-sqr-users@USA.NET Tue Jul 2 09:45:14 1996 Date: Tue, 2 Jul 1996 09:39:44 -0500 From: Ray Ontko Subject: Re: Basics > Currently, I am working in a support analyst programmers role for a large > distribution corporation. I am amending existing sqr report files that run > on an ORACLE (Version 7) database. I am enquiring to the availability of > any tutorials or basic instructions to the creation of sqr reports that I > could obtain online or by some means of file transfer. The existing > manuals are held at the headquarter site and are inaccessible to myself. > > Many thanks > > Vaughan Mullins We have an SQR Programmer Reference Card which we developed. We are in the process of putting into HTML, but aren't quite ready. In the mean-time, if you (or anyone else) would like a printed copy (or fax copy), I'd be happy to send one. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the Web" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Jul 2 10:55:35 1996 Date: Tue, 2 Jul 1996 08:46:43 -0700 From: Benjamin Le Subject: SQR Documentation Some one posted SQrL Developer's Environment. I 'd like to have a copy. Ray, Would you send me a copy what you have for SQR Programmer's Reference Card. My address is bellow. Thanks. Ben. ___________________________________________________________________________ Benjamin Le Voice: (503)-977-4970 Portland Community College, Information Technology Fax : (503)-977-4987 P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu ___________________________________________________________________________ From owner-sqr-users@USA.NET Tue Jul 2 15:49:13 1996 Date: Tue, 2 Jul 1996 15:41:55 -600 From: bonnie crittington Subject: SQrL: SQR developers's environment I am interested in a copy of your documentation as well. From owner-sqr-users@USA.NET Wed Jul 3 01:21:15 1996 Date: Wed, 3 Jul 1996 09:17:00 GMT-0200 From: WDFI-F KyttÈa Timo Subject: Q: IsNumeric-function ? Hello everybody! I joined in this list yesterday and now I already have a good (?) question. We use SQRWB/3.0.7.0.1 in Sun/Solaris & Oracle 7.1 and I needed to check in my program if first character in field is numeric or not. At first I tried to look in SQR-functions, but found nothing to this purpose. Then I tried to do it in SQL, but couldn't think of anything else but ugly decode(substr(field,1,1),1,'YES',2, .... Does anybody know any way to do this easier in SQR or in Oracle SQL? Thanks in advance Timo timo.kytta@vaasa.wartsila.infonet.com http://www.pcuf.fi/~tik 'reality is for people, who cannot //// cope with science fiction ' (o o) -------------------------------------o00=(_)=00o--- From owner-sqr-users@USA.NET Wed Jul 3 01:57:03 1996 Date: Wed, 3 Jul 1996 16:44:16 PDT From: Andrew Barnett Subject: Re: Q: IsNumeric-function ? >We use SQRWB/3.0.7.0.1 in Sun/Solaris & Oracle 7.1 and I >needed to check in my program if first character in field >is numeric or not. > >At first I tried to look in SQR-functions, but found nothing >to this purpose. Then I tried to do it in SQL, but couldn't think >of anything else but ugly decode(substr(field,1,1),1,'YES',2, .... > >Does anybody know any way to do this easier in SQR or in Oracle SQL? >timo.kytta@vaasa.wartsila.infonet.com >http://www.pcuf.fi/~tik >'reality is for people, who cannot //// > cope with science fiction ' (o o) > -------------------------------------o00=(_)=00o--- > in SQR if isnull(ltrim(rtrim(substr($field,1 ,1 ),'1234567890'), '1234567890')) do numeric_stuff else do other_stuff end-if or less good if substr($field,1,1) in ('1','2' ... etc do numeric_stuff else do other_stuff end-if and probably lots of other ways. Like your sig. -------------------------------------------------------- Andrew Barnett abarnett@isd.hih.com.au - Wizzard -------------------------------------------------------- From owner-sqr-users@USA.NET Sat Jul 6 17:54:07 1996 Date: Sat, 6 Jul 1996 16:08:54 +0100 From: Steve Nicholas Subject: Re: Basics Reply: Yes plese - I would appreciate a copy - email would be fine Original: >We have an SQR Programmer Reference Card which we developed. >We are in the process of putting into HTML, but aren't quite..... -- Steve Nicholas, Freelance Oracle Consultant, London, UK From owner-sqr-users@USA.NET Sun Jul 7 13:49:04 1996 Date: Sun, 7 Jul 1996 12:50:44 -0600 From: Mark Britton Subject: Re: Q: IsNumeric-function ? At 09:17 AM 7/3/96 GMT-0200, you wrote: >Hello everybody! > >I joined in this list yesterday and now I already have a >good (?) question. > >We use SQRWB/3.0.7.0.1 in Sun/Solaris & Oracle 7.1 and I >needed to check in my program if first character in field >is numeric or not. > >At first I tried to look in SQR-functions, but found nothing >to this purpose. Then I tried to do it in SQL, but couldn't think >of anything else but ugly decode(substr(field,1,1),1,'YES',2, .... > >Does anybody know any way to do this easier in SQR or in Oracle SQL? > > >Thanks in advance > Timo > >timo.kytta@vaasa.wartsila.infonet.com >http://www.pcuf.fi/~tik >'reality is for people, who cannot //// > cope with science fiction ' (o o) > -------------------------------------o00=(_)=00o--- > > Here's one way you could do it if range(substr(&field,1,1),'0','9') print 'Numeric' else print 'Not Numeric' end-if Mark From owner-sqr-users@USA.NET Mon Jul 8 10:56:10 1996 Date: Mon, 8 Jul 1996 07:52:10 PST From: John Kellogg Subject: Re[2]: Q: IsNumeric-function ? This is not pretty either but it works: if (ascii($string) > 48 and ascii($string) < 57) display 'First character is numeric' else display 'First character is non-numeric' end-if John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Re: Q: IsNumeric-function ? Author: SQR-USERS@USA.NET at Internet Date: 07/07/96 12:27 PM At 09:17 AM 7/3/96 GMT-0200, you wrote: >Hello everybody! > >I joined in this list yesterday and now I already have a >good (?) question. > >We use SQRWB/3.0.7.0.1 in Sun/Solaris & Oracle 7.1 and I >needed to check in my program if first character in field >is numeric or not. > >At first I tried to look in SQR-functions, but found nothing >to this purpose. Then I tried to do it in SQL, but couldn't think >of anything else but ugly decode(substr(field,1,1),1,'YES',2, .... > >Does anybody know any way to do this easier in SQR or in Oracle SQL? > > >Thanks in advance > Timo > >timo.kytta@vaasa.wartsila.infonet.com >http://www.pcuf.fi/~tik >'reality is for people, who cannot //// > cope with science fiction ' (o o) > -------------------------------------o00=(_)=00o--- > > Here's one way you could do it if range(substr(&field,1,1),'0','9') print 'Numeric' else print 'Not Numeric' end-if Mark From owner-sqr-users@USA.NET Mon Jul 8 16:39:20 1996 Date: Mon, 8 Jul 1996 16:03:07 -0500 From: Ray Ontko Subject: SQR Programmer Reference Card Our programmer reference card is now available via the world wide web. Feel free to print a copy, or ask us to send you a printed copy. The address: SQR Programmer Reference Card http://www.ontko.com/sqrcard.html Suggestions welcomed! Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the Web" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Jul 10 10:46:22 1996 Date: Wed, 10 Jul 1996 10:31:00 GMT From: "Facer,Simon" Subject: Dynamic sizing of SQR Array I need to dynamically size some arrays in an SQR report. Does anyone know the syntax for this ? Background : I am converting an existing Crystal report to SQR, and need to print a grid over multiple pages. The Crystal version of the report 'cheats' by using VB to build the grid then writes that grid to Sybase in the proper (paginated) output format. I need to remove the processing from VB completely. A SYBASE stored procedure to build the grid would be prohibitively complicated, but I can do the same in code quite easily. I can size the arrays to the maximum, however this will use several Meg of memory that will be mostly unused; so I would like to set the array sizes to match the data, and not suck up unnecessary resources from the server. Thanking you in advance Simon Facer simon.facer@cna.com From owner-sqr-users@USA.NET Wed Jul 10 11:44:01 1996 Date: Wed, 10 Jul 1996 09:39:26 -0700 From: joan Subject: Re: Dynamic sizing of SQR Array ------ =_NextPart_000_01BB6E43.B0DF29A0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit If processing speed weren't too much of an issue, you could build the grid and insert the records into a scratch table, then select them out when you had them all... jdh ---------- From: Facer,Simon[SMTP:simon.facer@CNA.COM] Sent: Wednesday, July 10, 1996 3:31 AM To: Multiple recipients of list SQR-USERS Subject: Dynamic sizing of SQR Array I need to dynamically size some arrays in an SQR report. Does anyone know the syntax for this ? Background : I am converting an existing Crystal report to SQR, and need to print a grid over multiple pages. The Crystal version of the report 'cheats' by using VB to build the grid then writes that grid to Sybase in the proper (paginated) output format. I need to remove the processing from VB completely. A SYBASE stored procedure to build the grid would be prohibitively complicated, but I can do the same in code quite easily. I can size the arrays to the maximum, however this will use several Meg of memory that will be mostly unused; so I would like to set the array sizes to match the data, and not suck up unnecessary resources from the server. Thanking you in advance Simon Facer simon.facer@cna.com ------ =_NextPart_000_01BB6E43.B0DF29A0 Content-Type: application/ms-tnef Content-Transfer-Encoding: base64 eJ8+Ih0QAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAENgAQAAgAAAAIAAgABBJAG ABABAAABAAAADAAAAAMAADADAAAACwAPDgAAAAACAf8PAQAAAEEAAAAAAAAAgSsfpL6jEBmdbgDd AQ9UAgAAAABTUVItVVNFUlNAVVNBLk5FVABTTVRQAFNRUi1VU0VSU0BVU0EuTkVUAAAAAB4AAjAB AAAABQAAAFNNVFAAAAAAHgADMAEAAAASAAAAU1FSLVVTRVJTQFVTQS5ORVQAAAADABUMAQAAAAMA /g8GAAAAHgABMAEAAAAUAAAAJ1NRUi1VU0VSU0BVU0EuTkVUJwACAQswAQAAABcAAABTTVRQOlNR Ui1VU0VSU0BVU0EuTkVUAAADAAA5AAAAAAsAQDoBAAAAAgH2DwEAAAAEAAAAAAAAA5koAQiABwAY AAAASVBNLk1pY3Jvc29mdCBNYWlsLk5vdGUAMQgBBIABACAAAABSRTogRHluYW1pYyBzaXppbmcg b2YgU1FSIEFycmF5AJQKAQWAAwAOAAAAzAcHAAoACQAnABoAAwAxAQEggAMADgAAAMwHBwAKAAkA JAAyAAMARgEBCYABACEAAAAwODNGMzM2NzM0REFDRjExOUMzQzAwMjBBRjZBNUQ1OQAkBwEDkAYA 3AUAABIAAAALACMAAAAAAAMAJgAAAAAACwApAAAAAAADADYAAAAAAEAAOQBgKOVbfm67AR4AcAAB AAAAIAAAAFJFOiBEeW5hbWljIHNpemluZyBvZiBTUVIgQXJyYXkAAgFxAAEAAAAWAAAAAbtuflvd ZzM/Cdo0Ec+cPAAgr2pdWQAAHgAeDAEAAAAFAAAAU01UUAAAAAAeAB8MAQAAABIAAABqb2FuQG1l ZGl3YXJlLmNvbQAAAAMABhALNZMPAwAHEKQDAAAeAAgQAQAAAGUAAABJRlBST0NFU1NJTkdTUEVF RFdFUkVOVFRPT01VQ0hPRkFOSVNTVUUsWU9VQ09VTERCVUlMRFRIRUdSSURBTkRJTlNFUlRUSEVS RUNPUkRTSU5UT0FTQ1JBVENIVEFCTEUsVEhFAAAAAAIBCRABAAAAWwQAAFcEAAB8BwAATFpGdYyV 2L3/AAoBDwIVAqgF6wKDAFAC8gkCAGNoCsBzZXQyNwYABsMCgzIDxQIAcHJCcRHic3RlbQKDM3cC 5AcTAoB9CoAIzwnZO/EWDzI1NQKACoENsQtg4G5nMTAzFFALChRRhQvyYwBAIElmIBNQHG9jB5AA kBkQIHNwsQngZCB3BJAJ8CcFQEB0b28gbXURcCAebxsAA5EEAQpQLCB5JQhgIAWgdWwcEGJ1QwMQ HBB0aGUgCcBp/xwQAHAcEAuAEbAAIB8CCoX7FhAFoWQEIAuAHLAdYBvA2QUAYXQdEQGRbB3hHxFX A6ARsCKQYyAzbR0wdf0FQHci4h4SEYAe8yPAB0AcbC4lcAqFCoVqZGiDJawK9GxpMTgwAtHgaS0x NDQN8AzQKJN5C1kxNgqgA2AT0CNhLV8qtwqHKWsMMCo2RgNhOj8rvio2DIItQADQBJAsUwMHcAIg W1NNVFA6EwCQL/EuZi+CQENOwEEuQ09NXStfLG2vBmACMC2fLqtXCYBuB5AoZGF5HfBKHnB5IAMZ MB3wMTk5NiAzZDozGtBBTTHPLG1U1m80Dy6rTR5wdAUgIpD/IOIFIAiQAjAEIB1BJ/ATwAEGAFFS LVVTRVLGUzfvMt51YmojUToPAS6rRHluYW1pY/kbwGl6G5IdQT2hFLEiAOZ5Jr8nwzM2KTcaRSo2 3EkgNhAcASGRZEKUJUH3NsBDAR8wcwNwHzAKwEQBryFSHWJDohYQcBWxLkJwHm8HkQBwHhA2ECBr bmxvdwqFHxJzQpABkHhOIAIQTBIEACA/JaxC3QDQawnACGAfsToKhUcwc0KwHkFudiARG5IDkWXm eD1hG5JDchOxB0BKNf9Hkj2hHfAfokdWE1AhcSGxex9SCoVvUBEc4TwFCrBn+weQSqBUHyFRVlAR AJACIFcdMh8SUdUnEXBlIhBzliceoDbAdRuDVkJLxvcc0B69ItN3BRAT0AQgHxDHIhBalVJReWJh EbBJku8fEhshG+AFwChVkQuAIhDtCYApVEYj8HAj8UzhAMD/SpFHOBYQBGBQEF0WG1YDUntZMR5B bTwxE9A2sEqgQfEGAFlCQT3wCoUTwAWwuxwBGyNkCHBg0Vnvdx5k611DTTBiW2BpUBA2sWJj/0gh XkEd8B6wRxEKhUgwA6B+ZBzQTDNCsFzTBaANsCD+cR7AE9BQsFywAxBi8E8n/2lCSJMfEkk1IZEf EgDAUNDVHPBtHfBoS6BlVMJNIz8D8CVQWNFIwW6SUaFNZf9DUgqFB4AEYFFgW6RvM2ahnwRgE8A2 sU7Qb4FkO0jR90chZkQn8GtlAxGxbKhIg/9tQnCmIhQfITZAAZBSpSpQ6xvAHQBrWNBwcrE2EBtS /wrANsAWEEjgCHAbUWHUTDPfBJBQESWdVgAAcGsbkh4S+UmiZHYAcBtQJawv0y9k6yWsMIpjQqAu YmElrESvL0W/KkUKhRUxAISwAAMAEBAAAAAAAwAREAAAAABAAAcwoKJ+/n1uuwFAAAgwoKJ+/n1u uwEeAD0AAQAAAAUAAABSRTogAAAAAHK8 ------ =_NextPart_000_01BB6E43.B0DF29A0-- From owner-sqr-users@USA.NET Wed Jul 10 11:51:29 1996 Date: Wed, 10 Jul 1996 11:36:57 -0500 From: "Jeff T. Orwick [C]" Subject: Re: Dynamic sizing of SQR Array If you are willing to recompile your report each time it runs (use sqr program.sqr ... rather than sqrt program.sqt) you can use #define variables to define the array sizes and a seperate sqr report to calculate the size of those variables and calls your report, passing the variables to it via ASK statements. Example: calcuation SQR begin-program do get_var_1 (#var_1) do get_var_2 (#var_2) do get_var_3 (#var_3) ... let $call = 'sqr report.sqr '||$username||'/'||$password ' '|| to_char(#var_1)||' '|| to_char(#var_2)||' '|| to_char(#var_3) call system using $call #status move #status to #return-status end-program ___________________________________________________________________________ report.sqr __________________ begin-setup ask var_1 ask var_2 ask var_3 create-array name=array1 size={var_11} field=field_1:number:{var_2} create-array name=array2 size={var_3} field=field_1:char end-setup begin-program ... end-program -- --------------------------------------------------------------------------- Jeff T. Orwick orwickj@tusc.com <- Full time address The Ultimate Software Consult http://www.tusc.com --------------------------------------------------------------------------- From owner-sqr-users@USA.NET Wed Jul 10 12:07:40 1996 Date: Wed, 10 Jul 1996 09:30:03 PST From: John Kellogg Subject: Re: Dynamic sizing of SQR Array Another idea is to use the LOAD-LOOKUP command which creates an internal table that (in SQR Version 3) can dynamically grow. Use of load-lookup requires that a table has a unique key. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Dynamic sizing of SQR Array Author: SQR-USERS@USA.NET at Internet Date: 10/07/96 9:05 AM I need to dynamically size some arrays in an SQR report. Does anyone know the syntax for this ? Background : I am converting an existing Crystal report to SQR, and need to print a grid over multiple pages. The Crystal version of the report 'cheats' by using VB to build the grid then writes that grid to Sybase in the proper (paginated) output format. I need to remove the processing from VB completely. A SYBASE stored procedure to build the grid would be prohibitively complicated, but I can do the same in code quite easily. I can size the arrays to the maximum, however this will use several Meg of memory that will be mostly unused; so I would like to set the array sizes to match the data, and not suck up unnecessary resources from the server. Thanking you in advance Simon Facer simon.facer@cna.com From owner-sqr-users@USA.NET Thu Jul 11 08:09:33 1996 Date: Thu, 11 Jul 1996 07:47:00 GMT From: "Facer,Simon" Subject: Re: Dynamic sizing of SQR Array Thank to everyone who responded so quickly with some excellent suggestions. The suggestion with the ASK variables passed between two SQR modules fits best with my programming structure, so that's the way I'm going to go. Simon Facer simon.facer@cna.com From owner-sqr-users@USA.NET Fri Jul 12 12:13:08 1996 Date: Fri, 12 Jul 1996 12:25:55 -0400 From: John Low Subject: Graphing questions, overlayed plots? I am trying to accomplish some specific graphing that seems not straightforward, and would appriceate ideas from experienced users on how to approach it. I want to graph performance data that is always represented as date-time,number pairs for measument of some aspect of utilization or performance. I wish to help analyze correlations by ploting varoius measures (e.g. number of users, cpu %busy, and disk reads per interval) on the same line graph. The problem is that 1) the peasures do not come from exactly the same points in time or at the same frequency, and 2) the measures may be on different scales (#users 0-50, % 0-100, reads 0-10,000). Obviously the measures may be put on a common scale by adjusting the data to reflect 0-100% of the maximum value observed, which would be ok but not ideal. Adjusting the time component so that all measures reflect the same times and intervals seems awfuly messy, however. I have found one approach that sorta works, which is to simply but multiple time vs. value graphs on top of each other, but there are several details to be solved. Assuming time is the horizontal axis, it has a common scale. But for the vertical axis, can I have multiple legends side by side? (not on top of each other?) If I use different line types for the different plots, how can I get a key that shows a name for each line type (again without puting these descriptions on top of each other?) As an alternative, can I do one graph from a single SQR table, where each row is a time and one or more measures, but a given row does not have all measures? (Missing or null values I guess?) Any guidance on using things smart, and not the hard way, would be appreciated. -- John Low (john.low@intelsat.int) INTELSAT From owner-sqr-users@USA.NET Mon Jul 15 23:29:48 1996 Date: Mon, 15 Jul 1996 22:23:52 -0600 From: Sean Carroll Subject: Dynamic column names SQR-USERS, I am writing a program to update telephone numbers ( Melbourne phone numbers have had a '9' prefixed to them). I would like the SQR to search the database syscolumns for fields containing the string 'PHONE'. I would then like to select and update those columns. I can specify the tablename using the results of a previous query, but had problems using a variable as a selected column name. I will also need to write back ( using a begin-SQL) paragraph, so will need to be able to specify an updatable column as a variable. Can anyone see a way of doing this? Sean Carroll Technical Consultant PeopleSoft Dump of code: ---------------------- begin-procedure Process-Main begin-SELECT ! Find all the fields with the string 'PHONE' contained within them ! Record the field and tablename s.name s.tbname let $fieldname = &s.name let $tablename = &s.tbname do Get-Phone-Number FROM syscolumns s WHERE name like '%PHONE%' end-SELECT end-procedure Process-Main begin-procedure Get-Phone-Number ! This procedure retrieves the existing telephone number begin-SELECT [$fieldname] (+1,1,1) from [syscolumns: $tablename] end-SELECT end-procedure Get-Phone-Number From owner-sqr-users@USA.NET Tue Jul 16 08:08:50 1996 Date: Tue, 16 Jul 1996 09:06:14 -0400 From: David Stanley SICAS Center Subject: LineFeeds SQR users, I am currently reconstructing an old sqr to print out column comments, I'm using the wrap option. The operating system I'm under is OPEN/VMS. The manual gives an example of using the strip parameter with the wrap command, but this doesn't seam to work for me. I'm still getting linefeeds where I don't want them. ie: COMMENTS (+2,5,65) wrap 65 5 strip=/\^@<13> Any Help??????? |\/\/| | | C 0 0| | > | \__ | / David [End of file] From owner-sqr-users@USA.NET Tue Jul 16 08:24:02 1996 Date: Tue, 16 Jul 1996 08:18:38 -0500 From: Ray Ontko > SQR users, > I am currently reconstructing an old sqr to print out column comments, > I'm using the wrap option. The operating system I'm under is OPEN/VMS. > The manual gives an example of using the strip parameter with the wrap > command, but this doesn't seam to work for me. I'm still getting linefeeds > where I don't want them. > > ie: COMMENTS (+2,5,65) wrap 65 5 strip=/\^@<13> Have you tried <10> in your strip? Also, if you're at the end of the page-width, you may get odd behavior. I recall that there should always be at least one extra column to the right of a wrap (don't ask me why). Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the web rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Jul 16 09:51:33 1996 Date: Tue, 16 Jul 1996 07:25:24 PST From: John Kellogg Subject: Re: Dynamic column names The correct syntax for using dynamic columns with SQR version 3 is: begin-SELECT [$fieldname] &phone_no=char ! Need an &variable definition do update_phone_no from [$tablename] ! Don't need the static table name end-SELECT You could then define a procedure to update the phone number and call it from the above select statement. For example: begin-procedure update_phone_no let $phone_no = substr(&phone_no,1,3) || '9' || substr(&phone_no,4,7) begin-sql update [$tablename] set [$fieldname] = $phone_no where [$fieldname] = &phone_no end-sql end-procedure John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Dynamic column names Author: SQR-USERS@USA.NET at Internet Date: 16/07/96 6:29 AM SQR-USERS, I am writing a program to update telephone numbers ( Melbourne phone numbers have had a '9' prefixed to them). I would like the SQR to search the database syscolumns for fields containing the string 'PHONE'. I would then like to select and update those columns. I can specify the tablename using the results of a previous query, but had problems using a variable as a selected column name. I will also need to write back ( using a begin-SQL) paragraph, so will need to be able to specify an updatable column as a variable. Can anyone see a way of doing this? Sean Carroll Technical Consultant PeopleSoft Dump of code: ---------------------- begin-procedure Process-Main begin-SELECT ! Find all the fields with the string 'PHONE' contained within them ! Record the field and tablename s.name s.tbname let $fieldname = &s.name let $tablename = &s.tbname do Get-Phone-Number FROM syscolumns s WHERE name like '%PHONE%' end-SELECT end-procedure Process-Main begin-procedure Get-Phone-Number ! This procedure retrieves the existing telephone number begin-SELECT [$fieldname] (+1,1,1) from [syscolumns: $tablename] end-SELECT end-procedure Get-Phone-Number From owner-sqr-users@USA.NET Tue Jul 16 10:10:27 1996 Date: Tue, 16 Jul 1996 10:52:37 -0400 From: SHARON LEFKOWITZ Subject: LineFeeds -Reply I had the same trouble printing long fields from Oracle. I solved it by stripping <10> instead of <13>. i.e. print &pn.note (+#count,{col9}) wrap 42 1000 STRIP=<10> >>> David Stanley SICAS Center 07/16/96 09:06am >>> SQR users, I am currently reconstructing an old sqr to print out column comments, I'm using the wrap option. The operating system I'm under is OPEN/VMS. The manual gives an example of using the strip parameter with the wrap command, but this doesn't seam to work for me. I'm still getting linefeeds where I don't want them. ie: COMMENTS (+2,5,65) wrap 65 5 strip=/\^@<13> Any Help??????? |\/\/| | | C 0 0| | > | \__ | / David [End of file] From owner-sqr-users@USA.NET Wed Jul 17 09:21:37 1996 Date: Wed, 17 Jul 1996 10:21:36 +0100 From: Vaughan Mullins Subject: SQR User Manual Could anyone tell me the easiest way to purchase a copy of the SQR user manual for the version 2.5.2.2. , bearing in mind I am working in the United Kingdom. Regards Vaughan Mullins From owner-sqr-users@USA.NET Wed Jul 17 14:29:56 1996 Date: Wed, 17 Jul 1996 13:39:30 -0500 From: "Jeff T. Orwick [C]" Subject: Re: Dynamic column names when using dynamic column names SQR requires an alias for the column try changing : begin-SELECT [$fieldname] (+1,1,1) from [syscolumns: $tablename] end-SELECT TO : begin-SELECT [$fieldname] (+1,1,1) &phone_column_name from [syscolumns: $tablename] end-SELECT -- --------------------------------------------------------------------------- Jeff T. Orwick orwickj@tusc.com <- Full time address The Ultimate Software Consult http://www.tusc.com --------------------------------------------------------------------------- From owner-sqr-users@USA.NET Thu Jul 18 09:35:03 1996 Date: Thu, 18 Jul 1996 07:18:46 PST From: John Kellogg Subject: Re: SQR User Manual You can contact our reseller in the UK. The company is Software Product Services. Their phone number (including country code) is 44-1483-730771. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: SQR User Manual Author: SQR-USERS@USA.NET at Internet Date: 17/07/96 5:37 PM Could anyone tell me the easiest way to purchase a copy of the SQR user manual for the version 2.5.2.2. , bearing in mind I am working in the United Kingdom. Regards Vaughan Mullins From owner-sqr-users@USA.NET Thu Jul 18 21:18:29 1996 Date: Thu, 18 Jul 1996 01:57:08 +0100 From: Steve Nicholas Subject: Re: SQR User Manual Reply : Contact SPS on 01483 730 771 (Woking) who market SQR in the UK. However I don't understand why you haven't got the documentation if you have the software..... ------------------------------------------------------------------- (((Re: ..... a copy of the SQR user manual .......))) Steve Nicholas, UK Contractor From owner-sqr-users@USA.NET Thu Jul 18 23:15:28 1996 Date: Fri, 19 Jul 1996 14:11:31 PDT From: Andrew Barnett Subject: Re: SQR User Manual >However I don't understand why you haven't got the documentation if you >have the software..... >------------------------------------------------------------------- >(((Re: ..... a copy of the SQR user manual .......))) >Steve Nicholas, UK Contractor > It can happen - my current place of work has paid for the software, even beta tested SQR 3 I think, and we have about one dog-eared manual for two dozen developers. -------------------------------------------------------- Andrew Barnett abarnett@isd.hih.com.au - Wizzard -------------------------------------------------------- From owner-sqr-users@USA.NET Mon Jul 22 23:31:38 1996 Date: Mon, 22 Jul 1996 21:22:55 PST From: marilyng@SUN4.MITI.COM Subject: SQR 2.5 User Manual Dear Vaughan, We have checked with our Shipping Department and we still have Version 2.5 user manuals as we have a few ports we still support at this level. If you wish to order such a manual, the cost is $50 US for the manual set and $103 US for shipping charges for a total of $153 US. The best method to order these manuals would be to put the above charges on a master card or VISA card. We would need the name on the card, the card #, and the expiration date. We also require your shipping address. Sincerely, Marilyn Guastamacchio Account Manager, International From owner-sqr-users@USA.NET Tue Jul 23 02:35:36 1996 Date: Tue, 23 Jul 1996 09:31:34 GMT From: Kishore Bharat Subject: Job Scheduling SQR Users, We need to submit print jobs at a specified time. We are working on an ORACLE v7 database on a HP Unix machine. Can SQR do this for us? If so, how? If NOT, do you know how we can do it otherwise. Do you use some tool Equally important is the management of this process. Thanx Kishore Bharat [Systems Analyst - ISCOR Profile Products] ---------------------------------------------------------------------- Things that go away by themselves, often come back by themselves... From owner-sqr-users@USA.NET Tue Jul 23 03:44:02 1996 Date: Tue, 23 Jul 1996 11:43:00 GMT-0200 From: WDFI-F KyttÈa Timo Subject: Calling Oracle stored procedures Hi everybody Does anybody know if it is possible to call Oracle's stored procedures from SQR? AND if it is possible, how can I do it? And do You have any comments or advice on this? Timo timo.kytta@vaasa.wartsila.infonet.com http://www.pcuf.fi/~tik 'reality is for people, who cannot //// cope with science fiction ' (o o) -------------------------------------o00=(_)=00o--- From owner-sqr-users@USA.NET Tue Jul 23 08:34:01 1996 Date: Tue, 23 Jul 1996 09:26:50 -0500 From: Richard Vernick Subject: Re: Calling Oracle stored procedures Sure. ! the following is a pl/sql block with sqr variable interaction. begin-procedure Get_Emp begin-sql begin $My_SQR_Emp = Stored_Proc_Get_Emp;; <=== NOTICE 2 semi-colons on the end of where there's usually 1!! end;; end-sql end-procedure enjoy. >>> WDFI-F Kytta Timo 07/23/96 11:43am >>> Hi everybody Does anybody know if it is possible to call Oracle's stored procedures from SQR? AND if it is possible, how can I do it? And do You have any comments or advice on this? Timo timo.kytta@vaasa.wartsila.infonet.com http://www.pcuf.fi/~tik 'reality is for people, who cannot //// cope with science fiction ' (o o) -------------------------------------o00=(_)=00o--- From owner-sqr-users@USA.NET Tue Jul 23 09:03:03 1996 Date: Tue, 23 Jul 1996 08:59:56 -0500 From: Ray Ontko Subject: Re: Job Scheduling > We need to submit print jobs at a specified time. We are working on an > ORACLE v7 database on a HP Unix machine. > > Can SQR do this for us? If so, how? > If NOT, do you know how we can do it otherwise. Do you use some tool > Equally important is the management of this process. > > Kishore Bharat You have 2 choices: You can have the SQR program submit the print job after if finishes generating the report, or you can use an operating system command to do this after you're done running SQR. With either approach the problem is about the same. Talk with your system administrator about the commands crontab, at, and batch. These will can be used to schedule a job for a specified time. Under Linux, we would use "at" to invoke "lpr" at a specified time. To invoke the at command from SQR, use CALL SYSTEM USING $command where $command contains the command line string. Hope this helps. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about Forte Software" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Jul 23 09:26:02 1996 Date: Tue, 23 Jul 1996 11:17:00 -0300 From: "Scott, Aaron FIN" Subject: Producing Postscript output that prints SQR-USERS, I am producing SQR (v3.0.7.1) reports in a postscript format on a RISC/6000=20= box (AIX 3.2.5). These reports include text with accented French=20 characters, such as "=E9". When the reports are edited, the characters appear= =20 properly. When the reports are printed, any accented french characters are=20= displayed as spaces or other odd symbols. Any ideas on how to get the accented characters to print properly? Thanks, Aaron Scott DMR Group Inc. (ascott@gov.nb.ca) From owner-sqr-users@USA.NET Tue Jul 23 09:40:35 1996 Date: Tue, 23 Jul 1996 09:23:00 GMT From: "Buckley,Jeff" Subject: FW: Job Scheduling Kishore SQR? I don't believe so. Unix? Certainly! Look at the man page for cron. Cron "jobs" would do the trick for you. Jeff ____________________ Jeff.Buckley@cna.com Technical Analyst III CNA Insurance ---------- From: user:owner-sqr-users@USA.NET To: user:SQR-USERS@USA.NET Subject: Job Scheduling Date: Tuesday, July 23, 1996 3:44AM SQR Users, We need to submit print jobs at a specified time. We are working on an ORACLE v7 database on a HP Unix machine. Can SQR do this for us? If so, how? If NOT, do you know how we can do it otherwise. Do you use some tool Equally important is the management of this process. Thanx Kishore Bharat [Systems Analyst - ISCOR Profile Products] ---------------------------------------------------------------------- Things that go away by themselves, often come back by themselves... From owner-sqr-users@USA.NET Tue Jul 23 11:42:03 1996 Date: Tue, 23 Jul 1996 11:31:09 -0500 From: "Jeff T. Orwick [C]" Subject: Re: Calling Oracle stored procedures --PART-BOUNDARY=.19607231131.ZM20868.tabby Content-Description: Text Content-Type: text/plain ; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Zm-Decoding-Hint: mimencode -q -u See page 124 of your SQR 3.0 manual: Example: begin-sql begin #sqr_variable :=3D stored_package.procedure_name($sqr_variable);; end;; end-sql On Jul 23, 11:43am, WDFI-F Kytt=C8a Timo wrote: > Subject: Calling Oracle stored procedures > Hi everybody > > Does anybody know if it is possible to call Oracle's stored > procedures from SQR? > > AND if it is possible, how can I do it? And do You have any > comments or advice on this? > > > Timo > > > timo.kytta@vaasa.wartsila.infonet.com > http://www.pcuf.fi/~tik > 'reality is for people, who cannot //// > cope with science fiction ' (o o) > -------------------------------------o00=3D(_)=3D00o--- >-- End of excerpt from WDFI-F Kytt=C8a Timo -- = -----------------------------------------------------------------------= ---- Jeff Orwick 847.632.6943 -----------------------------------------------------------------------= ---- --PART-BOUNDARY=.19607231131.ZM20868.tabby-- From owner-sqr-users@USA.NET Tue Jul 23 17:52:30 1996 Date: Tue, 23 Jul 1996 14:41:44 PST From: John Kellogg Subject: Re: Producing Postscript output that prints You need to add the following section to the POSTSCRI.STR file. See the POST_ISO.STR file for an example of where the CODE section should be placed. /CODE [ 192 /Agrave 194 /Acircumflex 199 /Ccedilla 200 /Egrave 201 /Eacute 202 /Ecircumflex 203 /Edieresis 206 /Icircumflex 207 /Idieresis 212 /Ocircumflex 217 /Ugrave 219 /Ucircumflex 224 /agrave 226 /acircumflex 231 /ccedilla 232 /egrave 233 /eacute 234 /ecircumflex 235 /edieresis 238 /icircumflex 239 /idieresis 244 /ocircumflex 249 /ugrave 251 /ucircumflex ]def John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Producing Postscript output that prints Author: SQR-USERS@USA.NET at Internet Date: 23/07/96 7:29 AM SQR-USERS, I am producing SQR (v3.0.7.1) reports in a postscript format on a RISC/6000=20= box (AIX 3.2.5). These reports include text with accented French=20 characters, such as "=E9". When the reports are edited, the characters appear= =20 properly. When the reports are printed, any accented french characters are=20= displayed as spaces or other odd symbols. Any ideas on how to get the accented characters to print properly? Thanks, Aaron Scott DMR Group Inc. (ascott@gov.nb.ca) From owner-sqr-users@USA.NET Tue Jul 23 18:03:32 1996 Date: Wed, 24 Jul 1996 08:29:43 PDT From: Andrew Barnett Subject: Re: Calling Oracle stored procedures >Hi everybody > >Does anybody know if it is possible to call Oracle's stored >procedures from SQR? > >AND if it is possible, how can I do it? And do You have any >comments or advice on this? > > >Timo > > >timo.kytta@vaasa.wartsila.infonet.com >http://www.pcuf.fi/~tik >'reality is for people, who cannot //// > cope with science fiction ' (o o) > -------------------------------------o00=(_)=00o--- > One thing to watch is that SQR (certainly 2.5) does not allow PL/SQL functions to return null. This is mildly annoying. If I have a function that does a lookup of some sort and it can't find a match then I believe that the correct behaviour is to return null. (See "PL/SQL Programming" by Steven Feuerstein - excellent). It is up to the calling program to decide how to process that result - whether to raise an error or continue. As things stand I have to use NVL which makes it harder to programmatically handle the situation. eg. <<< begin-procedure fetch_last_run_date(:$last_run_date) ! do this cos SQR 2.5 does not seem to allow parameters for on-error procedure let $_procedure_name = 'fetch_last_run_date' ! nvl here cos SQR raises error when function returns null begin-sql on-error=sql_error begin $last_run_date := to_char(nvl( pkg_batch_log.last_run_date('{program_name}', 'SUCCESS'), sysdate), '{date_format_mask}');; end;; end-sql end-procedure >>> Oracle Pro*C programs suffer the same problem. -------------------------------------------------------- Andrew Barnett abarnett@isd.hih.com.au - Wizzard -------------------------------------------------------- From owner-sqr-users@USA.NET Tue Jul 23 18:04:13 1996 Date: Wed, 24 Jul 1996 08:47:47 PDT From: Andrew Barnett Subject: Re: Job Scheduling >SQR Users, > >We need to submit print jobs at a specified time. We are working on an >ORACLE v7 database on a HP Unix machine. > >Can SQR do this for us? If so, how? >If NOT, do you know how we can do it otherwise. Do you use some tool >Equally important is the management of this process. > >Thanx >Kishore Bharat >[Systems Analyst - ISCOR Profile Products] >---------------------------------------------------------------------- >Things that go away by themselves, often come back by themselves... > If you're keen you can write your own scheduler using the DBMS_JOB package in Oracle 7. You'll need a daemon written in Pro*C or SQR which you can feed job requests to by using DBMS_ALERT and/or DBMS_PIPE. Such a system would also allow you to schedule server-side reporting from client-side applications. One day I'll write it myself... -------------------------------------------------------- Andrew Barnett abarnett@isd.hih.com.au - Wizzard -------------------------------------------------------- From owner-sqr-users@USA.NET Thu Jul 25 20:06:06 1996 Date: Thu, 25 Jul 1996 18:00:18 -0700 From: Mallory Stevens Subject: Running SQR on a different server I am moving my database to an NT Server runninig MS SQL Server. Currently I have a Sun Solaris Server running Sybase. Here is my question: Many users have cron jobs and such set up to run reports. Is it possible to run the UNIX version of SQR on the UNIX server against my SQL Server database on my NT machine? If so, where is the database that it is looking at set? Thanks in advance. Mallory ______________________________________________________________________ Mallory J. Stevens Tel. 415-312-0833 Manager, Technical Support Email mallory@visigenic.com Visigenic Software, Inc. Fax 415-286-2464 ______________________________________________________________________ From owner-sqr-users@USA.NET Fri Jul 26 03:55:45 1996 Date: Fri, 26 Jul 1996 09:44:27 +0100 From: Vaughan Mullins Subject: Re: Running SQR on a different server I am trying to purchase a copy of the user manual for SQR version 2.5.2.2. I have sent this message once already and received replies. Unfortunately we had a fault with our e-mail and all entries in my inbox were deleted. I would be grateful if you could resend those replies. Regards Vaughan Mullins From owner-sqr-users@USA.NET Sat Jul 27 09:58:56 1996 Date: Fri, 26 Jul 1996 13:34:19 PST From: Gadi Yedwab Subject: Re[2]: Running SQR on a different server The replies were basically two: 1. You can call the UK reseller of SQR: SPS Software Product Services Ltd. 19-20 The Broadway Woking, Surrey United Kingdom GU21 5AP Peter Bailey 44-1483-730771 44-1483-727417 2. You can order a book from MITI using a VISA/MasterCard MITI 2895 Temple Ave. Long Beach, CA 90806 (310) 424-4399 ______________________________ Reply Separator _________________________________ Subject: Re: Running SQR on a different server Author: SQR-USERS@USA.NET at Internet Date: 7/26/96 10:09 AM I am trying to purchase a copy of the user manual for SQR version 2.5.2.2. I have sent this message once already and received replies. Unfortunately we had a fault with our e-mail and all entries in my inbox were deleted. I would be grateful if you could resend those replies. Regards Vaughan Mullins From owner-sqr-users@USA.NET Sat Jul 27 10:01:10 1996 Date: Fri, 26 Jul 1996 15:49:21 PST From: suet@SUN4.MITI.COM Subject: User Manuals SQR Workbench v2.5.2.2 manual sets are still available from MITI. YOu may obtain these manuals by calling (800)366-6484x203, (310)424-4399x203 or fax (310)426-8910 attn: Customer Service. When ordering manuals we need the following information: - SQR Workbench version you would like the manuals to correspond to - Operating system you are using your SQR Workbench on (Windows, DOS or Non-PC) We accept MasterCard or VISA. From owner-sqr-users@USA.NET Mon Jul 29 10:18:50 1996 Date: Mon, 29 Jul 1996 10:47:15 EDT From: Bob Hearon <231173@IBMMAIL.COM> Subject: SQR & Oracle v7.3.2 ext. 9-1664 1-31-07 Hello, does anyone out there run SQR with Oracle v7.3.2. My problem is that if I run SQR programs for that Oracle version, I have to use the 7.2.3 Oracle home environment variable. And so, in my cron-executed scripts I am setting oracle home for the 7.3 version before running cobol programs (or else they won't work) and then before I run SQR, I set it to the 7.2 version. It's a little ugly, but works. Does anyone know of a better way? Many thanks, Bob Hearon Extra X400 information begins: Originator Name: Robert (RB) Hearon Domain: US/IBMX400/Nationwide Domain Attrib: DEN:HEARONB Node.Userid: IBMX400.231173 Message Id: 0012000001358630000002 Sent by Name: Robert (RB) Hearon Domain: US/IBMX400/Nationwide Domain Attrib: DEN:HEARONB Node.Userid: IBMX400.231173 Subject: SQR & Oracle v7.3.2 Recipients Name: Internet Internet Domain: GB/IBMX400/IBMMAIL Node.Userid: IBMMAIL.INTERNET Report request: No From owner-sqr-users@USA.NET Mon Jul 29 10:50:55 1996 Date: Mon, 29 Jul 1996 08:17:21 PST From: John Kellogg Subject: Re[2]: Running SQR on a different server Please contact MITI at 800-fon-miti. Ask for Sue Taylor at extension 203. ______________________________ Reply Separator _________________________________ Subject: Re: Running SQR on a different server Author: SQR-USERS@USA.NET at Internet Date: 26/07/96 10:09 AM I am trying to purchase a copy of the user manual for SQR version 2.5.2.2. I have sent this message once already and received replies. Unfortunately we had a fault with our e-mail and all entries in my inbox were deleted. I would be grateful if you could resend those replies. Regards Vaughan Mullins From owner-sqr-users@USA.NET Tue Jul 30 11:10:48 1996 Date: Tue, 30 Jul 1996 12:04:10 -0400 From: Scott Shelton Subject: SQR & Oracle v7.3.2 -Reply We don't have that version of ORACLE but it sounds like SQR is looking for an OLDER ORACLE DLL. Try copying those older DLLs to your SQR directory and see if that solves it. Otherwise, there's a difference in the one of the files between 7.2 and 7.3 and you'd have to do file compares to narrow it down. Hope this helps. From owner-sqr-users@usa.net Wed Jul 31 21:20:57 1996 Date: Wed, 31 Jul 1996 09:06:41 -0700 From: Duncan MacLean Subject: SQR Viewer and Windows NT 3.5.1 Has anyone run into problems using the SQR viewer in a Windows NT 3.5.1 environment? Thanks... -Duncan MacLean From owner-sqr-users@USA.NET Thu Aug 1 14:57:07 1996 Date: Thu, 1 Aug 1996 15:41:10 EST From: Sudeep Mulki Subject: Graphics on HP Laserjet We are using SQR 3.0.7 (UNIX) I am printing a file to the HP LaserJet. I want to include a logo image on the file. I can do this easily on a Postscript printer. I do not have user documentation for SQR 3.x, I am working off documentation for 2.x. Hence I have a few questions : 1) This is what I have : Printer-Type=hp .... in the Declare-Printer section Declare-Image MLBULL Image-Size = (6, 4) Source = 'smbull.eps' Type = EPS-FILE End-Declare The source file is a postscript document, and that's the reason why it will not print. Could someone please send me the complete syntax for 'Declare-Image', and also the type of pictures that are allowed (postscript, etc). 2) can GIF files be printed on HP LaserJet. Thanks Sudeep Mulki e-mail : sudeep_mulki@ml.com From owner-sqr-users@USA.NET Fri Aug 2 15:50:05 1996 Date: Fri, 2 Aug 1996 13:22:58 PST From: John Kellogg Subject: Re: SQR Viewer and Windows NT 3.5.1 Can you be more specific. What is the problem or error? John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: SQR Viewer and Windows NT 3.5.1 Author: SQR-USERS@usa.net at Internet Date: 02/08/96 11:17 AM Has anyone run into problems using the SQR viewer in a Windows NT 3.5.1 environment? Thanks... -Duncan MacLean From owner-sqr-users@usa.net Fri Aug 2 21:09:12 1996 Date: Fri, 2 Aug 1996 13:47:55 PST From: John Kellogg Subject: Re: Graphics on HP Laserjet Here is the documentation from the SQR Language Reference Manual, DECLARE-IMAGE ------------- Function Declares the type, size, and source of an image to be printed. Syntax DECLARE-IMAGE image_name [ TYPE = image_type_lit ] [ IMAGE-SIZE = ( width_num_lit, height_num_lit ) ] [ SOURCE = file_name_lit ] END-DECLARE O Note If TYPE, IMAGE-SIZE, and SOURCE are not defined in DECLARE-IMAGE, they must be defined in PRINT-IMAGE. Arguments image_name - Specifies a unique name for referencing the image declaration. TYPE - Specifies the image type. Types can be EPS-FILE, HPGL-FILE, or BMP-FILE (for Windows). IMAGE-SIZE - Specifies the width and height of the image in SQR coordinates. SOURCE - Specifies the name of a file containing the image. The file must be in the SQRDIR directory or you must specify the full path. Description The DECLARE-IMAGE command is used to define and name an image. This image can then be placed in a report at the position specified in the PRINT IMAGE command. O Note If the image file is unrecognizable, or has incomplete header information, then a box (either shaded, for HP printers, or having a diagonal line through it in the case of POSTSCRIPT) will be displayed where the image is expected. Examples declare-image officer-signature type = eps-file source = 'off_sherman.eps' image-size = (40, 5) end-declare See Also See the PRINT-IMAGE command. PRINT-IMAGE ----------- Function Prints an image. Syntax PRINT-IMAGE [ image_name ] position [ TYPE = { image_type_lit | _var | _col } ] [ IMAGE-SIZE = ( width_num_lit | _var | _col, height_num_lit | _var | _col ) ] [ SOURCE = { file_name_txt_lit | _var | _col } ] O Note If TYPE, IMAGE-SIZE, and SOURCE are not defined in PRINT IMAGE, they must be defined in DECLARE-IMAGE. Arguments image_name - Specifies the name of an image specified by a DECLARE-IMAGE. position - Is the location on the page where the image will begin. The position can be fixed or relative to the current position. TYPE - Specifies the image type. Types can be EPS-FILE, HPGL-FILE, or BMP-FILE (for Windows). IMAGE-SIZE - Specifies the width and height of the image. SOURCE - Specifies the name of a file containing the image. Description The PRINT-IMAGE command can be placed in any section of a report with the exception of the SETUP section. The image file pointed to can be any file of the proper format. PRINT-IMAGE may be used without referencing a named image if all required attributes for the DECLARE-IMAGE are supplied in addition to all its required parameters. Examples: For PostScript: print-image office-signature (50, 20) print-image (50, 20) type = eps-file source = 'sherman.eps' image-size = (10, 3) For Windows: print-image company-logo (+21, 25) type=bmp-file source='m:\logos\gustavs.bmp' image-size=(75,50) John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Graphics on HP Laserjet Author: SQR-USERS@usa.net at Internet Date: 02/08/96 11:09 AM We are using SQR 3.0.7 (UNIX) I am printing a file to the HP LaserJet. I want to include a logo image on the file. I can do this easily on a Postscript printer. I do not have user documentation for SQR 3.x, I am working off documentation for 2.x. Hence I have a few questions : 1) This is what I have : Printer-Type=hp .... in the Declare-Printer section Declare-Image MLBULL Image-Size = (6, 4) Source = 'smbull.eps' Type = EPS-FILE End-Declare The source file is a postscript document, and that's the reason why it will not print. Could someone please send me the complete syntax for 'Declare-Image', and also the type of pictures that are allowed (postscript, etc). 2) can GIF files be printed on HP LaserJet. Thanks Sudeep Mulki e-mail : sudeep_mulki@ml.com From owner-sqr-users@USA.NET Wed Aug 7 22:51:43 1996 Date: Wed, 7 Aug 1996 21:49:33 -0500 From: Ramesh R Turuvekere Subject: SQL programmer/Analysts I am new to this user group. I am looking for a few SQR experienced analysts/programmers for our client the Chicago area on a contract basis. Interested parties may contact me at mascon@tezcat.com Regards Ramesh From owner-sqr-users@USA.NET Thu Aug 8 10:04:08 1996 Date: Thu, 8 Aug 1996 09:58:37 -0500 From: Jim Doe ---- Subject: How do we join user group There doesn't seem to be any info on this on the web page. Would someone please tell me how to join, who to contact ... thank you .... jmd ------------------------------------------------------------------------------ James M. Doe Hamline University Manager, Administrative Systems Programming Computer Center jdoe@seq.hamline.edu Mail Stop C1911 phone: 612-641-2824 1536 Hewitt Ave. fax: 612-641-2027 St. Paul, MN 55104 From owner-sqr-users@USA.NET Thu Aug 8 20:54:32 1996 Date: Fri, 9 Aug 1996 01:36:36 +0100 From: Steve Nicholas Subject: Re: How do we join user group Hmm - nice message. However how the hell am I supposed to know what you are talking about? >There doesn't seem to be any info on this on the web page. > >Would someone please tell me how to join, who to contact ... > >thank you .... jmd > >------------------------------------------------------------------------------ >James M. Doe Hamline University >Manager, Administrative Systems Programming Computer Center >jdoe@seq.hamline.edu Mail Stop C1911 >phone: 612-641-2824 1536 Hewitt Ave. >fax: 612-641-2027 St. Paul, MN 55104 -- Steve Nicholas From owner-sqr-users@USA.NET Fri Aug 9 08:13:05 1996 Date: Fri, 9 Aug 1996 08:09:28 -0500 From: Ray Ontko Subject: Re: How do we join user group > Hmm - nice message. > However how the hell am I supposed to know what you are talking about? > > > >There doesn't seem to be any info on this on the web page. > > > >Would someone please tell me how to join, who to contact ... > > > >thank you .... jmd > > > >------------------------------------------------------------------------------ > >James M. Doe Hamline University > >Manager, Administrative Systems Programming Computer Center > >jdoe@seq.hamline.edu Mail Stop C1911 > >phone: 612-641-2824 1536 Hewitt Ave. > >fax: 612-641-2027 St. Paul, MN 55104 > > -- > Steve Nicholas > Steve: James is talking about SQRUG, the SQR User Group, which is a "virtual" user group with a home page at http://www.sqrug.com/. Check it out. James: SQRUG doesn't have an official membership list, but there are a few volunteers who try to keep it going. Contact Matt Reagan, Mark Johnson, or Nathan Treadway if you're interested in volunteering. In addition, there is something called the National SQR Users Group which pre-dated SQRUG. Matt Reagan is the President. Contact him if you're interested in joining or volunteering. Of course, these are both all-volunteer activities, so people work on them as time allows. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Fri Aug 9 10:47:45 1996 Date: Fri, 9 Aug 1996 08:43:18 -0700 From: S J Bayles Subject: Oracle Forms 4.5 and SQR 3.0 / SQR 3.5 SQR Users Group, Is anyone running Oracle Forms 4.5 (Windows) and SQR 3.0 (Character Based) ? Is this scenario even possible ? and Is anyone running Oracle Forms 4.5 (Windows) and SQR 3.5 Report Mate (Windows) ? Any success in running "canned, production" reports from Oracle Forms 4.5 and SQR 3.0 / 3.5 ? Please Help ! Thanks, Steve Bayles Pharmaco Austin, Texas email : pharmsjb@ix.netcom.com 10:45am, 09-Aug-96, Friday AM From owner-sqr-users@USA.NET Fri Aug 9 11:18:49 1996 Date: Fri, 9 Aug 1996 11:13:17 -0500 From: Ray Ontko Subject: Re: Oracle Forms 4.5 and SQR 3.0 / SQR 3.5 > Is anyone running Oracle Forms 4.5 (Windows) and SQR 3.0 (Character Based) ? > Is this scenario even possible ? > and > Is anyone running Oracle Forms 4.5 (Windows) and SQR 3.5 Report Mate > (Windows) ? > Any success in running "canned, production" reports from Oracle Forms 4.5 > and SQR 3.0 / 3.5 ? Steve, You should be able to invoke either version of SQR and have it run on the local box. It's been a while since I've worked with Oracle's application development tools, but you should be able call use system to call out to Windows to launch SQR. This will require that you specify a usr/pwd on the SQR command line. Another approach is to use callable sqr and link it into oracle forms as a user exit. This is more complicated, but means you can use the same connection, is a little faster, and you have control over how to deal with failures, etc. Sorry I don't have direct experience with 4.5, but I thought this reply would help. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Fri Aug 9 16:15:09 1996 Date: Fri, 9 Aug 1996 17:16:03 -0700 From: Sudeep Mulki Subject: use {database} question We are using SYBASE, SQR 3.x. I want to be able to dynamically change the database in the report. We can use the 'use' command only in the 'Setup' section. I do not want to use the 'ask' command. I would rather use the 'input' command with a no-prompt, and pass the database name as an argument. It seems that the 'input' command can not be used inside the 'begin setup' section. So, how can my objective be achieved? Another possible way is to always qualify the database name in the SQL statement. But I do not want to do this. Thanks Sudeep Mulki sudeep_mulki@ml.com From owner-sqr-users@USA.NET Sat Aug 10 00:47:50 1996 Date: Fri, 9 Aug 1996 15:33:18 -0400 From: Lynn Francis Subject: Oracle Forms 4.5 and SQR 3.0 / SQR 3.5 -Reply We have been able to run SQR 3.5 from Forms 3 (char mode) under WIN95 and also SQR 3.5 from Forms 4.5 under Windows and WIN95. Lynn Francis American Bankers Association (202) 663-5167 lfrancis@aba.com >>> S J Bayles 08/09/96 11:43am >>> SQR Users Group, Is anyone running Oracle Forms 4.5 (Windows) and SQR 3.0 (Character Based) ? Is this scenario even possible ? and Is anyone running Oracle Forms 4.5 (Windows) and SQR 3.5 Report Mate (Windows) ? Any success in running "canned, production" reports from Oracle Forms 4.5 and SQR 3.0 / 3.5 ? Please Help ! Thanks, Steve Bayles Pharmaco Austin, Texas email : pharmsjb@ix.netcom.com 10:45am, 09-Aug-96, Friday AM From owner-sqr-users@USA.NET Sat Aug 10 02:05:34 1996 Date: Fri, 9 Aug 1996 10:30:47 -0500 From: Jim Doe Subject: creation of variable paragraph letters with SQR We are a private college, running ORACLE7 on a Sequent unix platform and are going to a Client Server(Novelle) platform in the next 2 years. Most of our existing reports are written using an older version of ORACLE RPT or using a report function of our administrative software package (BANNER software by SCT Corp), We send out a great many letters to prospective students, existing students, parents, and alumni etc. These letters are basicly form letters that have certain fields that contain data from our database. These letters also have paragraphs of text that vary according to values in the database. We have begun using character based SQR and ESQR recently and are moving to the SQR Workbench product. We have asked MITI if any SQR product addresses this type of letter directly, and they say uh-uh. Our current reporting tool is very difficult for our users to use for this type of letter generation. We are looking for an easier way to create these letters by: 1. using SQR alone. 2. Using SQR in combination with a word processing product. 3. Using SQR in combination with some other 3rd party software. Does anyone have a process, or a know of a product that will work with SQR to generate this type of letter? Your feedback would be much appreciated. Thank You James M. Doe Programming Manager Hamline University MSC 1911 1536 Hewitt Ave St. Paul MN 55104-1284 612-641-2824 From owner-sqr-users@USA.NET Sat Aug 10 09:44:54 1996 Date: Sat, 10 Aug 1996 09:40:46 -0500 From: Ray Ontko Subject: Re: creation of variable paragraph letters with SQR > We are a private college, running ORACLE7 on a Sequent unix platform > and are going to a Client Server(Novelle) platform in the next 2 years. > > Most of our existing reports are written using an older version of > ORACLE RPT or using a report function of our administrative software > package (BANNER software by SCT Corp), > > We send out a great many letters to prospective students, existing > students, parents, and alumni etc. These letters are basicly form letters > that have certain fields that contain data from our database. These > letters also have paragraphs of text that vary according to values in the > database. > > We have begun using character based SQR and ESQR recently and are > moving to the SQR Workbench product. We have asked MITI if any SQR > product addresses this type of letter directly, and they say uh-uh. > > Our current reporting tool is very difficult for our users to use for this > type of letter generation. We are looking for an easier way to create > these letters by: > 1. using SQR alone. > 2. Using SQR in combination with a word processing product. > 3. Using SQR in combination with some other 3rd party software. > > Does anyone have a process, or a know of a product that will work with > SQR to generate this type of letter? Your feedback would be much > appreciated. > > Thank You > > James M. Doe James, We have done quite a bit of custom reporting work related to Banner, mostly in the Alumni module of Banner. We've helped an Alumni/Development office implement letter generation using the Banner facilities, but most often the office prefers to use what they call "downloads", mail-merge data files produced using SQR that are available through the Job Submission feature of Banner that are then downloaded to their PCs for mail-merge processing. They get complete control over the format and content of the document, and there is a high degree of confidence that the downloads contain the intended data. SQR CAN be used to generate letters with dynamic paragraphs, but you really need to be an SQR programmer to do it. I would be hard-pressed to ask the office staff to do this. We used SQR Execute running on the server to produce the downloads through Job Submission, although it would be fairly straightforward to create individual SQR programs that could be run from the desktop to produce the files on the user's PC. They could then mail-merge from there. Hope this helps. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Mon Aug 12 15:23:33 1996 Date: Mon, 12 Aug 1996 15:13:11 -0500 From: Jim Doe Subject: Re: creation of variable paragraph letters with SQR -Reply thank you , Ray for the info I will talk this over with folks around here and perhaps get back to you, Your knowledge of Sqr is impressive and maybe we can do some business. thanks again jmd From owner-sqr-users@USA.NET Mon Aug 12 22:17:23 1996 Date: Mon, 12 Aug 1996 23:00:17 -0500 From: "Matthew F. Reagan" Subject: Re: How do we join user group Ray, Thanks for the answers while I was "off the net". Let me try to fill in the blanks in case anyone is interested. If you aren't interested, just flush the rest of this e-mail. The SQR Users Group is a virtual user group that exists around the mailing list and the Web page. Yes, the National SQR Users Group still exists, but no longer really serves a function, since those functions have been replaced/enhanced by the mail list and the web page. The old users group existed to "facilitate the free exchange of information relating to the SQR software package". Our primary method of doing this was publishing a newsletter, organizing a meeting at the annual IOUW and ECO conferences, running a BBS, and working with MITI to identify possible beta site participants, help with resolving incompatible enhancement requests, and generally represent the customer base to MITI. Being a volunteer organization, we relied on volunteer effort to write articles, edit the newsletter, organize its publication, stuff envelopes, and drag the mail bags to the post office. As is the case in almost ALL volunteer efforts in this wonderful economy, help was very hard to find. Very few people had the time to write articles, and the effort and cost of publishing a newsletter proved too much for the volunteers that could be Shanghai'd into helping. The Web provided an avenue that could replace and improve the services provided and substantially reduce the cost. Ray Ontko, Nathan Treadway, Mark Johnson, and I got together and created the mailing list and web server that exists today. If you want to help in any aspect of the virtual users group, don't hesitate to drop a line here. If there is a service that you would like see (and most especially want to run), let us know. Hell, I'm evaluating how to link Oracle7 Enterprise Server and WebServer into the home page. Why? I thought it would be interesting, look good on my resume, and provide a whole host of features for the user group home page. Anyone want to look at ContextServer? How about helping to run a page of consulting company references? Hey, wouldn't it be nice to have a dynamic link to a database of consultants on tap? Searching by region, vertical market, etc. would help alot for me. Someone out there must want to try to put one of these things together. C'mon. You know you do. How about submitting one of your neat and nifty SQR programs to the archive? Everybody's got at least ONE program that someone else might want or need. Sorry. I can't help falling into the volunteer recruiting role. I've been doing it for too many years. Matt... President National SQR Users Group >> Hmm - nice message. >> However how the hell am I supposed to know what you are talking about? >> >> >> >There doesn't seem to be any info on this on the web page. >> > >> >Would someone please tell me how to join, who to contact ... >> > >> >thank you .... jmd >> > >> >>>------------------------------------------------------------------------- >>----- >> >James M. Doe Hamline University >> >Manager, Administrative Systems Programming Computer Center >> >jdoe@seq.hamline.edu Mail Stop C1911 >> >phone: 612-641-2824 1536 Hewitt Ave. >> >fax: 612-641-2027 St. Paul, MN 55104 >> >> -- >> Steve Nicholas >> > >Steve: James is talking about SQRUG, the SQR User Group, which is a > "virtual" user group with a home page at http://www.sqrug.com/. > Check it out. > >James: SQRUG doesn't have an official membership list, but there > are a few volunteers who try to keep it going. Contact > Matt Reagan, Mark Johnson, or Nathan Treadway if you're > interested in volunteering. > > In addition, there is something called the National SQR > Users Group which pre-dated SQRUG. Matt Reagan is the > President. Contact him if you're interested in joining > or volunteering. > > Of course, these are both all-volunteer activities, so > people work on them as time allows. > >Ray >---------------------------------------------------------------------- >Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" >rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Aug 13 08:14:39 1996 Date: Tue, 13 Aug 1996 09:02:09 EDT From: geetter@UHAVAX.HARTFORD.EDU Subject: Re: creation of variable paragraph letters with SQR We, at The University of Hartford, use WordPerfect for the VAX to do our letter generation. The product is the same as the WP51 Plus version found on the PC. It is developed and supported by a company called SPIRE also located in Orem Utah. I believe they have a unix version. We extract data from our Oracle database using either SQR or a product called population selection/letter generation which is part of our BANNER system from SCT. This delimited data becomes the secondary file of a WordPerfect mailmerge. With the use of the WordPerfect macro facility, we can do a lot of data/ text manipulation. We also scan signatures and make them into postscript fonts and then include them in the letter generation. We have had great success with this product. If you want more information, please give me a call. Allan Geetter University of Hartford West Hartford, CT 06117 (860) 768-4889 geetter@uhavax.hartford.edu From owner-sqr-users@USA.NET Mon Aug 19 11:41:01 1996 Date: Mon, 19 Aug 1996 18:32:29 +0200 From: "Mansfeld, Fredrik" Subject: Extracting rows from a stored proc call to SQL Server Hi! I'm currently writing a bunch of reports for SQRW V3.0.12.3. I want to make a call to a stored procedure in my database. My database is on SQL Server 6.0 The stored procedure returns a set of rows that I would like to print on my report. The problem is that I don't know how to get the rows one by one. I would like to be able to use the DO paramater in the EXECUTE command but it only seems to work for Sybase and Ingres databases. Is there anyone out there who can giveme a hint on how to do a similar thing on SQL Server? Any ideas or hints are appreciated. Thanks in advance. Fredrik Mansfeld Abaris AB, Sweden From owner-sqr-users@USA.NET Mon Aug 19 12:16:19 1996 Date: Mon, 19 Aug 1996 12:10:25 -0500 From: "Jeff T. Orwick [C]" Subject: Re: Extracting rows from a stored proc call to SQL Server I've run into the same thing with Oracle and SQR. The solution we used may work for you if in SQL Server procedures are able to hold variables for the duration of the user session. We called a Database procedure that queried the data and filled the rows, of structure that we couldn't pass directly SQR. In the last row we inserted an 'Last Row' identifier. Then made the structure available to all Oracle Database procedures run by the current user session. Then we wrote another database procedure that popped one set of variables of the structure and passed then out. This second procedure is the one we called from SQR inside a While not "Last Row" loop. On Aug 19, 6:32pm, Mansfeld, Fredrik wrote: > Subject: Extracting rows from a stored proc call to SQL Server > Hi! > > I'm currently writing a bunch of reports for SQRW V3.0.12.3. > I want to make a call to a stored procedure in my database. > My database is on SQL Server 6.0 > > The stored procedure returns a set of rows that I would like > to print on my report. The problem is that I don't know how > to get the rows one by one. > > I would like to be able to use the DO paramater in the EXECUTE > command but it only seems to work for Sybase and Ingres databases. > > Is there anyone out there who can giveme a hint on how to do a > similar thing on SQL Server? > > > Any ideas or hints are appreciated. > Thanks in advance. > > Fredrik Mansfeld > Abaris AB, Sweden >-- End of excerpt from Mansfeld, Fredrik -- Thanks, Jeff Orwick 847.632.6943 From owner-sqr-users@USA.NET Mon Aug 19 15:12:44 1996 Date: Mon, 19 Aug 1996 14:39:00 PDT From: "Cys, Kent D." Subject: How can I get SQR3 to link to a Xerox printer? Hi All, I'm using SQR version 3.0.5 on an HP-UX platform backed by an Oracle database. Most of the SQR reports I produce go to an HP laser printer but there are a few that need to print on a huge Xerox high speed printer/copier. Unfortunately, this beast is not directly supported as a printer type by SQR. In order to get my reports formatted correctly, I will have to convert my .lis file for each report to a straight ASCII file. The reports in question are set up as direct prints and can easily be defined as line printer. My question is how do I get the .lis files changed to a straight ASCII file? One idea is to encode a hidden ASCII escape character and print it at the end of every line. Later, a UNIX script could open the .lis file and remove the hidden character as well as the character that would come after it. This ostensibly would make the .lis file a group of ASCII characters that could be aligned using Xerox's formatting program that accompanies this huge printer. Does that sound plausible? Anyone done anything similar? Do you have examples of your code that you could e-mail me? Any suggestions would be appreciated... Thanks! Kent Cys From owner-sqr-users@USA.NET Mon Aug 19 16:42:24 1996 Date: Mon, 19 Aug 1996 15:29:03 -0700 From: Bill Spence Subject: Substituting characters in a string I am reading text which contains carriage control characters. Is there a way to edit them out using something like 'substr' so that I can reconfigure the output. The datatype being read is defined as 'long' in an Oracle database. Any suggestions appreciated. From owner-sqr-users@USA.NET Mon Aug 19 17:36:19 1996 Date: Mon, 19 Aug 1996 17:12:59 -0500 From: "Jeff T. Orwick [C]" Subject: Re: Substituting characters in a string Look at the function TRANSLATE and the command ENCODE. ENCODE allows you to define a variable with control characters TRANSLATE converts all instences of x into y. On Aug 19, 3:29pm, Bill Spence wrote: > Subject: Substituting characters in a string > I am reading text which contains carriage control > characters. Is there a way to edit them out using something > like 'substr' so that I can reconfigure the output. The > datatype being read is defined as 'long' in an Oracle > database. > > Any suggestions appreciated. >-- End of excerpt from Bill Spence -- Thanks, Jeff Orwick 847.632.6943 From owner-sqr-users@USA.NET Mon Aug 19 22:49:30 1996 Date: Mon, 19 Aug 1996 23:41:52 EDT From: Ed Crotty <73747.1247@COMPUSERVE.COM> Subject: Re: How can I get SQR3 to link to a Xerox printer? The .lis file for a line-printer is "straight ascii" as far as I know. I've used SQR to support IBM control characters (1st column, 1=new page). Could it be something like this? Ed Crotty From owner-sqr-users@USA.NET Tue Aug 20 07:42:43 1996 Date: Tue, 20 Aug 1996 07:27:39 -0500 From: Sean Shaw Subject: Re: Substituting characters in a string begin 600 .tar.444.Re__Substituting_cha.attach M'YV0+EX`&$BPH,&#"!,J7,BPH4.$("+>J%$#!("((&3`L&$18T08'3V*!`G" MAD8;,V3GU"U[ MQHW8KFD`WTT#!W'7-88;QBL&;QJ\==BX`5P&L0P:AM.TJ$$#+YLTL/&:&8-W MS%T0/D!H%@."2!@Z973(YU(=1!/`+(`00PX@!%''&0+FD`-',=2@@PPYZ`"# M2RW`<`-Q"J2VFFSIR49;;A[FMEMOR/$67'$:"7<<<\O)UMQSKTEGAGCDF8=> M;.NU]UY\&LK!&G0E?K@;;C"2..*)K@VG8HG*@9B<<[M%%YL8X8U7'A?G=9@C M%^Z!9(0<;[2AWWP@"9$&&VR`,`4<9;@Q1AD@\"#&F6Q\,0>;;I8!A!!#4)&$ M$T50X0*?5$@1A!-3)"'H$$\TX0,7&7*AFH\+44I'Y8Q6VJ@E MJUVJ68<8:I0Q!AUC\@?2%,O.01D==5#F!H)CH-%9&,^6(4=C1X$0!@C6RG'4 M&9#V&&N'MUUZFXB_WLB^1\4;T?;71':4P<$&G'(XFP8<:;1)1V-OF`'" M>=:J&844+50Q11%23!'G%#?GO'//0.@\KK MK_Q"Z2^.`&M\[,#PO7JPK$\/&;61OSVLJ]43,Z>UQ0*W"A*D\8F4A+EM@)!R M&&2L"P)^>-`!PAUH5(8&"&,`1D<81S5FF1SJAG$&G(D'!F9A3(\-[VP*UUIO MB?>B"*-Q;;OX=HQ<%^MUW,D6W#3"'G9^]M3XCGYUDVZ7*F/')'G4[;?ACNL" M"$DT1@<:XL)Y[AUAY/'W&R"4T;?@QY>1]QO9@E`'7]NB&^9DA6_;KL&4PAXO MU)F"KG;5I+-(\>FF8ISJQH;Q'K:[3L>.OJWJ4VU[Z:0*%NO>(Y+SK`%.)YA# MM>@@AQ-X[V_>$MS=+.,&O3D+,#,Z0QU2!D$X88\.<,C6\*B`O/&]CFSZ,UOZ MCN2_);DO=P(\E>I4Q3&PN4YSLU(A_UA8.Q>*ZGVZ&V#O,$*&^]PG#VP"@1C* MX+>]D0$$BP%!4F;D!NF9JS$G8`-@SN#``3&&_JY+Q6&$D^ M3M*/E83;)0-60TW6,95G7&4:-[6^_XWR5_#;'=A$$@0W.$^!9YB,ZB!&G$@.AF`2B:BNI`;MVDQXYCR M/9!*@LSR@+T3<%`-VZ.>'/+@-SI`+YI'$5P:!-8%A0QYT`"E(102@ M@0&!";2XK2\DC@UU:$,%43""\U21!2.X:`H&)T8X@&`$BB'#\4YZLFVM-%TK MZP$/:+.T>,IL.W0(4/4J6#TPBG$,)P.!"%)F,G"5000125P;.(,4*#;F7&=X MPQN>V*TW5":1$4'"&^Y0!LG((4#<>U,'$?<&C&H4BCQ%'B$79TA$.M5<0J7H M&9#*G0#1LPZ(TPM.0<`F.?Q%#GD3`5-7EIW[,-,-2*4#$CTH,S/4P4V4:>;S MH$B'X8$@"]C+JQL"A(:M=E5<`2(#]'KZ%S1MU6\H&&@"06`&QLE!H:P]I.#T M\L0R'#(/`1)#]D1;AL:D+`YU2`,']?*&ZLE!J&/8X!S>(`>DTK:#P^5@&YA+ MN3"9K#+5?*((YA"'YI(U*8-K'LQD)EJ_#12"]P$!9YRWQ-A:2UP@:$$+M!>8 M,]E,"B#PUE.%2E0V&!6I2F7J$V-&69C=P0TI8*AF%+#$,QRE!=%\PYO(L$$X M<>8HD&KP@Q%YLF=!2JX6+6M&W>!0];Y!,A(%\45'/%D2J%C$&BVQ:$$P.3I\ M05UD^$+,+#HN2)D!3'ECZ\F^X(8PM*$["F@3&5K`86?1`5)*AC"8)ESAAC*X M#`YV@Y0E++T*TW@R-TY#CG<\AAXK(")M2AQX9PJ#^`04>B0H%)K'*BDYT^K2="_2E0@^J3H1"E*!0R276MOZUKC. MM:YWS>M>^_K7P`ZVL(=-[&(;^]@/824OURA*2KH1D,2*(_VVU+I;RIIS^X/D MLD/)ME]6#'74D1\MWSFM937K62$KMQB6B2UM<05]#EXO>]OSVW*/?+QUF7WH:%\8WD/']CYB M[8\"[]K/[;=)A!,][?S&.<3:SO>E0]M^!4S#`4&0P`4V\(''2^\$ORA-#*9! M@QSLZ0=#6%D0D!#)0K=[MM5^],Z_\O.Q]'O<*?[WTE\[\YYC?MZ=_V_H!SSB MGV"0NL8FV?6(4IW@4*QZ2]G+M8@6_&,8Q(O_@U[_[+K>_>L_C[OO2 M)WK31GK6=G;ZMW"PYQ'C%P9ME4B7IWPVEWIKIX#=QX"N%WHS M-(!TE'RJI'G[EX!KLW?>UX#")$@5.(+9AX'-IX%)UWIO]R\?F$G5)H*Y1((( MV$O^QW.O-TP>44S'="#*%%E>]TS1I#+9=4W)ITW508@)5(D%08FA5)BME(=U29G\%(,%%-L5E,*($\@@%,ZA3QI!2?U M!U1P,E1E4%1O@E1DM53/%450)554U5E795E:Q55>!59'(58]I8<55"X]%8$3 M^%;G(@)R15KU5K"!5NM53//95MS@%M*M%MOT%L6!%S" 0I3PXA3S')0+)-2[,Y5Q-!3VI ` end From owner-sqr-users@USA.NET Tue Aug 20 09:26:26 1996 Date: Tue, 20 Aug 1996 14:01:31 +0000 From: Noel Macara Subject: Re: Substituting characters in a string The WRAP argument (of the PRINT command) itself has an argument, STRIP, which should do the job for you. You can find details on Page 271 of the SQR3 User's Guide, but, in case you have mislaid you copy, I quote directly from it.. 'The STRIP and ON arguments affect which characters are to be converted before wrapping, and which characters will force a wrap to occur. * Chararcters in the STRIP argument will be converted to spaces before the wrap occurs. * Characters in the ON string argument will cause a wrap at each ON character found. The ON character will not be printed. Both arguments will accept regular characters plus non-display characters whose ASCII values are surrounded by angled brackets, . For example, to print a long data type that contains embedded carriage returns, the setup would be: print &long_field (5,20) wrap 42 30 on=<13> The paragraph will wrap at each carriage return, rather than at the usual word boundaries. If the ON character is not found within the width specified for the paragraph, the wrap will occur at a word space. For example: print &description (20,10) wrap 50 22 strip=/\^@<13> on=<10> The preceding example converts the STRIP characters to spaces before wrapping on either a line feed <10> or a space (the default). From owner-sqr-users@USA.NET Wed Aug 21 11:51:39 1996 Date: Wed, 21 Aug 1996 11:36:40 -0700 From: Jay Rouse Subject: SQR3 Programming Talent Available This goes to Ramesh T who is looking for SQR3 help. Contact Jay Rouse at INOVA. Thanks. From owner-sqr-users@USA.NET Wed Aug 21 15:15:22 1996 Date: Wed, 21 Aug 1996 14:57:00 PDT From: "Cys, Kent D." Subject: How does SQR page-break when writing many detail lines? Hey gang, I need to make an SQR report reprint a column titles for a group of detail records each time it new-pages while writing them. In this case I have a report that has room to write about 30 records to a page after it writes the report header. If I'm writing some thing like 45 detail lines, the 15 lines on page 2 have no column titles. I can't make the column titles part of the report header because they differ depending on what records are being retrieved. Does anyone know of a variable or something that I can key off of to write a condition to reprint the column titles if record detail is split across pages? Any suggestions would be greatly appreciated... Thanks! Kent Cys From owner-sqr-users@USA.NET Wed Aug 21 16:29:24 1996 Date: Wed, 21 Aug 1996 16:16:54 -0500 From: Ray Ontko Subject: Re: How does SQR page-break when writing many detail lines? > I need to make an SQR report reprint a column titles for a group of detail > records each time it new-pages while writing them. In this case I have a > report that has room to write about 30 records to a page after it writes the > report header. If I'm writing some thing like 45 detail lines, the 15 lines > on page 2 have no column titles. I can't make the column titles part of the > report header because they differ depending on what records are being > retrieved. Does anyone know of a variable or something that I can key off > of to write a condition to reprint the column titles if record detail is > split across pages? Any suggestions would be greatly appreciated... Kent, Have you looked at DECLARE-PROCEDURE AFTER-PAGE= and BEFORE-PAGE= ? I have used these to do something similar. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB." rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Aug 21 17:56:42 1996 Date: Wed, 21 Aug 1996 16:56:53 -0500 From: "Jeff T. Orwick [C]" Subject: Re: How does SQR page-break when writing many detail lines? Check ON-BREAK, a optional parameter for the PRINT statement. look at PRINT= I don't have a manual in front of me, but I seem to recall it can be set to print well the value changes or when the page breaks. -- Thanks, Jeff Orwick 847.632.6943 From owner-sqr-users@USA.NET Wed Aug 21 18:30:42 1996 Date: Wed, 21 Aug 1996 19:17:40 EDT From: Ed Crotty <73747.1247@COMPUSERVE.COM> Subject: Re: How does SQR page-break when writing many detail lines? Kent, The easiest way that I have found to repeat heading on an overflow page is to check if it started a new page using #current-line. You need to look for the first line of the body of the report, which will be one more than the heading. begin-select col1 if #current-line = 10 do print_detail_header end-if print &col1 (1,1) next-listing end-select You can also repeat some of your master info ( Account : 12345 continued) if you like. It might be more elegant to use a variable for your heading size and make the first_body_line be one more. move 9 to #heading lines let #first_body_line = #heading_lines +1 if #current-line = #first_body_line do print_detail_header end-if Ed Crotty BEGIN-HEADING #heading_line From owner-sqr-users@USA.NET Wed Aug 21 22:34:44 1996 Date: Wed, 21 Aug 1996 09:26:03 -0700 From: Bill Spence Subject: Substituting characters in a string Thanks everyone for your advice on how to handle my problem eliminating imbedded carriage control characters in a text field. The 'WRAP' and 'STRIP' arguments in the PRINT command works fine. From owner-sqr-users@USA.NET Thu Aug 22 10:19:34 1996 Date: Thu, 22 Aug 1996 08:15:34 -0400 From: "Brent S. Templeton" Subject: Re: How does SQR page-break when writing many detail lines? ------ =_NextPart_000_01BB9002.18B574A0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I have used variables in my the header section to print a header based on variable information. Since the header is not created until the whole page is written, this is a very plausible solution. I have used both the evaluate statement and also just simple if statements. ---------- From: Ray Ontko[SMTP:rayo@ONTKO.COM] Sent: Wednesday, August 21, 1996 5:16 PM To: Multiple recipients of list SQR-USERS Subject: Re: How does SQR page-break when writing many detail lines? > I need to make an SQR report reprint a column titles for a group of detail > records each time it new-pages while writing them. In this case I have a > report that has room to write about 30 records to a page after it writes the > report header. If I'm writing some thing like 45 detail lines, the 15 lines > on page 2 have no column titles. I can't make the column titles part of the > report header because they differ depending on what records are being > retrieved. Does anyone know of a variable or something that I can key off > of to write a condition to reprint the column titles if record detail is > split across pages? Any suggestions would be greatly appreciated... Kent, Have you looked at DECLARE-PROCEDURE AFTER-PAGE= and BEFORE-PAGE= ? I have used these to do something similar. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB." rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ ------ =_NextPart_000_01BB9002.18B574A0 Content-Type: application/ms-tnef Content-Transfer-Encoding: base64 eJ8+IiQMAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEkAYAEAEAAAEAAAAMAAAAAwAAMAIAAAAL AA8OAAAAAAIB/w8BAAAAQQAAAAAAAACBKx+kvqMQGZ1uAN0BD1QCAAAAAFNRUi1VU0VSU0BVU0Eu TkVUAFNNVFAAU1FSLVVTRVJTQFVTQS5ORVQAAAAAHgACMAEAAAAFAAAAU01UUAAAAAAeAAMwAQAA ABIAAABTUVItVVNFUlNAVVNBLk5FVAAAAAMAFQwBAAAAAwD+DwYAAAAeAAEwAQAAABQAAAAnU1FS LVVTRVJTQFVTQS5ORVQnAAIBCzABAAAAFwAAAFNNVFA6U1FSLVVTRVJTQFVTQS5ORVQAAAMAADkA AAAACwBAOgEAAAACAfYPAQAAAAQAAAAAAAAClygBBIABADwAAABSRTogSG93IGRvZXMgU1FSIHBh Z2UtYnJlYWsgd2hlbiB3cml0aW5nIG1hbnkgZGV0YWlsIGxpbmVzPwDHFAEFgAMADgAAAMwHCAAW AAgADwAiAAQALgEBIIADAA4AAADMBwgAFgAIAAgAIgAEACcBAQmAAQAhAAAAQzcyQkUwOTgxNUZD Q0YxMUI5NkIxMDAwNUFGMTU2QjEALQcBA5AGAKAGAAAUAAAACwAjAAAAAAADACYAAAAAAAsAKQAB AAAAAwAuAAAAAAADADYAAAAAAEAAOQAwZZKeI5C7AR4AcAABAAAAPAAAAFJFOiBIb3cgZG9lcyBT UVIgcGFnZS1icmVhayB3aGVuIHdyaXRpbmcgbWFueSBkZXRhaWwgbGluZXM/AAIBcQABAAAAFgAA AAG7kCOeiZjgK8n8FRHPuWsQAFrxVrEAAB4AHgwBAAAAAwAAAE1TAAAeAB8MAQAAABYAAABXT1JL R1JPVVAvV0dQTy9CcmVudFQAAAADAAYQLu30eQMABxCfBAAAHgAIEAEAAABlAAAASUhBVkVVU0VE VkFSSUFCTEVTSU5NWVRIRUhFQURFUlNFQ1RJT05UT1BSSU5UQUhFQURFUkJBU0VET05WQVJJQUJM RUlORk9STUFUSU9OU0lOQ0VUSEVIRUFERVJJU05PVENSRQAAAAACAQkQAQAAAPQEAADwBAAAHAkA AExaRnXV3IKX/wAKAQ8CFQKkA+QF6wKDAFATA1QCAGNoCsBzZXTuMgYABsMCgzIDxgcTAoMiMw96 aGVsAyBEbOpnAoM0Ew19CoAIzwnZ4jsXnzI1NQKACoENscELYG5nMTAzFCALCosS8gwBYwBAIEkg EcAQdmUgdRHwZCB2HwrABzACYAeRC4AgbXlMIHQU8ByQZWEEgSAxEfBjdGkCIB4wbyAmcAUQAjAg YR52YmHfHQIfQR1GHdECEHIAwB8iqC4gIAqFUwuAYxzQ4x5JBAAgbm8FQAUAHpA6dB0RdQIwAxEe QndotwbwHNAKsGchkQQgdwUQ+wJACfAsHjEkESQRIAAcwK5yHiALURzwaSFycwbw/nUiIwqFCoUc igbgHkAeM/5lHUAKQCSxHuABkCTAB4CdH9JuHSAHQCigIGoc8FsFQACQbQtQIZFmK+hzgyktCvRs aTE4MALR4GktMTQ0DfAM0DCjeQtZMTYKoANgJMAfECC+LTLHCocxewwwMkZGA2FeOjPOMkYMggfw YR4gTwECMGtvW1NNVFAEOnI3kG9AT05UgEtPLkNPTV0zb180fQZgAjA1rza7VwmAbo0HkGQ3kCbw QXVnLTIEMjEm8DE5OTYgxDU6MhAgUE05bzR9jFRvO682u011bB8g+y2iF6BjBSAIkC6BIOAt8AMw AC1BU1FSLVVTGEVSUz+vOn51YmqXHwFBzza8ZUhgSG8H4JxkbweRRWEl8y1iJJHeayWRCfAmcwuA Zx4AAHC/HiANsAGQAxEwAD2xPy7PeS/TMzYxRxXCDAEyRj7fHHE9sB0RH3EAwGsc0AORe0sSF6Bw F0FSYh+1FxF1/m0fUSagHaIh0R/xCcAIYH5wRNJNJAqFUPBEMQWwZP8EIB6QEbBT4QeAHdAFQD2w /HctJgImYScgIYFMVh5B2m0iYUkfUSciYyChHHb+YVW5UpMeQCIQHJEEIANgPwNwH2ImglHhBuAo 0CAz3jBWNx9xIAAmA2EBgCPi/wVAXONeMRTwWt4ehFlSLfD8SSdckExWKKBXMScRTKFzMABR0TQ1 TRsm8hzQMf9jsE2TVbcfQSYDEiAcoyRA51N8WVJZ8W4nBUBRsx5C/1OMCrEFQEThX/9hBiCABZBv KCEjQ00BBpBmHsENsHD/CfBtAEyhH0EloFvxVkYKwG8c0GwwTJFVuXQIgRzAZL0iYURK0kzhAiAc 0GskQP8H4EThJ5EhNgWxYqJi9FvT72gjcaBs0UTgZmV4anFcx/9TcW2xHyZS5mj/LdJWRE0W+wQA VbdzC1BXYQDQA2AEEdVX0z8icEFM8XM+QFfx9x8iJmEIYGwqsRzQCcEiEHJsHiBhcB+gREEksi6r foApPEssUSwpPEgcsn04kHVFAFxwUdAssQVARABFQ0xBUkUtUMBST0NFRFWCQBNwDEZURcCCYEFH RT3hLINCRUZPgkKDg03m/xyKHkFsgh+ASsBzCS1xAxD/CsApLTeBCoUyyIofiy+MP28y3jeHInCO 43wicI5YJsYgCFCPMyJBc0vgVzEPXURLEiySHkJXRUIu3iIKhThzAiE38C4FoFyQ/Y9DaRGwBGAs oCbwWYGPJP8GYBzSgbJPjRxBDGAXgDJFKS/wbmsdIGgCQHA6qC8vd5iwLpNnL0+PvzJkTf9PDhvV mo0WwQCesAMAEBAAAAAAAwAREAAAAABAAAcwANprpCKQuwFAAAgwANprpCKQuwEeAD0AAQAAAAUA AABSRTogAAAAAAMADTT9NwAAxwo= ------ =_NextPart_000_01BB9002.18B574A0-- From owner-sqr-users@USA.NET Thu Aug 22 12:51:46 1996 Date: Thu, 22 Aug 1996 13:55:21 +0200 From: "Mansfeld, Fredrik" Subject: General Protection Fault when using the -M switch in SQRW 2.5 Hi, I have run into some serious problems when trying to use the -M switch in SQRW 2.5. I must increase the number of allowed #Define's in my report so I created a small file with only one row in it: SUBVARS=250 However, as soon as I make my call to SQRW.EXE crasches with a GP fault on address 0001:432E According to the manual the -M switch only takes a file name as argument and no path. It doesn't matter where I put the file or what I call it, or even if there are no file at all. I get the GP in all cases. What am I doing wrong? I run SQRW 2.5 in NT 3.51 on a Compaq Deskpro XL 5100 with plenty of RAM and disk space, so I don't think it is a 'limited resources'-problem. Any hints or suggestions are deeply appreciated. Thanks in advance! /Fredrik Mansfeld, Abaris AB, Sweden From owner-sqr-users@USA.NET Thu Aug 22 13:15:22 1996 Date: Thu, 22 Aug 1996 13:05:02 -0500 From: Ray Ontko Subject: Re: General Protection Fault when using the -M switch in SQRW 2.5 > According to the manual the -M switch only takes a file name as argument > and no path. It doesn't matter where I put the file or what I call it, > or > even if there are no file at all. I get the GP in all cases. What am I > doing wrong? Fredrick, I think that you CAN specify the path for the -M file. If you don't specify one, I think it uses the Working Directory specified on the SQRW File->Properties panel. I don't know if that explains the GP fault, but it could be. Try specifing a smaller value, just to see if it accepts the parameter. 100 is the default, try that and 101 and 200 and see if you get the same results. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about Forte Software" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@usa.net Fri Aug 23 21:57:59 1996 Date: Fri, 23 Aug 1996 09:26:27 -0400 From: "Michael L. Brown" Subject: Re: SQR3 Programming Talent Available Go to mail and news options in netscape, look at every thing in there. Anywhere that has hha.com, change it to InovaInc.com. ---------- From: Jay Rouse[SMTP:rouse@hha.com] Sent: Wednesday, August 21, 1996 2:36 PM To: Multiple recipients of list SQR-USERS Subject: SQR3 Programming Talent Available This goes to Ramesh T who is looking for SQR3 help. Contact Jay Rouse at INOVA. Thanks. From owner-sqr-users@USA.NET Tue Aug 27 05:07:10 1996 Date: Tue, 27 Aug 1996 12:01:41 +0200 From: "Mansfeld, Fredrik" Subject: Re: General Protection Fault when using the -M switch in SQRW 2.5 Hi, last week I wrote this: >>I have run into some serious problems when trying to use the -M >>switch in SQRW 2.5. I must increase the number of allowed #Define's >>in my report so I created a small file with only one row in it: >>SUBVARS=250 >> >>However, as soon as I make my call to SQRW.EXE crasches with a >>GP fault on address 0001:432E I tried everything, and finally I solved the problem. I think it could be intreresting for all to know about it as it costed me a couple of days to solve it. I always included the -DEBUG switch in my calls, when I removed it everything worked fine. I tried to remove some other switches to (to see if it had something to do with the length of the command line or so), but got the GP Fault all the time, until I remove the -DEBUG switch. So apperantly there are some bug in SQRW that gives a GP Fault when you combine the -DEBUG switch and the M switch. I haven't tried it with later versions of SQRW, hopefully they have corrected it. Sincerely, Fredrik Mansfeld, Abaris AB, Sweden From owner-sqr-users@USA.NET Tue Aug 27 08:26:20 1996 Date: Tue, 27 Aug 1996 08:49:04 -0400 From: "\"Andy Rampulla'" Subject: FW: Sqr (3.0.12.1) on dec Alpha Open Vms (6.2) write file problem....! >---------- >From: Rampulla, Andy >Sent: Tuesday, August 27, 1996 8:45 AM >To: 'Sqr User Group mail' >Cc: 'Andy Rampulla @ AOL' >Subject: Sqr (3.0.12.1) on dec Alpha Open Vms (6.2) write file >problem....! > >HELP HELP HELP HELP ....... >Having trouble writing fixed record flat file to our Alpha open vms >(6.2) computer with sqr (3.0.12.1). The same SQR program runs just >fine on our old vax vms computer. Can anyone out there give us a clue >on how to correct this problem ? > >Call me, Andy Rampulla (609) 663-1010 ext 4454 or > Sofia Shekhtman (609) 663-1010 ext 4464 or e-mail >me...... > >Thanks. > From owner-sqr-users@USA.NET Tue Aug 27 13:53:18 1996 Date: Tue, 27 Aug 1996 14:44:43 -0400 From: Scott Shelton Subject: Re: SQR 3 for windows -Reply John, Long time, no here. Hey, a quick question about SQR for Windows. We have SQRW.EXE and SQR6W.EXE. When I run the SQR6W to accessa V7 database, I don't have any problems but trying to run SQRW against the same database, I get an error about the database not being available. Does it have something to do with the DLL's not being found? What are the different dll's each version needs? We're only pointing to a V7 db now. Thanks. Scott Shelton American Bankers Assoc. From owner-sqr-users@USA.NET Tue Sep 3 13:29:13 1996 Date: Tue, 3 Sep 1996 10:41:23 -0700 From: Angel Guzman Subject: Dynamic Array Names SQR-USERS, Can the array names be dynamic? I have a generic array input routine which would work much more smoothly if I could get it to work with a changeable ARRAY NAME in the GET and PUT commands. I have had to use an 'if' command to distinguish which array to update. if $array-name = 'dparray' put $something into dparray(#record) end-if if $array-name = 'wcarray' put $something into wcarray(#record) end-if I am new to SQR. I have taken the beginners and advanced courses, but still feel I have allot of learning to do. Thanks for any help you may suggest. Angel GUZMAN From owner-sqr-users@USA.NET Tue Sep 3 14:48:13 1996 Date: Tue, 3 Sep 1996 14:15:57 -0500 From: Ray Ontko Subject: Re: Dynamic Array Names > > SQR-USERS, > > Can the array names be dynamic? > I have a generic array input routine which would work much more > smoothly if I could get it to work with a changeable ARRAY NAME in the > GET and PUT commands. > I have had to use an 'if' command to distinguish which array to > update. > > > if $array-name = 'dparray' > put $something into dparray(#record) > end-if > if $array-name = 'wcarray' > put $something into wcarray(#record) > end-if > > > I am new to SQR. I have taken the beginners and advanced courses, but > still feel I have allot of learning to do. > > Angel GUZMAN Angel, Array names cannot be dynamic, nor can they be passed as parameters to procedures. If you're willing to create a ufunc (written in C and linked in with SQR), I think you can create a reusable routine that allows you to pass the name of the array, but then you'd be writing in C. I don't know if this will work for your application, but you may be able to use substitution variables to allow you to reuse the code using #include files and require that the name of the array be #defined. For example: #define MY_ARRAY wcarray #include 'my_proc.sqh' begin-procedure main create-array name=wcarray size=100 field=a:char do my_proc( #n ) end-procedure where my_proc.sqh looks like: begin-procedure my_proc( :#n ) move 0 to #n input $line while not isnull( $line ) put $line into {MY_ARRAY}(#n) a add 1 to #n end-while end-procedure Unfortunately, this doesn't quite allow you to pass the array as a parameter, but does allow you to declare the array differently in different programs that use the routine. If you need to use the same routine several times in your program using different arrays but want to have a single source-code module, try this: #define MY_ARRAY darray #include 'my_proc.sqh' #define MY_ARRAY wcarray #include 'my_proc.sqh' begin-procedure main create-array name=darray size=25 field=a:char create-array name=wcarray size=100 field=a:char do my_proc_darray( #d ) do my_proc_wcarray( #wc ) end-procedure where my_proc.sqh looks like: begin-procedure my_proc_{MY_ARRAY}( :#n ) move 0 to #n input $line while not isnull( $line ) put $line into {MY_ARRAY}(#n) a add 1 to #n end-while end-procedure Hope this helps. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about Forte Software" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Sep 3 15:00:37 1996 Date: Tue, 3 Sep 1996 14:48:05 -600 From: Karthik Rajagoplan Subject: HIGHLIGHTING TEXT.. I am trying to selectively highlight (either through fonts or any other possible way) text in reports. Any suggestions on how to do this would be appreciated. Thanks, Raj. From owner-sqr-users@usa.net Wed Sep 4 07:23:26 1996 Date: Tue, 3 Sep 1996 21:56:38 EDT From: "Michael A. Docteroff" <103526.1257@COMPUSERVE.COM> Subject: Dynamic NEED statement I am having a problem with a report jumping to a new page even though there is plenty of room on the page to fit more data. I am trying to create a dynamic # variable to use in the NEED arguement of my NEXT-listing command. To compund the problem I am spacing the report using points. Does anyone have any suggestions, or has anyone tried this. Thanks for any help Michael Docteroff From owner-sqr-users@USA.NET Wed Sep 4 21:50:23 1996 Date: Wed, 4 Sep 1996 17:58:07 -0700 From: Bob Lowell Subject: how long is long? I'm using SQR V3.5 on a windows95 client w/Oracle on an SGI. I'm trying to retreive a long data type in a report that is truely long. SQR seems to truncate the long field after about 13 pages text. Is it possible to extend this? Suggested tricks to get around it? Thanks in advance. Bob Bob Lowell bpl@msi.com MIS Support Analyst Molecular Simulations Inc. (619) 546-5343 From owner-sqr-users@USA.NET Thu Sep 5 06:33:05 1996 Date: Thu, 5 Sep 1996 13:27:15 +0200 From: Ulrika Wahman Subject: Error 6003 and 6705 Hi everyone! I'm working with a package called MAXIMO (developed by PSDI). When I'm compiling .SQT-files with the parameter -KEEP and try to run the reports in MAXIMO , I get the "wonderful" errormessage SQR 6003 (Unexpected End-of-File while processing the printer file). An other message I get is no 6705 (File (filename) is not in SPF-packet format). The funny thing is that the .SPF-files are compiled using SQRWT.EXE, hmm... When I compile the .SQT-files "outside" MAXIMO, everything goes perfect! Does anyone recognize these messages and what to do ? Background: SQRW 3.0.7.1 for Sybase. Server is Sybase 10.0.2.3. The reports contains only select-statements, i.e no updates, inserts, deletes. "To guess is cheap. To guess wrong is expensive" Thanks in advance /Ulrika From owner-sqr-users@USA.NET Thu Sep 5 06:42:02 1996 Date: Thu, 5 Sep 1996 13:33:26 +0200 From: "Mansfeld, Fredrik" Subject: Re: Error 6003 and 6705 sound to like a missed Carriage Return/LineFeed in the end of the file. Some compilers want all statements to end with new-line. My advice is to check the last statement in your file and press the enter key one extra time. >---------- >From: Ulrika Wahman[SMTP:Ulrika.Wahman@ORE.IMS.SE] >Sent: den 5 september 1996 13:27 >To: Multiple recipients of list SQR-USERS >Subject: Error 6003 and 6705 > >Hi everyone! >I'm working with a package called MAXIMO (developed by PSDI). When I'm >compiling .SQT-files with the parameter >-KEEP and try to run the reports in MAXIMO , I get the "wonderful" >errormessage SQR 6003 (Unexpected >End-of-File while processing the printer file). An other message I get is no >6705 (File (filename) is not in >SPF-packet format). The funny thing is that the .SPF-files are compiled using >SQRWT.EXE, hmm... >When I compile the .SQT-files "outside" MAXIMO, everything goes perfect! >Does anyone recognize these messages and what to do ? > >Background: SQRW 3.0.7.1 for Sybase. Server is Sybase 10.0.2.3. > The reports contains only select-statements, i.e no updates, >inserts, deletes. > >"To guess is cheap. To guess wrong is expensive" >Thanks in advance >/Ulrika > From owner-sqr-users@USA.NET Thu Sep 5 07:39:54 1996 Date: Thu, 5 Sep 1996 08:33:41 -0400 From: Terri Jenkins Subject: Re: Dynamic Array Names I've never tried using dynamic array names, but for your application, I might use the EVALUATE command or at least nest your IF stmts so it won't process as many lines each time around. If you do not have the MITI SQR manual, msg me back and I'll send you the correct syntax for the EVALUATE command. From owner-sqr-users@USA.NET Thu Sep 5 13:36:56 1996 Date: Thu, 5 Sep 1996 09:52:32 -0500 From: Ray Ontko Subject: Re: HIGHLIGHTING TEXT.. > I am trying to selectively highlight (either through fonts or any > other possible way) text in reports. Any suggestions on how to do this > would be appreciated. Raj, We have used GRAPHIC BOX to draw a box around numbers in a report that are above or below the allowable ranges. You can also vary the width of the edges of the box. Ray -------------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR coding standards" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Thu Sep 5 13:37:09 1996 Date: Thu, 5 Sep 1996 08:32:25 -0500 From: Ray Ontko Subject: Re: how long is long? > I'm using SQR V3.5 on a windows95 client w/Oracle on an SGI. > > I'm trying to retreive a long data type in a report that is > truely long. SQR seems to truncate the long field after about > 13 pages text. Is it possible to extend this? Suggested > tricks to get around it? > > Thanks in advance. > > Bob Using the -M command line argument, you can specify a different maximum for the LONGSPACE parameter. For example, you might create a file called my_prog.sqm with the line LONGSPACE=65535 and use the command line sqr my_prog usr/pwd -Mmy_prog.sqm to invoke the program using the file. The default value for LONGSPACE is 13515, which I would expect to be about 3 pages of text, so you may already be using a larger LONGSPACE value. I don't know what happens if you try to use a value greater than 64K. I'm not sure if $ variables can handle values that large. Are you trying to print long text, up to 64K? If so, you should be OK. If not, there are some things you can do using C and ufuncs that I'd be happy to chat about. Good luck. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about Forte Software" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Thu Sep 5 16:36:33 1996 Date: Thu, 5 Sep 1996 14:28:00 -0700 From: Bob Lowell Subject: Re: how long is long? At 08:32 AM 9/5/96 -0500, you wrote: >Using the -M command line argument, you can specify a >different maximum for the LONGSPACE parameter. For example, >you might create a file called my_prog.sqm with the line > >LONGSPACE=65535 > Thanks for the suggestion. I was actually trying that when I received your mail :-) Changing this default seems to act very flakey on the PC. The acceptable values are lower for the PC (per MITI's user guide, the PC limits are lower, but they don't say what they are. However, I did get an error message that it could not be set over 32k) and when I set it to that highest PC acceptable value it returns less information than if I just leave it alone. > I don't know what happens if you try to use >a value greater than 64K. SQR returns a no data found error. (and then crashes, on the PC anyhow) I also tryed from the SGI and it made absolutely no difference no matter what I put in my longspace default. I tried altering other defaults and it picked them up right away,...? go figure. This might become a non-issue for me, I think I've convinced them they don't want all this (mostly useless) info in their reports. However, I would be curious if anyone else has any ideas. Thanks again, Bob Bob Lowell bpl@msi.com MIS Support Analyst Molecular Simulations Inc. (619) 546-5343 From owner-sqr-users@USA.NET Thu Sep 5 17:20:02 1996 Date: Sat, 5 Sep 2015 16:55:01 -0700 From: Judy Vandiver Subject: Re: HELP!! How do I quit user group HELP!!!! How do I get off this SQR-Users thing? I took over this e-mail address from my son and I don't even know what you guys are talking about. Please, please, please will someone remove me from your mailing list? mucho gracias I'm sure.......... ------------------------------- Ray Ontko wrote: > > > Hmm - nice message. > > However how the hell am I supposed to know what you are talking about? > > > > > > >There doesn't seem to be any info on this on the web page. > > > > > >Would someone please tell me how to join, who to contact ... > > > > > >thank you .... jmd > > > > > >------------------------------------------------------------------------------ > > >James M. Doe Hamline University > > >Manager, Administrative Systems Programming Computer Center > > >jdoe@seq.hamline.edu Mail Stop C1911 > > >phone: 612-641-2824 1536 Hewitt Ave. > > >fax: 612-641-2027 St. Paul, MN 55104 > > > > -- > > Steve Nicholas > > > > Steve: James is talking about SQRUG, the SQR User Group, which is a > "virtual" user group with a home page at http://www.sqrug.com/ > Check it out. > > James: SQRUG doesn't have an official membership list, but there > are a few volunteers who try to keep it going. Contact > Matt Reagan, Mark Johnson, or Nathan Treadway if you're > interested in volunteering. > > In addition, there is something called the National SQR > Users Group which pre-dated SQRUG. Matt Reagan is the > President. Contact him if you're interested in joining > or volunteering. > > Of course, these are both all-volunteer activities, so > people work on them as time allows. > > Ray > ---------------------------------------------------------------------- > Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" > rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Thu Sep 5 17:47:48 1996 Date: Thu, 5 Sep 1996 17:38:43 -0500 From: "Eric A. Eastman" Subject: Re: HELP!! How do I quit user group Hello Judy, All you have to do to remover your self from the SQR Users mailing list is send the message (without the quotes) : "SIGNOFF SQR-USERS" to: "LISTSERV@USA.NET" Hope this helps, Eric Eastman P.S. Judy, I sent this to the list and not you personally so that fifty people don't all tell you the same thing. Everyone else, Sorry to waste band width. From owner-sqr-users@USA.NET Thu Sep 5 18:40:08 1996 Date: Thu, 5 Sep 1996 19:32:17 -0400 From: Paul Baker Subject: SQR-Users I was recently posed a question about SQR. I didn't know the answer, and have been directed several different ways by various colleagues. Question: If all things were kept as equal as possible which would perform better Cobol or SQR? I understand this is pretty wide open considering all of the possibilities. But trying to keep to the Preface of keeping things equal what do you say? From owner-sqr-users@USA.NET Thu Sep 5 22:25:32 1996 Date: Thu, 5 Sep 1996 20:14:22 -0700 From: Donald Raikes Subject: Re: SQR-Users In my opinion, I believe that SQR would perform at least equally well if not better. Don Raikes At 07:32 PM 9/5/96 -0400, you wrote: >I was recently posed a question about SQR. >I didn't know the answer, and have been directed several different ways by >various colleagues. > >Question: > If all things were kept as equal as possible which would perform better >Cobol or SQR? > >I understand this is pretty wide open considering all of the possibilities. >But trying to keep to the Preface of keeping things equal what do you say? > > ==================================== Donald Raikes CPIM EaglesWing Making Oracle Fly draikes@primenet.com http://www.primenet.com/~draikes =========================== From owner-sqr-users@usa.net Fri Sep 6 04:38:58 1996 Date: Thu, 5 Sep 1996 15:27:41 -0700 From: Alan Rosenthal Subject: Re: HELP!! How do I quit user group Sorry Judy. It's kind of like one of those secret societies. You can never leave ;) ============================================================= At 04:55 PM 9/5/15 -0700, you wrote: >HELP!!!! How do I get off this SQR-Users thing? I took over this e-mail >address from my son and I don't even know what you guys are talking >about. Please, please, please will someone remove me from your mailing >list? mucho gracias I'm sure.......... -------------------------------------------------------------------- | Alan Rosenthal :o) email ahr@msi.com | | Biosym/MSI voice 619 597-9732 | | Management Information Systems fax 619 458-0136 | -------------------------------------------------------------------- | I have a simple philosophy. Fill what's empty. | | Empty what's full. Scratch where it itches. | | -- Alice Roosevelt Longworth (1884-1980) | -------------------------------------------------------------------- From owner-sqr-users@usa.net Fri Sep 6 05:20:31 1996 Date: Thu, 5 Sep 1996 09:18:49 PST From: John Kellogg Subject: Re: how long is long? The maximum for long data types is 32K bytes. There are no current plans to increase this. ______________________________ Reply Separator _________________________________ Subject: how long is long? Author: SQR-USERS@USA.NET at Internet Date: 04/09/96 9:34 PM I'm using SQR V3.5 on a windows95 client w/Oracle on an SGI. I'm trying to retreive a long data type in a report that is truely long. SQR seems to truncate the long field after about 13 pages text. Is it possible to extend this? Suggested tricks to get around it? Thanks in advance. Bob Bob Lowell bpl@msi.com MIS Support Analyst Molecular Simulations Inc. (619) 546-5343 From owner-sqr-users@USA.NET Fri Sep 6 08:55:53 1996 Date: Sun, 6 Sep 2015 08:37:47 -0700 From: Judy Vandiver Subject: Re: HELP!! How do I quit user group Thanks bunches. Appreciate it..... Judy -------------------- Eric A. Eastman wrote: > > Hello Judy, > > All you have to do to remover your self from the SQR Users mailing list > is send the message (without the quotes) : > > "SIGNOFF SQR-USERS" > > to: "LISTSERV@USA.NET" > > Hope this helps, > Eric Eastman > > P.S. Judy, I sent this to the list and not you personally so that fifty > people don't all tell you the same thing. Everyone else, Sorry to waste > band width. From owner-sqr-users@USA.NET Fri Sep 6 09:01:20 1996 Date: Sun, 6 Sep 2015 08:41:41 -0700 From: Judy Vandiver Subject: Re: HELP!! How do I quit user group Why do I feel like I am in the twilight zone???????????? JV ------------- Alan Rosenthal wrote: > > Sorry Judy. It's kind of like one of those secret > societies. You can never leave ;) > > ============================================================= > > At 04:55 PM 9/5/15 -0700, you wrote: > >HELP!!!! How do I get off this SQR-Users thing? I took over this e-mail > >address from my son and I don't even know what you guys are talking > >about. Please, please, please will someone remove me from your mailing > >list? mucho gracias I'm sure.......... > > -------------------------------------------------------------------- > | Alan Rosenthal :o) email ahr@msi.com | > | Biosym/MSI voice 619 597-9732 | > | Management Information Systems fax 619 458-0136 | > -------------------------------------------------------------------- > | I have a simple philosophy. Fill what's empty. | > | Empty what's full. Scratch where it itches. | > | -- Alice Roosevelt Longworth (1884-1980) | > -------------------------------------------------------------------- From owner-sqr-users@USA.NET Fri Sep 6 10:43:52 1996 Date: Fri, 6 Sep 1996 07:35:40 PST From: John Kellogg Subject: Re[2]: how long is long? The current maximum for the LONGSPACE value in the new V4 manual is 32K-2. The 64K limit in previous documentation was incorrect. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Re: how long is long? Author: SQR-USERS@usa.net at Internet Date: 06/09/96 5:31 AM > I'm using SQR V3.5 on a windows95 client w/Oracle on an SGI. > > I'm trying to retreive a long data type in a report that is > truely long. SQR seems to truncate the long field after about > 13 pages text. Is it possible to extend this? Suggested > tricks to get around it? > > Thanks in advance. > > Bob Using the -M command line argument, you can specify a different maximum for the LONGSPACE parameter. For example, you might create a file called my_prog.sqm with the line LONGSPACE=65535 and use the command line sqr my_prog usr/pwd -Mmy_prog.sqm to invoke the program using the file. The default value for LONGSPACE is 13515, which I would expect to be about 3 pages of text, so you may already be using a larger LONGSPACE value. I don't know what happens if you try to use a value greater than 64K. I'm not sure if $ variables can handle values that large. Are you trying to print long text, up to 64K? If so, you should be OK. If not, there are some things you can do using C and ufuncs that I'd be happy to chat about. Good luck. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about Forte Software" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Fri Sep 6 11:30:04 1996 Date: Fri, 6 Sep 1996 12:29:32 EDT From: Scott Humphrey Subject: Versions Available I've seem several postings where people are using SQR V3.5. Could someone clarify the platforms for which V3.5 is available? Specifically I'm wondering about HP-UX. Thanks, Scott From owner-sqr-users@USA.NET Fri Sep 6 13:43:53 1996 Date: Fri, 6 Sep 1996 10:50:38 PST From: John Kellogg Subject: Re: Versions Available SQR V3.5 was available on Windows only. This was the ReportMate product with a 3.0.12.2 SQR engine. The subsequent release on Windows was 3.0.13.2 (we stopped calling it 3.5). The current software for HP/Oracle is 3.0.13.3. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Versions Available Author: SQR-USERS@USA.NET at Internet Date: 06/09/96 10:35 AM I've seem several postings where people are using SQR V3.5. Could someone clarify the platforms for which V3.5 is available? Specifically I'm wondering about HP-UX. Thanks, Scott From owner-sqr-users@USA.NET Fri Sep 6 16:27:55 1996 Date: Fri, 6 Sep 1996 14:21:56 -0400 From: pauldp@SFITVA.CC.FITSUNY.EDU Subject: Re: SQR-Users NO DOUBT ABOUT IT SQR. On Thu, 5 Sep 1996, Paul Baker wrote: > I was recently posed a question about SQR. > I didn't know the answer, and have been directed several different ways by > various colleagues. > > Question: > If all things were kept as equal as possible which would perform better > Cobol or SQR? > > I understand this is pretty wide open considering all of the possibilities. > But trying to keep to the Preface of keeping things equal what do you say? > Diane Paul Fashion Institute of Technology INTERNET ADDRESS PAULDP@SFITVA.CC.FITSUNY.EDU 212-760-7854 From owner-sqr-users@USA.NET Sat Sep 7 22:37:20 1996 Date: Sat, 7 Sep 1996 23:29:59 -0400 From: Paul Baker Subject: SQR-USERS I must appologize, When I posted my query the other night I was A little awed. I have relaxed now and will try to pose the pertinant information. (Admit it you guys are great) Doing an install on Informix via SunUltraSparc using PeopleSoft HR,Ben and Payroll Database of employees should grow to 500,000 I was wondering if there are any performance tests or other opinions that might help direct the effort concerning SQR VS. Cobol. Main worry is SQR can't keep up with MainFrame Cobol at this level. I will tally the results and post them back to the group if I get sufficient response. My thought is Compiled SQR or SQRT will run as fast as cobol. The only limitation will be the SQL that each module will interpret. The real guts gets to Backup and RollBack on three tiered Client Server vs. Mainframe. Thanks Paul Baker Buisness SoftWare Consultants Bscpebtul@Aol.com Thanks for your Help From owner-sqr-users@USA.NET Sun Sep 8 12:13:41 1996 Date: Sun, 8 Sep 1996 12:08:34 -0500 From: wesb@HENDRIX.NET Subject: Re: SQR-USERS Paul, I am working on an Inventory conversion project in a PeopleSoft/Oracle7.1 Client/Server environment at The Coastal Corporation. We decided several weeks ago to rewrite most of the staging MicroFocus Cobol/SQL with SQR. We had one staging program which dealt with 100,000 records take 3 days in Cobol, but only 26hrs in SQR. Being able to do things over the weekend is now a possibility with SQR. Wes Bailey Consultant Solutions Thru Technology Coopers & Lybrand From owner-sqr-users@usa.net Wed Sep 11 03:33:44 1996 Date: Tue, 10 Sep 1996 16:31:04 -0700 From: Donald Raikes Subject: Re: SQR-USERS At 12:08 PM 9/8/96 -0500, you wrote: >Paul, > >I am working on an Inventory conversion project in a >PeopleSoft/Oracle7.1 Client/Server environment at The Coastal >Corporation. We decided several weeks ago to rewrite most of the >staging MicroFocus Cobol/SQL with SQR. > >We had one staging program which dealt with 100,000 records take 3 >days in Cobol, but only 26hrs in SQR. Being able to do things over >the weekend is now a possibility with SQR. > >Wes Bailey >Consultant >Solutions Thru Technology >Coopers & Lybrand > > I think you can do even better than 26 hours. However this will require some database and application tuning. If you would like some assistance, Please give me a call. Oracle / SQR performance tuning is a specialty of mine. Good luck, Don Raikes CPIM ==================================== Donald Raikes CPIM EaglesWing Making Oracle Fly draikes@primenet.com http://www.primenet.com/~draikes =========================== From owner-sqr-users@USA.NET Wed Sep 11 09:27:32 1996 Date: Wed, 11 Sep 1996 09:23:44 U From: Suresh Devanathan Subject: Multiple Begin-Footing Clau Hi, I am trying to compile a sqr program that produces multiple reports. It has two begin-footing clauses. I have a declare-layout section that is common to both the reports and separate begin-heading sections. I get the following error: /public/sqr3[3]: 5582 Memory fault (coredump). If I put a common begin-footing clause for both the reports, using the for-reports clause, then I have no problem. The declarations I am using is listed below: begin-setup declare-layout DEFAULT paper-size = (11, 8.5) left-margin = .5 top-margin = .5 right-margin = .1 bottom-margin = .5 line-height = 9 char-width = 6 orientation = landscape end-declare declare-printer DEFAULT-PS font = 8 point-size = 9 end-declare declare-printer DEFAULT-PS font = 8 point-size = 9 end-declare declare-report EP layout = DEFAULT printer-type = POSTSCRIPT end-declare declare-report EP-PLAIN layout = DEFAULT end-declare end-setup begin-heading 6 for-reports=(EP) .... end-heading begin-heading 6 for-reports=(EP-PLAIN) .... end-heading begin-footing 3 for-reports=(EP) .... end-footing begin-footing 3 for-reports=(EP-PLAIN) .... end footing Any help is appreciated. Thanks. Suresh Devanathan sdevanat@gartner.com From owner-sqr-users@USA.NET Wed Sep 11 14:20:14 1996 Date: Wed, 11 Sep 1996 09:21:22 PST From: John Kellogg Subject: Re: Multiple Begin-Footing Clau This was bug 740. It is fixed in version 3.0.12.x. John L. Kellogg MITI Technical Support Manager ______________________________ Reply Separator _________________________________ Subject: Multiple Begin-Footing Clau Author: SQR-USERS@USA.NET at Internet Date: 11/09/96 9:04 AM Hi, I am trying to compile a sqr program that produces multiple reports. It has two begin-footing clauses. I have a declare-layout section that is common to both the reports and separate begin-heading sections. I get the following error: /public/sqr3[3]: 5582 Memory fault (coredump). If I put a common begin-footing clause for both the reports, using the for-reports clause, then I have no problem. The declarations I am using is listed below: begin-setup declare-layout DEFAULT paper-size = (11, 8.5) left-margin = .5 top-margin = .5 right-margin = .1 bottom-margin = .5 line-height = 9 char-width = 6 orientation = landscape end-declare declare-printer DEFAULT-PS font = 8 point-size = 9 end-declare declare-printer DEFAULT-PS font = 8 point-size = 9 end-declare declare-report EP layout = DEFAULT printer-type = POSTSCRIPT end-declare declare-report EP-PLAIN layout = DEFAULT end-declare end-setup begin-heading 6 for-reports=(EP) .... end-heading begin-heading 6 for-reports=(EP-PLAIN) .... end-heading begin-footing 3 for-reports=(EP) .... end-footing begin-footing 3 for-reports=(EP-PLAIN) .... end footing Any help is appreciated. Thanks. Suresh Devanathan sdevanat@gartner.com From owner-sqr-users@USA.NET Thu Sep 12 16:39:21 1996 Date: Thu, 12 Sep 1996 17:27:05 -0500 From: Richard Vernick Subject: Drawing boxes I was looking to create a particular style of box -rectangular, thin double bar. SQR GRAPHIC-BOX cannot create this, so using the HP 10U symbol set -upper left-hand corner double bar, upper right-hand corner double bar, lower left-hand corner double bar, lower right-hand corner double bar, horizontal double bar, and vertical bar is an option. When I put all the pieces together, however, the corners did not flush with the horizontal double line (although the vertical double line did flush with the the corners). I did use a fixed font prior to printing these special symbols. Any suggestions on how to give this a clean flushed look? I addition, when I used the above symbols combined with SQR?s graphic verticle line and box commands, the ends also did not flush with the horizontal double line. Any suggestions? From owner-sqr-users@USA.NET Fri Sep 13 08:21:11 1996 Date: Fri, 13 Sep 1996 08:03:02 -0500 From: Simon Facer Subject: Re: Drawing boxes Have you tried drawing two boxes, one inside the other ? Simon Facer. Simon.Facer@cna.com ---------- From: RVernick@MAIL.NBME.ORG To: SQR-USERS@USA.NET Subject: Drawing boxes Date: Thursday, September 12, 1996 4:54PM I was looking to create a particular style of box -rectangular, thin double bar. SQR GRAPHIC-BOX cannot create this, so using the HP 10U symbol set -upper left-hand corner double bar, upper right-hand corner double bar, lower left-hand corner double bar, lower right-hand corner double bar, horizontal double bar, and vertical bar is an option. When I put all the pieces together, however, the corners did not flush with the horizontal double line (although the vertical double line did flush with the the corners). I did use a fixed font prior to printing these special symbols. Any suggestions on how to give this a clean flushed look? I addition, when I used the above symbols combined with SQR?s graphic verticle line and box commands, the ends also did not flush with the horizontal double line. Any suggestions? From owner-sqr-users@USA.NET Fri Sep 13 08:41:57 1996 Date: Fri, 13 Sep 1996 08:06:08 GMT From: Woodbury-Ken Subject: SQR on Digital OS's Here's a simple one... Does SQR run on the AXP(Alpha) platform in both Digital UNIX and OpenVMS? Will version(s) 3 and up run there? Ken W. msmail.woodburk@tsod.lmig.com From owner-sqr-users@USA.NET Fri Sep 13 09:00:05 1996 Date: Fri, 13 Sep 1996 08:56:41 -0500 From: Ray Ontko Subject: Re: Drawing boxes Here's a few thoughts on the box problem: I can't think of a way to do double-line boxes using the SQR graphic-box command. > I was looking to create a particular style of box > -rectangular, thin double bar. SQR GRAPHIC-BOX > cannot create this, so using the HP 10U symbol set > -upper left-hand corner double bar, upper > right-hand corner double bar, lower left-hand > corner double bar, lower right-hand corner double > bar, horizontal double bar, and vertical bar is > an option. When I put all the pieces together, > however, the corners did not flush with the > horizontal double line (although the vertical > double line did flush with the the corners). I > did use a fixed font prior to printing these > special symbols. Any suggestions on how to give > this a clean flushed look? I would think that if you are using a fixed font, and establish the apropriate pitch in declare printer that these would line up. Did you specify a pitch for the font? > I addition, when I used the above symbols combined > with SQR?s graphic verticle line and box commands, > the ends also did not flush with the horizontal > double line. Any suggestions? I don't think you can do it without changing the char width/height using declare layout. The manual does say, however, that "GRAPHIC commands reference numbers that can be whole or floating point literals or numeric variables." But, I think this does not apply to the placement, width or height of the box, horz-line or vert-line. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Fri Sep 13 10:59:47 1996 Date: Fri, 13 Sep 1996 11:11:09 -0500 From: Richard Vernick Subject: Re: Drawing boxes -Reply Thanks for the reply. I'll experiment with the pitch and keep messing with it. Rv From owner-sqr-users@USA.NET Fri Sep 13 11:07:42 1996 Date: Fri, 13 Sep 1996 11:14:14 -0500 From: Richard Vernick Subject: Re: Drawing boxes -Reply Yes. The spacing is too far apart. A box 1,1 to 10,10 and another inside, 2,2 to 9,9 is not the effect I'm looking for. I think I'll tell the users to accept a single line box and like it. :) >>> Simon Facer 09/13/96 08:03am >>> Have you tried drawing two boxes, one inside the other ? Simon Facer. Simon.Facer@cna.com ---------- From: RVernick@MAIL.NBME.ORG To: SQR-USERS@USA.NET Subject: Drawing boxes Date: Thursday, September 12, 1996 4:54PM I was looking to create a particular style of box -rectangular, thin double bar. SQR GRAPHIC-BOX cannot create this, so using the HP 10U symbol set -upper left-hand corner double bar, upper right-hand corner double bar, lower left-hand corner double bar, lower right-hand corner double bar, horizontal double bar, and vertical bar is an option. When I put all the pieces together, however, the corners did not flush with the horizontal double line (although the vertical double line did flush with the the corners). I did use a fixed font prior to printing these special symbols. Any suggestions on how to give this a clean flushed look? I addition, when I used the above symbols combined with SQR?s graphic verticle line and box commands, the ends also did not flush with the horizontal double line. Any suggestions? From owner-sqr-users@USA.NET Fri Sep 13 11:09:53 1996 Date: Fri, 13 Sep 1996 10:11:32 -0500 From: Simon Facer Subject: Re: Drawing boxes Have you tried drawing two boxes, one inside the other ? - Sorry, I meant to include the following example with the first e-mail. !*************************************************************************** ************************************ ! These commands will draw a box separated into three sections, with all ! lines double lines, and the space between the lines shaded. ! NOTE - LINE-HEIGHT and CHAR-WIDTH are defined as 1 in the DECLARE-LAYOUT ! to use point positioning, not character positioning, for accuracy. GRAPHIC (1, 1, 540) BOX 3 10 20 GRAPHIC (302, 1, 540) BOX 3 10 20 GRAPHIC (1, 1, 3) BOX 304 10 20 GRAPHIC (1, 537, 3) BOX 304 10 20 GRAPHIC (1, 1, 540) BOX 304 10 GRAPHIC (4, 4, 534) BOX 298 10 GRAPHIC (71, 2, 538) BOX 4 10 20 GRAPHIC (186, 2, 538) BOX 4 10 20 GRAPHIC (70, 5, 533) HORZ-LINE 10 GRAPHIC (74, 5, 533) HORZ-LINE 10 GRAPHIC (185, 5, 533) HORZ-LINE 10 GRAPHIC (189, 5, 533) HORZ-LINE 10 !*************************************************************************** ************************************ Simon Facer. Simon.Facer@cna.com ---------- From: RVernick@MAIL.NBME.ORG To: SQR-USERS@USA.NET Subject: Drawing boxes Date: Thursday, September 12, 1996 4:54PM I was looking to create a particular style of box -rectangular, thin double bar. SQR GRAPHIC-BOX cannot create this, so using the HP 10U symbol set -upper left-hand corner double bar, upper right-hand corner double bar, lower left-hand corner double bar, lower right-hand corner double bar, horizontal double bar, and vertical bar is an option. When I put all the pieces together, however, the corners did not flush with the horizontal double line (although the vertical double line did flush with the the corners). I did use a fixed font prior to printing these special symbols. Any suggestions on how to give this a clean flushed look? I addition, when I used the above symbols combined with SQR?s graphic verticle line and box commands, the ends also did not flush with the horizontal double line. Any suggestions? From owner-sqr-users@USA.NET Fri Sep 13 17:54:23 1996 Date: Fri, 13 Sep 1996 13:38:27 PST From: Gadi Yedwab Subject: Re: SQR on Digital OS's SQR3 is available on both today. ______________________________ Reply Separator _________________________________ Subject: SQR on Digital OS's Author: SQR-USERS@USA.NET at Internet Date: 9/13/96 7:07 AM Here's a simple one... Does SQR run on the AXP(Alpha) platform in both Digital UNIX and OpenVMS? Will version(s) 3 and up run there? Ken W. msmail.woodburk@tsod.lmig.com From owner-sqr-users@USA.NET Fri Sep 13 18:43:28 1996 Date: Fri, 13 Sep 1996 08:12:17 PST From: John Kellogg Subject: Re: SQR on Digital OS's Current versions are: OSF/Informix = 3.0.7.3.1 OSF/Ingres = 3.0.7.0.1 OpenVMS/OpenIngres = 3.0.13.3 OSF/Oracle = 3.0.12.3 OpenVMS/Oracle = 3.0.12.1 OSF/Sybase = 3.0.12.3 OpenVMS/Sybase = 3.0.12.1 ______________________________ Reply Separator _________________________________ Subject: SQR on Digital OS's Author: SQR-USERS@USA.NET at Internet Date: 13/09/96 7:07 AM Here's a simple one... Does SQR run on the AXP(Alpha) platform in both Digital UNIX and OpenVMS? Will version(s) 3 and up run there? Ken W. msmail.woodburk@tsod.lmig.com From owner-sqr-users@USA.NET Thu Sep 19 14:15:32 1996 Date: Thu, 19 Sep 1996 13:32:06 -0400 From: BOB SHIFLETT Subject: table joins or seperate begin-select clause Which is better for machine performance, to join several tables within a single begin-select clause or separate begin-select clauses? Thanx Bob From owner-sqr-users@USA.NET Thu Sep 19 15:42:41 1996 Date: Thu, 19 Sep 1996 14:33:00 -0400 From: BOB SHIFLETT Subject: using -B flag What constitutes the use of the flag -B and how do you determine how many rows to buffer? Thanx Bob. From owner-sqr-users@USA.NET Thu Sep 19 15:51:46 1996 Date: Thu, 19 Sep 1996 12:45:51 -0700 From: Albert Howard Subject: Re: table joins or seperate begin-select clause BOB SHIFLETT wrote: > > Which is better for machine performance, to join several tables within a > single begin-select clause or separate begin-select clauses? > > Thanx > > Bob There is no easy answer to this. It depends on several factors. If there is a one-to-one correspondance between the tables, a join is probably fine. If the tables are to be joined by non-key fields, a single join is definitely the better choice. And if an order by is necessary by say, a title in the join, then of course the join is needed. In other situations, however, such as a join strictly by key fields where there is no one-to-one correspondance, a sub-select might work better. From owner-sqr-users@USA.NET Thu Sep 19 16:16:45 1996 Date: Thu, 19 Sep 1996 13:58:08 -0700 From: Donald Raikes Subject: Re: using -B flag At 02:33 PM 9/19/96 -0400, you wrote: >What constitutes the use of the flag -B and how do you determine how many >rows to buffer? > >Thanx > >Bob. > > Bob, Use the -b flag on a begin-select when you are reading large quantities of data. To determine how many rows to buffer, use trial an error. Start with 100, then 1000 etc to find a reasonable level of performance. Contact me if you have more performance questions. Don Raikes draikes@primenet.com http://www.primenet.com/~draikes ==================================== Donald Raikes CPIM EaglesWing Making Oracle Fly draikes@primenet.com http://www.primenet.com/~draikes =========================== From owner-sqr-users@USA.NET Thu Sep 19 19:38:46 1996 Date: Thu, 19 Sep 1996 15:33:06 -0400 From: "Brent S. Templeton" Subject: Re: table joins or separate begin-select clause ------ =_NextPart_000_01BBA63F.DBB0D410 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I would say it depends on the number of tables and their data = distribution. I have had 6 table joins work wonderfully, while 4 table = joins are slow. I think in general it is better to put as many tables = in the main join as make sense to have the initial select return the = most important rows. I try to structure selects to do as few I/O = operations as possible. The less server I/O and LAN packets the better. Hope this helps some. Brent btempleton@pmai.org ---------- From: BOB SHIFLETT Sent: Thursday, September 19, 1996 1:32 PM To: Multiple recipients of list SQR-USERS Subject: table joins or seperate begin-select clause Which is better for machine performance, to join several tables within a single begin-select clause or separate begin-select clauses? Thanx Bob ------ =_NextPart_000_01BBA63F.DBB0D410 Content-Type: application/ms-tnef Content-Transfer-Encoding: base64 eJ8+IggTAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEkAYAEAEAAAEAAAAMAAAAAwAAMAIAAAAL AA8OAAAAAAIB/w8BAAAAQQAAAAAAAACBKx+kvqMQGZ1uAN0BD1QCAAAAAFNRUi1VU0VSU0BVU0Eu TkVUAFNNVFAAU1FSLVVTRVJTQFVTQS5ORVQAAAAAHgACMAEAAAAFAAAAU01UUAAAAAAeAAMwAQAA ABIAAABTUVItVVNFUlNAVVNBLk5FVAAAAAMAFQwBAAAAAwD+DwYAAAAeAAEwAQAAABQAAAAnU1FS LVVTRVJTQFVTQS5ORVQnAAIBCzABAAAAFwAAAFNNVFA6U1FSLVVTRVJTQFVTQS5ORVQAAAMAADkA AAAACwBAOgEAAAACAfYPAQAAAAQAAAAAAAAClygBBIABADAAAABSRTogdGFibGUgam9pbnMgb3Ig c2VwYXJhdGUgYmVnaW4tc2VsZWN0IGNsYXVzZQAhEQEFgAMADgAAAMwHCQATAA8AIQAGAAQAKQEB IIADAA4AAADMBwkAEwAPABoAJgAEAEIBAQmAAQAhAAAANkMzRTFDNkExNjEyRDAxMUI5ODcwMEEw QzkxMjEwMkUA7gYBA5AGAOgEAAAUAAAACwAjAAAAAAADACYAAAAAAAsAKQAAAAAAAwAuAAAAAAAD ADYAAAAAAEAAOQAQQvphYaa7AR4AcAABAAAAMAAAAFJFOiB0YWJsZSBqb2lucyBvciBzZXBhcmF0 ZSBiZWdpbi1zZWxlY3QgY2xhdXNlAAIBcQABAAAAFgAAAAG7pmFh9WocPm0SFhHQuYcAoMkSEC4A AB4AHgwBAAAAAwAAAE1TAAAeAB8MAQAAABYAAABXT1JLR1JPVVAvV0dQTy9CcmVudFQAAAADAAYQ PwMVDgMABxB4AgAAHgAIEAEAAABlAAAASVdPVUxEU0FZSVRERVBFTkRTT05USEVOVU1CRVJPRlRB QkxFU0FORFRIRUlSREFUQURJU1RSSUJVVElPTklIQVZFSEFENlRBQkxFSk9JTlNXT1JLV09OREVS RlVMTFksV0hJTAAAAAACAQkQAQAAAEgDAABEAwAA0gUAAExaRnWeRb/I/wAKAQ8CFQKkA+QF6wKD AFATA1QCAGNoCsBzZXTuMgYABsMCgzIDxgcTAoMSMxMPZjQPemhlbNEDIERsZwKAfQqACM/FCdk7 F58yNTUCgAqBgw2xC2BuZzEwMxQgFwsKEvIMAWMAQCBJIAJ3CGBsZCBzYXmsIGkFQA2wcAnwZAQg iQIgIHQWICBudQbQ2wSQHeBmHhABoGwHkQBwyxzgHiFpBcBkYQGQHWCFBAB0BRBidXRpAiDsLiAc cRHAdh5AEcAc4OI2HvQgam8LgAQgHKBccmsckR2wBJBmHMBstHksHJBoAxAeQDQiG+sKwB5Acxcw dyEjHiALgPMjEAuAIGcJ8ASQB0AdMh0EACAekAJAHqF0byD+cCDQH2AEIAOBHSAfBSZx3x4iAMAm cSKCKFRrJWEJ8P8R8CfiIXMeIguAHUAHMSrRbR8wYwVAF6B0CHApZW/zIIAdMG1wF0EAcCzRJaC6 cyXEcijBKAAggXUswN8IcCrCLKIEICfxZCgAKGHiZgfRSS9PHeAdkCbg/yDiH1EEIC4QBBAgsB8w ISHeVB4xHzEEIBHwciGQBcDjMYIfckxBTigQANAqsLcwgh4xJ4QuCoUKhUgxwfcmAgQgFiFwM8ED cDMQNkzuQhegAjAKhWInsC4AHzBRJ/BuQHApwS4FsGeDNkwK9GxpMTgwAtHgaS0xNDQN8AzQPSN5 C1kxNgqgA2AnsCzBLV8/RwqHPfsMMD7GRgNhOk9ATj7GDII5QE9CBgBIwElGTEVUVD/vQP2/BmAC MEIvQzszUAhwcyAQnyPRBmAFMDowHpIxOSPgRUogOSIAMTozEiBQZk1Ez0D9VG9HD0M7Te8cwCDg OlEs4WMFIAiQAjAPHdEe4DyALcFTUVItYFVTRVJTSy9F3nX8YmossU1PQzsiKgWxEfCrMdM1smcL gC0shWMLYM51EfA7TzxTMzY9xxQi+wwBPsZXJBARsCdJAhAFwD8AwSYhHkAx0VxxA4FjZf8j4Cfx KhMR8DQRJvEfBQPw/yYSH2AKhQCQGqAiUVdPKxHPVoQKwFcPWBRzPzZMM1DlAHB4OH1vYlh/WY4b 1Rc+xgqFFsEAahADABAQAAAAAAMAERAAAAAAQAAHMAA7WXpgprsBQAAIMAA7WXpgprsBHgA9AAEA AAAFAAAAUkU6IAAAAAADAA00/TcAAF5d ------ =_NextPart_000_01BBA63F.DBB0D410-- From owner-sqr-users@usa.net Fri Sep 20 01:03:30 1996 Date: Thu, 19 Sep 1996 15:25:58 -0400 From: BOB SHIFLETT Subject: using -S flag I downloaded the program explain.sqr and it say's to run a sqr report with the -S flag on to create a sqr.log file. I do not see a *.log file in my directory? What am I doing wrong? We are running UNIX, SQR 3.0. Thanx Bob. From owner-sqr-users@usa.net Fri Sep 20 01:28:20 1996 Date: Thu, 19 Sep 1996 14:41:33 -0500 From: Simon Facer Subject: VB / SQR I am attempting to run an SQR report from a VB 3.0 app, passing a file name for use in the program and the reading the filename with an INPUT command, the same way I do if I call one SQR module from another. The INPUT Command does not recognize the passed file name !! Does anyone have a solution to this ? The command that is being executed from VB (through the SHELL command) is : sqrw.exe SQR_PRT.SQR -ziv -keep -Printer:hp -fC:\temp\sqr_prt.lis 'C:\temp\sqr_prt.dat' thanks in advance Simon Facer. Simon.Facer@cna.com From owner-sqr-users@usa.net Fri Sep 20 01:35:30 1996 Date: Thu, 19 Sep 1996 13:52:30 -0700 From: Donald Raikes Subject: Re: table joins or seperate begin-select clause At 01:32 PM 9/19/96 -0400, you wrote: >Which is better for machine performance, to join several tables within a >single begin-select clause or separate begin-select clauses? > >Thanx > >Bob > Bob, If coded correctly, using a join can be more efficient. However, if not properly written, a join can kill performance. If you would like help with a join, please contact me. Donald Raikes draikes@primenet.com> ==================================== Donald Raikes CPIM EaglesWing Making Oracle Fly draikes@primenet.com http://www.primenet.com/~draikes =========================== From owner-sqr-users@USA.NET Fri Sep 20 02:00:39 1996 Date: Thu, 19 Sep 1996 23:50:09 -0700 From: Mark Johnson Subject: Re: using -S flag Bob, Make sure that the program with the -s on the command line has a query in it, and creates some form of output. Mark At 03:25 PM 9/19/96 -0400, you wrote: >I downloaded the program explain.sqr and it say's to run a sqr report with >the -S flag on to create a sqr.log file. I do not see a *.log file in my >directory? What am I doing wrong? > >We are running UNIX, SQR 3.0. > >Thanx > >Bob. > > From owner-sqr-users@USA.NET Fri Sep 20 10:22:37 1996 Date: Fri, 20 Sep 1996 08:08:24 -0700 From: Ben Le Subject: Re: table joins or separate begin-select clause At 03:33 PM 9/19/96 -0400, you wrote: >I would say it depends on the number of tables and their data distribution. I have had 6 table joins work wonderfully, while 4 table joins are slow. I think in general it is better to put as many tables in the main join as make sense to have the initial select return the most important rows. I try to structure selects to do as few I/O operations as possible. The less server I/O and LAN packets the better. > >Hope this helps some. > >Brent >btempleton@pmai.org > > >From my experience when you join many table together, you need to put the bigest table at last on line FROM .... to improve the perfomance. Ben. -------------------------------------------------------------------- Ben Le Direct/Voice: (503)-977-4970 Portland Community College, ITS Fax: (503)-977-4987 PO Box 19000 Portland, OR. 97280-0990 Internet: ble@pcc.edu -------------------------------------------------------------------- From owner-sqr-users@USA.NET Mon Sep 23 13:19:30 1996 Date: Mon, 23 Sep 1996 14:04:10 -0500 From: Toni Iacobo 617-441-2364 Subject: Printing Charts - X Axis Problems I'm having a problem printing out a chart. The x-axis values don't correspond to the first field of the first row in the array. The array has 2 fields, both numbers. I can print out the table with the following proper values: array position: field1 field2 0 0 1546 1 1 7651 2 2 8214 ... ... However, when I print the chart, the values are skewed: field1 field2 1 1546 2 7651 3 8214 ... Any suggestions? Also, what does the footnote in the "Chart-Array Field Type" table say for columns not of type CHAR? I've tried it both ways. The x-axis always starts with the value 1. For example, if I don't use the first position and fill the array with: array position: field1 field2 0 0 0 1 0 1546 2 1 7651 3 2 8214 ... ... It will plot: field1 field2 1 0 2 1546 3 7651 4 8214 ... Thanks, Toni Iacobo From owner-sqr-users@USA.NET Mon Sep 23 13:59:42 1996 Date: Mon, 23 Sep 1996 14:43:54 -0500 From: Toni Iacobo 617-441-2364 Subject: Printing Charts - X Axis Problems, More Info... I just thought of this shortly after I posted my earlier question: Is it b/c it's a TYPE=AREA chart? Yes :( I tried BAR, LINE, XY-SCATTER-PLOT, et al. Only XY-SCATTER-PLOT would properly chart (0,1546) (1,7651), etc. All the others start the x-coordinate at 1 and the y with the first y value at 1546. Any way around this? (Meaning, my manager would like a chart drawing a line or some other continuous graph of this data.) Thanks again, Toni Iacobo From owner-sqr-users@USA.NET Mon Sep 23 16:02:31 1996 Date: Mon, 23 Sep 1996 16:42:58 -0500 From: Toni Iacobo 617-441-2364 Subject: Printing Charts - Orientation How do you print a chart with a LANDSCAPE orientation to show an x-axis much longer than the y? I've tried to use, in the DECLARE-CHART, ORIENTATION=LANDSCAPE with various chart positions besides (1,1) but none seem to work - either they are 'invalid' or chart cannot fit. When I use (1,1) I get the same portrait chart dimensions (y axis longer than the x) but rotated. Thanks, Toni Iacobo From owner-sqr-users@USA.NET Tue Sep 24 09:46:56 1996 Date: Tue, 24 Sep 1996 10:22:34 EDT From: geetter@UHAVAX.HARTFORD.EDU Subject: Re: table joins or seperate begin-select clause At the University of Hartford, we have found that a single select with multiple joins is more efficient than multiple selects. We use multiple selects when the data selection requires it. Allan Geetter University of Hartford West Hartford, CT 06117 geetter@hartford.uhavax.edu From owner-sqr-users@USA.NET Wed Sep 25 11:41:37 1996 Date: Wed, 25 Sep 1996 12:12:31 -0400 From: pauldp@SFITVA.CC.FITSUNY.EDU Subject: Re: table joins or separate begin-select clause I believe it is just the opposite. The table which you expect to retrieve the least number of rows from is the one that should be listed last in the from clause. On Fri, 20 Sep 1996, Ben Le wrote: > At 03:33 PM 9/19/96 -0400, you wrote: > >I would say it depends on the number of tables and their data distribution. > I have had 6 table joins work wonderfully, while 4 table joins are slow. I > think in general it is better to put as many tables in the main join as make > sense to have the initial select return the most important rows. I try to > structure selects to do as few I/O operations as possible. The less server > I/O and LAN packets the better. > > > >Hope this helps some. > > > >Brent > >btempleton@pmai.org > > > > > From my experience when you join many table together, you need to put the > bigest table at last on line FROM .... to improve the perfomance. > Ben. > > > -------------------------------------------------------------------- > Ben Le Direct/Voice: (503)-977-4970 > Portland Community College, ITS Fax: (503)-977-4987 > PO Box 19000 Portland, OR. 97280-0990 Internet: ble@pcc.edu > -------------------------------------------------------------------- > Diane Paul Fashion Institute of Technology INTERNET ADDRESS PAULDP@SFITVA.CC.FITSUNY.EDU 212-760-7854 From owner-sqr-users@USA.NET Wed Sep 25 13:14:02 1996 Date: Wed, 25 Sep 1996 10:51:04 -0700 From: Lydia Verhoef Subject: Re: table joins or separate begin-select clause I don't know if there is a general rule for this across all databases but for the Oracle database Ben Le is correct. Large tables with the smallest number of qualified rows should be listed last in the FROM clause. The optimizer first tries to rank all aspects of the query, if all ranks are equal then Oracle uses the last table in the FROM clause as the driving table. Also, you will want to list the join clause for the pair of tables resulting in the smallest result set last in the list of join clauses. Hope this helps, Lydia >Return-Path: >Date: Wed, 25 Sep 1996 12:12:31 -0400 >Reply-To: SQR-USERS@USA.NET >Sender: "Discussion of MITI's SQR database reporting language" > >From: pauldp@SFITVA.CC.FITSUNY.EDU >Subject: Re: table joins or separate begin-select clause >To: Multiple recipients of list SQR-USERS > >I believe it is just the opposite. The table which you expect to >retrieve the least number of rows from is the one that should be listed last >in the from clause. > >On Fri, 20 Sep 1996, Ben Le wrote: > >> At 03:33 PM 9/19/96 -0400, you wrote: >> >I would say it depends on the number of tables and their data distribution. >> I have had 6 table joins work wonderfully, while 4 table joins are slow. I >> think in general it is better to put as many tables in the main join as make >> sense to have the initial select return the most important rows. I try to >> structure selects to do as few I/O operations as possible. The less server >> I/O and LAN packets the better. >> > >> >Hope this helps some. >> > >> >Brent >> >btempleton@pmai.org >> > >> > >> From my experience when you join many table together, you need to put the >> bigest table at last on line FROM .... to improve the perfomance. >> Ben. >> >> >> -------------------------------------------------------------------- >> Ben Le Direct/Voice: (503)-977-4970 >> Portland Community College, ITS Fax: (503)-977-4987 >> PO Box 19000 Portland, OR. 97280-0990 Internet: ble@pcc.edu >> -------------------------------------------------------------------- >> > >Diane Paul >Fashion Institute of Technology >INTERNET ADDRESS PAULDP@SFITVA.CC.FITSUNY.EDU >212-760-7854 > > ---------------------------------------------------------------------------- Lydia Verhoef Email: lverhoef@pcc.edu Programmer/Analyst Voice: (503) 977-4750 Portland Community College FAX: (503) 977-4987 Information Technology Services Mailstop: SYL CC 224 ---------------------------------------------------------------------------- From owner-sqr-users@USA.NET Wed Sep 25 14:06:36 1996 Date: Wed, 25 Sep 1996 14:30:00 -0400 From: John Douglas Subject: Re: table joins or separate begin-select clause I vote for biggest table last in the From clause. John Douglas Lockheed Martin From owner-sqr-users@USA.NET Wed Sep 25 15:43:20 1996 Date: Wed, 25 Sep 1996 13:19:08 -0700 From: Albert Howard Subject: Re: table joins or separate begin-select clause If all other ranks are equal, the order in the FROM clause should be irrelevant. The real important factor is how the WHERE clause is coded. Are the keys specified, and in proper order? If not, you may not get efficient use of available indices. This can have a tremendous effect on performance. Obviously, you can not always join by keys (which is the beauty of SQL, that you don't have to), but its best to do so when you can. Sofia Dobkin wrote: > > I belive you are right, but only for ORACLE V6, in version 7 > ORACLE will use tables in order they are listed in the FROM > clause if all ranks are equal. > Sofia Dobkin > > >---------- > >From: Lydia Verhoef[SMTP:lverhoef@ZEUS.CC.PCC.EDU] > >Sent: Wednesday, September 25, 1996 1:51 PM > >To: Multiple recipients of list SQR-USERS > >Subject: Re: table joins or separate begin-select clause > > > >I don't know if there is a general rule for this across all databases > >but for the Oracle database Ben Le is correct. Large tables with the > >smallest number of qualified rows should be listed last in the FROM > >clause. The optimizer first tries to rank all aspects of the query, > >if all ranks are equal then Oracle uses the last table in the FROM > >clause as the driving table. > > > >Also, you will want to list the join clause for the pair of tables > >resulting in the smallest result set last in the list of join clauses. > > > >Hope this helps, > >Lydia > > From owner-sqr-users@usa.net Wed Sep 25 23:33:06 1996 Date: Wed, 25 Sep 1996 16:48:48 -0400 From: pauldp@SFITVA.CC.FITSUNY.EDU Subject: Re: table joins or separate begin-select clause Could someone from MITI please comment. It's been a rule here to put the table which you expect to get the least number of records from last. It appears to greatly affect performance when you do that. If it has changed (due to Oracle or an SQR upgrade) I'd like to know. If it hasn't, a lot of people might be able to enhance performance. On Wed, 25 Sep 1996, John Douglas wrote: > I vote for biggest table last in the From clause. > > John Douglas > > Lockheed Martin > Diane Paul Fashion Institute of Technology INTERNET ADDRESS PAULDP@SFITVA.CC.FITSUNY.EDU 212-760-7854 From owner-sqr-users@usa.net Thu Sep 26 00:35:47 1996 Date: Wed, 25 Sep 1996 14:25:18 -0400 From: Sofia Dobkin Subject: Re: table joins or separate begin-select clause I belive you are right, but only for ORACLE V6, in version 7 ORACLE will use tables in order they are listed in the FROM clause if all ranks are equal. Sofia Dobkin >---------- >From: Lydia Verhoef[SMTP:lverhoef@ZEUS.CC.PCC.EDU] >Sent: Wednesday, September 25, 1996 1:51 PM >To: Multiple recipients of list SQR-USERS >Subject: Re: table joins or separate begin-select clause > >I don't know if there is a general rule for this across all databases >but for the Oracle database Ben Le is correct. Large tables with the >smallest number of qualified rows should be listed last in the FROM >clause. The optimizer first tries to rank all aspects of the query, >if all ranks are equal then Oracle uses the last table in the FROM >clause as the driving table. > >Also, you will want to list the join clause for the pair of tables >resulting in the smallest result set last in the list of join clauses. > >Hope this helps, >Lydia > >>Return-Path: >>Date: Wed, 25 Sep 1996 12:12:31 -0400 >>Reply-To: SQR-USERS@USA.NET >>Sender: "Discussion of MITI's SQR database reporting language" >> >>From: pauldp@SFITVA.CC.FITSUNY.EDU >>Subject: Re: table joins or separate begin-select clause >>To: Multiple recipients of list SQR-USERS >> >>I believe it is just the opposite. The table which you expect to >>retrieve the least number of rows from is the one that should be listed last >>in the from clause. >> >>On Fri, 20 Sep 1996, Ben Le wrote: >> >>> At 03:33 PM 9/19/96 -0400, you wrote: >>> >I would say it depends on the number of tables and their data >>>distribution. >>> I have had 6 table joins work wonderfully, while 4 table joins are >>>slow. I >>> think in general it is better to put as many tables in the main join >>>as make >>> sense to have the initial select return the most important rows. I try to >>> structure selects to do as few I/O operations as possible. The less >>>server >>> I/O and LAN packets the better. >>> > >>> >Hope this helps some. >>> > >>> >Brent >>> >btempleton@pmai.org >>> > >>> > >>> From my experience when you join many table together, you need to put the >>> bigest table at last on line FROM .... to improve the perfomance. >>> Ben. >>> >>> >>> -------------------------------------------------------------------- >>> Ben Le Direct/Voice: (503)-977-4970 >>> Portland Community College, ITS Fax: (503)-977-4987 >>> PO Box 19000 Portland, OR. 97280-0990 Internet: ble@pcc.edu >>> -------------------------------------------------------------------- >>> >> >>Diane Paul >>Fashion Institute of Technology >>INTERNET ADDRESS PAULDP@SFITVA.CC.FITSUNY.EDU >>212-760-7854 >> >> >------------------------------------------------------------------------ >---- >Lydia Verhoef Email: >lverhoef@pcc.edu >Programmer/Analyst Voice: (503) >977-4750 >Portland Community College FAX: (503) >977-4987 >Information Technology Services Mailstop: SYL >CC 224 >------------------------------------------------------------------------ >---- > From owner-sqr-users@USA.NET Thu Sep 26 08:05:16 1996 Date: Thu, 26 Sep 1996 09:00:36 -0400 From: "Brent S. Templeton" Subject: Re: table joins or separate begin-select clause ------ =_NextPart_000_01BBAB89.2FD10F80 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am not from MITI, however to my understanding this is not a SQR issue. SQR simply forwards the select statement to the DBS server. In my case = it is MS SQL Server. I have used ISQL to optimize queries before by = cutting the select statement out of the SQR program and running an = interactive SQL statement in Transact SQL or ISQL, (Sorry I don't know = what Oracle uses for ad-hoc queries) and looking and the execution plan. = Getting working here then transferring the same logic to the SQR = Program. Hope this helps Brent btempleton@pmai.org ---------- From: pauldp@SFITVA.CC.FITSUNY.EDU Sent: Wednesday, September 25, 1996 4:48 PM To: Multiple recipients of list SQR-USERS Subject: Re: table joins or separate begin-select clause Could someone from MITI please comment. It's been a rule here to put = the table which you expect to get the least number of records from last. It appears to greatly affect performance when you do that. If it has changed (due to Oracle or an SQR upgrade) I'd like to know. If it hasn't, a lot of people might be able to enhance performance. On Wed, 25 Sep 1996, John Douglas wrote: > I vote for biggest table last in the From clause. > > John Douglas > > Lockheed Martin > Diane Paul Fashion Institute of Technology INTERNET ADDRESS PAULDP@SFITVA.CC.FITSUNY.EDU 212-760-7854 ------ =_NextPart_000_01BBAB89.2FD10F80 Content-Type: application/ms-tnef Content-Transfer-Encoding: base64 eJ8+IiYNAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEkAYAEAEAAAEAAAAMAAAAAwAAMAIAAAAL AA8OAAAAAAIB/w8BAAAAQQAAAAAAAACBKx+kvqMQGZ1uAN0BD1QCAAAAAFNRUi1VU0VSU0B1c2Eu bmV0AFNNVFAAU1FSLVVTRVJTQHVzYS5uZXQAAAAAHgACMAEAAAAFAAAAU01UUAAAAAAeAAMwAQAA ABIAAABTUVItVVNFUlNAdXNhLm5ldAAAAAMAFQwBAAAAAwD+DwYAAAAeAAEwAQAAABQAAAAnU1FS LVVTRVJTQHVzYS5uZXQnAAIBCzABAAAAFwAAAFNNVFA6U1FSLVVTRVJTQFVTQS5ORVQAAAMAADkA AAAACwBAOgEAAAACAfYPAQAAAAQAAAAAAAAClysBBIABADAAAABSRTogdGFibGUgam9pbnMgb3Ig c2VwYXJhdGUgYmVnaW4tc2VsZWN0IGNsYXVzZQAhEQEFgAMADgAAAMwHCQAaAAkAAAAkAAQAJwEB IIADAA4AAADMBwkAGgAIADkACAAEAEMBAQmAAQAhAAAARUU2RURBRTk5QzE3RDAxMUI5ODkwMEEw QzkxMjEwMkUANgcBA5AGAJgGAAAUAAAACwAjAAAAAAADACYAAAAAAAsAKQAAAAAAAwAuAAAAAAAD ADYAAAAAAEAAOQCQGrS1qqu7AR4AcAABAAAAMAAAAFJFOiB0YWJsZSBqb2lucyBvciBzZXBhcmF0 ZSBiZWdpbi1zZWxlY3QgY2xhdXNlAAIBcQABAAAAFgAAAAG7q6q1runabvAXnBHQuYkAoMkSEC4A AB4AHgwBAAAAAwAAAE1TAAAeAB8MAQAAABYAAABXT1JLR1JPVVAvV0dQTy9CcmVudFQAAAADAAYQ it6R8wMABxAbBAAAHgAIEAEAAABlAAAASUFNTk9URlJPTU1JVEksSE9XRVZFUlRPTVlVTkRFUlNU QU5ESU5HVEhJU0lTTk9UQVNRUklTU1VFU1FSU0lNUExZRk9SV0FSRFNUSEVTRUxFQ1RTVEFURU1F TlRUT1RIRURCUwAAAAACAQkQAQAAAPgEAAD0BAAASwgAAExaRnXoqsER/wAKAQ8CFQKkA+QF6wKD AFATA1QCAGNoCsBzZXTuMgYABsMCgzIDxgcTAoMSMxMPZjQPemhlbNEDIERsZwKAfQqACM/FCdk7 F58yNTUCgAqBgw2xC2BuZzEwMxQgFwsKEvIMAWMAQCBJIOBhbSBubwVAA1IF0ABJVEksIGhvdwRl dgSQIHRvIG3QeSB1bgSBcwGQHrDVC4BnHjBoBAAgH6Ec0lJhBgBRUh/BcwpQLu8KhQqFIGIAkG0L UB6AAhDccncLEQQgH4BlIhAWMOcFkAVAHvF0ZQeAAjAeMlkjIkRCBfAR8HIeAS7OIBxwA6AecWNh EfAfwOcFQB+hBeJRTAZSJVQcce8RwB4AHpAR8GQccCbyHkGmbwUwB3BpeiNAcQpQuwiBBCBiDcAF sCNAYiXxfnUCQB9EI08FQAhgLHFmeyszIGJwA2AJwByhHxEg/nIeoAMAH1EDkQuAJAAtwD0joGko ESbyI9gLgCBUfy3AAIAvQSbjBbEokh2gKFpTBbByHoAcgGQCICdtBUBrHNAH4HcRwAVATz8vMSOA KDIEICKRHJBkLTUdwGMplikt8xcwb2tnLoQocCtCZXgFkCrQaW8CIC1wGoElgUcSACrzd78FsDYj FiAqYStBA6B0MNJ+ZgSQBRArFhygK2AXMGduaTUAJHUgYlAtlCD9SE8pEDkyH6EWIXBzCoVC9xeg AjAKhWIkAQtQEgACIKRAcADAaS4FsGchDEEK9GxpMTgwAtFp8C0xNDQN8AzQQqMLWbwxNgqgA2Ak ACOhLUTHrwqHQ3sMMERGRgNhOkXOB0RGDIItcGF1bGRwCEBTRh1wVkEuQwRDLkoBU1VOWS74RURV RW9GfQZgAjBHrxVIu1cJgG4HkGRhef8doAZgBTAkECogBcAZ0B2gADE5OTYgNDo0mjg8AE1LT0Z9 VG9Nj/1Iu01JoCkwP9EuMAWQBSB/CJACMAQgLNFCAB7wIFItYFVTRVJTUb9MXnWcYmojkVPfSLtS ZVpw8wGRM/FqbwuAVtEFwBHwzwqxI/EqETsgbi0rhTPgz0mQEfBAz0HTMzZDRxQivwwBREYIUUmw IhADcGUCILcrYB0XN4FlJiIFoG0kIvklgnQnKgI5cSBALkAz8fs5BB5QcCyhK0EKhVyUM2DxOzBo IHkIYDbhPZAjoT0eQWcSACszY9IFQG51/1BjLNFWQQWwIvEdEwtgHvDzZKMKhWFwPZAR0WijF6C7 I/AiYWEN0COSPZByIpH9A4FjZ4I5cWgCMrAfcSPw/yWCLOAmYRHAPlYRsRqgKGH8KGQKUB4yM7U0 ggOgIGKcdXAtsQ2wNZBJJzXR/GlrZhMzEm+WCoVwITLR/x2gIEAXMCyzPZApEDPxKVD8Z2gFQCog HJBcsh5BCfDvcNFuYW3ZIP1PA6BPYR2gjxnQUAJQ4x2gSm9oA6C6RAhgZ2sxM1BEUjohDLY+J6En snZEYTRjYnbg/2jgV0FclGsyMIIrQkdiXtW9IPY+fPt7WoDffXJMNPD2axYgKGFNCsAq8YLtCoW2 RAcwYvFQSZEKhUYmIP8fkDdhJbAe8CZgKtByESzgTlQFkHtwFyFneQqFSUROVFfQTkVUE3BEEERS RVMF8FBBVRhMRFBJ70r6MjEyjC03YLCNYDg1NF9PX2BeG9VERgqFFsEAkaADABAQAAAAAAMAERAA AAAAQAAHMMCawTmqq7sBQAAIMMCawTmqq7sBHgA9AAEAAAAFAAAAUkU6IAAAAAADAA00/TcAAF8E ------ =_NextPart_000_01BBAB89.2FD10F80-- From owner-sqr-users@USA.NET Thu Sep 26 10:59:44 1996 Date: Thu, 26 Sep 1996 08:46:05 -0700 From: Albert Howard Subject: Re: table joins or separate begin-select clause As with all things in programming, the real answer is, it depends! To dispel doubt, try it both ways and put some date-time displays in your program at various checkpoints. You should have a checkpoint before the primary begin-select, one inside the begin-select, and one at the end. If you have do statements with selects in them, put show statements with the time displayed there too. Once your program has run, you can look at the time displays and see where the delay points are. If you are using SQR 3, you can also see the displays happening on the communication box and might notice some delays between displays. You can then evaluate the timings running your program with different styles of FROMs and WHEREs to see which one performs the best. And you might try it at different times of the day, if there is alot of heavy usage of your system. Many factors will affect this performance. There are just too many variables involved to make a blanket statement about which way is best. pauldp@SFITVA.CC.FITSUNY.EDU wrote: > > Could someone from MITI please comment. It's been a rule here to put the > table which you expect to get the least number of records from last. It > appears to greatly affect performance when you do that. If it has > changed (due to Oracle or an SQR upgrade) I'd like to know. If it > hasn't, a lot of people might be able to enhance performance. > > On Wed, 25 Sep 1996, John Douglas wrote: > > > I vote for biggest table last in the From clause. > > > > John Douglas > > > > Lockheed Martin > > > > Diane Paul > Fashion Institute of Technology > INTERNET ADDRESS PAULDP@SFITVA.CC.FITSUNY.EDU > 212-760-7854 From owner-sqr-users@USA.NET Mon Sep 30 14:19:43 1996 Date: Mon, 30 Sep 1996 13:56:00 PDT From: "Cys, Kent D." Subject: Creating/Printing/Clearing Arrays in SQR? Greetings Fellow SQR Users, Anyone have any sample code on how to define and use an array in SQR? The example in the SQR3 User's Guide is sketchy at best. A sample of defining , populating, printing, and then clearing an array would be ideal. Any help would be greatly appreciated...Thanks! Kent Cys From owner-sqr-users@USA.NET Mon Sep 30 19:07:28 1996 Date: Mon, 30 Sep 1996 19:52:50 -0400 From: Tim Kovacich Subject: Re: Creating/Printing/Clearing Arrays in SQR? ------ =_NextPart_000_01BBAF08.F9D97D80 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Here is a simple example of an array used to collect checking account = history and print it. The defining of the array: (This array has a maximum 8000 entries = possible) : Create-Array Name=3DAcctHistory - Size=3D8000 - Field=3DCreateDt:char - Field=3DTranCode:number - Field=3DDescription:char - Field=3DAmount:number - Field=3DCheckNo:number - Field=3DReversal:number - Field=3DEffectBalance:char *************************************************************************= *************************************************************** To populate the array, 'PUT' the variables into it in the same order = they were defined in the 'Create-Array' statement and increase your = arrayindex variable:=20 Put $CreateDt &TranCode $Description #Amount &CheckNo &Reversal = $EffectBalance Into AcctHistory(#ArrayIndex) =09 Add 1 to #ArrayIndex *************************************************************************= *************************************************************** To print the data, you can do it one of two ways, either 'GET' the data = from the array and then individually print it:=20 Get #TranCode #Reversal #TranAmount $CreateDt #CheckNo $Description = $EffectBalance - From AcctHistory(#TranCount) - TranCode Reversal Amount CreateDt CheckNo Description EffectBalance Print #TranAmount (,50,) Edit '99,999,999.99' Print #CheckNo (,10,) Edit '8888888888' *************************************************************************= *************************************************************** OR, using the let variable, extract the data from the array and then = print it. Let #IntAmt =3D AcctHistory.IntAmt(#ArrayIndex) =20 Print #IntAmt (,50,) Edit '99,999,999.99' It's been a while since I have played with the arrays, but if I remember = right, I had some grief attempting to print directly=20 from the array. So I pulled the data out of the array first and then = printed and I had better luck. =20 As for clearing the array, I never do. If you keep the index running = properly and record your max, there really is no need to since each new = account would start over back at arrayindex of 1 and overwrite the old = one. I'm not sure of your specific application...that may not work for = you. If this prompts more questions, feel free to respond!! ---------- From: Cys, Kent D.[SMTP:CYSKD@AUS0000P01.AUST.TDPRS.STATE.TX.US] Sent: Monday, September 30, 1996 4:56 PM To: Multiple recipients of list SQR-USERS Subject: Creating/Printing/Clearing Arrays in SQR? Greetings Fellow SQR Users, Anyone have any sample code on how to define and use an array in SQR? = The example in the SQR3 User's Guide is sketchy at best. A sample of = defining , populating, printing, and then clearing an array would be ideal. Any = help would be greatly appreciated...Thanks! Kent Cys ------ =_NextPart_000_01BBAF08.F9D97D80 Content-Type: application/ms-tnef Content-Transfer-Encoding: base64 eJ8+IjkXAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAENgAQAAgAAAAIAAgABBJAG ABABAAABAAAADAAAAAMAADADAAAACwAPDgAAAAACAf8PAQAAAEEAAAAAAAAAgSsfpL6jEBmdbgDd AQ9UAgAAAABTUVItVVNFUlNAVVNBLk5FVABTTVRQAFNRUi1VU0VSU0BVU0EuTkVUAAAAAB4AAjAB AAAABQAAAFNNVFAAAAAAHgADMAEAAAASAAAAU1FSLVVTRVJTQFVTQS5ORVQAAAADABUMAQAAAAMA /g8GAAAAHgABMAEAAAAUAAAAJ1NRUi1VU0VSU0BVU0EuTkVUJwACAQswAQAAABcAAABTTVRQOlNR Ui1VU0VSU0BVU0EuTkVUAAADAAA5AAAAAAsAQDoBAAAAAgH2DwEAAAAEAAAAAAAAA5koAQiABwAY AAAASVBNLk1pY3Jvc29mdCBNYWlsLk5vdGUAMQgBBIABAC4AAABSRTogQ3JlYXRpbmcvUHJpbnRp bmcvQ2xlYXJpbmcgQXJyYXlzIGluIFNRUj8Ayg8BBYADAA4AAADMBwkAHgATADQAMgABAHQBASCA AwAOAAAAzAcJAB4AEwARACYAAQBFAQEJgAEAIQAAADU3QkQ1NkJCQUUxQUQwMTE4NkI0MDBBMDI0 QkM1OUY4ADsHAQOQBgDACAAAEgAAAAsAIwAAAAAAAwAmAAAAAAALACkAAAAAAAMANgAAAAAAQAA5 ACCzQH0qr7sBHgBwAAEAAAAuAAAAUkU6IENyZWF0aW5nL1ByaW50aW5nL0NsZWFyaW5nIEFycmF5 cyBpbiBTUVI/AAAAAgFxAAEAAAAWAAAAAbuvKn1Au1a9WBquEdCGtACgJLxZ+AAAHgAeDAEAAAAD AAAATVMAAB4AHwwBAAAAGwAAAFBITklYTUFJTC9BTExNQUlML3Rrb3ZhY2ljAAADAAYQcJgrGAMA BxANCQAAHgAIEAEAAABlAAAASEVSRUlTQVNJTVBMRUVYQU1QTEVPRkFOQVJSQVlVU0VEVE9DT0xM RUNUQ0hFQ0tJTkdBQ0NPVU5USElTVE9SWUFORFBSSU5USVRUSEVERUZJTklOR09GVEhFQVJSQVk6 KFRISQAAAAACAQkQAQAAACoHAAAmBwAAbw8AAExaRnWr61a+/wAKAQ8CFQKoBesCgwBQAvIJAgBj aArAc2V0MjcGAAbDAoMyA8UCAHByQnER4nN0ZW0CgzM3AuQHEwKDNBLMD99mNbsSzBTFfQqACM8J 2TsZr3gyNTUCgAqBDbELYG7wZzEwMxRQCwoUUQvykmMAQCBIBJBlIAQAaCBhIACQbQtQHsBl5Hhh H1NvZh8AA6AKwCByYXkgdRGwZCDYdG8gGSEfcGMFQBFwVQWQawuAZx8AYwWgddkCMCBoBAAhMHIg wABwjyEQE1ALgAVAaXQuCoX1CoVUIfAgDbELgCIyICGGdCUxIIM6ICAoJSBfHuIgkxGAHvIAwHgH cHXwbSA4MCiQH5ACMAiBKQQgcG8EEGkCYGUpVCA6JExDGbBhE9AtLwcQIKEKhSwDTh/AZT1SQSKA dEgjBS0rqlNcaXoskCiDLXtGCJBsxGQ9KuREdDoRci7fnS/hVCCgCEENsDpuKFBuYgSQMO8v4UQH kAUDafcCIDCfL5ZBBGAisTKvL3kZIfJObzb/L3hSZXbdBJBzB0A5Hy94RQ3QIaH2QgdAAHBjMpAR ciRMHR/9HiUqQH9Bj0KfQ69Ev0XPb0bfR+4+jx28VCFAKVBwDnULYBPQJhgsICdQ6FVUJyYTdgrA BzApof8EICPRIUAkEE2BJhM7EAeA3yAQCyA7kSYhIMB3HqIlY/shAU4VJyrqTJATwCsRB4A/IsEj cguABQArABGwIHnvCGEgdAuADbB4TOcmsCRMSFB1dAyCICQwFiDOJjImVhA0WSAjNpRWsH84pVaw OsZWEDz7K6dV00n3TaFV0yy5KFgwIJJboFPhzilI9lXiXbpBZCEQHnD/ITFc+Uj1R+9h72L/ZA9l H39mL2c/aE8ktkrxI8MmImS9KxBhTDBTISFQA5FkTcNTAiAgA3R3IUB3ILBzHUwwZSQQIfAFwCdH RftMhWqiIANSJhgjYyYhA6BBU8FpdmlkdQdAbHcgwCO2VK5HEcBYIFbXI+9ZV3JjWEVWKCNYxldr Wez9LWtGbmJcOzIkIrEp0C12/1XTVtdZV1hFVjdYxld6Wf8PVQkjw3OqLAQoLDUwGiwp0EVv8AVA Jzk51iyCEIIjLoIQJ39cOKW/VdOEiIFAHNCBgYGlOIYX/4LmYH+IP4lPil+Lb4x/jY/zjp9IjE9S TDAg4CIyJiLvH3AFQEz2bNF4KPAA0GpI725Pb1Yjv0kETHIyW6E2kNcFQVXiVdM9XCoulqRc6/8m wEj/Hbx/xZalLAKERIFPj4Jfml8eJZ8FSXQnBCD3O4BvoR8QdyLwH3GQ4Xch3kknkTrglNALYHkh AQPw9yYgJhhswWJVsB7QIDCi4I8ZsAeAO3MFEGdodEww+6LiIRBzA3AewAnACJAgMf8CQBPgNLGR Amnmb/AZsCGw93BxnwWTbC4uISFAouBLMf8fcG9jkwQIYGvBJgmTUKjA/xPAlE0hASNypmQ7gKeB BcDvCkAiEKqRJExBBCACEAXA/mMfcE0BkQVL5aLgUBA64VtrcaqRSSAwawJrCeBw+yYTU8RyIrAl oxNQSyAEkP9wcSNyqNFO0VMUKAFMMG0S7x7AKvFwYh7hbiFAUBAhBP+ihCsAEXCysQfgInZsYEtA X6ahAZAAICAQsuJiANBrv6dhU2ogIR5wI3K7EncFEN9LdQbwvQFQELNCJyhguDBdBUBzCHAgA1Mj c7WAY+kGkGljHwBwC1DAUCsQ/TTRLsEwJiC7sQDAIMC+4v1sYHK7kLEiUyEkPbNxJiC/HuG1Uaex BCAEYB6xcQpQ/xPANNFswT0QL9CTUQngISLHGbC/8AIgZCEhJEyfCw3AsDEogQIAaS0xNJ40DfAM 0MmTC1kxNp8g9wNgE9AhsS3Lt58HymsMML/LNngSJrDKT8tUVdNDbLICS1ISRC5bU01UAFA6Q1lT S0RACEFVUyiRMFAwMQIu0fFULlREUFJEUy7SwEFURdLgWPou0gBdzF/NbQZgNtHOr33Puk3G8UwS BmAFMKWUMwedgF9gniA2IDQ6NfnZwFBN1B/NbUrg1l/XbP9LQDTAH2Ko0QUgCJACMAQghyAhwLCt UVNRUi3SAI5F0yDaX9UudWJqIaFv3H/PrCryIjEvf8PlQkNvsXYrU01y4AI/x7/IwzPuNso3HeXL NkcJ0afSBCCeRi/QGUAH4OARIFURsPURoCywHW5TIGvxowMAcL8gwE6BH2IFoFcxWAFo62H/ITFP 1CNjIOEgSOcVJsAlIW+fBR+mThXgETPrw6GBR9Z1cCAew3Oz4HQRcCNR7wVAO4ATwKqRQe4GICEl Z//sJksVIjFMMJTU98NvR7Fn/yBXulQ7gB7QDbAHQPVS7eH5IfBscJ8F+ncJwSsQtbJ3wJDe4isR ZMExJSAAcGv+c8c90MPQceeP6J/prJ8FBRwhAAPgAAADABAQAAAAAAMAERAAAAAAQAAHMGAXLZIl r7sBQAAIMGAXLZIlr7sBHgA9AAEAAAAFAAAAUkU6IAAAAAD0Ag== ------ =_NextPart_000_01BBAF08.F9D97D80-- From owner-sqr-users@USA.NET Fri Oct 4 10:58:45 1996 Date: Fri, 4 Oct 1996 09:42:19 +1800 From: Ben Burkland Subject: Writing SQR Reports to HTML? I understand that SQR Workbench V4 will be supporting writing reports to HTML but was wondering if anyone is already doing this with earlier versions of the product? If so, do you have any suggestions or sample code on how to implement writing text and numeric columns to HTML. Ben Burkland Environmental Research Institue of Michigan From owner-sqr-users@USA.NET Fri Oct 4 19:54:15 1996 Date: Fri, 4 Oct 1996 20:36:11 -0400 From: CValdes@AOL.COM Subject: SQR help needed in Miami The Miami Herald Publishing Company is searching for a high caliber SQR consultant to work in the Miami area for the next six weeks. We are running on Sybase 11, hpux 10.1. If you are interested, please call Carlos M. Valdes at (305) 376-3038 or email to cvaldes@herald.com. Thanks Carlos Manuel From owner-sqr-users@USA.NET Sun Oct 6 10:59:33 1996 Date: Sun, 6 Oct 1996 11:40:52 -0500 From: MRS RALINE D SMITH-REID Subject: Multi Level ON-BREAK I am a new SQR programmer using SQR3. Currently, I am creating a program that produces a count of UNIQUE PRODUCTS for each ACCOUNT. A product is identified by 3 fields on a table. I have created a control-break process to accomplish this task. My break is on the ACCOUNT and the CONCATENATED PRODUCT (the 3 product fields). Can someone tell me if the above can be done with the ON-BREAK command and if so an example would be appreciated. Also, which would be more efficient when the query has the potential of capture more than 50,000 records. Creating a control-break process or using the ON- BREAK command. Thanks, Raline Reid From owner-sqr-users@USA.NET Tue Oct 8 02:12:54 1996 Date: Mon, 7 Oct 1996 09:06:15 -0500 From: Ray Ontko Subject: Re: Multi Level ON-BREAK > I am a new SQR programmer using SQR3. Currently, I am creating a > program that produces a count of UNIQUE PRODUCTS for each ACCOUNT. A > product is identified by 3 fields on a table. > > I have created a control-break process to accomplish this task. My > break is on the ACCOUNT and the CONCATENATED PRODUCT (the 3 product > fields). > > Can someone tell me if the above can be done with the ON-BREAK > command and if so an example would be appreciated. Also, which would > be more efficient when the query has the potential of capture more > than 50,000 records. Creating a control-break process or using the ON- > BREAK command. > > Thanks, > Raline Reid Raline, I'm assuming you're simply trying to produce a count of distinct products by account (but not actually list the products). If so, then if you're using a SQL database that supports GROUP BY, something like this should work (on-break not needed): begin-select account count(distinct a||b||c) from ... group by account end-select If you're trying to list them: begin-select distinct account () on-break after=a before=b a||b||c add 1 to #count from ... end-select This assumes that you'll use procedures a and b to print what you want each time the account number changes, and reset the #count to 0. If you want to do your own control break logic, I would not expect that it would be much different from a performance standpoint. If you want to print a detail report with a final summary page, you'll have to use arrays to save the result for each account into the array for printing the summary, or something like that. Does this help? Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Oct 8 08:12:42 1996 Date: Tue, 8 Oct 1996 08:09:04 -0500 From: Ray Ontko Subject: Re: Writing SQR Reports to HTML? > I understand that SQR Workbench V4 will be supporting writing reports to HTML > but was wondering if anyone is already doing this with earlier versions of the > product? > > If so, do you have any suggestions or sample code on how to implement writing > text and numeric columns to HTML. Ben, We're using SQR to do two things with the WEB: 1) generate static pages for browsing based on the contents of a database, 2) provide dynamic pages using SQR to implement CGI (Common Gateway Interface, a mechanism to allow programs to be invoked on the web server, usually in response to a page form being submitted). In both cases, we use off-the-shelf SQR and use SHOW or WRITE to produce the output. We have a collection of routines that we use to parse input for our cgi programs, but other than that, we simply embed the HTML tags directly in SHOW and WRITE statements. It's worth noting that we decided NOT to use PRINT to write the HTML to a .LIS file. Since HTML has its own formatting mechanisms, we felt that it would be easier to use WRITE to generate to a file, and SHOW to generate to stdout (needed for the cgi). (Too bad WRITE doesn't allow you to open stdout). Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Oct 9 11:05:13 1996 Date: Mon, 7 Oct 1996 11:15:44 -0300 From: "Adem M. Hamidovic" Subject: Help with input problem I'm trying to do a select with a value input by the user. I'm using: input $provider 'Please enter the provider number' This field is actually a character field, so I thought this would be okay, but nothing is being selected. When I hard code it in, as in'45700', it works fine. Any help would be appreciated. -Adem Hamidovic hamidoam@tuns.ca From owner-sqr-users@usa.net Wed Oct 9 11:59:32 1996 Date: Tue, 8 Oct 1996 17:37:01 -0500 From: Toni Iacobo 617-441-2364 Subject: Controlling Font of TITLE in Chart Hi, Is there a way to control the font of this string? I would like to fit more characters in the title on the chart by adjusting the font. Is this possible? Or do I have to change the font of the printer and then the other fields (subtitle, plotting, labels, etc.) will adjust by some fixed, uncontrollable factor? Thanks, Toni Iacobo toni_iacobo@iacnet.com From owner-sqr-users@USA.NET Wed Oct 9 12:42:13 1996 Date: Wed, 9 Oct 1996 12:17:16 -0500 From: Ray Ontko Subject: Re: Help with input problem > I'm trying to do a select with a value input by the user. I'm using: > input $provider 'Please enter the provider number' > This field is actually a character field, so I thought this would be > okay, but nothing is being selected. When I hard code it in, as > in'45700', it works fine. Any help would be appreciated. > > -Adem Hamidovic > hamidoam@tuns.ca Adem, I'm assuming that you are trying to use $provider in a where clause. begin-select ... from my_table where my_field = $provider end-select Some things to check: 1) What database are you using? If you're using Oracle and my_field is char(5), then 45700 will match '45700', but 1234 will not match '1234'. You may need to rpad. 2) is $provider being used in a local procedure (i.e., a procedure that takes parameters)? If so, you may need to use $_provider in your where clause: where my_field = $_provider end-select Hope this helps. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Oct 9 12:42:19 1996 Date: Mon, 7 Oct 1996 08:49:26 -0700 From: Albert Howard Subject: Re: Multi Level ON-BREAK If this is a summary report, you would be better off doing a SELECT DISTINCT on the three fields and using a count column: begin-select distinct FIELDA FIELDB FIELDC COUNT(*) &count from your_table group by fielda, fieldb, fieldc end-select MRS RALINE D SMITH-REID wrote: > > I am a new SQR programmer using SQR3. Currently, I am creating a > program that produces a count of UNIQUE PRODUCTS for each ACCOUNT. A > product is identified by 3 fields on a table. > > I have created a control-break process to accomplish this task. My > break is on the ACCOUNT and the CONCATENATED PRODUCT (the 3 product > fields). > > Can someone tell me if the above can be done with the ON-BREAK > command and if so an example would be appreciated. Also, which would > be more efficient when the query has the potential of capture more > than 50,000 records. Creating a control-break process or using the ON- > BREAK command. > > Thanks, > Raline Reid From owner-sqr-users@USA.NET Wed Oct 9 14:21:05 1996 Date: Wed, 9 Oct 1996 11:16:10 -0700 From: Albert Howard Subject: Re: Help with input problem Adem M. Hamidovic wrote: > > I'm trying to do a select with a value input by the user. I'm using: > input $provider 'Please enter the provider number' > This field is actually a character field, so I thought this would be > okay, but nothing is being selected. When I hard code it in, as > in'45700', it works fine. Any help would be appreciated. > > -Adem Hamidovic > hamidoam@tuns.ca You might try doing an rtrim on the input variable. It could be that a space is getting appended somewhere. Try adding: $provider = rtrim($provider,' ') right after your input statement. From owner-sqr-users@USA.NET Wed Oct 9 14:28:56 1996 Date: Wed, 9 Oct 1996 14:04:00 -0400 From: John Douglas Subject: Re: Help with input problem You might try this after the input line: let $providerwithquotes = '''' || $provider || '''' This will add quotes to the value in $provider. John Douglas Lockheed Martin Utility Services From owner-sqr-users@USA.NET Wed Oct 9 15:17:59 1996 Date: Wed, 9 Oct 1996 16:15:15 -0400 From: Paul Baker Subject: Re: Help with input problem In a message dated 96-10-09 11:40:27 EDT, you write: << input $provider 'Please enter the provider number' >> Adam try this input $provider maxlen=5 'Please enter the provider number' type=Char Hope it helps works fine for me Paul Baker BSC From owner-sqr-users@USA.NET Wed Oct 9 16:52:40 1996 Date: Wed, 9 Oct 1996 14:25:27 -0400 From: "Brent S. Templeton" Subject: Re: Help with input problem ------ =_NextPart_000_01BBB5ED.B8740B30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Try enclosing variable by brackets: IE: [$provider] What is happening is SQR is compiling the select prior to the value = being set. the brackets tell SQR that this will be filled in at run = time. ---------- From: Adem M. Hamidovic Sent: Monday, October 07, 1996 10:15 AM To: Multiple recipients of list SQR-USERS Subject: Help with input problem I'm trying to do a select with a value input by the user. I'm using: input $provider 'Please enter the provider number' This field is actually a character field, so I thought this would be okay, but nothing is being selected. When I hard code it in, as in'45700', it works fine. Any help would be appreciated. -Adem Hamidovic hamidoam@tuns.ca ------ =_NextPart_000_01BBB5ED.B8740B30 Content-Type: application/ms-tnef Content-Transfer-Encoding: base64 eJ8+IhwSAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEkAYAEAEAAAEAAAAMAAAAAwAAMAIAAAAL AA8OAAAAAAIB/w8BAAAAQQAAAAAAAACBKx+kvqMQGZ1uAN0BD1QCAAAAAFNRUi1VU0VSU0B1c2Eu bmV0AFNNVFAAU1FSLVVTRVJTQHVzYS5uZXQAAAAAHgACMAEAAAAFAAAAU01UUAAAAAAeAAMwAQAA ABIAAABTUVItVVNFUlNAdXNhLm5ldAAAAAMAFQwBAAAAAwD+DwYAAAAeAAEwAQAAABQAAAAnU1FS LVVTRVJTQHVzYS5uZXQnAAIBCzABAAAAFwAAAFNNVFA6U1FSLVVTRVJTQFVTQS5ORVQAAAMAADkA AAAACwBAOgEAAAACAfYPAQAAAAQAAAAAAAAClysBBIABABwAAABSRTogSGVscCB3aXRoIGlucHV0 IHByb2JsZW0AtwkBBYADAA4AAADMBwoACQAOABkAGwADACsBASCAAwAOAAAAzAcKAAkADgAWACEA AwAuAQEJgAEAIQAAAEYyODI5REUyQ0MyMUQwMTFCOTk1MDBBMEM5MTIxMDJFAAYHAQOQBgCkBAAA FAAAAAsAIwAAAAAAAwAmAAAAAAALACkAAQAAAAMALgAAAAAAAwA2AAAAAABAADkAwASOPg+2uwEe AHAAAQAAABwAAABSRTogSGVscCB3aXRoIGlucHV0IHByb2JsZW0AAgFxAAEAAAAWAAAAAbu2Dz6E 4p2C8yHMEdC5lQCgyRIQLgAAHgAeDAEAAAADAAAATVMAAB4AHwwBAAAAFgAAAFdPUktHUk9VUC9X R1BPL0JyZW50VAAAAAMABhCTU8X1AwAHECkCAAAeAAgQAQAAAGUAAABUUllFTkNMT1NJTkdWQVJJ QUJMRUJZQlJBQ0tFVFM6SUU6JFBST1ZJREVSV0hBVElTSEFQUEVOSU5HSVNTUVJJU0NPTVBJTElO R1RIRVNFTEVDVFBSSU9SVE9USEVWQUxVRUJFAAAAAAIBCRABAAAAFgMAABIDAAB7BQAATFpGdR0v WEz/AAoBDwIVAqQD5AXrAoMAUBMDVAIAY2gKwHNldO4yBgAGwwKDMgPGBxMCgxIzEw9mNA96aGVs 0QMgRGxnAoB9CoAIz8UJ2TsXnzI1NQKACoGDDbELYG5nMTAzFCAXCwoS8gwBYwBAIFRydHkgCfBj FzAAkBqgII52CsAHMAJgZSBiHKCUYnIA0GsSAHM6CoWASUU6IFskcANgtHZpBIFdCoUKhVcRwMsF QAQAIBHAcHAJ8B0iMSFBU1FSITIFoG1wawMQHSJ0FiAgEfAdwGPLBUAfgGkFsXRvI0MdYJsKQR3g ZR0iEfEuICND/x4mI0AWMiJCI1AhESNQIUHnA/AWQSUwIGYoAQmAITBTA6AhEXJ1A6B0B3EuRyAc CvQjADE4MALRafAtMTQ0DfAM0CuzC1m8MTYKoANgJsAj0S0t1+8KhyyLDDAtVkYDYR9ALG9vLXQM ghNwDbBtBdAlwEjsYW0fwB+hYy5/L40GYBcCMDC/MctNAiBkYXloLCBPI9BvJTAFwDBCNzggMTk5 NjjwMGg6MTUTcE0zry+NVOZvNe82/HVsKYALUB3QPRegYwUgCJACMAQgb2YaICMAczWBIlAtVVMY RVJTOd80vnViatcjwTv/MctIFjBwJ+EjULko0XB1I+I4cB3AbSnfeSrjMzYsVxQiDAEtVkn6JzLA dByQIxMkcDNQKQB/I4ZEw0nwJNRFFB3xI1J1/RHwciXASOJMIB0hHqZFFNEfdyAnUB3AYRHwHLHP JsAkQSNhTgdudQbQBJD6JwqFVCeyKHAWMCjBBCDpANB0dQdAbBygSfARsq9SATiRUXM4IHMkcEkj QfkIYGdoJ4YIYFGhJTAKhdRvazgCYkVBbi1wJ7D/IeQlNiOyCYAlwCDwCfBT4b8RwSjABaANsCEw ISFuOCBDTtBNJyc0NTcrUCenOCBZMVTgcmtRUm4psP0TcG4coBYhRKFU9SkAIZDvPmIhEFfhIBwt MpMzHhHAGzMyMyBAUiAAgC5jYb9F70b+G9UtVgqFFsEAZKAAAAMAEBAAAAAAAwAREAAAAABAAAcw 0H/81g62uwFAAAgw0H/81g62uwEeAD0AAQAAAAUAAABSRTogAAAAAAMADTT9NwAAXlA= ------ =_NextPart_000_01BBB5ED.B8740B30-- From owner-sqr-users@USA.NET Wed Oct 9 16:52:52 1996 Date: Wed, 9 Oct 1996 13:01:51 -0500 From: Ray Ontko Subject: Re: Controlling Font of TITLE in Chart > Is there a way to control the font of this string? I would like to fit > more characters in the title on the chart by adjusting the font. Is > this possible? Or do I have to change the font of the printer and then > the other fields (subtitle, plotting, labels, etc.) will adjust by some > fixed, uncontrollable factor? Toni, I haven't found a documented solution to this problem. Try putting in a call to MITI to let them know that you'd like to be able to control these things. My problem was that the type-faces are too light; they don't reproduce well. It's as if SQR is using some plotting package the uses a very fine pen; I couldn't find a way to control this. Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Oct 9 17:30:04 1996 Date: Wed, 9 Oct 1996 12:58:48 -0400 From: Sofia Dobkin Subject: Re: Help with input problem Try this: input $prov 'Please enter the provider number' move '''' to $pup string $pup $prov $pup by '' into $provider I hope it help. Sofia Dobkin >---------- >From: Adem M. Hamidovic[SMTP:hamidoam@TUNS.CA] >Sent: Monday, October 07, 1996 10:15 AM >To: Multiple recipients of list SQR-USERS >Subject: Help with input problem > >I'm trying to do a select with a value input by the user. I'm using: >input $provider 'Please enter the provider number' >This field is actually a character field, so I thought this would be >okay, but nothing is being selected. When I hard code it in, as >in'45700', it works fine. Any help would be appreciated. > >-Adem Hamidovic >hamidoam@tuns.ca > From owner-sqr-users@USA.NET Thu Oct 10 13:50:21 1996 Date: Thu, 10 Oct 1996 15:21:26 -0300 From: "Adem M. Hamidovic" Subject: Dynamic WHERE clause? Hi all. Thanks for helping out with my input problem - that part works fine now :) The other problem I'm wrestling with at the moment is how to set a WHERE clause based on user input. Specifically, if the user enters one value for a variable, use one WHERE clause, else use a different WHERE clause. I tried putting an IF statement following the FROM and it complained. Is there any way to do this other than having two different SELECT sections? As always, I'd appreciate any help :) Adem From owner-sqr-users@USA.NET Thu Oct 10 14:17:53 1996 Date: Thu, 10 Oct 1996 14:05:12 -0500 From: Ray Ontko Subject: Re: Dynamic WHERE clause? > Hi all. Thanks for helping out with my input problem - that part works > fine now :) The other problem I'm wrestling with at the moment is how to > set a WHERE clause based on user input. Specifically, if the user enters > one value for a variable, use one WHERE clause, else use a different > WHERE clause. I tried putting an IF statement following the FROM and it > complained. Is there any way to do this other than having two different > SELECT sections? > > As always, I'd appreciate any help :) > > Adem Adem, I can't tell what you've tried, but something like this should work: input $answer if $answer = 'A' move 'and col_a = ''WILMA''' to $where_clause else move 'and col_c = ''BARNEY''' to $where_clause end-if begin-select ... where column_b = 'FRED' [$where_clause] end-select Ray ---------------------------------------------------------------------- Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB" rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/ From owner-sqr-users@USA.NET Thu Oct 10 14:35:53 1996 Date: Thu, 10 Oct 1996 14:51:00 -0500 From: Philip Roemer Subject: Re: Dynamic WHERE clause? >Hi all. Thanks for helping out with my input problem - that part works >fine now :) The other problem I'm wrestling with at the moment is how >to set a WHERE clause based on user input. Specifically, if the user >enters one value for a variable, use one WHERE clause, else use a >different WHERE clause. I tried putting an IF statement following the >FROM and it complained. Is there any way to do this other than having >two different SELECT sections? >As always, I'd appreciate any help :) >Adem Adem, The way I use dynamic WHERE clauses is to have a call to a procedure right after your inputs and before your select. In this procedure you set variables equal to your WHERE clause, then in your select ... from, you just reference these variables. This can get very complicated if you have a lot of and/or clauses, but it works. Example: ... input $prov do set_where ... procedure set_where ! you can do your if..thens here let $where = 'Where provider = '||$prov end-procedure procedure get_info begin-select ... from ... [$where] end-procedure This is a very simple example, hope it helps! - Phil Roemer From owner-sqr-users@USA.NET Thu Oct 10 15:09:29 1996 Date: Thu, 10 Oct 1996 14:56:01 -0500 From: Nathan Treadway Subject: Re: Dynamic WHERE clause? > Hi all. Thanks for helping out with my input problem - that part works > fine now :) The other problem I'm wrestling with at the moment is how to So, what was the problem you were having. I am curious, because there were many different proposed solutions to your problem, but each one assumed different things about what you were trying to do. Which one actually helped? > set a WHERE clause based on user input. Specifically, if the user enters > one value for a variable, use one WHERE clause, else use a different > WHERE clause. I tried putting an IF statement following the FROM and it > complained. Is there any way to do this other than having two different > SELECT sections? As other people have mentioned, it sounds like what you are trying to do is dynamic SQL. This is described on page 49 of the SQR v3 User's Guide under "Dynamic Query Variables". Note that you can use a separate procedure to prepare the $where_clause string (or whatever you are using) if you want, but it's not necessary. As long as you get the proper text into the $ variable before you execute the begin-select paragraph, you'll be fine. Also, you need to be careful with imbedded ' characters in the $where_clause variable. Ray's example shows the proper doubling of ', but if you have trouble with this, using the -s option on the SQR command line (described on page 7 of the user's manual) will show you what text is actually being passed to the database and that's often useful in tracking down problems. You can't put "if"s after the FROM in a begin-select; "if" is an SQR command, and everything between a "from" and the "end-select" must be pure SQL, passed to the database server. Good luck. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Thu Oct 10 15:52:27 1996 Date: Thu, 10 Oct 1996 15:13:00 -0400 From: John Douglas Subject: Re: Dynamic WHERE clause? Here's one way of substituting different 'Where' clauses depended on user input to prompts. Let's say the user enters a '2' at this prompt. Begin-Procedure Emplid-Course-StartDate while $ecs <> '1' and $ecs <> '2' and $ecs <> '3' input $ecs 'Report on (1) Emplid, (2) Course or (3) Start Date Enter 1,2 or 3' type = char end-while if $ecs = '1' move 'Where t.emplid =' to $choice do get-emplid else if $ecs = '2' !!!So, this happens move 'Where t.course =' to $choice do get-course else if $ecs = '3' move 'Where t.course_start_dt >=' to $choice do get-startdate end-if end-if end-if End-Procedure Emplid-Course-StartDate BEGIN-PROCEDURE Get-Course !!!So, this happens !!!Let's say they enter X00472 while $course = '' input $course 'Enter Course ie; X00325' type=char uppercase $course end-while let $coursewithquotes = '''' || $course || '''' concat $coursewithquotes with $choice !!!See [$choice] below. do get-attendance END-PROCEDURE Get-Course BEGIN-PROCEDURE get-attendance begin-select t.emplid t.course t.course_start_dt From ps_training t [$choice] !!!This value is: Where t.course = 'X00472' end-select END-PROCEDURE get-attendance You can fill the [$choice] variable from other procedures as long as it is accomplished before you come to 'get-attendance'. Hope this helps, John Douglas Lockheed Martin Utility Services From owner-sqr-users@USA.NET Thu Oct 10 16:25:43 1996 Date: Thu, 10 Oct 1996 14:20:50 -0500 From: Johnny Ravela Subject: Re: Dynamic WHERE clause? Hi Adem, Here is a fully fucntional example for dynamic table and where clause substitution . HTH Johnny Ravela xxxxxxxxxxxxxxxx cut here xxxxxxxxxxxxxxxxxxx begin-report do 101-get-date end-report ! =============================================== begin-procedure 101-get-date INPUT $tab-name INPUT $var-name if $var-name = 'ONE' let $where-var-name = 'and emp_name = ''JOHNNY''' end-if begin-select sysdate &date from [dual : $tab-name] ! dynamic table substituion where 1 = 1 ! ----------> ! allows all the dynamic to use AND [$where-var-name] ! dynamic where clause end-select display $tab-name display &date end-procedure ! ============================================================================ > > Hi all. Thanks for helping out with my input problem - that part works > fine now :) The other problem I'm wrestling with at the moment is how to > set a WHERE clause based on user input. Specifically, if the user enters > one value for a variable, use one WHERE clause, else use a different > WHERE clause. I tried putting an IF statement following the FROM and it > complained. Is there any way to do this other than having two different > SELECT sections? > > As always, I'd appreciate any help :) > > Adem > From owner-sqr-users@USA.NET Fri Oct 11 09:55:03 1996 Date: Fri, 11 Oct 1996 08:40:19 -0300 From: "Adem M. Hamidovic" Subject: Re: Dynamic WHERE clause? On Thu, 10 Oct 1996, Nathan Treadway wrote: > > Hi all. Thanks for helping out with my input problem - that part works > > fine now :) The other problem I'm wrestling with at the moment is how to > > So, what was the problem you were having. I am curious, because there were > many different proposed solutions to your problem, but each one assumed > different things about what you were trying to do. Which one actually > helped? > I only tried the first suggestion I came across, which was to enclose the variable in brackets [$provider]. I had all the other suggestions printed off just in case that one didn't work! Thanks again, Adem From owner-sqr-users@USA.NET Fri Oct 11 13:03:47 1996 Date: Fri, 11 Oct 1996 11:53:40 -0600 From: Sean Carroll Subject: Calling DOS/Windows applications Hello, I am writing an SQR which produces another SQR, (the only way I could find of getting around the non-ability of SQR to specify table names completely dynamically. I know you can do it, but the tablename must have a template of the same table - not appropriate in this circumstance) I would like to clean up the directory before I run it, and am trying something like this: let $comspec = 'command /c del c:\temp\mig*.*' call system using $comspec #status display #status I keep getting a #Status of 2, and no files have been deleted. I am running SQR 3 under windows 95. Also, what is the command for invoking a windows command line? Thanks in advance Sean Carroll PeopleSoft Australia From owner-sqr-users@USA.NET Fri Oct 11 14:12:48 1996 Date: Fri, 11 Oct 1996 14:44:52 -0400 From: GARRIDF@SNYFARVA.CC.FARMINGDALE.EDU Subject: ESQR Export question When creating an export report format, we need the report output created as an operating system file rather than a print file. The documentation says the Print menu should provide an option to copy the file, and I recall seeing a submenu in earlier versions where the file could be named and created, but it does not come up anymore. We can print and not delete, or hold the print job, rename the print file and then kill the print job as a work around. What are we doing wrong? Frances Garrido, SUNY Farmingdale From owner-sqr-users@USA.NET Sun Oct 13 00:42:43 1996 Date: Sat, 12 Oct 1996 18:50:57 IST From: GANAPATHIB@INF.COM Subject: Using the function written in UFUNC.C Hi , I have written a function in UFUNC.C , but when i tried to use the function in my SQR program , it is giving error 'Invalid function'. 1 ) After writing the c function in UFUNC.C , What to be done to use it in my SQR program ?? When i went through manuals it is saying that we have to create SQR executable of the 'C' functions ? If it is , then how to create ?? 2 ) I have written a SQR program . Can i get a executable out of it , Which can be run independently(Without SQRW) ?? Thanx in advance , Ganapathi. Email id : Ganapathib@inf.com From owner-sqr-users@USA.NET Sun Oct 13 15:23:29 1996 Date: Fri, 11 Oct 1996 13:33:53 -0500 From: Nathan Treadway Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Sun Oct 13 18:24:37 1996 Date: Sun, 13 Oct 1996 18:22:42 -0500 From: Nathan Treadway Subject: Re: Calling DOS/Windows applications I did some testing and it looks like the important thing is not the path to COMMAND, but rather including the .COM extension. That is, the string 'command.com /c del ...' seems to work, while 'command /c del ...' does not. Note that the COMSPEC environment variable's value includes the .COM, so using that is still probably the best idea in this particular case: let $comspec = getenv('COMSPEC') || ' /c del c:\temp\mig*.*' call sytem using $comspec #status Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Mon Oct 14 07:51:15 1996 Date: Mon, 14 Oct 1996 08:48:35 -0500 From: Richard Vernick Subject: Re(2x): Calling DOS/Windows applications Won't "del *.*" wait for a "Are you sure?"? You might need to pipe a 'Y' into it. e.g. (del *.* | echo "Y"). To see that this is NOT your problem, put a blabla.tmp file there. Then do a "del *.tmp" and see if your result changes. Good luck. >>> Nathan Treadway 10/11/96 01:33pm >>> > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Mon Oct 14 08:49:25 1996 Date: Mon, 14 Oct 1996 08:47:39 -0500 From: Nathan Treadway Subject: Re: Re(2x): Calling DOS/Windows applications > Won't "del *.*" wait for a "Are you sure?"? You might need to pipe a 'Y' > into it. e.g. (del *.* | echo "Y"). > > To see that this is NOT your problem, put a blabla.tmp file there. Then > do a "del *.tmp" and see if your result changes. > Good point. Under Windows 95 you'll get a separate DOS window poping up with the prompt from DEL if this happens; you'll at least know what's going on, but you'll have to answer the prompt before the files are deleted. Using 'echo "Y" | ' || getenv('COMSPEC') || ' /c del ...' would solve that problem -- or just change your naming convention so that you can get away with del *.tmp or whatever. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Mon Oct 14 19:40:55 1996 Date: Mon, 14 Oct 1996 16:35:30 -0700 From: John Kellogg Subject: Re: Using the function written in UFUNC.C GANAPATHIB@INF.COM wrote: > > Hi , > > I have written a function in UFUNC.C , but when i tried to use the > function in my SQR program , it is giving error 'Invalid function'. > > 1 ) After writing the c function in UFUNC.C , What to be done to use > it in my SQR program ?? > > When i went through manuals it is saying that we have to create > SQR executable of the 'C' functions ? If it is , then how to > create ?? > > 2 ) I have written a SQR program . Can i get a executable out of it , > Which can be run independently(Without SQRW) ?? > > Thanx in advance , > > Ganapathi. > > Email id : Ganapathib@inf.com The function must be inserted in the userfuncs table in the ufunc.c program. See how max, split, and printarray are done. If you have done this correctly, you then compile ufunc.c into an object module (ufunc.o). After that, the SQR executables must be relinked using the new ufunc.o. Either replace the ufunc.o that is in the SQR library with the one you have created, or by change the SQR makefile to link in the ufunc.o before the SQR library is accessed. Then run the appropriate command to relink the executables. JLKellogg From owner-sqr-users@USA.NET Mon Oct 14 22:11:24 1996 Date: Tue, 15 Oct 1996 13:07:23 +1000 From: DALE KAY Subject: Re: ESQR Export question At 02:44 PM 11/10/96 -0400, you wrote: >When creating an export report format,.... Can someone on this user group please advise what I need to do to be removed from the service as it is no longer required. Thanks Steve Jackson. > > From owner-sqr-users@USA.NET Tue Oct 15 11:17:32 1996 Date: Tue, 15 Oct 1996 03:59:38 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Oct 15 14:58:01 1996 Date: Tue, 15 Oct 1996 07:28:18 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Oct 15 16:52:07 1996 Date: Tue, 15 Oct 1996 16:24:49 -0400 From: BOB SHIFLETT Subject: to_date I'm having a problem using the oracle to_date function in SQR V3.0.12.1 I get the error message : (SQR 4008) Unknown function or variable in expression: to_date to_date($end_date,'yymmdd') < to_date($begin_date,'yymmdd') I have successfully used this function on one of our other unix boxes running V2.4.2 If you should happen to know of a problem with this release of SQR or spot errors in code below (I have tried many different variations) please let me know. thanks, Bob ========================================================== begin-procedure get_edi_date BEGIN_DATE: let $begin_date = ' ' show (7,20) clear-line show (7,20) 'Enter Beginning EDI Date [DD-MON-YY] ' input $begin_date type=date status=#begin_date_status noprompt if #begin_date_status <> 0 or isnull ($begin_date) show (7,20) clear-line goto BEGIN_DATE end-if END_DATE: let $end_date = ' ' show (8,20) clear-line show (8,20) 'Enter Ending EDI Date [DD-MON-YY] ' input $end_date type=date status=#end_date_status noprompt if #end_date_status <> 0 or isnull ($end_date) or to_date($end_date,'yymmdd') < to_date($begin_date,'yymmdd') show (8,20) clear-line goto END_DATE end-if end-procedure From owner-sqr-users@USA.NET Tue Oct 15 17:31:59 1996 Date: Tue, 15 Oct 1996 14:08:37 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Oct 15 17:36:31 1996 Date: Tue, 15 Oct 1996 17:25:14 -0500 From: Nathan Treadway Subject: Re: to_date > > I'm having a problem using the oracle to_date function in SQR V3.0.12.1 > > I get the error message : > (SQR 4008) Unknown function or variable in expression: to_date > to_date($end_date,'yymmdd') < to_date($begin_date,'yymmdd') [...] > show (8,20) 'Enter Ending EDI Date [DD-MON-YY] ' > input $end_date type=date status=#end_date_status noprompt > if #end_date_status <> 0 or > isnull ($end_date) or > to_date($end_date,'yymmdd') < to_date($begin_date,'yymmdd') > show (8,20) clear-line > goto END_DATE > end-if The problem here is that you are trying to use a database server function as an SQR function. (Notice that to_date isn't a function listed on page 229 of the SQR v3 manual.) You can do something like this: ------------------------------------------------------------------------- input $end_date type=date status=#end_date_status noprompt do reformat_dates if #end_date_status <> 0 or isnull ($end_date) or &end_date_compare < &begin_date_compare show (8,20) clear-line goto END_DATE end-if .... begin-procedure reformat_dates begin-select to_char(to_date($begin_date,'dd-mon-yy'),'yyyymmdd') &begin_date_compare to_char(to_date($end_date,'dd-mon-yy'),'yyyymmdd') &end_date_compare from dual end-select end-procedure ------------------------------------------------------------------------- Note that you may want skip SQR's date format checking on the input command and replace it with your own so that you can more flexibly handle years in the next century. For example, you can put an on-error handler on a select similar to the one above in order to trap user input that does not match the format mask you give. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Oct 15 19:48:26 1996 Date: Tue, 15 Oct 1996 16:55:25 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Tue Oct 15 19:48:30 1996 Date: Tue, 15 Oct 1996 16:38:31 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Oct 16 07:26:09 1996 Date: Wed, 16 Oct 1996 08:11:53 -0400 From: Nick Moscaritolo Subject: Re: to_date BOB SHIFLETT wrote: > > I'm having a problem using the oracle to_date function in SQR V3.0.12.1 > > I get the error message : > (SQR 4008) Unknown function or variable in expression: to_date > to_date($end_date,'yymmdd') < to_date($begin_date,'yymmdd') > > I have successfully used this function on one of our other unix boxes > running V2.4.2 > If you should happen to know of a problem with this release of SQR or spot > errors > in code below (I have tried many different variations) please let me know. > > thanks, > > Bob > > ========================================================== > begin-procedure get_edi_date > BEGIN_DATE: > let $begin_date = ' ' > show (7,20) clear-line > show (7,20) 'Enter Beginning EDI Date [DD-MON-YY] ' > input $begin_date type=date status=#begin_date_status noprompt > if #begin_date_status <> 0 or > isnull ($begin_date) > show (7,20) clear-line > goto BEGIN_DATE > end-if > END_DATE: > let $end_date = ' ' > show (8,20) clear-line > show (8,20) 'Enter Ending EDI Date [DD-MON-YY] ' > input $end_date type=date status=#end_date_status noprompt > if #end_date_status <> 0 or > isnull ($end_date) or > to_date($end_date,'yymmdd') < to_date($begin_date,'yymmdd') > show (8,20) clear-line > goto END_DATE > end-if > end-procedure I believe the TO_DATE function is *NOT* an SQR function but an SQL function. I suggest you use it in a SQL paragraph and then move the variables to the appropriate area. Good Luck -- ************************************************************************** Nick Moscaritolo BBBB Principal Programmer/Analyst B B B B BENTLEY COLLEGE B B MIS Dept./Waverly Hall BBBB EEEEE N N TTTTT L EEEEE Y Y 175 Forest Street B B E NN N T L E Y Y Waltham, MA 02154 B B EEEEE N N N T L EEEEE Y (617)891-2542 FAX:(617)891-2150 B B E N NN T L E Y NET: nmoscaritolo@bentley.edu BBBB EEEEE N N T LLLLL EEEEE Y ************************************************************************** From owner-sqr-users@USA.NET Wed Oct 16 07:50:20 1996 Date: Wed, 16 Oct 1996 00:17:59 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Oct 16 17:13:38 1996 Date: Wed, 16 Oct 1996 15:36:00 PST From: Jay Cleghorn Subject: Where clause in load-lookup I'm trying to use the load-lookup command but the where clause is rather long and I'd like to wrap to the next line, but I'm getting errors unless I string the whole line together. Can you line up your code in the WHERE clause of a LOAD-LOOKUP. Heres how mine looks right now: where='effdt=(select max(effdt) from ps_paygroup_tbl LUPGT1 where LUPGT1.company = LUPGT.company and LUPGT1.paygroup = LUPGT.paygroup and LUPGT1.effdt <= sysdate)' Here's how I'd like to sort of look: 'where=effdt=(select max(effdt) from ps_paygroup_tbl LUPGT1 where LUPGT1.company = LUPGT.company and LUPGT1.paygroup = LUPGT.paygroup and LUPGT1.effdt <= sysdate)' Is this possible and if so, what is the correct syntax? Can anyone help or do I just have to keep it ugly? -Jay From owner-sqr-users@USA.NET Wed Oct 16 19:28:09 1996 Date: Wed, 16 Oct 1996 05:32:38 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Wed Oct 16 21:10:51 1996 Date: Wed, 16 Oct 1996 18:14:30 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Thu Oct 17 07:46:09 1996 Date: Wed, 16 Oct 1996 22:33:10 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Thu Oct 17 07:46:17 1996 Date: Thu, 17 Oct 1996 04:02:04 PST From: SQR-USERS@USA.NET Subject: Re: Calling DOS/Windows applications > I would like to clean up the directory before I run it, and am trying something > like this: > > let $comspec = 'command /c del c:\temp\mig*.*' > call system using $comspec #status > display #status > > > I keep getting a #Status of 2, and no files have been deleted. Try specifying the full path to the command.com program file. You should be able to use the getenv SQR function to get that value from the COMSPEC environment variable. Use that value instead of the text "command" above. (I haven't done this in a while, but I think this will work. Note that you could hard-code in the full path rather than use getenv, but then your program won't work under most Windows 3.1 or NT installations because COMMAND.COM will be found in a different place.) If that still doesn't work, try doing a "dir" or even an "echo" instead of the "del" to see if you are sucessfully invoking the command interpreter. Once you get some evidence that your dos command is working, you can work on executing the dos command you really want to execute. > > I am running SQR 3 under windows 95. Also, what is the command for invoking a > windows command line? Hopefully, the string you send to the "call system using" command is executed the same was a string entered into the Start | Run... box in Windows 95. If this is true, you should be able to execute windows programs using "call system using". I haven't tried this under Windows 95, though. (Note that the only reason you need COMMAND.COM in the "del" case is that "del" is not an actual program, but is part of COMMAND.COM. If you are trying to execute actual programs then you shouldn't need COMMAND.COM, I believe.) Hope this helps. Nathan ---------------------------------------------------------------------------- Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server) nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/ From owner-sqr-users@USA.NET Thu Oct 17 11:17:36 1996 Date: Thu, 1