From sqr-users-admin@sqrug.org Tue Jul 1 00:02:31 2003 Date: Tue, 1 Jul 2003 00:00:02 -0500 From: Nathan Stratton Treadway Subject: [sqr-users] Monthly sqr-users Hints Posting sqr-users Mailing List Hints and Guidelines Nathan Stratton Treadway, Ray Ontko & Co. (nathanst@ontko.com) $Revision: 1.14 $ $Date: 2002-11-13 12:55:07-05 $ This document gathers in one location information about the sqr-users mail list. It includes instructions for changing your subscription settings (including unsubscribing), as well are guidelines for using the list. ______________________________________________________________________ Table of Contents 1. Changes Since Previous Version 2. Introduction 2.1 sqr-users Mailing List 2.2 sqr-users Hints and Guidelines Document 2.3 Related Mailing Lists 3. Interacting with the list server 3.1 Subscribing to the list 3.2 Unsubscribing from the list 3.3 Digests 3.4 Obtaining your password 3.5 Problems 4. Posting to the sqr-users List 4.1 General Guidelines 4.2 Posting a Message 4.3 Replying to a Message 5. Job Announcements ______________________________________________________________________ 1. Changes Since Previous Version Changes since the version dated 2002/04/17: o Reflect the new location of the list and the new list server software being used. 2. Introduction 2.1. sqr-users Mailing List The sqr-users mailing list was created to enable discussion related to the SQR database language from Brio Software (and to other products in the SQR product suite). Note: SQR used to be published by SQRIBE Technologies, which was merged into Brio Technology on August 3, 1999. Brio Technology changed its name to Brio Software in October 2001. SQR and related applications have also been called "Brio.Report" and "Brio Reports". The mailing list is provided as a service of Ray Ontko & Co. A searchable archive of past postings to the mailing list is available from the SQR Users Group web site . 2.2. sqr-users Hints and Guidelines Document This document gives various hints and guidelines about the sqr-users mailing list. It will be posted approximately monthly to the mailing list so that new users can see it (and existing users can find it easily). An HTML version of the document is always available at http://www.sqrug.org/sqr-users/sqr-users-hints.html. If you have comments or suggestions about this document, please contact me directly at the address listed in the title section. This document is Copyright (C) 1999-2002 by Ray Ontko & Co. It may be freely copied and distributed provided it is not modified in any way and it retains the original copyright notice. 2.3. Related Mailing Lists Here are some mailing lists that cover topics relating to SQR in some way. sqr-jobs : SQR Jobs This list may be used for posting SQR-related resumes, recruitments, job announcements, project announcments, help- wanted, work-wanted ads, etc. To join, follow the link above, or send any message to "sqr-jobs-subscribe@yahoogroups.com". peoplesoft-fans : PeopleSoft Fans Moderated list covering technical and functional aspects of PeopleSoft. To join, follow the link above, or send any message to "peoplesoft-fans-subscribe@yahoogroups.com". psusers : PeopleSoft Users For questions related to any aspect of PeopleSoft (including PeopleSoft-specific SQR issues). This list has merged with the Peoplesoft Fans mailing list and is no longer active, but the message achive can still be found at the link above. BrioSQRReport : Brio SQR Report List for discussion of SQR and SQR Developer (formerly called Brio.Report and Report Builder). To join, follow the link above, or send any message to "BrioSQRReport- subscribe@yahoogroups.com". rm-users : Report- Mart Users List for discussion of Brio Portal (previously called ReportMart). To join, follow the link above, or send a message containing the word "subscribe" in the body to "rm-users- request@sqrug.org". brioportalusersgroup : Brio Portal Users Group list List for discussion of Brio Portal. To join, follow the link above, or send any message to "brioportalusersgroup- subscribe@yahoogroups.com". brio-l : OpenITx Brio List List for technical and functional discussion of all Brio products (but most messages are currently about Brio Intelligence). To join, follow the link above. briousers : Brio.Enter- prise Users List for discussion of the Brio.Enterprise (now called Intelligence) product. To join, follow the link above, or send any message to "briousers-subscribe@yahoogroups.com". briolist : Brio List List for discussion of Brio Intelligence. To join, follow the link above, or send any message to "briolist- subscribe@yahoogroups.com". 3. Interacting with the list server The sqr-users mailing list is hosted using the MailMan list server package. All of the MailMan functions described below are accessed from the sqr-users List Info page, "http://www.sqrug.org/mailman/listinfo/sqr-users". 3.1. Subscribing to the list To subscribe to the mailing list, enter your e-mail address in the box at the top of the "Subscribing to sqr-users" section on the sqr-users List Info page, then choose a password to assign to your subscription and enter it in both "Password" boxes. This password is used to allow you to securely make changes to your subscription over the web. This password will be e-mailed back to you at varous times, so you should not use the same password as you are using elsewhere. Once you have filled in the password, click the "Subscribe" button. You should soon receive an e-mail message from the list server requesting confirmation of your subscription request. Once you have replied to this message and your subscription has been processed, you will receive a "welcome" message giving you more information on the list server, and as well as a reminder of the subscription password you chose. 3.2. Unsubscribing from the list To unsubscribe from the list, go to the sqr-users List Info page, enter your e-mail address in the "sqr-users Subscribers" section, and click the "Edit Options" button. In the page that comes up, there will be an "Unsubscribing from sqr-users" section; simply enter your password in the box there and click the "Unsubscribe" button. Assuming you enter the correct password, you will recieve a message stating "You have been unsubscribed." and the removal will take effect immediately (there is no need to send in a confirmation e-mail message). (If you have forgotton your password, see the instructions below.) 3.3. Digests You can request to get your messages in digest form (one large message containing all of the posts made each day). To do this, enter your address in the "sqr-users Subscribers" section of the sqr-users List Info page and click the "Edit Options" button. At the bottom of the resulting page, you will see a section titled "Your sqr-users Subscription Options". Change the "Set Digest Mode" option to "On", enter your subscription password in the box provided, and click the "Submit My Changes" button. (If you have forgotton your password, see the instructions below.) You actually have a choice of two different digest formats, "MIME" or "Plain Text". The MIME format sends each individual list message as a separate MIME attachment to the digest; the plain text format consists of one large text message, with all of the individual messages run together. Which format you will want to use depends on your mail- reading software (and personal preference). If you are not sure which format will work best, you can just leave the default setting of "MIME" and see if the next morning's digest is easy to read in your mail reader -- you can change to the other format at any time using that same web page. If you use digests, you should not just "reply" to the digest mailing. Instead, be sure your message's subject header matches the subject in the original posting to which you are replying, and that you don't include a quoted copy of the entire digest in your post. To restore normal distribution, simply follow the above instructions choosing the "Off" setting for the Digest option. 3.4. Obtaining your password You will not be able to unsubscribe or change your subscription options without your password. If you have forgotten your password, simply click the "Email My Password to Me" button on the Edit Options page and your password will be e-mailed to you. You will also be e- mailed a copy of your password at the beginning of each month, as part of a "mailing list memberships reminder" message from the MailMan software. 3.5. Problems If the above instructions do not work, please contact the list manager at "sqr-users-manager@sqrug.org". (Do not send a message to the list itself -- no one there can help you with your problem!) Please include a description of what you were trying to do and what exactly happened when you made the attempt. 4. Posting to the sqr-users List In order to post to the mailing list, you must be subscribed to it (see directions above). 4.1. General Guidelines For any message you send to the list, please: o make sure your mail software is not requesting a "Return Receipt". (If a "Return Receipt Requested" message is sent to the list, several dozen receipt messages will be sent out to the mailing list in reply from other subscribers.) o do not send messages in HTML or other special formats. (These are not usable by many subscribers, especially those who receive their messages in digest format.) The list server will delete these special attachments from your message and send you a warning notice. o keep in mind that over 500 people will receive your message, and that it will appear in the list archives. Try to keep your messages on-topic and relatively short. Consider sending your message directly to particular people if it won't interest many of the list's subscribers. o ignore abusive and inappropriate messages that get sent to the list, rather than getting drawn into a debate. The very nature of these messages will cause most subscribers to automatically discredit them -- no "response" is necessary. To the contrary, any response will only "add fule to the fire," prolonging the controversy and further interupting the normal conversation on the list. 4.2. Posting a Message Once you are subscribed, you can post to the list by sending a message to "sqr-users@sqrug.org". Be sure your subject heading describes your specific problem or question (i.e. don't just use "SQR Question"). In the body of your message, please include the following information: o Brio product and version number (see notes below) o Operating system and version number o Database name and version number o Application name (i.e. PeopleSoft) and a version number, if any Also, include a short code sample whenever possible. It's much easier for other people to understand what you are trying to do when they can see the actual code. (At the same time, be careful not to post confidential or proprietary code, since the posting will be placed in a public web archive.) Note that your question should relate to SQR or other Brio Report product in some way. Don't ask questions about PeopleSoft, for example, unless you are having SQR-related issues. (For PeopleSoft- specific questions, see other lists mentioned in the ``Related Mailing Lists'' section.) In 2001, PeopleSoft purchased from Brio the rights to the source code for SQR and began releasing its own line of SQR. PeopleSoft's SQR version numbering is different from Brio's, so it's very important to mention whether you are using Brio's "SQR" or "SQR for PeopleSoft". (This info is included automatically if you include the full SQR version-id string as described below.) To get the version-id string for your copy of SQR, you can run the following program: begin-program show $sqr-ver end-program This will produce a line that looks something like this: SQR/3.0.15/Intel/SCO Unix R3.2 V5.0/Oracle 7.2.2.3/Sep 25 1996 Include the full line of output in your message. Note that the oper- ating system version number listed here is the one under which this copy of SQR was compiled, so you'll still need to include this infor- mation for your own environment. In a command-line environment (Unix, etc.), you can also get this version-id string by saying sqr -id 4.3. Replying to a Message Messages sent out on the list have a Reply-To header pointing to the list. This means that you should be able to simply use your mail reader's "reply" function to send a reply to the list. Generally, all answers to questions sent out on the list should be public replies, so that other subscribers can benefit. In those cases where a private reply is appropriate, be sure to over-ride the default Reply-To address. If your message is not actually a reply to the earlier message, please do not use the "reply" function. Instead, address a new e-mail message to the list as described in the previous section. (This is because the list archives will incorrectly show the new message in the original thread if you use "reply".) You should quote enough lines from the original message that later readers can understand your answer even if they missed the original question. At the same time, you should remove any unnecessary lines from the quote in order to make your message shorter and easier to understand. (Remember that some people read the mailing list in digest form, and the digests become much larger if unnecessary lines are quoted.) 5. Job Announcements Please do not post job announcements on the sqr-users list, but use the sqr-jobs list instead. (See ``Related Mailing Lists'' for more information on this list.) A large number of sqr-users subscribers do not want to receive job announcements (for various reasons) and such posts tend to cause a lot of disruption of the discussion on the list. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 00:14:01 2003 From: "Umesh R. Neeli" Subject: RE: [sqr-users] Installing one/administrator Date: Wed, 2 Jul 2003 10:45:42 +0530 Thank you Franck. Regards, Umesh R. Neeli -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Franck Masson Sent: Wednesday, June 25, 2003 7:13 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Installing one/administrator 1/ OneADmin You can install it either on windows or on Unix it does not matter. You may have an issue only if you customize the authentication server in this case install it on unix. I will recommand you to install it on both on the desktop you need lot of memory, if you have not this configuration use X11 server on windows to launch OneAdmin on the server. 2/Client There is 2 modules in OneAdministrator OnePublisher to administrate only the repository this module is available as a java applet OneAdministrator to manage repository, users, services This module is available as a desktop application but can be share on a file server. 3/ Installation I will recommand the Desktop application, it is faster as it do not have to download the applet every time you need it. 4/ Win98/ winNT Win 98 is not really a desktop for IT administrator or Developper Move to NT workstation or 2000 Franck, -----Original Message----- From: Umesh R. Neeli [mailto:umesh.neeli@patni.com] Sent: mercredi 25 juin 2003 15:19 To: sqr-users@sqrug.org Subject: [sqr-users] Installing one/administrator Hi, We have the following Brio installation setup 1. Brio One Webclient is installed on NT machine 2. Brio Portal services and repository are installed on Unix HP machine Now I want to install One/Administrator Can anyone kindly tell me if I need to install One/Administrator on unix server or on my development PC (windows 98, windows NT) If unix how can One/Administrator be accessed through the web browser If windows (98, NT) Then a. I do not think Brio.Portal repository also needs to be on NT. Please confirm. b. I was going through the instructions (Installing Brio Portal 7.0.3 on windows system), It says that Brio Portal can run on Windows NT 4.0 with Service pack 3 or Windows 2000. Does this mean that One/Administrator also cannot be installed on Windows 98, Is it OK if the operating system is Windows NT 4.0 with service pack 6. c. Should the desktop version be installed on individual developers PC or better to install browser version. Mostly only one person will be using the One/Administrator. Please advise Thanking you, Regards, Umesh R. Neeli _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.290 / Virus Database: 155 - Release Date: 23/10/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.290 / Virus Database: 155 - Release Date: 23/10/2001 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 00:18:05 2003 From: "Umesh R. Neeli" Date: Wed, 2 Jul 2003 10:49:14 +0530 Subject: [sqr-users] Error while executing Hi, I am trying to execute a simple SQR program suing sqrw. While executing it gives me the following error (SQR 5528) ORACLE OCIServerAttach error 12154 in cursor 0: ORA-12154: TNS:could not resolve service name (SQR 4701) Cannot logon to the database. SQR: Program Aborting. I am able to access the database through Toad. Through report builder I am able to connect to the database and create the report but while executing from Report Builder again it gives me the same error. The database entry does exist in the tnsnames.ora file. Please let me know how to solve this. Thanking you, Regards, Umesh R. Neeli _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 02:29:14 2003 Date: Wed, 02 Jul 2003 17:26:14 +1000 From: Steve Cavill Subject: RE: [sqr-users] Error while executing Report builder uses ODBC, whereas SQRW uses OCI so that could explain why one works and the other does not. I'm not sure how toad connects. Can you connect using the same connect string (host name) with SQL*plus? Can you also try tnsping? Steve. -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Umesh R. Neeli Sent: Wednesday, 2 July 2003 3:19 PM To: sqr-users@sqrug.org Subject: [sqr-users] Error while executing Hi, I am trying to execute a simple SQR program suing sqrw. While executing it gives me the following error (SQR 5528) ORACLE OCIServerAttach error 12154 in cursor 0: ORA-12154: TNS:could not resolve service name (SQR 4701) Cannot logon to the database. SQR: Program Aborting. I am able to access the database through Toad. Through report builder I am able to connect to the database and create the report but while executing from Report Builder again it gives me the same error. The database entry does exist in the tnsnames.ora file. Please let me know how to solve this. Thanking you, Regards, Umesh R. Neeli _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 02:32:09 2003 From: "Steve Cavill" Subject: RE: [sqr-users] Rendering an eps-file Date: Wed, 2 Jul 2003 17:31:31 +1000 According to the sqr reference, under declare-image: 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. Note: If the file is not in the SQRDIR directory, the full path or no path should be given. A relative path will not do since you need to know where you execute the file from. If you don't want to specify the path, it should also work if the source file is in the same directory that you are in when you execute the sqrw command. Steve. -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Parks, Sam Sent: Tuesday, 1 July 2003 4:18 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Rendering an eps-file Subject: Rendering an eps-file When I try and render an eps-file I get a box and a diagonally line through it. Does anyone have any idea? The postscript file that gets created and the eps file are located in the same directory when I try to look at my document. Thanks begin-program do main end-program begin-setup declare printer type = postscript orientation = portrait left-margin = 1.0 declare-image orclogo type = eps-file source = 'orclogops.eps' image-size = (40,4) end-declare end-setup begin-procedure main print-image orclogo (5,5) end-procedure main Sam Parks 1-310-846-4218 email: sam.parks@orcinc.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 02:39:05 2003 Date: Wed, 02 Jul 2003 17:36:20 +1000 From: Steve Cavill Subject: RE: [sqr-users] Unable to Move or Del from CALL SYSTEM... It does look like the files are open. The difference between move and copy of course is that move attempts to delete the files after copying them, but copy does not. You could test by calling a bat file which issues a pause command instead of the move command, then try to move the files manually in a cod window. If the manual move fails then you can work try to work out why the files cannot be deleted. Of course if the manual move DOES work then I have no idea :-) Steve. -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Ross, Steven Sent: Saturday, 28 June 2003 4:49 AM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] Unable to Move or Del from CALL SYSTEM... The program closes all files prior to trying to move them. Also, 'copy' works for us; it's 'move' that doesn't work...go figure. Again, any help would be appreciated. TIA, Steven Ross Applications Developer/Analyst sross@kcm.org -----Original Message----- From: Stephen Ratliff [mailto:stephenratliff@hotmail.com] Sent: Wednesday, June 25, 2003 6:08 PM To: sross@kcm.org Subject: Re: [sqr-users] Unable to Move or Del from CALL SYSTEM... Try this. ALSO BE SURE THE FILE(S) YOU ARE MOVING ARE CLOSED. I have made that mistake many times. You cannot move/delete/rename opened files. (IMPORTPREFIX is #define'd and referenced to SETENV.sqc for the UNC path for files) $File_complete is the filename. You should be able to put *.* in its place. let $ofile1 = '{IMPORTPREFIX}' || '\Procard\Archive\' let $ifile1 = '{IMPORTPREFIX}' || '\Procard\Input\' let $rcp1 = 'cmd /c copy ' let $copy-command = $rcp1 || $ifile1 || $file_complete || ' ' || $ofile1 CALL SYSTEM using $copy-command #command-status WAIT Stephen Ratliff -The problem with democracy is that it counts the number of heads not their content. ----Original Message Follows---- From: "Ross, Steven" To: "'sqr-users@sqrug.org'" Subject: [sqr-users] Unable to Move or Del from CALL SYSTEM... Date: Wed, 25 Jun 2003 16:57:34 -0500 Hello, We have a process which backs up output files, and another one that moves output files. Both use the CALL SYSTEM syntax to perform a system command. However the 'move' routine fails, while the 'backup' routine succeeds. I've worked with our LAN people, and have eliminated Permissions as a cause. Here are the particulars: OS: Windows 2000 Server Backup command: C:\WINNT\system32\cmd.exe /c xcopy /y "\\kcmfp1\FDEV\operations\USA\Step2_Out\SPECIAL\*.*" "\\kcmfp1\FDEV\operations\USA\Step2_Out\SPECIAL\20030625_976690\" Move command: C:\WINNT\system32\cmd.exe /c move /y "\\kcmfp1\FDEV\operations\USA\Step2_Out\SPECIAL\*.*" "\\kcmfp1\FDEV\operations\USA\Step2_Out\SPECIAL\Completed" These commands are both called in the same way: CALL SYSTEM USING $kc_cmd #ReturnValue WAIT Where $kc_cmd is the command line(s) above. The #ReturnValue = 1, which Win2K says is: "Incorrect function." Any help would be GREATLY appreciated, Thanks, Steven Ross Applications Developer/Analyst IT Mailings Coordinator Kenneth Copeland Ministries sross@kcm.org 817-252-2844 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 07:59:13 2003 From: "Ashish Bhatt" Date: Wed, 2 Jul 2003 07:57:44 -0500 Subject: [sqr-users] Running SQRs in Mainframe with DB2 database Hi All, I hope you are doing fine today. Is anyone of you running SQRs in Mainframe with DB2 as the backend database ? If yes, please share with me your experiences. I have worked on SQRs in UNIX with Oracle as the backend database. I used to have TOAD as the tool to view Oracle data. Is there any similar tool like TOAD for DB2 on Mainframe to view the DB2 data ? Please reply. Thanks in advance. Have a nice day and great week. Regards. Ashish Bhatt. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 08:19:07 2003 From: EricRection@aol.com Date: Wed, 2 Jul 2003 09:18:03 EDT Subject: Re: [sqr-users] Running SQRs in Mainframe with DB2 database There's a mainframe thing called SPUFI for executing SQL. Remember to change those square brackets to double slashes... The three most useless things in the world: 1. A nun's tits 2. The Pope's balls 3. DB2 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 10:28:20 2003 Subject: RE: [sqr-users] Running SQRs in Mainframe with DB2 database Date: Wed, 2 Jul 2003 10:27:41 -0500 From: "Knapp, Richard" Ahhh... the burdens we all must bear. Interesting association - IBM and The Catholic Church. Richard (Papa) Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: EricRection@aol.com [mailto:EricRection@aol.com] Sent: Wednesday, July 02, 2003 8:18 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Running SQRs in Mainframe with DB2 database There's a mainframe thing called SPUFI for executing SQL. Remember to change those square brackets to double slashes... The three most useless things in the world: 1. A nun's tits 2. The Pope's balls 3. DB2 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 10:35:05 2003 Subject: RE: [sqr-users] Error while executing Date: Wed, 2 Jul 2003 10:34:45 -0500 From: "Knapp, Richard" Toad uses SQLNet but uses a different tnsnames file than SQRW (by default). Toad uses the tnsnames file on your local machine and SQRW probably will use a networked orahome. Make sure both tnsnames files contain the same stuff and you will be fine. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: Steve Cavill [mailto:steve.cavill@infoclarity.com.au] Sent: Wednesday, July 02, 2003 2:26 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Error while executing Report builder uses ODBC, whereas SQRW uses OCI so that could explain why one works and the other does not. I'm not sure how toad connects. Can you connect using the same connect string (host name) with SQL*plus? Can you also try tnsping? Steve. -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Umesh R. Neeli Sent: Wednesday, 2 July 2003 3:19 PM To: sqr-users@sqrug.org Subject: [sqr-users] Error while executing Hi, I am trying to execute a simple SQR program suing sqrw. While executing it gives me the following error (SQR 5528) ORACLE OCIServerAttach error 12154 in cursor 0: ORA-12154: TNS:could not resolve service name (SQR 4701) Cannot logon to the database. SQR: Program Aborting. I am able to access the database through Toad. Through report builder I am able to connect to the database and create the report but while executing from Report Builder again it gives me the same error. The database entry does exist in the tnsnames.ora file. Please let me know how to solve this. Thanking you, Regards, Umesh R. Neeli _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 11:12:50 2003 From: PSFTPROGRAMMER@aol.com Date: Wed, 2 Jul 2003 12:11:11 EDT Subject: Re: [sqr-users] Error while executing I use Toad, and is uses my same log-in and password as SQRW. This is different than my typical username/password when accessing the database using my front-end software. This is something that had to be set up for us by the DBA. Hope this helps, Denise _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 12:23:18 2003 Date: 2 Jul 2003 17:19:50 -0000 From: "Chandra Yarlagadda" Subject: [sqr-users] Want to know the database name Hi I want to find out what database the user has logged in when launching the SQR. Any help is appreciated. Thanks, Chandra ___________________________________________________ Click below to experience Sooraj R Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek & Kareena http://www.mpkdh.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 12:27:05 2003 Subject: RE: [sqr-users] Want to know the database name Date: Wed, 2 Jul 2003 12:26:34 -0500 From: "Knapp, Richard" If it's a PeopleSoft db, you can query psdbowner. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: Chandra Yarlagadda [mailto:yarlagaddacs@rediffmail.com] Sent: Wednesday, July 02, 2003 12:20 PM To: sqr-users@sqrug.org Subject: [sqr-users] Want to know the database name Hi I want to find out what database the user has logged in when launching the SQR. Any help is appreciated. Thanks, Chandra ___________________________________________________ Click below to experience Sooraj R Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek & Kareena http://www.mpkdh.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 12:38:06 2003 Subject: RE: [sqr-users] Want to know the database name Date: Wed, 2 Jul 2003 13:37:30 -0400 From: "Wright, Rodney" The following will do the trick if you're running in SQL Server: Begin-Select DB_NAME() &DBName Show 'Running in ' &DBName End-Select Rod Wright Senior Applications Specialist The Rouse Company 410-992-6307 -----Original Message----- From: Chandra Yarlagadda [mailto:yarlagaddacs@rediffmail.com] Sent: Wednesday, July 02, 2003 1:20 PM To: sqr-users@sqrug.org Subject: [sqr-users] Want to know the database name Hi I want to find out what database the user has logged in when launching the SQR. Any help is appreciated. Thanks, Chandra ___________________________________________________ Click below to experience Sooraj R Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek & Kareena http://www.mpkdh.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users The information contained in this transmission is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this communication is strictly prohibited. If you have received this e-mail in error, please contact the sender by reply e-mail and destroy all paper and electronic copies of the original message. 쪿왨x%lʫm 0ʫj)fjb?ǫ From sqr-users-admin@sqrug.org Wed Jul 2 12:47:05 2003 Subject: RE: [sqr-users] Want to know the database name Date: Wed, 2 Jul 2003 13:45:53 -0400 From: "Wright, Rodney" I don't know if my previous reply made it through, but if you're using SQL Server, this will do the trick: Begin-Select DB_NAME() &DBName Show 'Running in ' &DBName End-Select Rod Wright Senior Applications Specialist The Rouse Company 410-992-6307 -----Original Message----- From: Chandra Yarlagadda [mailto:yarlagaddacs@rediffmail.com] Sent: Wednesday, July 02, 2003 1:20 PM To: sqr-users@sqrug.org Subject: [sqr-users] Want to know the database name Hi I want to find out what database the user has logged in when launching the SQR. Any help is appreciated. Thanks, Chandra ___________________________________________________ Click below to experience Sooraj R Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek & Kareena http://www.mpkdh.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users The information contained in this transmission is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this communication is strictly prohibited. If you have received this e-mail in error, please contact the sender by reply e-mail and destroy all paper and electronic copies of the original message. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 12:49:06 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] Want to know the database name Date: Wed, 2 Jul 2003 10:53:25 -0700 When I'm running from the Peoplesoft process scheduler in version 8, its command line includes the database name. The Stdapi-Init procedure calls the Get-Run-Control-Parms procedure, which puts that value in $database_name. I don't know about other versions of Peoplesoft. -----Original Message----- From: Chandra Yarlagadda [mailto:yarlagaddacs@rediffmail.com] Sent: Wednesday, July 02, 2003 10:20 AM To: sqr-users@sqrug.org Subject: [sqr-users] Want to know the database name Hi I want to find out what database the user has logged in when launching the SQR. Any help is appreciated. Thanks, Chandra ___________________________________________________ Click below to experience Sooraj R Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek & Kareena http://www.mpkdh.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 12:58:05 2003 Date: Wed, 02 Jul 2003 19:51:11 +0200 From: LEBLANC Philippe FTC Subject: [sqr-users] =?ISO-8859-1?Q?R=E9p.=20:=20RE:=20[sqr-users]=20Want=20to=20know?==?ISO-8859-1?Q?=20the=20database=20name?= With Oracle try this select command within Sqr: SELECT name &BASENAME FROM v$database Philippe LEBLANC France Tlcom Cble _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 13:00:07 2003 Subject: RE: [sqr-users] Want to know the database name From: apthornton@nisource.com Date: Wed, 2 Jul 2003 13:59:05 -0400 If you want to, you can select the database name from the database, but I'm fairly sure that the exact syntax is DB-dependant. On Oracle, you can use this: BEGIN-SELECT VS.NAME Move &VS.Name to $name FROM V$DATABASE VS END-SELECT I think other databases have similar ways of doing this. Allen Thornton "Alexander, Steve" To: "'sqr-users@sqrug.org'" Subject: RE: [sqr-users] Want to know the database name Sent by: sqr-users-admin@ sqrug.org 07/02/2003 01:53 PM Please respond to sqr-users When I'm running from the Peoplesoft process scheduler in version 8, its command line includes the database name. The Stdapi-Init procedure calls the Get-Run-Control-Parms procedure, which puts that value in $database_name. I don't know about other versions of Peoplesoft. -----Original Message----- From: Chandra Yarlagadda [mailto:yarlagaddacs@rediffmail.com] Sent: Wednesday, July 02, 2003 10:20 AM To: sqr-users@sqrug.org Subject: [sqr-users] Want to know the database name Hi I want to find out what database the user has logged in when launching the SQR. Any help is appreciated. Thanks, Chandra ___________________________________________________ Click below to experience Sooraj R Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek & Kareena http://www.mpkdh.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 15:17:21 2003 From: RHudgins@genencor.com Date: Wed, 2 Jul 2003 16:15:23 -0400 Subject: [sqr-users] sqr and pdf file Has any one had trouble with misc. characters appearing in the pdf file that is created by doing -printer:pd? The spf file looks fine, but the pdf seems to throw in font names and other characters in a random fashion for me. Thanks! Rhonda Hudgins @}---'----,---- Genencor International, Inc 585/256-5266 rhudgins@genencor.com -------------------------------------------------------------------------- This message (including any attachments) may contain information which is confidential or privileged. Use, dissemination, distribution, or reproduction of this message by unintended recipients is not authorized and may be unlawful. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. -------------------------------------------------------------------------- _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 16:14:08 2003 Date: Wed, 2 Jul 2003 14:13:16 -0700 (PDT) From: Clara Carter Subject: Re: [sqr-users] sqr and pdf file Yes, we had to go to V6.2 to take care of that problem. I still get it once in a while in the windows version but is completely gone in the unix version. Clara --- RHudgins@genencor.com wrote: > Has any one had trouble with misc. characters > appearing in the pdf file > that is created by doing -printer:pd? > > The spf file looks fine, but the pdf seems to throw > in font names and > other characters in a random fashion for me. > > Thanks! > > Rhonda Hudgins > @}---'----,---- > Genencor International, Inc > 585/256-5266 > rhudgins@genencor.com > > -------------------------------------------------------------------------- > This message (including any attachments) may contain > information > which is confidential or privileged. Use, > dissemination, distribution, > or reproduction of this message by unintended > recipients is not > authorized and may be unlawful. If you are not the > intended > recipient, please advise the sender immediately by > reply e-mail and > delete this message and any attachments without > retaining a copy. > -------------------------------------------------------------------------- > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 2 18:08:20 2003 From: "Paul Hoyte" Subject: RE: [sqr-users] Running SQRs in Mainframe with DB2 database Date: Wed, 2 Jul 2003 19:07:14 -0400 You might want to check out Quest for DB2 - it's a great tool for the DB2 environment. Paul Hoyte (248) 752-6970 Cell (248) 559-6868 Office (248) 559-6875 Fax paul.hoyte@sharidionne.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf Of Ashish Bhatt Sent: Wednesday, July 02, 2003 8:58 AM To: sqr-users@sqrug.org Subject: [sqr-users] Running SQRs in Mainframe with DB2 database Hi All, I hope you are doing fine today. Is anyone of you running SQRs in Mainframe with DB2 as the backend database ? If yes, please share with me your experiences. I have worked on SQRs in UNIX with Oracle as the backend database. I used to have TOAD as the tool to view Oracle data. Is there any similar tool like TOAD for DB2 on Mainframe to view the DB2 data ? Please reply. Thanks in advance. Have a nice day and great week. Regards. Ashish Bhatt. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 3 09:03:42 2003 From: "Ashish Bhatt" Subject: Re: [sqr-users] Running SQRs in Mainframe with DB2 database Date: Thu, 3 Jul 2003 09:02:28 -0500 Paul, have you ever worked on SQRs on mainframe ? ----- Original Message ----- From: "Paul Hoyte" To: Sent: Wednesday, July 02, 2003 6:07 PM Subject: RE: [sqr-users] Running SQRs in Mainframe with DB2 database > You might want to check out Quest for DB2 - it's a great tool for the DB2 > environment. > > Paul Hoyte > (248) 752-6970 Cell > (248) 559-6868 Office > (248) 559-6875 Fax > paul.hoyte@sharidionne.com (Email) > www.sharidionne.com (Web Site) > > > -----Original Message----- > From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf > Of Ashish Bhatt > Sent: Wednesday, July 02, 2003 8:58 AM > To: sqr-users@sqrug.org > Subject: [sqr-users] Running SQRs in Mainframe with DB2 database > > > Hi All, > > I hope you are doing fine today. > > Is anyone of you running SQRs in Mainframe with DB2 as the backend database > ? If yes, please share with me your experiences. > > I have worked on SQRs in UNIX with Oracle as the backend database. I used to > have TOAD as the tool to view Oracle data. > > Is there any similar tool like TOAD for DB2 on Mainframe to view the DB2 > data ? > > Please reply. > > Thanks in advance. > > Have a nice day and great week. > > Regards. > > Ashish Bhatt. > > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 3 09:14:06 2003 Subject: RE: [sqr-users] Running SQRs in Mainframe with DB2 database Date: Thu, 3 Jul 2003 09:12:51 -0500 From: "Sengupta, Rajib (CAG-CC-Contractor)" Ashish, We run SQR V 4 in IBM Mainframe(OS/390) with DB2 database for Peoplesoft Financial. Let me know what exactly you want? Thanks, Rajib Rajib Sengupta Systems Analyst and Team Lead Peoplesoft Financial Consultant Conagra Business Systems Phone: 402-595-5749 -----Original Message----- From: Ashish Bhatt [mailto:ashish_bhatt@hotmail.com] Sent: Thursday, July 03, 2003 9:02 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Running SQRs in Mainframe with DB2 database Paul, have you ever worked on SQRs on mainframe ? ----- Original Message ----- From: "Paul Hoyte" To: Sent: Wednesday, July 02, 2003 6:07 PM Subject: RE: [sqr-users] Running SQRs in Mainframe with DB2 database > You might want to check out Quest for DB2 - it's a great tool for the DB2 > environment. > > Paul Hoyte > (248) 752-6970 Cell > (248) 559-6868 Office > (248) 559-6875 Fax > paul.hoyte@sharidionne.com (Email) > www.sharidionne.com (Web Site) > > > -----Original Message----- > From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf > Of Ashish Bhatt > Sent: Wednesday, July 02, 2003 8:58 AM > To: sqr-users@sqrug.org > Subject: [sqr-users] Running SQRs in Mainframe with DB2 database > > > Hi All, > > I hope you are doing fine today. > > Is anyone of you running SQRs in Mainframe with DB2 as the backend database > ? If yes, please share with me your experiences. > > I have worked on SQRs in UNIX with Oracle as the backend database. I used to > have TOAD as the tool to view Oracle data. > > Is there any similar tool like TOAD for DB2 on Mainframe to view the DB2 > data ? > > Please reply. > > Thanks in advance. > > Have a nice day and great week. > > Regards. > > Ashish Bhatt. > > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Sun Jul 6 02:40:39 2003 From: "Serene Yeo" Date: Sun, 06 Jul 2003 15:36:00 +0800 Subject: [sqr-users] Re: [sqr-users]Rendering an eps-file Hi Sam, I have encountered this problem before, think it's due to ur conversion of your image. You can check the contents of the image file by opening with a text editor. It should be a postscript file. You can use software such as ImageMagic K to convert Regards, Serene _________________________________________________________________ Keep track of Singapore stock prices. http://www.msn.com.sg/money/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Sun Jul 6 11:47:34 2003 From: RVas157927@aol.com Date: Sun, 6 Jul 2003 12:45:06 EDT Subject: [sqr-users] Re:PeopleSoft Recruitment Letters Hello all, We are in the process of upgrading to Psoft 8.3. I am a novice in SQR and have modified the delivered SQR for the recruitment letters, but am having a problem with pulling data for applicants that do not exist in the interview_schedule tables. Can anyone help? Thanks _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Sun Jul 6 11:56:17 2003 From: EricRection@aol.com Date: Sun, 6 Jul 2003 12:54:45 EDT Subject: Re: [sqr-users] Re:PeopleSoft Recruitment Letters Umm... How about you do an SQR based on a query along the lines of SELECT stuff FROM whereever WHERE EMPLID NOT IN interview_schedule tables? Hope my bullshit isn't too transparent. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Sun Jul 6 12:26:09 2003 From: EricRection@aol.com Date: Sun, 6 Jul 2003 13:24:53 EDT Subject: Re: [sqr-users] Re:PeopleSoft Recruitment Letters OK, so specifically it would be SELECT stuff FROM whereever WHERE NOT EXISTS (SELECT 'X' FROM interview_tables WHERE whereever.EMPLID=interview_tables.EMPLID). _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 7 12:53:04 2003 From: "David Thorburn" Subject: Re: [sqr-users] Re:PeopleSoft Recruitment Letters Date: Mon, 7 Jul 2003 10:50:21 -0700 Do you require the services of an SQR consultant? ---------------------------------------------------------------------------- ----------------- David Thorburn (916) 712-2272 thorburn@conl.net www.geocities.com\david_thorburn ---------------------------------------------------------------------------- ----------------- ----- Original Message ----- From: To: Sent: Sunday, July 06, 2003 9:45 AM Subject: [sqr-users] Re:PeopleSoft Recruitment Letters > Hello all, > > We are in the process of upgrading to Psoft 8.3. I am a novice in SQR and > have modified the delivered SQR for the recruitment letters, but am having a > problem with pulling data for applicants that do not exist in the > interview_schedule tables. Can anyone help? > > Thanks > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 8 03:00:47 2003 From: "Serene Yeo" Date: Tue, 08 Jul 2003 15:55:56 +0800 Subject: [sqr-users] Print footer on last page of letter Hi all, I have a few set of letters that is required to print footer on every pages but a different footer on last page of letter. All footer printed are coded in the begin-footing section. I have searched through the forum and find out the after-report=fin-report. But the thing is how can I code in order for this to point to the begin-footing 100 name=footerlastPg. Because if I print the details in the fin-report procedure. it seems it is printed in the detail section and is not aligned with all other pages. I need to standardised all. The following is my code: Begin-Setup Declare-Layout Default Orientation = Portrait Paper-Size = (A4) Top-Margin = 0.591 Bottom-Margin = 0.591 Left-Margin = 0.591 Right-Margin = 0.591 Line-Height = 1 Char-Width = 1 End-Declare declare-procedure after-report=fin_report end-declare End-Setup begin-footing 50 Print 'This is the footing' (10,20) end-footing begin-footing 100 name=footerlastPg Print 'This is the footing on last page' (20,20) end-footing !******** This procedure does not have effect in the footing section on last page********** begin-procedure fin_report alter-report footing=footerlastPg end-procedure Will appreciate all of your help. Thanks. Regards, Serene _________________________________________________________________ Get 10mb of inbox space with MSN Hotmail Extra Storage http://join.msn.com/?pgmarket=en-sg at only S$36 including GST _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 8 04:46:24 2003 Date: Tue, 08 Jul 2003 19:43:18 +1000 From: Steve Cavill Subject: RE: [sqr-users] Print footer on last page of letter Hi Serene, you're nearly there. Unfortunately, the alter-printer command takes effect on the next page to be printed, so as you are already on the last page it will never take effect. But you can still use the after-report syntax, and use a flag to indicate in the footing section to print something different on the last page. e.g. Begin-Setup declare-procedure after-report=fin_report end-declare End-Setup begin-program while #count < 200 print #count (1,1) next-listing add 1 to #count end-while end-program begin-footing 5 if #last_page=1 Print 'This is the footing on last page' (1,20) else Print 'This is the footing' (1,20) end-if end-footing begin-procedure fin_report let #last_page=1 end-procedure Cheers, Steve. -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Serene Yeo Sent: Tuesday, 8 July 2003 5:56 PM To: sqr-users@sqrug.org Subject: [sqr-users] Print footer on last page of letter Hi all, I have a few set of letters that is required to print footer on every pages but a different footer on last page of letter. All footer printed are coded in the begin-footing section. I have searched through the forum and find out the after-report=fin-report. But the thing is how can I code in order for this to point to the begin-footing 100 name=footerlastPg. Because if I print the details in the fin-report procedure. it seems it is printed in the detail section and is not aligned with all other pages. I need to standardised all. The following is my code: Begin-Setup Declare-Layout Default Orientation = Portrait Paper-Size = (A4) Top-Margin = 0.591 Bottom-Margin = 0.591 Left-Margin = 0.591 Right-Margin = 0.591 Line-Height = 1 Char-Width = 1 End-Declare declare-procedure after-report=fin_report end-declare End-Setup begin-footing 50 Print 'This is the footing' (10,20) end-footing begin-footing 100 name=footerlastPg Print 'This is the footing on last page' (20,20) end-footing !******** This procedure does not have effect in the footing section on last page********** begin-procedure fin_report alter-report footing=footerlastPg end-procedure Will appreciate all of your help. Thanks. Regards, Serene _________________________________________________________________ Get 10mb of inbox space with MSN Hotmail Extra Storage http://join.msn.com/?pgmarket=en-sg at only S$36 including GST _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 8 11:51:57 2003 From: "Mezzullo, Paul" Date: Tue, 8 Jul 2003 12:55:57 -0400 Subject: [sqr-users] CALL SYSTEM COMMAND Hi, I'm using the following code (below) to print a file from an SQR running on a Windows2000 machine and it works fine. However, when I run the same SQR code on a Windows98 machine, it does not work?? I understand there's no 'CMD' on Windows98 and instead 'COMMAND', I tried that modification and it still does not work, does anyone know how to modify the CALL SYSTEM COMMAND for Windows98? Thanks for your help ... !** printing an SQR lis file from Windows2000 ** let $command_str_3 = 'cmd /c copy c:\temp\abs_main.lis lpt5' CALL SYSTEM USING $Command_str_3 #return_status NOWAIT - Paul M. Mezzullo Pmezzull@esboces.org _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 8 14:20:41 2003 Subject: RE: [sqr-users] CALL SYSTEM COMMAND Date: Tue, 8 Jul 2003 14:17:49 -0500 From: "Knapp, Richard" You just have to figure out how to invoke the command interperter - maybe it has a different name and/or needs the full path. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: Mezzullo, Paul [mailto:pmezzull@esboces.org] Sent: Tuesday, July 08, 2003 11:56 AM To: SQR RUG (E-mail) Subject: [sqr-users] CALL SYSTEM COMMAND Hi, I'm using the following code (below) to print a file from an SQR running on a Windows2000 machine and it works fine. However, when I run the same SQR code on a Windows98 machine, it does not work?? I understand there's no 'CMD' on Windows98 and instead 'COMMAND', I tried that modification and it still does not work, does anyone know how to modify the CALL SYSTEM COMMAND for Windows98? Thanks for your help ... !** printing an SQR lis file from Windows2000 ** let $command_str_3 = 'cmd /c copy c:\temp\abs_main.lis lpt5' CALL SYSTEM USING $Command_str_3 #return_status NOWAIT - Paul M. Mezzullo Pmezzull@esboces.org _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 9 13:46:37 2003 From: "Mark Hall" Date: Wed, 09 Jul 2003 13:43:17 -0500 Subject: [sqr-users] PDFLib Error (9): Page size must be positive We are upgrading from PSoft HR 7.5 to Psoft HR 8.8. When I run a certain report with the output type of Web and the Format PDF I get the following error: "PDFLib Error (9): Page size must be positive." Has anyone encountered this problem before? If so how did you fix it? Mark Hall IS Analyst ERP Team 260-373-8796 mark.hall@parkview.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 10 03:57:23 2003 From: Kajal Somaiya Subject: RE: [sqr-users] CALL SYSTEM COMMAND Date: Thu, 10 Jul 2003 14:20:35 +0530 please try using this command "cmd /c type c:\temp\abs_main.lis > prn" this will work only if the printer driver for dos has been installed. regds kajal -----Original Message----- From: Mezzullo, Paul [mailto:pmezzull@esboces.org] Sent: Tuesday, July 08, 2003 10:26 PM To: SQR RUG (E-mail) Subject: [sqr-users] CALL SYSTEM COMMAND Hi, I'm using the following code (below) to print a file from an SQR running on a Windows2000 machine and it works fine. However, when I run the same SQR code on a Windows98 machine, it does not work?? I understand there's no 'CMD' on Windows98 and instead 'COMMAND', I tried that modification and it still does not work, does anyone know how to modify the CALL SYSTEM COMMAND for Windows98? Thanks for your help ... !** printing an SQR lis file from Windows2000 ** let $command_str_3 = 'cmd /c copy c:\temp\abs_main.lis lpt5' CALL SYSTEM USING $Command_str_3 #return_status NOWAIT - Paul M. Mezzullo Pmezzull@esboces.org _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 10 08:39:58 2003 From: "Mezzullo, Paul" Date: Thu, 10 Jul 2003 09:45:29 -0400 Subject: [sqr-users] CALL SYSTEM COMMAND Thanks for your help everyone. I've included my CALL SYSTEM COMMANDs below for future reference. All three are functioning perfectly .... !******* Set printer paths ******* let $command_str_1 = 'net use lpt5 \\printer\path ' CALL SYSTEM USING $Command_str_1 #return_status NOWAIT !**** Windows98 Environment **** let $command_str_2 = GETENV('COMSPEC') || ' /c copy c:\abs_main.lis lpt5 ' CALL SYSTEM USING $Command_str_2 #return_status NOWAIT !**** Windows2000 Environment **** let $command_str_3 = 'cmd /c copy c:\abs_main.lis lpt5' CALL SYSTEM USING $Command_str_3 #return_status NOWAIT Paul M. Mezzullo pmezzull@esboces.org _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 10 14:20:41 2003 From: "Cumberbatch, Keith R" Date: Thu, 10 Jul 2003 15:18:02 -0400 Subject: [sqr-users] spaces and -F command line option I'm using SQRW 4.3.2.1 on Windows2000. Is there a way to get the -F option to recognize directories and/or files with spaces. The only workaround I found was to use the DOS short names. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 10 14:32:06 2003 Subject: Re: [sqr-users] spaces and -F command line option From: Ramzi_Salameh@daveandbusters.com Date: Thu, 10 Jul 2003 14:31:05 -0500 I'm not sure if this would work in the -F on the SQR command line, but you can use the windows long name at the command prompt if you wrap the path/filename in quotes. i.e. "C:\Program Files\Microsoft Office\........." You might try that and see if it works. HTH ------------------------------------------------ Ramzi Salameh PeopleSoft Technical Analyst Dave & Busters, Inc. Voice (214) 904-2550 Fax (214) 350-0941 ------------------------------------------------ "Cumberbatch, Keith R" To: "'sqr-users@sqrug.org'" Subject: [sqr-users] spaces and -F command line option Sent by: sqr-users-admin@sqru g.org 07/10/03 02:18 PM Please respond to sqr-users I'm using SQRW 4.3.2.1 on Windows2000. Is there a way to get the -F option to recognize directories and/or files with spaces. The only workaround I found was to use the DOS short names. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 11 08:11:25 2003 Subject: RE: [sqr-users] PDFLib Error (9): Page size must be positive Date: Fri, 11 Jul 2003 09:09:12 -0400 From: "Wright, Rodney" If I remember correctly, this is caused by having what SQR considers "old" printer commands (for example DECLARE PRINTER rather than DECLARE-PRINTER, or PAGE-SIZE rather than MAX-LINES in DECLARE-LAYOUT). You can get rid of the error message by replacing all of the old printer commands with their newer counterparts. Rod Wright Senior Applications Specialist The Rouse Company 410-992-6307 -----Original Message----- From: Mark Hall [mailto:Mark.Hall@parkview.com] Sent: Wednesday, July 09, 2003 2:43 PM To: sqr-users@sqrug.org Subject: [sqr-users] PDFLib Error (9): Page size must be positive We are upgrading from PSoft HR 7.5 to Psoft HR 8.8. When I run a certain report with the output type of Web and the Format PDF I get the following error: "PDFLib Error (9): Page size must be positive." Has anyone encountered this problem before? If so how did you fix it? Mark Hall IS Analyst ERP Team 260-373-8796 mark.hall@parkview.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users The information contained in this transmission is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this communication is strictly prohibited. If you have received this e-mail in error, please contact the sender by reply e-mail and destroy all paper and electronic copies of the original message. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 11 09:14:14 2003 From: "Cumberbatch, Keith R" Date: Fri, 11 Jul 2003 10:13:30 -0400 Subject: [sqr-users] RE: spaces and -F command line option Wrapping the path in quotes does not work. The only solution appears to be to use the Short file name, so I updated my program to get the short file name and send it to SQRW. Message: 3 Subject: Re: [sqr-users] spaces and -F command line option To: sqr-users@sqrug.org Message-ID: From: Ramzi_Salameh@daveandbusters.com Date: Thu, 10 Jul 2003 14:31:05 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Sender: sqr-users-admin@sqrug.org Precedence: bulk Reply-To: sqr-users@sqrug.org List-Help: List-Post: List-Subscribe: , List-Id: This list is for discussion about the SQR database reporting language from Brio Software. List-Unsubscribe: , I'm not sure if this would work in the -F on the SQR command line, but you can use the windows long name at the command prompt if you wrap the path/filename in quotes. i.e. "C:\Program Files\Microsoft Office\........." You might try that and see if it works. HTH ------------------------------------------------ Ramzi Salameh PeopleSoft Technical Analyst Dave & Busters, Inc. Voice (214) 904-2550 Fax (214) 350-0941 ------------------------------------------------ "Cumberbatch, Keith R" To: "'sqr-users@sqrug.org'" Subject: [sqr-users] spaces and -F command line option Sent by: sqr-users-admin@sqru g.org 07/10/03 02:18 PM Please respond to sqr-users I'm using SQRW 4.3.2.1 on Windows2000. Is there a way to get the -F option to recognize directories and/or files with spaces. The only workaround I found was to use the DOS short names. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 11 09:45:07 2003 Date: Fri, 11 Jul 2003 10:43:57 -0400 From: Wendy Biggs Subject: [sqr-users] is there a limt to ARRAY Extents available using SQR 8.x >SQR 8.x allows you to set up incremental extents to the base array size >with an optional "extent= " parameter. I can't find documentation >anywhere that says *how many* extents it will grant tho... are extents >unlimited? does anyone know? or know where I might find out? > >there MUST be a limit... either number of extents or total memory available... > >I set up a little test array (below) and built a loop to see if I could >figure it out myself... so far I've pushed the number of extents to 1200 >so it seems to me that the limit must be memory size if one exists. > >create-array name=t_array size={T_ArrayMax} extent=5 > field=a:char > field=b:char > field=c:char > >any ideas? > >--wb _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 11 10:04:07 2003 From: Peter Burton Subject: RE: [sqr-users] is there a limt to ARRAY Extents available using SQR 8.x Date: Fri, 11 Jul 2003 11:03:27 -0400 Wendy, The EXTENT keyword takes a value from 0 to 2GB. There is no limit as to how many times the array is extended. Of course the underlying limit is how much memory the process can acquire from the system. Peter -----Original Message----- From: Wendy Biggs [mailto:biggswl@vt.edu] Sent: Friday, July 11, 2003 10:44 AM To: sqr-users@sqrug.org Subject: [sqr-users] is there a limt to ARRAY Extents available using SQR 8.x >SQR 8.x allows you to set up incremental extents to the base array size >with an optional "extent= " parameter. I can't find documentation >anywhere that says *how many* extents it will grant tho... are extents >unlimited? does anyone know? or know where I might find out? > >there MUST be a limit... either number of extents or total memory available... > >I set up a little test array (below) and built a loop to see if I could >figure it out myself... so far I've pushed the number of extents to 1200 >so it seems to me that the limit must be memory size if one exists. > >create-array name=t_array size={T_ArrayMax} extent=5 > field=a:char > field=b:char > field=c:char > >any ideas? > >--wb _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 11 10:17:30 2003 Date: Fri, 11 Jul 2003 11:16:41 -0400 From: Wendy Biggs Subject: RE: [sqr-users] is there a limt to ARRAY Extents available using SQR 8.x OK... Thanks Peter! so I won't worry about running out of array space... (I'll just have to worry about running out of space for the rest of my program to squeeze through ) out of curiosity, how do you know these things? is there somewhere I should be looking? --wb At 11:03 AM 7/11/2003, you wrote: >Wendy, > >The EXTENT keyword takes a value from 0 to 2GB. There is no limit as to how >many times the array is extended. Of course the underlying limit is how >much memory the process can acquire from the system. > >Peter > > >-----Original Message----- >From: Wendy Biggs [mailto:biggswl@vt.edu] >Sent: Friday, July 11, 2003 10:44 AM >To: sqr-users@sqrug.org >Subject: [sqr-users] is there a limt to ARRAY Extents available using >SQR 8.x > > > > >SQR 8.x allows you to set up incremental extents to the base array size > >with an optional "extent= " parameter. I can't find documentation > >anywhere that says *how many* extents it will grant tho... are extents > >unlimited? does anyone know? or know where I might find out? > > > >there MUST be a limit... either number of extents or total memory >available... > > > >I set up a little test array (below) and built a loop to see if I could > >figure it out myself... so far I've pushed the number of extents to 1200 > >so it seems to me that the limit must be memory size if one exists. > > > >create-array name=t_array size={T_ArrayMax} extent=5 > > field=a:char > > field=b:char > > field=c:char > > > >any ideas? > > > >--wb > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 11 14:46:41 2003 From: "Raul Sanchez Estrada" Date: Fri, 11 Jul 2003 14:43:16 -0500 Subject: [sqr-users] update my version of SQR I need to update my version of SQR 3.5, to latest version, somebody can sell the SQR in latest completes version. Please contact via email. Metropolitan Autonoma University Raul Sanchez Estrada Mexico DF TEL (55) 5483-4115 ------------------------------------------------------------------------------------------------------------------------------------------- Necesito actualizar mi version de SQR 3, a la ultima version, alguien puede vender el SQR ultima version. Por favor contacteme via email. Universidad Autonoma Metropolitana Raul Snchez Estrada Mxico DF TEL (55) 5483-4115 _________________________________________________________________ nete al mayor servicio mundial de correo electrnico: http://www.hotmail.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 11 15:01:38 2003 From: "Shishir Singh" Date: Fri, 11 Jul 2003 16:05:24 -0400 Subject: [sqr-users] Using Windows authentication when running SQR from Command Line Hi All, I am running an SQR using SQRW.exe. I used to connect to the database by using Sql Server authentication Server/User_id/Pwd. With this connection I am able to connect to that database but now I have to use the Windows authentication instead. Exp : sqrw test_trusted_Con.sqr $Server/$User/$Pwd -XCB -oprog.log -A I am not sure what option should I use for windows authentication. Any insight will be greatly appreciated. Shishir _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Sat Jul 12 00:42:28 2003 Date: Sat, 12 Jul 2003 15:41:15 +1000 From: Steve Cavill Subject: RE: [sqr-users] update my version of SQR Raul, try http://www.brio.com/company/contact/rep_form.html Steve. -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Raul Sanchez Estrada Sent: Saturday, 12 July 2003 5:43 AM To: sqr-users@sqrug.org Subject: [sqr-users] update my version of SQR I need to update my version of SQR 3.5, to latest version, somebody can sell the SQR in latest completes version. Please contact via email. Metropolitan Autonoma University Raul Sanchez Estrada Mexico DF TEL (55) 5483-4115 ---------------------------------------------------------------------------- --------------------------------------------------------------- Necesito actualizar mi version de SQR 3, a la ultima version, alguien puede vender el SQR ultima version. Por favor contacteme via email. Universidad Autonoma Metropolitana Raul Snchez Estrada Mxico DF TEL (55) 5483-4115 _________________________________________________________________ nete al mayor servicio mundial de correo electrnico: http://www.hotmail.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 14 15:02:24 2003 From: "rachel fuller" Subject: Re: [sqr-users] Running SQRs in Mainframe with DB2 database Date: Mon, 14 Jul 2003 15:58:57 -0400 My last project, I worked with DB2. If you are looking for a windows based sql tool, try WINSQL. >From: "Ashish Bhatt" >Reply-To: sqr-users@sqrug.org >To: >Subject: [sqr-users] Running SQRs in Mainframe with DB2 database >Date: Wed, 2 Jul 2003 07:57:44 -0500 > >Hi All, > >I hope you are doing fine today. > >Is anyone of you running SQRs in Mainframe with DB2 as the backend database >? If yes, please share with me your experiences. > >I have worked on SQRs in UNIX with Oracle as the backend database. I used >to have TOAD as the tool to view Oracle data. > >Is there any similar tool like TOAD for DB2 on Mainframe to view the DB2 >data ? > >Please reply. > >Thanks in advance. > >Have a nice day and great week. > >Regards. > >Ashish Bhatt. > > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 14 20:29:05 2003 From: mark.a.o.pabilona@accenture.com Date: Tue, 15 Jul 2003 09:22:07 +0800 Subject: [sqr-users] SQR books Hello, We are in the process of purchasing SQR resources. I'd like to ask your expert advices on what books we should purchase for SQR? We'd like to get the most informative resource possible, that is why I'm asking your help. Thanks on any help on this. Have a great day! Mark A. O. Pabilona Alliance Utilization,CIO-SD Accenture 9th floor 6750 Bldg Ayala Ave., Makati City Philippines 1200 Phone: +632 841-0111 loc.4315 Octel: 632/4315 E-mail:mark.a.o.pabilona@accenture.com This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 07:06:29 2003 From: "the dragon" Subject: Re: [sqr-users] SQR books Date: Tue, 15 Jul 2003 07:04:38 -0500 The best book is the free one that comes with sqribe. But, there are some additional excellant resources. go to http://www.amazon.com and search on sqr. I recommend : sqr in peoplesoft and other applications by landres sqr programming language reference by mellon peoplesoft sqr cheatsheet. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hello, We are in the process of purchasing SQR resources. I'd like to ask your expert advices on what books we should purchase for SQR? We'd like to get the most informative resource possible, that is why I'm asking your help. Thanks on any help on this. Have a great day! _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 09:55:18 2003 From: "Wunsche, Kathy" Subject: RE: [sqr-users] SQR books Date: Tue, 15 Jul 2003 11:01:28 -0400 Hi: Could you please tell me how to get the free book that comes with sqribe? We don't have it. Thank you. Kathy -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 8:05 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] SQR books The best book is the free one that comes with sqribe. But, there are some additional excellant resources. go to http://www.amazon.com and search on sqr. I recommend : sqr in peoplesoft and other applications by landres sqr programming language reference by mellon peoplesoft sqr cheatsheet. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hello, We are in the process of purchasing SQR resources. I'd like to ask your expert advices on what books we should purchase for SQR? We'd like to get the most informative resource possible, that is why I'm asking your help. Thanks on any help on this. Have a great day! _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:14:59 2003 From: "Paul Hoyte" Subject: RE: [sqr-users] SQR books Date: Tue, 15 Jul 2003 11:13:00 -0400 Kathy: The books come with the product. If you are interested in getting more copies, just contact Brio and order directly from them (for a fee of course).... Paul Hoyte (248) 752-6970 Cell (248) 559-6868 Office (586) 421-9640 Fax paul.hoyte@sharidionne.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf Of Wunsche, Kathy Sent: Tuesday, July 15, 2003 11:01 AM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] SQR books Hi: Could you please tell me how to get the free book that comes with sqribe? We don't have it. Thank you. Kathy -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 8:05 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] SQR books The best book is the free one that comes with sqribe. But, there are some additional excellant resources. go to http://www.amazon.com and search on sqr. I recommend : sqr in peoplesoft and other applications by landres sqr programming language reference by mellon peoplesoft sqr cheatsheet. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hello, We are in the process of purchasing SQR resources. I'd like to ask your expert advices on what books we should purchase for SQR? We'd like to get the most informative resource possible, that is why I'm asking your help. Thanks on any help on this. Have a great day! _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:18:05 2003 From: "Wunsche, Kathy" Subject: RE: [sqr-users] SQR books Date: Tue, 15 Jul 2003 11:24:34 -0400 HI Paul Hoyte: Thanks for getting back to me. I will pursue that. Kathy -----Original Message----- From: Paul Hoyte [mailto:Paul.Hoyte@sharidionne.com] Sent: Tuesday, July 15, 2003 11:13 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] SQR books Kathy: The books come with the product. If you are interested in getting more copies, just contact Brio and order directly from them (for a fee of course).... Paul Hoyte (248) 752-6970 Cell (248) 559-6868 Office (586) 421-9640 Fax paul.hoyte@sharidionne.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf Of Wunsche, Kathy Sent: Tuesday, July 15, 2003 11:01 AM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] SQR books Hi: Could you please tell me how to get the free book that comes with sqribe? We don't have it. Thank you. Kathy -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 8:05 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] SQR books The best book is the free one that comes with sqribe. But, there are some additional excellant resources. go to http://www.amazon.com and search on sqr. I recommend : sqr in peoplesoft and other applications by landres sqr programming language reference by mellon peoplesoft sqr cheatsheet. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hello, We are in the process of purchasing SQR resources. I'd like to ask your expert advices on what books we should purchase for SQR? We'd like to get the most informative resource possible, that is why I'm asking your help. Thanks on any help on this. Have a great day! _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:33:07 2003 From: "Ben Anderson" Date: Tue, 15 Jul 2003 11:32:18 -0400 Subject: [sqr-users] write 1 from $1 -> in header I'm writing to a flat file and getting this error when I try to write in the BEGIN-HEADING section: (SQR 3202) Specified file number not opened for writing. I've tried putting this: open $full_name as 2 for-writing record=900:vary in the HEADING and at the very beginning of BEGIN-REPORT, but it just errors on different line numbers. I also tried switching BEGIN-REPORT to BEGIN-PROGRAM. Any guidance? Thanks, Ben Anderson _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:44:07 2003 From: "John Willson" Date: Tue, 15 Jul 2003 09:43:57 +0700 Subject: RE: [sqr-users] SQR books Hi Kathy, try http://www.sqrevangelism.com/ Darrin's book is the best independent of Peoplesoft SQR; however, it also has lots of applicable code for Peoplesoft and how to's. I use it as a first approach and always when managing a suite of SQRs. John Willson -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Wunsche, Kathy Sent: Tuesday, July 15, 2003 9:25 AM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] SQR books HI Paul Hoyte: Thanks for getting back to me. I will pursue that. Kathy -----Original Message----- From: Paul Hoyte [mailto:Paul.Hoyte@sharidionne.com] Sent: Tuesday, July 15, 2003 11:13 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] SQR books Kathy: The books come with the product. If you are interested in getting more copies, just contact Brio and order directly from them (for a fee of course).... Paul Hoyte (248) 752-6970 Cell (248) 559-6868 Office (586) 421-9640 Fax paul.hoyte@sharidionne.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf Of Wunsche, Kathy Sent: Tuesday, July 15, 2003 11:01 AM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] SQR books Hi: Could you please tell me how to get the free book that comes with sqribe? We don't have it. Thank you. Kathy -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 8:05 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] SQR books The best book is the free one that comes with sqribe. But, there are some additional excellant resources. go to http://www.amazon.com and search on sqr. I recommend : sqr in peoplesoft and other applications by landres sqr programming language reference by mellon peoplesoft sqr cheatsheet. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hello, We are in the process of purchasing SQR resources. I'd like to ask your expert advices on what books we should purchase for SQR? We'd like to get the most informative resource possible, that is why I'm asking your help. Thanks on any help on this. Have a great day! _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users http://netwinsite.com/dbabble/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:45:05 2003 From: "Mezzullo, Paul" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 11:51:41 -0400 Ben, Try placing an error condition in your 'file opening code' to verify the files status, I've included my working example code below for you --> !****************************************** ! PROCEDURE: open_File ((Procedure)) !****************************************** ! open file for writing !****************************************** begin-procedure open_File open 'c:\file.txt' as 10 for-writing ! len was 73 record=150:Fixed status = #open1 if #open1 = -1 display 'Open File Error' stop quiet end-if end-procedure open_File -----Original Message----- From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] Sent: Tuesday, July 15, 2003 11:32 AM To: sqr-users@sqrug.org Subject: [sqr-users] write 1 from $1 -> in header I'm writing to a flat file and getting this error when I try to write in the BEGIN-HEADING section: (SQR 3202) Specified file number not opened for writing. I've tried putting this: open $full_name as 2 for-writing record=900:vary in the HEADING and at the very beginning of BEGIN-REPORT, but it just errors on different line numbers. I also tried switching BEGIN-REPORT to BEGIN-PROGRAM. Any guidance? Thanks, Ben Anderson _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:47:06 2003 Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 10:46:16 -0500 From: "Sengupta, Rajib (CAG-CC-Contractor)" do some trimming and display: let $full_name = RTRIM($full_name, ' ') display $full_name open $full_name as 2 for-writing record=900:vary status=#filestatus Then put: if #filestatus != 0 display "error message" else process... by this way you will be sure that while opening the file it is erroring out.. then go back to check the file . Check whether file already exits or not etc..depending on O/s it might overwrite or might cause open error. rajib Rajib Sengupta Systems Analyst and Team Lead Peoplesoft Financial Consultant Conagra Business Systems Phone: 402-595-5749 -----Original Message----- From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] Sent: Tuesday, July 15, 2003 10:32 AM To: sqr-users@sqrug.org Subject: [sqr-users] write 1 from $1 -> in header I'm writing to a flat file and getting this error when I try to write in the BEGIN-HEADING section: (SQR 3202) Specified file number not opened for writing. I've tried putting this: open $full_name as 2 for-writing record=900:vary in the HEADING and at the very beginning of BEGIN-REPORT, but it just errors on different line numbers. I also tried switching BEGIN-REPORT to BEGIN-PROGRAM. Any guidance? Thanks, Ben Anderson _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:47:22 2003 From: "the dragon" Subject: Re: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 10:46:22 -0500 place it in it's own procedure like this, and then call it from the begin-program: (this is a generic section in my code; modify as needed) ! ------*-*-----------------------&---------(--,----)------------*-*---+ ! - OPEN THE FILES - | ! - this procedure opens any flat files needed for - | ! - processing. [CW] - | ! - desc : - | ! - proc : 6 - | ! - from : 0 - | ! - 14-Dec-1999 [CW] - | ! ------*-*-----------------------&---------(--,----)------------*-*---+ begin-procedure open_the_files show 'Entering OPEN THE FILES : proc 6 ' let $file_name = 'racsreplen.dat' let $environment = getenv('ORACLE_SID') show 'Environment = |' $environment '|' let $source_file = '/data/' || $country_code || lower($environment) || '/OM/export/' let $source_file = $source_file || {name} || '_' || $prcs_process_instance || '.txt' evaluate $environment when = 'ERPDEV' ! let $source_file = '/data/' || $country_code || lower($environment) || '/OM/export/' ! let $source_file = $source_file || {name} || '_' || $prcs_process_instance || '.txt' ! break when = 'ERPQA' ! let $source_file = '/data/' || $country_code || lower($environment) || '/OM/export/' ! let $source_file = $source_file || {name} || '_' || $prcs_process_instance || '.txt' ! break when = 'ERPPROD' ! let $source_file = '/data/' || $country_code || lower($environment) || '/OM/export/' ! let $source_file = $source_file || {name} || '_' || $prcs_process_instance || '.txt' break when-other show 'What environment are you running this program in?' stop quiet end-evaluate ! evaluate $environment ! when = 'ERPDEV' ! let $source_file = '/data/RA/erpdev/PO/import/racsreplen.dat' ! let $success_path = '/data/RA/erpdev/PO/import/.processed/' ! let $reject_path = '/data/RA/erpdev/PO/import/.rejects/' ! break ! when = 'ERPQA' ! let $source_file = '/data/RA/erpqa/PO/import/racsreplen.dat' ! let $success_path = '/data/RA/erpqa/PO/import/.processed/' ! let $reject_path = '/data/RA/erpqa/PO/import/.rejects/' ! break ! when = 'ERPPROD' ! let $source_file = '/data/RA/erpprod/PO/import/racsreplen.dat' ! let $success_path = '/data/RA/erpprod/PO/import/.processed/' ! let $reject_path = '/data/RA/erpprod/PO/import/.rejects/' ! break ! when-other ! show 'What environment are you running this program in?' ! stop quiet ! end-evaluate ! let $source_file = '/data/RA/erpdev/PO/import/brian1.dat' ! let $source_file = '/data/RA/erpqa/PO/import/brian1.dat' ! let $source_file = '/data/RA/erpprod/PO/import/brian1.dat' open $Source_File as 1 for-reading record=640:vary status=#File_1_Status if ( #File_1_Status <> 0 ) show 'Could not open input file: ' $Source_File show ' ' show 'SQR Halted.' stop quiet else show 'Input file 1 successfully found and opened.' ! [CW] end-if open $Source_File as 2 for-writing record=640:vary status=#File_2_Status if ( #File_2_Status <> 0 ) show 'Could not open output file: ' $Source_File show ' ' show 'SQR Halted.' stop quiet else show 'Output file 1 successfully found and opened.' ! [CW] end-if show 'Exiting OPEN THE FILES' end-procedure ! OPEN THE FILES Those of you at Strong, tell Geoff the dragon says 'high' :-P clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- I'm writing to a flat file and getting this error when I try to write in the BEGIN-HEADING section: (SQR 3202) Specified file number not opened for writing. I've tried putting this: open $full_name as 2 for-writing record=900:vary in the HEADING and at the very beginning of BEGIN-REPORT, but it just errors on different line numbers. I also tried switching BEGIN-REPORT to BEGIN-PROGRAM. Any guidance? Thanks, Ben Anderson _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:48:06 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 08:52:41 -0700 Don't put an open statement in the HEADING unless you want it to execute at the beginning of every page you print. I'm not sure what happens when you try to open a file that's already open. Maybe nothing, or maybe it deletes whatever you've written before and starts over. Add a "status=#open_status" clause to the open statement and test the value of #open_status. If it isn't 0, then your attempt to open the file didn't work. Why? You might not be logged in to that drive, or the path in $full_name might not exist, or you might not have write-access to it, or there might already be a read-only file with that name. -----Original Message----- From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] Sent: Tuesday, July 15, 2003 8:32 AM To: sqr-users@sqrug.org Subject: [sqr-users] write 1 from $1 -> in header I'm writing to a flat file and getting this error when I try to write in the BEGIN-HEADING section: (SQR 3202) Specified file number not opened for writing. I've tried putting this: open $full_name as 2 for-writing record=900:vary in the HEADING and at the very beginning of BEGIN-REPORT, but it just errors on different line numbers. I also tried switching BEGIN-REPORT to BEGIN-PROGRAM. Any guidance? Thanks, Ben Anderson _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:50:09 2003 Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 10:49:26 -0500 From: "Sengupta, Rajib (CAG-CC-Contractor)" one more point while using vary: make sure that you are not writing any binary data(only display charecters) Rajib Sengupta Systems Analyst and Team Lead Peoplesoft Financial Consultant Conagra Business Systems Phone: 402-595-5749 -----Original Message----- From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] Sent: Tuesday, July 15, 2003 10:32 AM To: sqr-users@sqrug.org Subject: [sqr-users] write 1 from $1 -> in header I'm writing to a flat file and getting this error when I try to write in the BEGIN-HEADING section: (SQR 3202) Specified file number not opened for writing. I've tried putting this: open $full_name as 2 for-writing record=900:vary in the HEADING and at the very beginning of BEGIN-REPORT, but it just errors on different line numbers. I also tried switching BEGIN-REPORT to BEGIN-PROGRAM. Any guidance? Thanks, Ben Anderson _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:53:05 2003 Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 11:52:36 -0400 From: "Weaver, Judith R" Ben - Change begin-report back to begin-program - this is the proper format and has nothing to do with your problem. - It appears that you're opening file as 2 but writing to file 1...should be "write 2 from $1" Judy -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Ben Anderson Sent: Tuesday, July 15, 2003 11:32 AM To: sqr-users@sqrug.org Subject: [sqr-users] write 1 from $1 -> in header I'm writing to a flat file and getting this error when I try to write in the BEGIN-HEADING section: (SQR 3202) Specified file number not opened for writing. I've tried putting this: open $full_name as 2 for-writing record=900:vary in the HEADING and at the very beginning of BEGIN-REPORT, but it just errors on different line numbers. I also tried switching BEGIN-REPORT to BEGIN-PROGRAM. Any guidance? Thanks, Ben Anderson _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 10:56:12 2003 From: "Hood Louise (app1lxh)" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 11:55:28 -0400 Ben, The body of the report is created first with the heading and footer being entered only after a page is "done". Therefore, you should place your open file (and close file) in the main program stream, i.e., between BEGIN-PROGRAM and END-PROGRAM. HTH, Louise -----Original Message----- From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] Sent: Tuesday, July 15, 2003 11:32 AM To: sqr-users@sqrug.org Subject: [sqr-users] write 1 from $1 -> in header I'm writing to a flat file and getting this error when I try to write in the BEGIN-HEADING section: (SQR 3202) Specified file number not opened for writing. I've tried putting this: open $full_name as 2 for-writing record=900:vary in the HEADING and at the very beginning of BEGIN-REPORT, but it just errors on different line numbers. I also tried switching BEGIN-REPORT to BEGIN-PROGRAM. Any guidance? Thanks, Ben Anderson _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 11:00:05 2003 Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 10:59:05 -0500 From: "Sengupta, Rajib (CAG-CC-Contractor)" i guess thats the answer- i haven't noticed it at all- it should be write 2 Rajib Sengupta Systems Analyst and Team Lead Peoplesoft Financial Consultant Conagra Business Systems Phone: 402-595-5749 -----Original Message----- From: Weaver, Judith R [mailto:Judith.R.Weaver@usa-spaceops.com] Sent: Tuesday, July 15, 2003 10:53 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] write 1 from $1 -> in header Ben - Change begin-report back to begin-program - this is the proper format and has nothing to do with your problem. - It appears that you're opening file as 2 but writing to file 1...should be "write 2 from $1" Judy -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Ben Anderson Sent: Tuesday, July 15, 2003 11:32 AM To: sqr-users@sqrug.org Subject: [sqr-users] write 1 from $1 -> in header I'm writing to a flat file and getting this error when I try to write in the BEGIN-HEADING section: (SQR 3202) Specified file number not opened for writing. I've tried putting this: open $full_name as 2 for-writing record=900:vary in the HEADING and at the very beginning of BEGIN-REPORT, but it just errors on different line numbers. I also tried switching BEGIN-REPORT to BEGIN-PROGRAM. Any guidance? Thanks, Ben Anderson _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 11:19:06 2003 From: "the dragon" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 11:18:23 -0500 Also, putting an open statement in the heading would never get executed unless print output was created - and print output may be created long after you try writing to a flat file that you wanted open. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Don't put an open statement in the HEADING unless you want it to execute at the beginning of every page you print. I'm not sure what happens when you try to open a file that's already open. Maybe nothing, or maybe it deletes whatever you've written before and starts over. Add a "status=#open_status" clause to the open statement and test the value of #open_status. If it isn't 0, then your attempt to open the file didn't work. Why? You might not be logged in to that drive, or the path in $full_name might not exist, or you might not have write-access to it, or there might already be a read-only file with that name. _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 11:38:07 2003 Date: Tue, 15 Jul 2003 09:37:48 -0700 From: Jim Engebretson Subject: [sqr-users] SQR Code needed to convert employee name from upper case to mixed case Have you seen any SQR code which converts names from upper case into mixed case? _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 11:54:06 2003 From: EricRection@aol.com Date: Tue, 15 Jul 2003 12:53:38 EDT Subject: Re: [sqr-users] SQR Code needed to convert employee name from upper case to m... My effort is below. It correctly converts the following: Old Surname New Surname DE BASTO de Basto DE LOS ANGELES de los Angeles MCDONALD McDonald O'REILLY O'Reilly DUNCAN-SMITH Duncan-Smith TWOO WORDS Twoo Words (I can't think of a real life example, but it happens) HO LING Ho Ling MORRIS EL Morris El (this name came up in a newspaper recently) SMITH Smith Caveats: 1. To properly do Chinese names, you need an ethnic code, $ethnic, to identify your Orientals. UK PeopleSoft has such a thing, global PeopleSoft doesn't. Without a specific code, HO LING becomes Ho ling. 2. The procedure works on the kind of names you find in Europe - you'd have to hard-code any 'funnies' you get in your locality. It's a heuristic, i.e. it usually gives a good answer, but if you want to be perfect, you have to use the Mark I Eyeball. 3. Please note that Eric Rection is a pseudonym (E.Rection - geddit? Maturity is for cheeses). Credit me, huh? 4. The procedure works on the PeopleSoft demo DB but I admit I haven't tried it on a huge quantity of data. 5. The spacing looks nice on PFE but not here. Bummer. begin-procedure capitalise($name,$ethnic,:$capitalised) let $capitalised = '' let #len = length($name) let #current_char = 1 let #new_word = 1 let $old_char = ' ' while #current_char <= #len let #found_space = instr($name,' ',#current_char) let $current_char = substr($name,#current_char,1) if ! de Basto, de los Angeles but not two word surnames ( ( instr($name,' ',#current_char) > 0 and $ethnic <> '8' and not ($old_char = ' ' and instr($name,' ',#current_char) > #current_char+3) ) or ! exempt Chinese surnames from the above rule - requires a specific Chinese ethnic group code ( $ethnic = '8' and $old_char <> ' ' ) or ! Conventional surnames ( instr($name,' ',#current_char) = 0 and $old_char <> ' ' ) ) and ! McDonald, O'Leary not ( #current_char = 3 and ( substr($name,1,2) = 'MC' or substr($name,1,2) = 'O''' ) ) and ! Duncan-Smith $old_char <> '-' let $current_char = lower($current_char) else let $current_char = upper($current_char) end-if #ifdef debugx show $current_char ' ' #current_char ' new word ' #new_word ' 1st spc ' #found_space #endif if $current_char = ' ' let #new_word = #current_char end-if let $capitalised = $capitalised || $current_char let #current_char = #current_char + 1 let $old_char = $current_char end-while end-procedure _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 12:00:13 2003 From: EricRection@aol.com Date: Tue, 15 Jul 2003 12:59:01 EDT Subject: Re: [sqr-users] SQR Code needed to convert employee name from upper case to m... Oops! Forgot to put my name in it for advertising purposes. Let's have a cigarette and try again... begin-procedure capitalise($name,$ethnic,:$capitalised) ! by Timothy Chilman, email: ephedrasa@hotmail.com let $capitalised = '' let #len = length($name) let #current_char = 1 let #new_word = 1 let $old_char = ' ' while #current_char <= #len let #found_space = instr($name,' ',#current_char) let $current_char = substr($name,#current_char,1) if ! de Basto, de los Angeles but not two word surnames ( ( instr($name,' ',#current_char) > 0 and $ethnic <> '8' and not ($old_char = ' ' and instr($name,' ',#current_char) > #current_char+3) ) or ! exempt Chinese surnames from the above rule - requires a specific Chinese ethnic group code ( $ethnic = '8' and $old_char <> ' ' ) or ! Conventional surnames ( instr($name,' ',#current_char) = 0 and $old_char <> ' ' ) ) and ! McDonald, O'Leary not ( #current_char = 3 and ( substr($name,1,2) = 'MC' or substr($name,1,2) = 'O''' ) ) and ! Duncan-Smith $old_char <> '-' let $current_char = lower($current_char) else let $current_char = upper($current_char) end-if #ifdef debugx show $current_char ' ' #current_char ' new word ' #new_word ' 1st spc ' #found_space #endif if $current_char = ' ' let #new_word = #current_char end-if let $capitalised = $capitalised || $current_char let #current_char = #current_char + 1 let $old_char = $current_char end-while end-procedure _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 12:04:06 2003 From: "the dragon" Subject: Re: [sqr-users] SQR Code needed to convert employee name from upper case to mixed case Date: Tue, 15 Jul 2003 12:03:41 -0500 If you're using PeopleSoft, I think there is a delivered sqc. I think it's one of the Rotname series. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Have you seen any SQR code which converts names from upper case into mixed case? _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 12:48:07 2003 From: "Ben Anderson" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 13:47:12 -0400 ok, all your replies made sense, but it's still not working. It's pretty weird. I have the file being opened in BEGIN-PROGRAM. The file is being opened and written to. Then when it tries the write in the header - that's when I get the error. I'm not closing the file until right before END-PROGRAM. It errors out and then I'm left with the first page of data with no header. Any ideas? TIA, Ben >From: "the dragon" >Reply-To: sqr-users@sqrug.org >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] write 1 from $1 -> in header >Date: Tue, 15 Jul 2003 11:18:23 -0500 > >Also, putting an open statement in the heading would never get executed >unless print output was created - and print output may be created long >after you try writing to a flat file that you wanted open. > >clark 'the dragon' willis >dragon enterprises, consulting services > > > >PSA: Salary <> Slavery. If you earn a salary, your employer is renting >your services for 40 hours a week, not purchasing your soul. Your time is >the only real finite asset that you have, and once used it can never be >recovered, so don't waste it by giving it away. > >"Time is the coin of your life. It is the only coin you have, and only you >can determine how it will be spent. Be careful lest you let other people >spend it for you." > >Carl Sandburg >(1878 - 1967) > >----Original Message Follows---- > >Don't put an open statement in the HEADING unless you want it to execute at >the beginning of every page you print. I'm not sure what happens when you >try to open a file that's already open. Maybe nothing, or maybe it deletes >whatever you've written before and starts over. > >Add a "status=#open_status" clause to the open statement and test the value >of #open_status. If it isn't 0, then your attempt to open the file didn't >work. Why? You might not be logged in to that drive, or the path in >$full_name might not exist, or you might not have write-access to it, or >there might already be a read-only file with that name. > >_________________________________________________________________ >The new MSN 8: advanced junk mail protection and 2 months FREE* >http://join.msn.com/?page=features/junkmail > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 13:01:16 2003 From: "Hood Louise (app1lxh)" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 14:00:40 -0400 Can you show us what you have coded (begin-program through end-program, heading proc, and error msg)? Also, what are you using the flat file for in relation to the header? -----Original Message----- From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] Sent: Tuesday, July 15, 2003 1:47 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] write 1 from $1 -> in header ok, all your replies made sense, but it's still not working. It's pretty weird. I have the file being opened in BEGIN-PROGRAM. The file is being opened and written to. Then when it tries the write in the header - that's when I get the error. I'm not closing the file until right before END-PROGRAM. It errors out and then I'm left with the first page of data with no header. Any ideas? TIA, Ben >From: "the dragon" >Reply-To: sqr-users@sqrug.org >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] write 1 from $1 -> in header >Date: Tue, 15 Jul 2003 11:18:23 -0500 > >Also, putting an open statement in the heading would never get executed >unless print output was created - and print output may be created long >after you try writing to a flat file that you wanted open. > >clark 'the dragon' willis >dragon enterprises, consulting services > > > >PSA: Salary <> Slavery. If you earn a salary, your employer is renting >your services for 40 hours a week, not purchasing your soul. Your time is >the only real finite asset that you have, and once used it can never be >recovered, so don't waste it by giving it away. > >"Time is the coin of your life. It is the only coin you have, and only >you >can determine how it will be spent. Be careful lest you let other people >spend it for you." > >Carl Sandburg >(1878 - 1967) > >----Original Message Follows---- > >Don't put an open statement in the HEADING unless you want it to >execute at the beginning of every page you print. I'm not sure what >happens when you try to open a file that's already open. Maybe >nothing, or maybe it deletes whatever you've written before and starts >over. > >Add a "status=#open_status" clause to the open statement and test the >value of #open_status. If it isn't 0, then your attempt to open the >file didn't work. Why? You might not be logged in to that drive, or >the path in $full_name might not exist, or you might not have >write-access to it, or there might already be a read-only file with >that name. > >_________________________________________________________________ >The new MSN 8: advanced junk mail protection and 2 months FREE* >http://join.msn.com/?page=features/junkmail > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 13:07:09 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 11:11:48 -0700 What do you mean "write in the header?" Do you have write statements in the "begin-heading ... end-heading" section, or are you talking about writing a header record to the file (a special record at the begining of a file that contains different data than the other records)? -----Original Message----- From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] Sent: Tuesday, July 15, 2003 10:47 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] write 1 from $1 -> in header ok, all your replies made sense, but it's still not working. It's pretty weird. I have the file being opened in BEGIN-PROGRAM. The file is being opened and written to. Then when it tries the write in the header - that's when I get the error. I'm not closing the file until right before END-PROGRAM. It errors out and then I'm left with the first page of data with no header. Any ideas? TIA, Ben >From: "the dragon" >Reply-To: sqr-users@sqrug.org >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] write 1 from $1 -> in header >Date: Tue, 15 Jul 2003 11:18:23 -0500 > >Also, putting an open statement in the heading would never get executed >unless print output was created - and print output may be created long >after you try writing to a flat file that you wanted open. > >clark 'the dragon' willis >dragon enterprises, consulting services > > > >PSA: Salary <> Slavery. If you earn a salary, your employer is renting >your services for 40 hours a week, not purchasing your soul. Your time is >the only real finite asset that you have, and once used it can never be >recovered, so don't waste it by giving it away. > >"Time is the coin of your life. It is the only coin you have, and only you >can determine how it will be spent. Be careful lest you let other people >spend it for you." > >Carl Sandburg >(1878 - 1967) > >----Original Message Follows---- > >Don't put an open statement in the HEADING unless you want it to execute at >the beginning of every page you print. I'm not sure what happens when you >try to open a file that's already open. Maybe nothing, or maybe it deletes >whatever you've written before and starts over. > >Add a "status=#open_status" clause to the open statement and test the value >of #open_status. If it isn't 0, then your attempt to open the file didn't >work. Why? You might not be logged in to that drive, or the path in >$full_name might not exist, or you might not have write-access to it, or >there might already be a read-only file with that name. > >_________________________________________________________________ >The new MSN 8: advanced junk mail protection and 2 months FREE* >http://join.msn.com/?page=features/junkmail > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 13:11:06 2003 Date: Tue, 15 Jul 2003 13:10:35 -0500 (EST) From: Don Mellen Subject: RE: [sqr-users] write 1 from $1 -> in header Remove the "close" statement. Headers get fired off when the page gets flushed. For the last page, this happens as a part of the "cleanup" when the program ends. Since you had already closed it, it was no longer available for writing. SQR will also close the file as part of it's "cleanup". This isn't the best form (not closing files) but should be the quickest fix for you. On Tue, 15 Jul 2003, Ben Anderson wrote: > ok, all your replies made sense, but it's still not working. It's pretty > weird. I have the file being opened in BEGIN-PROGRAM. The file is being > opened and written to. Then when it tries the write in the header - that's > when I get the error. I'm not closing the file until right before > END-PROGRAM. It errors out and then I'm left with the first page of data > with no header. Any ideas? > TIA, > Ben > > >From: "the dragon" > >Reply-To: sqr-users@sqrug.org > >To: sqr-users@sqrug.org > >Subject: RE: [sqr-users] write 1 from $1 -> in header > >Date: Tue, 15 Jul 2003 11:18:23 -0500 > > > >Also, putting an open statement in the heading would never get executed > >unless print output was created - and print output may be created long > >after you try writing to a flat file that you wanted open. > > > >clark 'the dragon' willis > >dragon enterprises, consulting services > > > > > > > >PSA: Salary <> Slavery. If you earn a salary, your employer is renting > >your services for 40 hours a week, not purchasing your soul. Your time is > >the only real finite asset that you have, and once used it can never be > >recovered, so don't waste it by giving it away. > > > >"Time is the coin of your life. It is the only coin you have, and only you > >can determine how it will be spent. Be careful lest you let other people > >spend it for you." > > > >Carl Sandburg > >(1878 - 1967) > > > >----Original Message Follows---- > > > >Don't put an open statement in the HEADING unless you want it to execute at > >the beginning of every page you print. I'm not sure what happens when you > >try to open a file that's already open. Maybe nothing, or maybe it deletes > >whatever you've written before and starts over. > > > >Add a "status=#open_status" clause to the open statement and test the value > >of #open_status. If it isn't 0, then your attempt to open the file didn't > >work. Why? You might not be logged in to that drive, or the path in > >$full_name might not exist, or you might not have write-access to it, or > >there might already be a read-only file with that name. > > > >_________________________________________________________________ > >The new MSN 8: advanced junk mail protection and 2 months FREE* > >http://join.msn.com/?page=features/junkmail > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > > _________________________________________________________________ > STOP MORE SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > ----------------------------------------------------------------------- Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/ donm@ontko.com | "In the beginning, there was nothing, which exploded" _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 13:15:10 2003 Date: Tue, 15 Jul 2003 13:14:18 -0500 (EST) From: Don Mellen Subject: RE: [sqr-users] write 1 from $1 -> in header My bad, a better way is to leave the close and put a "new-page" just before it to flush the page. On Tue, 15 Jul 2003, Ben Anderson wrote: > ok, all your replies made sense, but it's still not working. It's pretty > weird. I have the file being opened in BEGIN-PROGRAM. The file is being > opened and written to. Then when it tries the write in the header - that's > when I get the error. I'm not closing the file until right before > END-PROGRAM. It errors out and then I'm left with the first page of data > with no header. Any ideas? > TIA, > Ben ----------------------------------------------------------------------- Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/ donm@ontko.com | "In the beginning, there was nothing, which exploded" _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 13:17:46 2003 From: "the dragon" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 13:15:49 -0500 Ben, ummmmmm, what exactly do you mean by "Then when it tries the write in the header - that's when I get the error" ???? I think we may be talking about a couple different issues here. Are you trying to create a flat file or write a printed page? Maybe you could include the entire program with your next post if it isn't too large? clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- ok, all your replies made sense, but it's still not working. It's pretty weird. I have the file being opened in BEGIN-PROGRAM. The file is being opened and written to. Then when it tries the write in the header - that's when I get the error. I'm not closing the file until right before END-PROGRAM. It errors out and then I'm left with the first page of data with no header. Any ideas? TIA, Ben _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 13:32:07 2003 From: "Ben Anderson" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 14:31:32 -0400 sorry - I should have done this originally: BEGIN-HEADING ...... if( #flag != 1 ) write 2 from $l3 write 2 from $l4 let #flag = 1 end-if END-HEADING BEGIN-PROGRAM Let $Program = 'fsaercnt' let $full_name = $Program || '.csv' open $full_name as 2 for-writing record=900:vary close 2 do print_detail_records END-PROGRAM Here's my error: Error on line 119: (SQR 3202) Specified file number not opened for writing. SQR: Program Aborting. I made sure I deleted this file before running. What happens is it creates the file, writes some data, and then errors when it tries to print the header. The file then contains the first page of print_detail_records, but no header. I only want the header to print once, which I know doesn't make sense. The reason is, my report writes out a .lis and this .csv and I want to keep all the print commands for the .lis right next to the write commands for the .csv, so that's why I want it in the BEGIN-HEADING....END-HEADING. -Ben >From: "Alexander, Steve" >Reply-To: sqr-users@sqrug.org >To: "'sqr-users@sqrug.org'" >Subject: RE: [sqr-users] write 1 from $1 -> in header >Date: Tue, 15 Jul 2003 11:11:48 -0700 > >What do you mean "write in the header?" Do you have write statements in >the >"begin-heading ... end-heading" section, or are you talking about writing a >header record to the file (a special record at the begining of a file that >contains different data than the other records)? > >-----Original Message----- >From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] >Sent: Tuesday, July 15, 2003 10:47 AM >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] write 1 from $1 -> in header > > >ok, all your replies made sense, but it's still not working. It's pretty >weird. I have the file being opened in BEGIN-PROGRAM. The file is being >opened and written to. Then when it tries the write in the header - that's >when I get the error. I'm not closing the file until right before >END-PROGRAM. It errors out and then I'm left with the first page of data >with no header. Any ideas? >TIA, >Ben > > >From: "the dragon" > >Reply-To: sqr-users@sqrug.org > >To: sqr-users@sqrug.org > >Subject: RE: [sqr-users] write 1 from $1 -> in header > >Date: Tue, 15 Jul 2003 11:18:23 -0500 > > > >Also, putting an open statement in the heading would never get executed > >unless print output was created - and print output may be created long > >after you try writing to a flat file that you wanted open. > > > >clark 'the dragon' willis > >dragon enterprises, consulting services > > > > > > > >PSA: Salary <> Slavery. If you earn a salary, your employer is renting > >your services for 40 hours a week, not purchasing your soul. Your time >is > >the only real finite asset that you have, and once used it can never be > >recovered, so don't waste it by giving it away. > > > >"Time is the coin of your life. It is the only coin you have, and only >you > >can determine how it will be spent. Be careful lest you let other people > >spend it for you." > > > >Carl Sandburg > >(1878 - 1967) > > > >----Original Message Follows---- > > > >Don't put an open statement in the HEADING unless you want it to execute >at > >the beginning of every page you print. I'm not sure what happens when >you > >try to open a file that's already open. Maybe nothing, or maybe it >deletes > >whatever you've written before and starts over. > > > >Add a "status=#open_status" clause to the open statement and test the >value > >of #open_status. If it isn't 0, then your attempt to open the file >didn't > >work. Why? You might not be logged in to that drive, or the path in > >$full_name might not exist, or you might not have write-access to it, or > >there might already be a read-only file with that name. > > > >_________________________________________________________________ > >The new MSN 8: advanced junk mail protection and 2 months FREE* > >http://join.msn.com/?page=features/junkmail > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > >_________________________________________________________________ >STOP MORE SPAM with the new MSN 8 and get 2 months FREE* >http://join.msn.com/?page=features/junkmail > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 13:46:07 2003 Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 13:45:19 -0500 From: "Sengupta, Rajib (CAG-CC-Contractor)" why are you using begin-heading for writing file-that is for writing reports you have to use Begin-Procedure.. some thing like this: BEGIN-PROGRAM Let $Program = 'fsaercnt' let $full_name = $Program || '.csv' open $full_name as 2 for-writing record=900:vary Do process_heading do print_detail_records close 2 END-PROGRAM Begin-procedure process_heading ...... if( #flag != 1 ) write 2 from $l3 write 2 from $l4 let #flag = 1 end-if end-procedure Rajib Sengupta Systems Analyst and Team Lead Peoplesoft Financial Consultant Conagra Business Systems Phone: 402-595-5749 -----Original Message----- From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] Sent: Tuesday, July 15, 2003 1:32 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] write 1 from $1 -> in header sorry - I should have done this originally: BEGIN-HEADING END-HEADING BEGIN-PROGRAM Let $Program = 'fsaercnt' let $full_name = $Program || '.csv' open $full_name as 2 for-writing record=900:vary close 2 do print_detail_records END-PROGRAM Here's my error: Error on line 119: (SQR 3202) Specified file number not opened for writing. SQR: Program Aborting. I made sure I deleted this file before running. What happens is it creates the file, writes some data, and then errors when it tries to print the header. The file then contains the first page of print_detail_records, but no header. I only want the header to print once, which I know doesn't make sense. The reason is, my report writes out a .lis and this .csv and I want to keep all the print commands for the .lis right next to the write commands for the .csv, so that's why I want it in the BEGIN-HEADING....END-HEADING. -Ben >From: "Alexander, Steve" >Reply-To: sqr-users@sqrug.org >To: "'sqr-users@sqrug.org'" >Subject: RE: [sqr-users] write 1 from $1 -> in header >Date: Tue, 15 Jul 2003 11:11:48 -0700 > >What do you mean "write in the header?" Do you have write statements in >the >"begin-heading ... end-heading" section, or are you talking about writing a >header record to the file (a special record at the begining of a file that >contains different data than the other records)? > >-----Original Message----- >From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] >Sent: Tuesday, July 15, 2003 10:47 AM >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] write 1 from $1 -> in header > > >ok, all your replies made sense, but it's still not working. It's pretty >weird. I have the file being opened in BEGIN-PROGRAM. The file is being >opened and written to. Then when it tries the write in the header - that's >when I get the error. I'm not closing the file until right before >END-PROGRAM. It errors out and then I'm left with the first page of data >with no header. Any ideas? >TIA, >Ben > > >From: "the dragon" > >Reply-To: sqr-users@sqrug.org > >To: sqr-users@sqrug.org > >Subject: RE: [sqr-users] write 1 from $1 -> in header > >Date: Tue, 15 Jul 2003 11:18:23 -0500 > > > >Also, putting an open statement in the heading would never get executed > >unless print output was created - and print output may be created long > >after you try writing to a flat file that you wanted open. > > > >clark 'the dragon' willis > >dragon enterprises, consulting services > > > > > > > >PSA: Salary <> Slavery. If you earn a salary, your employer is renting > >your services for 40 hours a week, not purchasing your soul. Your time >is > >the only real finite asset that you have, and once used it can never be > >recovered, so don't waste it by giving it away. > > > >"Time is the coin of your life. It is the only coin you have, and only >you > >can determine how it will be spent. Be careful lest you let other people > >spend it for you." > > > >Carl Sandburg > >(1878 - 1967) > > > >----Original Message Follows---- > > > >Don't put an open statement in the HEADING unless you want it to execute >at > >the beginning of every page you print. I'm not sure what happens when >you > >try to open a file that's already open. Maybe nothing, or maybe it >deletes > >whatever you've written before and starts over. > > > >Add a "status=#open_status" clause to the open statement and test the >value > >of #open_status. If it isn't 0, then your attempt to open the file >didn't > >work. Why? You might not be logged in to that drive, or the path in > >$full_name might not exist, or you might not have write-access to it, or > >there might already be a read-only file with that name. > > > >_________________________________________________________________ > >The new MSN 8: advanced junk mail protection and 2 months FREE* > >http://join.msn.com/?page=features/junkmail > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > >_________________________________________________________________ >STOP MORE SPAM with the new MSN 8 and get 2 months FREE* >http://join.msn.com/?page=features/junkmail > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 13:46:28 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 11:51:28 -0700 It looks like you open the file, then close it, then print detail records, which trigger the writing to the file. You shouldn't close the file until after you write those records. Also, SQR will automatically close the file when it terminates, so the close statement is usually optional. The only times you must explicitly close a file are if you want to (1) reuse the file number for another file, (2) reopen and reinitialize the file, (3) perform an operation like ftp on the file. -----Original Message----- From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] Sent: Tuesday, July 15, 2003 11:32 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] write 1 from $1 -> in header sorry - I should have done this originally: BEGIN-HEADING ...... if( #flag != 1 ) write 2 from $l3 write 2 from $l4 let #flag = 1 end-if END-HEADING BEGIN-PROGRAM Let $Program = 'fsaercnt' let $full_name = $Program || '.csv' open $full_name as 2 for-writing record=900:vary close 2 do print_detail_records END-PROGRAM Here's my error: Error on line 119: (SQR 3202) Specified file number not opened for writing. SQR: Program Aborting. I made sure I deleted this file before running. What happens is it creates the file, writes some data, and then errors when it tries to print the header. The file then contains the first page of print_detail_records, but no header. I only want the header to print once, which I know doesn't make sense. The reason is, my report writes out a .lis and this .csv and I want to keep all the print commands for the .lis right next to the write commands for the .csv, so that's why I want it in the BEGIN-HEADING....END-HEADING. -Ben >From: "Alexander, Steve" >Reply-To: sqr-users@sqrug.org >To: "'sqr-users@sqrug.org'" >Subject: RE: [sqr-users] write 1 from $1 -> in header >Date: Tue, 15 Jul 2003 11:11:48 -0700 > >What do you mean "write in the header?" Do you have write statements in >the >"begin-heading ... end-heading" section, or are you talking about writing a >header record to the file (a special record at the begining of a file that >contains different data than the other records)? > >-----Original Message----- >From: Ben Anderson [mailto:pegandersonbd1@hotmail.com] >Sent: Tuesday, July 15, 2003 10:47 AM >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] write 1 from $1 -> in header > > >ok, all your replies made sense, but it's still not working. It's pretty >weird. I have the file being opened in BEGIN-PROGRAM. The file is being >opened and written to. Then when it tries the write in the header - that's >when I get the error. I'm not closing the file until right before >END-PROGRAM. It errors out and then I'm left with the first page of data >with no header. Any ideas? >TIA, >Ben > > >From: "the dragon" > >Reply-To: sqr-users@sqrug.org > >To: sqr-users@sqrug.org > >Subject: RE: [sqr-users] write 1 from $1 -> in header > >Date: Tue, 15 Jul 2003 11:18:23 -0500 > > > >Also, putting an open statement in the heading would never get executed > >unless print output was created - and print output may be created long > >after you try writing to a flat file that you wanted open. > > > >clark 'the dragon' willis > >dragon enterprises, consulting services > > > > > > > >PSA: Salary <> Slavery. If you earn a salary, your employer is renting > >your services for 40 hours a week, not purchasing your soul. Your time >is > >the only real finite asset that you have, and once used it can never be > >recovered, so don't waste it by giving it away. > > > >"Time is the coin of your life. It is the only coin you have, and only >you > >can determine how it will be spent. Be careful lest you let other people > >spend it for you." > > > >Carl Sandburg > >(1878 - 1967) > > > >----Original Message Follows---- > > > >Don't put an open statement in the HEADING unless you want it to execute >at > >the beginning of every page you print. I'm not sure what happens when >you > >try to open a file that's already open. Maybe nothing, or maybe it >deletes > >whatever you've written before and starts over. > > > >Add a "status=#open_status" clause to the open statement and test the >value > >of #open_status. If it isn't 0, then your attempt to open the file >didn't > >work. Why? You might not be logged in to that drive, or the path in > >$full_name might not exist, or you might not have write-access to it, or > >there might already be a read-only file with that name. > > > >_________________________________________________________________ > >The new MSN 8: advanced junk mail protection and 2 months FREE* > >http://join.msn.com/?page=features/junkmail > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > >_________________________________________________________________ >STOP MORE SPAM with the new MSN 8 and get 2 months FREE* >http://join.msn.com/?page=features/junkmail > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 14:03:31 2003 From: "Ben Anderson" Subject: RE: [sqr-users] write 1 from $1 -> in header Date: Tue, 15 Jul 2003 15:02:03 -0400 that was it. The file was being closed before the final flush. Thanks!!! >From: Don Mellen >Reply-To: sqr-users@sqrug.org >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] write 1 from $1 -> in header >Date: Tue, 15 Jul 2003 13:14:18 -0500 (EST) > >My bad, a better way is to leave the close and put a "new-page" just >before it to flush the page. > >On Tue, 15 Jul 2003, Ben Anderson wrote: > > > ok, all your replies made sense, but it's still not working. It's >pretty > > weird. I have the file being opened in BEGIN-PROGRAM. The file is >being > > opened and written to. Then when it tries the write in the header - >that's > > when I get the error. I'm not closing the file until right before > > END-PROGRAM. It errors out and then I'm left with the first page of >data > > with no header. Any ideas? > > TIA, > > Ben > >----------------------------------------------------------------------- >Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/ >donm@ontko.com | "In the beginning, there was nothing, which exploded" > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 14:08:05 2003 From: Jim McKeever Date: Tue, 15 Jul 2003 13:04:48 -0600 Subject: [sqr-users] SQRs on UNIX vs. NT Good Afternoon Everyone! I've encountered a very strange situation and am wondering if anyone else has had this happen. I have written a program which, among other things, inserts values into a table based on whether or not a specific person already exists in the table. When I run the program on our NT server, it does exactly what it is supposed to, but when I run it on our UNIX server, it seems to delete all of the existing rows on the table before it does anything else. Of course, it then does a complete insert for everyone it encounters. I have verified that the code on NT is exactly the same as on UNIX. Any ideas on what's happening? Jim McKeever PeopleSoft Contractor - U.S. Nursing Corp. (800) 726-8773 x1973 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 14:18:07 2003 From: "the dragon" Subject: Re: [sqr-users] SQRs on UNIX vs. NT Date: Tue, 15 Jul 2003 14:17:51 -0500 It sounds to me like you are running two different versions of the same program. Check pathing hierarchy to make certain your executing the program you think you are, because the running the same program on two different environments will not make the program behave differently (unless it contains environment specific code).... clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Good Afternoon Everyone! I've encountered a very strange situation and am wondering if anyone else has had this happen. I have written a program which, among other things, inserts values into a table based on whether or not a specific person already exists in the table. When I run the program on our NT server, it does exactly what it is supposed to, but when I run it on our UNIX server, it seems to delete all of the existing rows on the table before it does anything else. Of course, it then does a complete insert for everyone it encounters. I have verified that the code on NT is exactly the same as on UNIX. Any ideas on what's happening? Jim McKeever PeopleSoft Contractor - U.S. Nursing Corp. (800) 726-8773 x1973 _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 14:30:06 2003 From: EricRection@aol.com Date: Tue, 15 Jul 2003 15:28:59 EDT Subject: Re: [sqr-users] SQR Code needed to convert employee name from upper case to m... Hope nobody minds this interruption to the "Open File" controversy. ROTNAME is short for Rotate Name, e.g. "Last,First,Prefix" becomes "First Prefix Last". There is a procedure called Proper in - wait for it! - PROPER.SQC but it doesn't handle von Richtofen, O'Toole, Duncan-Smith etc, and you wouldn't want to improperly capitalise the name of the Leader of the Opposition in the UK. Surely? _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 15:19:38 2003 From: Jim McKeever Subject: RE: [sqr-users] SQRs on UNIX vs. NT Date: Tue, 15 Jul 2003 14:16:15 -0600 I have verified that the code is exactly the same. That is why I'm so baffled... -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 1:18 PM To: sqr-users@sqrug.org Subject: Re: [sqr-users] SQRs on UNIX vs. NT It sounds to me like you are running two different versions of the same program. Check pathing hierarchy to make certain your executing the program you think you are, because the running the same program on two different environments will not make the program behave differently (unless it contains environment specific code).... clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Good Afternoon Everyone! I've encountered a very strange situation and am wondering if anyone else has had this happen. I have written a program which, among other things, inserts values into a table based on whether or not a specific person already exists in the table. When I run the program on our NT server, it does exactly what it is supposed to, but when I run it on our UNIX server, it seems to delete all of the existing rows on the table before it does anything else. Of course, it then does a complete insert for everyone it encounters. I have verified that the code on NT is exactly the same as on UNIX. Any ideas on what's happening? Jim McKeever PeopleSoft Contractor - U.S. Nursing Corp. (800) 726-8773 x1973 _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 15:35:11 2003 Date: Tue, 15 Jul 2003 16:36:18 -0400 From: "Dan Brinkley" Subject: RE: [sqr-users] SQRs on UNIX vs. NT What about the -S option for SQR that shows the status of all the SQL Cursors? I know it's -S for NT. Not sure for UNIX. But it might show something. Daniel Brinkley Techneglas, inc. >>> JMcKeever@fastaff.com 07/15/2003 4:16:15 PM >>> I have verified that the code is exactly the same. That is why I'm so baffled... -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 1:18 PM To: sqr-users@sqrug.org Subject: Re: [sqr-users] SQRs on UNIX vs. NT It sounds to me like you are running two different versions of the same program. Check pathing hierarchy to make certain your executing the program you think you are, because the running the same program on two different environments will not make the program behave differently (unless it contains environment specific code).... clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Good Afternoon Everyone! I've encountered a very strange situation and am wondering if anyone else has had this happen. I have written a program which, among other things, inserts values into a table based on whether or not a specific person already exists in the table. When I run the program on our NT server, it does exactly what it is supposed to, but when I run it on our UNIX server, it seems to delete all of the existing rows on the table before it does anything else. Of course, it then does a complete insert for everyone it encounters. I have verified that the code on NT is exactly the same as on UNIX. Any ideas on what's happening? Jim McKeever PeopleSoft Contractor - U.S. Nursing Corp. (800) 726-8773 x1973 _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 15:50:07 2003 From: "the dragon" Subject: RE: [sqr-users] SQRs on UNIX vs. NT Date: Tue, 15 Jul 2003 15:49:29 -0500 Daniel, Good call. That should show exactly what is happening. clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- What about the -S option for SQR that shows the status of all the SQL Cursors? I know it's -S for NT. Not sure for UNIX. But it might show something. Daniel Brinkley Techneglas, inc. >>> JMcKeever@fastaff.com 07/15/2003 4:16:15 PM >>> I have verified that the code is exactly the same. That is why I'm so baffled... _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 16:06:11 2003 From: Jim McKeever Subject: RE: [sqr-users] SQRs on UNIX vs. NT Date: Tue, 15 Jul 2003 15:02:57 -0600 OK, I figured it out. In case anyone else doesn't know this...apparently even though I was using TRUNCATE TABLE only in an If statement, the SQR performed this even when the if statement was not executed. When I changed it to DELETE FROM, it performed properly. Still don't see why it would only do it on UNIX, but I guess as long as it's working, that's the important thing! Thanks to everyone for your assistance! -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 2:49 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] SQRs on UNIX vs. NT Daniel, Good call. That should show exactly what is happening. clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- What about the -S option for SQR that shows the status of all the SQL Cursors? I know it's -S for NT. Not sure for UNIX. But it might show something. Daniel Brinkley Techneglas, inc. >>> JMcKeever@fastaff.com 07/15/2003 4:16:15 PM >>> I have verified that the code is exactly the same. That is why I'm so baffled... _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 16:50:06 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] SQRs on UNIX vs. NT Date: Tue, 15 Jul 2003 14:53:43 -0700 Wait a minute - let's not close the book on this too quickly. Could you please show us the code that performed a truncate even though it was on an unexecuted branch of an IF statement? By the way, there are several reasons identical code could behave differently in different environments. First, different versions of the include files. Second, "#IFDEF UNIX" and "#IFDEF NT" preprocessor commands. Third, different bugs in the SQR server on different platforms. Fourth, different environment variables. -----Original Message----- From: Jim McKeever [mailto:JMcKeever@fastaff.com] Sent: Tuesday, July 15, 2003 2:03 PM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] SQRs on UNIX vs. NT OK, I figured it out. In case anyone else doesn't know this...apparently even though I was using TRUNCATE TABLE only in an If statement, the SQR performed this even when the if statement was not executed. When I changed it to DELETE FROM, it performed properly. Still don't see why it would only do it on UNIX, but I guess as long as it's working, that's the important thing! Thanks to everyone for your assistance! -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 2:49 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] SQRs on UNIX vs. NT Daniel, Good call. That should show exactly what is happening. clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- What about the -S option for SQR that shows the status of all the SQL Cursors? I know it's -S for NT. Not sure for UNIX. But it might show something. Daniel Brinkley Techneglas, inc. >>> JMcKeever@fastaff.com 07/15/2003 4:16:15 PM >>> I have verified that the code is exactly the same. That is why I'm so baffled... _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 17:00:07 2003 From: Jim McKeever Subject: RE: [sqr-users] SQRs on UNIX vs. NT Date: Tue, 15 Jul 2003 15:56:58 -0600 There are no #IfDef commands anywhere in the program. It's pretty straightforward really. Here's the code snippet: !*********************************************************************** Begin-PROCEDURE Get-Date-Range !This is the initial Select from the Run Cntrl Panel !*********************************************************************** Begin-SELECT RC.FROMDATE RC.THRUDATE RC.OVERRIDE_IND If &RC.OVERRIDE_IND = 'Y' Do Truncate-Table End-If FROM PS_RUN_CNTL_HR RC WHERE RC.OPRID = $Prcs_OprID AND RC.RUN_CNTL_ID = $Prcs_Run_Cntl_ID End-SELECT End-PROCEDURE !*********************************************************************** Begin-PROCEDURE Truncate-Table !This is where the TRUNCATE TABLE command originally was !*********************************************************************** Begin-SQL On-Error=SQL-Error DELETE FROM PS_USN_GIFT_AWARD End-SQL End-PROCEDURE -----Original Message----- From: Alexander, Steve [mailto:Steve.Alexander@ci.sj.ca.us] Sent: Tuesday, July 15, 2003 3:54 PM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] SQRs on UNIX vs. NT Wait a minute - let's not close the book on this too quickly. Could you please show us the code that performed a truncate even though it was on an unexecuted branch of an IF statement? By the way, there are several reasons identical code could behave differently in different environments. First, different versions of the include files. Second, "#IFDEF UNIX" and "#IFDEF NT" preprocessor commands. Third, different bugs in the SQR server on different platforms. Fourth, different environment variables. -----Original Message----- From: Jim McKeever [mailto:JMcKeever@fastaff.com] Sent: Tuesday, July 15, 2003 2:03 PM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] SQRs on UNIX vs. NT OK, I figured it out. In case anyone else doesn't know this...apparently even though I was using TRUNCATE TABLE only in an If statement, the SQR performed this even when the if statement was not executed. When I changed it to DELETE FROM, it performed properly. Still don't see why it would only do it on UNIX, but I guess as long as it's working, that's the important thing! Thanks to everyone for your assistance! -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 2:49 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] SQRs on UNIX vs. NT Daniel, Good call. That should show exactly what is happening. clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- What about the -S option for SQR that shows the status of all the SQL Cursors? I know it's -S for NT. Not sure for UNIX. But it might show something. Daniel Brinkley Techneglas, inc. >>> JMcKeever@fastaff.com 07/15/2003 4:16:15 PM >>> I have verified that the code is exactly the same. That is why I'm so baffled... _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 15 22:06:11 2003 Subject: RE: [sqr-users] SQR books From: mark.a.o.pabilona@accenture.com Date: Wed, 16 Jul 2003 10:59:39 +0800 Thanks everyone for your recommendations! It's great to be part of this SQR-USERS group! Cheers to everyone Mark A. O. Pabilona Alliance Utilization,CIO-SD Accenture 9th floor 6750 Bldg Ayala Ave., Makati City Philippines 1200 Phone: +632 841-0111 loc.4315 Octel: 632/4315 E-mail:mark.a.o.pabilona@accenture.com "Wunsche, Kathy" To: "'sqr-users@sqrug.org'" Sent by: cc: sqr-users-admin@sqrug.or Subject: RE: [sqr-users] SQR books g 07/15/2003 11:24 PM Please respond to sqr-users HI Paul Hoyte: Thanks for getting back to me. I will pursue that. Kathy -----Original Message----- From: Paul Hoyte [mailto:Paul.Hoyte@sharidionne.com] Sent: Tuesday, July 15, 2003 11:13 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] SQR books Kathy: The books come with the product. If you are interested in getting more copies, just contact Brio and order directly from them (for a fee of course).... Paul Hoyte (248) 752-6970 Cell (248) 559-6868 Office (586) 421-9640 Fax paul.hoyte@sharidionne.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf Of Wunsche, Kathy Sent: Tuesday, July 15, 2003 11:01 AM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] SQR books Hi: Could you please tell me how to get the free book that comes with sqribe? We don't have it. Thank you. Kathy -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 15, 2003 8:05 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] SQR books The best book is the free one that comes with sqribe. But, there are some additional excellant resources. go to http://www.amazon.com and search on sqr. I recommend : sqr in peoplesoft and other applications by landres sqr programming language reference by mellon peoplesoft sqr cheatsheet. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hello, We are in the process of purchasing SQR resources. I'd like to ask your expert advices on what books we should purchase for SQR? We'd like to get the most informative resource possible, that is why I'm asking your help. Thanks on any help on this. Have a great day! _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 16 14:00:22 2003 Date: Wed, 16 Jul 2003 14:58:37 -0400 (EDT) From: Jay Sagadraca Subject: [sqr-users] SQR calling another sqr Hello !!! Is it possible to call another sqr within an sqr program? I checked the commands like call, call system and execute and it didn't say anything. Please help and Thank You !!! Jay V. Sagadraca Markham, Ontario, Canada email : knight7883@yahoo.ca --------------------------------- Post your free ad now! Yahoo! Canada Personals _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 16 14:03:05 2003 Date: Wed, 16 Jul 2003 14:58:58 -0400 (EDT) From: Jay Sagadraca Subject: [sqr-users] SQR calling another sqr Hello !!! Is it possible to call another sqr within an sqr program? I checked the commands like call, call system and execute and it didn't say anything. Please help and Thank You !!! Jay V. Sagadraca Markham, Ontario, Canada email : knight7883@yahoo.ca --------------------------------- Post your free ad now! Yahoo! Canada Personals _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 16 14:13:06 2003 Date: Wed, 16 Jul 2003 15:12:27 -0400 From: "Prasanna Menta" Subject: Re: [sqr-users] SQR calling another sqr Yes, use the call-system, build a string with all the required parms as seen in the report-distrubution logs and this should work. Note: you will need to provide the userid/password in the string. Jay Sagadraca wrote: > > Hello !!! > > Is it possible to call another sqr within an sqr program? I checked the commands like call, call system and execute and it didn't say anything. > > Please help and Thank You !!! > > Jay V. Sagadraca > > Markham, Ontario, Canada > > email : knight7883@yahoo.ca > > --------------------------------- > Post your free ad now! Yahoo! Canada Personals > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 16 14:32:06 2003 From: "Ashish Bhatt" Subject: Re: [sqr-users] SQR calling another sqr Date: Wed, 16 Jul 2003 19:31:49 +0000 it is easy i have done this. >From: Jay Sagadraca >Reply-To: sqr-users@sqrug.org >To: sqr-users@sqrug.org >Subject: [sqr-users] SQR calling another sqr >Date: Wed, 16 Jul 2003 14:58:58 -0400 (EDT) > >Hello !!! > > Is it possible to call another sqr within an sqr program? I >checked the commands like call, call system and execute and it didn't say >anything. > > Please help and Thank You !!! > > > > >Jay V. Sagadraca > >Markham, Ontario, Canada > >email : knight7883@yahoo.ca > > > >--------------------------------- >Post your free ad now! Yahoo! Canada Personals > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Get 10mb of inbox space with MSN Hotmail Extra Storage http://join.msn.com/?pgmarket=en-sg at only S$36 including GST _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 16 15:15:39 2003 From: "the dragon" Date: Wed, 16 Jul 2003 15:12:55 -0500 Subject: [sqr-users] Revenge of the mainframe (aka comp3) Hi all, I have an unusual (well, for me anyway) task to perform at the client I am at. We are running Financials v8.x with the database being udb (v7.2?) on a mainframe (OS/390). I am creating an sqr which will read an ascii file, perform some validation and data massaging and then creating an output file to be used as input for a cobol program. The challenge - some of the fields are *number* and defined in the copy book as comp and comp-3, which I understand to be packed decimal. How do I go about creating these mysterious little beasties? I read through the archive list and the best I could come up with is "sqr doesn't do this, build comething in another langauge and call it" from 2000. I was wondering if anyone has anything newer to add about this issue that might be of a more positive aspect? thanks in advance clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 16 17:12:48 2003 From: Franck Masson Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) Date: Wed, 16 Jul 2003 15:17:52 -0700 For a more positive aspect visit the web site of Tony delia http://www.sqrtools.com/funccmp3.htm -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: mercredi 16 juillet 2003 22:13 To: sqr-users@sqrug.org Subject: [sqr-users] Revenge of the mainframe (aka comp3) Hi all, I have an unusual (well, for me anyway) task to perform at the client I am at. We are running Financials v8.x with the database being udb (v7.2?) on a mainframe (OS/390). I am creating an sqr which will read an ascii file, perform some validation and data massaging and then creating an output file to be used as input for a cobol program. The challenge - some of the fields are *number* and defined in the copy book as comp and comp-3, which I understand to be packed decimal. How do I go about creating these mysterious little beasties? I read through the archive list and the best I could come up with is "sqr doesn't do this, build comething in another langauge and call it" from 2000. I was wondering if anyone has anything newer to add about this issue that might be of a more positive aspect? thanks in advance clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 07:28:19 2003 From: "Wunsche, Kathy" Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) Date: Thu, 17 Jul 2003 08:33:41 -0400 Hi: One way would be to make those output fields of your sqr as number (of course) and then add a litle something to the cobol program like so: This is the output file of your sqr program and would be described in the File Section of your cobol program as an input file. 01 file-from-sqr. 05 num1-field-from-sqr pic 99999. 05 num2-field-from-sqr pic 99999. etc. This would be in the working storage section. 01 filler. 05 numberfield1 pic s9(5) comp-3. 05 numberfield2 pic s9(5) comp-3. etc. Then right in the beginning of the Procedure Division, right after you read a record in, do this: move num1-field-from-sqr to numberfield1 move num2-field-from-sqr to numberfield2 etcetera for each additional field. What the Cobol program will do during the move statements is to convert the field to the correct format, either packed (comp-3) or binary (comp). If you are not allowed to change the Cobol program that is reading in the output of your sqr, then maybe with some help you could write a tiny Cobol program that does the converts and then use the output of that as the input to the other program. Of course maybe you'll get some answers on how to do this all in SQR. Kathy -----Original Message----- From: Franck Masson [mailto:Franck.Masson@brio.com] Sent: Wednesday, July 16, 2003 6:18 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) For a more positive aspect visit the web site of Tony delia http://www.sqrtools.com/funccmp3.htm -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: mercredi 16 juillet 2003 22:13 To: sqr-users@sqrug.org Subject: [sqr-users] Revenge of the mainframe (aka comp3) Hi all, I have an unusual (well, for me anyway) task to perform at the client I am at. We are running Financials v8.x with the database being udb (v7.2?) on a mainframe (OS/390). I am creating an sqr which will read an ascii file, perform some validation and data massaging and then creating an output file to be used as input for a cobol program. The challenge - some of the fields are *number* and defined in the copy book as comp and comp-3, which I understand to be packed decimal. How do I go about creating these mysterious little beasties? I read through the archive list and the best I could come up with is "sqr doesn't do this, build comething in another langauge and call it" from 2000. I was wondering if anyone has anything newer to add about this issue that might be of a more positive aspect? thanks in advance clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 09:29:34 2003 From: "Wayne Rodgers" Date: Thu, 17 Jul 2003 09:28:40 -0500 Subject: [sqr-users] PDF formats in Vista and PeopleSoft are slightly different We are in the process of setting up delivered and custom PeopleSoft asset reports on VistaPlus. Adhoc reports go directly to Report Manager in PDF format. Monthly batch reports are generated in an LIS file and then captured into Vista. Users click the PDF download button in Vista Web to have the reports printed in PDF format. The problem is the column headings, data, and totals are misaligned and deviate slightly (3 or 4 characters) between reports. If you make adjustments for the Vista report it affects the adhoc report and visa versa. We are using the delivered SQC - PTPSL225. #if {PRINTER_TYPE} = 'HPLASERJET' declare-printer HP-definition type=HPLASERJET point-size=5 symbol-set=0U ! ASCII symbol set pitch=24 font=2 ! Courier font end-declare #endif Any recommendations? Thanks, Wayne Rodgers _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 09:51:07 2003 From: "the dragon" Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) Date: Thu, 17 Jul 2003 09:50:40 -0500 Kathy, Thanks. That is actually plan B for right now - that I create the output as normal numbers (ASCII) and then a small cobol program is run between the output and the other cobol program to take the numbers and squash then into mainframese. The reason that is plan B is that I have always opined that SQR could do *anything* up to and including destroying and creating matter, so if there is a way to accomplish what I want without relying on archaic languages, I would like to find it. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hi: One way would be to make those output fields of your sqr as number (of course) and then add a litle something to the cobol program like so: This is the output file of your sqr program and would be described in the File Section of your cobol program as an input file. 01 file-from-sqr. 05 num1-field-from-sqr pic 99999. 05 num2-field-from-sqr pic 99999. etc. This would be in the working storage section. 01 filler. 05 numberfield1 pic s9(5) comp-3. 05 numberfield2 pic s9(5) comp-3. etc. Then right in the beginning of the Procedure Division, right after you read a record in, do this: move num1-field-from-sqr to numberfield1 move num2-field-from-sqr to numberfield2 etcetera for each additional field. What the Cobol program will do during the move statements is to convert the field to the correct format, either packed (comp-3) or binary (comp). If you are not allowed to change the Cobol program that is reading in the output of your sqr, then maybe with some help you could write a tiny Cobol program that does the converts and then use the output of that as the input to the other program. Of course maybe you'll get some answers on how to do this all in SQR. Kathy -----Original Message----- For a more positive aspect visit the web site of Tony delia http://www.sqrtools.com/funccmp3.htm -----Original Message----- Hi all, I have an unusual (well, for me anyway) task to perform at the client I am at. We are running Financials v8.x with the database being udb (v7.2?) on a mainframe (OS/390). I am creating an sqr which will read an ascii file, perform some validation and data massaging and then creating an output file to be used as input for a cobol program. The challenge - some of the fields are *number* and defined in the copy book as comp and comp-3, which I understand to be packed decimal. How do I go about creating these mysterious little beasties? I read through the archive list and the best I could come up with is "sqr doesn't do this, build comething in another langauge and call it" from 2000. I was wondering if anyone has anything newer to add about this issue that might be of a more positive aspect? thanks in advance clark 'the dragon' willis dragon enterprises, consulting services _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 10:12:06 2003 Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) From: apthornton@nisource.com Date: Thu, 17 Jul 2003 11:11:36 -0400 You might want to find the wisest Mainframe guru at the client site. He can probably tell you how the decimals are packed and how to unpack them- any MF Guru worth his salt has hex edited a file at some point to massage a bit of data that has been giving them problems, and can probably pack a decimal by hand. Then, you can probably create a string version of the packed number. (It seems like some packed numbers are site-specific.) I don't have the destroying and creating matter option.... yet. I've heard it's quite handy; I can't wait for the upgrade. :-) Allen "the dragon" cc: Sent by: Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) sqr-users-admin@ sqrug.org 07/17/2003 10:50 AM Please respond to sqr-users Kathy, Thanks. That is actually plan B for right now - that I create the output as normal numbers (ASCII) and then a small cobol program is run between the output and the other cobol program to take the numbers and squash then into mainframese. The reason that is plan B is that I have always opined that SQR could do *anything* up to and including destroying and creating matter, so if there is a way to accomplish what I want without relying on archaic languages, I would like to find it. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hi: One way would be to make those output fields of your sqr as number (of course) and then add a litle something to the cobol program like so: This is the output file of your sqr program and would be described in the File Section of your cobol program as an input file. 01 file-from-sqr. 05 num1-field-from-sqr pic 99999. 05 num2-field-from-sqr pic 99999. etc. This would be in the working storage section. 01 filler. 05 numberfield1 pic s9(5) comp-3. 05 numberfield2 pic s9(5) comp-3. etc. Then right in the beginning of the Procedure Division, right after you read a record in, do this: move num1-field-from-sqr to numberfield1 move num2-field-from-sqr to numberfield2 etcetera for each additional field. What the Cobol program will do during the move statements is to convert the field to the correct format, either packed (comp-3) or binary (comp). If you are not allowed to change the Cobol program that is reading in the output of your sqr, then maybe with some help you could write a tiny Cobol program that does the converts and then use the output of that as the input to the other program. Of course maybe you'll get some answers on how to do this all in SQR. Kathy -----Original Message----- For a more positive aspect visit the web site of Tony delia http://www.sqrtools.com/funccmp3.htm -----Original Message----- Hi all, I have an unusual (well, for me anyway) task to perform at the client I am at. We are running Financials v8.x with the database being udb (v7.2?) on a mainframe (OS/390). I am creating an sqr which will read an ascii file, perform some validation and data massaging and then creating an output file to be used as input for a cobol program. The challenge - some of the fields are *number* and defined in the copy book as comp and comp-3, which I understand to be packed decimal. How do I go about creating these mysterious little beasties? I read through the archive list and the best I could come up with is "sqr doesn't do this, build comething in another langauge and call it" from 2000. I was wondering if anyone has anything newer to add about this issue that might be of a more positive aspect? thanks in advance clark 'the dragon' willis dragon enterprises, consulting services _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 10:36:14 2003 Date: Thu, 17 Jul 2003 10:34:40 -0500 (EST) From: Don Mellen Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) Hmmm. Searching the site, I found the folowing message... http://www.sqrug.org/sqr-users/sqrusers_00q4/msg00573.html from Tony DeLia which also had a reference to his site, where I found... http://www.sqrtools.com/funccmp3.htm which would seem to handle the comp-3. Would that help? On Thu, 17 Jul 2003, the dragon wrote: > Kathy, > > Thanks. That is actually plan B for right now - that I create the output as > normal numbers (ASCII) and then a small cobol program is run between the > output and the other cobol program to take the numbers and squash then into > mainframese. > > The reason that is plan B is that I have always opined that SQR could do > *anything* up to and including destroying and creating matter, so if there > is a way to accomplish what I want without relying on archaic languages, I > would like to find it. > > clark 'the dragon' willis > dragon enterprises, consulting services ----------------------------------------------------------------------- Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/ donm@ontko.com | "In the beginning, there was nothing, which exploded" _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 10:42:06 2003 From: "Wunsche, Kathy" Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) Date: Thu, 17 Jul 2003 11:48:49 -0400 Clark: You probably know this but just in case: In Cobol, a number could be represented as an alphanumeric field: pic x(5) could represent 19432 like this: f1 f9 f4 f3 f2 (f = nonprinting plus sign) where f1 takes up one byte and f9 takes up one byte etc. or as a numeric field pic 9(5) c1 c9 c4 c3 c2 (c = internal equivalent of plus sign) The comp-3 internal representation of this field would only take up three positions and would be: comp-3 pic 9(5) 19 43 2f comp-3 pic s9(5) 19 43 2c comp-3 pic s9(5) 19 43 2d if the number were minus In order to execute a valid move statement, the source field must be defined as numeric 9(5). Kathy -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Thursday, July 17, 2003 10:51 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) Kathy, Thanks. That is actually plan B for right now - that I create the output as normal numbers (ASCII) and then a small cobol program is run between the output and the other cobol program to take the numbers and squash then into mainframese. The reason that is plan B is that I have always opined that SQR could do *anything* up to and including destroying and creating matter, so if there is a way to accomplish what I want without relying on archaic languages, I would like to find it. clark 'the dragon' willis dragon enterprises, consulting services PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hi: One way would be to make those output fields of your sqr as number (of course) and then add a litle something to the cobol program like so: This is the output file of your sqr program and would be described in the File Section of your cobol program as an input file. 01 file-from-sqr. 05 num1-field-from-sqr pic 99999. 05 num2-field-from-sqr pic 99999. etc. This would be in the working storage section. 01 filler. 05 numberfield1 pic s9(5) comp-3. 05 numberfield2 pic s9(5) comp-3. etc. Then right in the beginning of the Procedure Division, right after you read a record in, do this: move num1-field-from-sqr to numberfield1 move num2-field-from-sqr to numberfield2 etcetera for each additional field. What the Cobol program will do during the move statements is to convert the field to the correct format, either packed (comp-3) or binary (comp). If you are not allowed to change the Cobol program that is reading in the output of your sqr, then maybe with some help you could write a tiny Cobol program that does the converts and then use the output of that as the input to the other program. Of course maybe you'll get some answers on how to do this all in SQR. Kathy -----Original Message----- For a more positive aspect visit the web site of Tony delia http://www.sqrtools.com/funccmp3.htm -----Original Message----- Hi all, I have an unusual (well, for me anyway) task to perform at the client I am at. We are running Financials v8.x with the database being udb (v7.2?) on a mainframe (OS/390). I am creating an sqr which will read an ascii file, perform some validation and data massaging and then creating an output file to be used as input for a cobol program. The challenge - some of the fields are *number* and defined in the copy book as comp and comp-3, which I understand to be packed decimal. How do I go about creating these mysterious little beasties? I read through the archive list and the best I could come up with is "sqr doesn't do this, build comething in another langauge and call it" from 2000. I was wondering if anyone has anything newer to add about this issue that might be of a more positive aspect? thanks in advance clark 'the dragon' willis dragon enterprises, consulting services _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 11:25:08 2003 Date: Thu, 17 Jul 2003 13:23:43 -0300 From: "Peter Clark" Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) >The reason that is plan B is that I have always opined that SQR could do >*anything* up to and including destroying and creating matter, so if there >is a way to accomplish what I want without relying on archaic languages, I >would like to find it. COBOL may be "archaic" (as you refer to it) but that just means that it is good enough to have withstood the test of time (name me another programming language that has been around for nearly 50 years, is available on just about any platform and has been able to evolve with the times). In fact, it does several things better than SQR (e.g. arrays or processing ASCII as easily as it does EBCDIC), and given its longevity so far will probably be still around when people are calling SQR an archaic language, so let's have a little respect, huh? :-) _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 12:02:34 2003 Date: Thu, 17 Jul 2003 10:01:44 -0700 (PDT) From: D Patel Subject: [sqr-users] How to deal with REF CURSOR??? Hi ALL, I am working on SQR Reports (V8.1.0) and we are fetching data from ORACLE9i as database. Can I use REF Cursor returned by ORACLE Procedure? If yes, how?? Thanks in advance. Thanks, D Patel __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 12:07:05 2003 Date: Thu, 17 Jul 2003 13:06:47 -0400 (EDT) From: Kevin Laroche Subject: [sqr-users] Dynamic array addressing? Hi to all I have inheirited some bloated code full of tidbits like this let Array1.col(#i,9) = Array1.col(#i,9) + 1 and let Array1.col2(#i,9) = Array1.col2(#i,9) + 1 and let Array1.col3(#i,9) = Array1.col3(#i,9) + 1 I could really put this report on a diet if I could code something like this if a variable = 1 let $column_number = 'col' end-if if a variable = 2 let $column_number = 'col2' end-if if a variable = 3 let $column_number = 'col3' end-if let Array1.[$column_number](#i,9) = Array1.[$column_number](#i,9) + 1 I know you can use dynamic SQR for select where and order by. Can it done for arrays or is there a better way that I have missed? Thanks to all Kevin LaRoche at the Canadian Human Rights Commision Ottawa Ontario _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 12:12:05 2003 From: "the dragon" Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3) Date: Thu, 17 Jul 2003 12:11:45 -0500 Yes, I did see that message, but I also saw this one, http://www.sqrug.org/sqr-users/sqrusers_00q4/msg00572.html , and I thought the message I was viewing was the last message, although it appears it wasn't.... clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Hmmm. Searching the site, I found the folowing message... http://www.sqrug.org/sqr-users/sqrusers_00q4/msg00573.html from Tony DeLia which also had a reference to his site, where I found... http://www.sqrtools.com/funccmp3.htm which would seem to handle the comp-3. Would that help? On Thu, 17 Jul 2003, the dragon wrote: > Kathy, > > Thanks. That is actually plan B for right now - that I create the output as > normal numbers (ASCII) and then a small cobol program is run between the > output and the other cobol program to take the numbers and squash then into > mainframese. > > The reason that is plan B is that I have always opined that SQR could do > *anything* up to and including destroying and creating matter, so if there > is a way to accomplish what I want without relying on archaic languages, I > would like to find it. > > clark 'the dragon' willis > dragon enterprises, consulting services _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 13:00:06 2003 From: "Wood, Stuart" Date: Thu, 17 Jul 2003 13:59:20 -0400 Subject: [sqr-users] FTP From SQR Does anyone have some sample code that FTPs a file from NT to Unix? Thanks, Stu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 13:02:05 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] Dynamic array addressing? Date: Thu, 17 Jul 2003 11:05:41 -0700 I don't think you can use a dynamic variable for an array field name, but you can use array-add to combine those three additions into one command. It seems like you could use a third dimension in the array. That's not possible, but perhaps you could restructure the first or second dimension - then you could use a loop! Suppose the second dimension is currently 0 - 9 and you have five columns. You could change the occurs clause to give you 50 elements. Then columns 1 - 5 for item 9 would be second index values 45 - 49. Columns 1 - 5 for item 8 would be second index values 40 - 44, etc. -----Original Message----- From: Kevin Laroche [mailto:bydesign@magma.ca] Sent: Thursday, July 17, 2003 10:07 AM To: sqr-users@sqrug.org Subject: [sqr-users] Dynamic array addressing? Hi to all I have inheirited some bloated code full of tidbits like this let Array1.col(#i,9) = Array1.col(#i,9) + 1 and let Array1.col2(#i,9) = Array1.col2(#i,9) + 1 and let Array1.col3(#i,9) = Array1.col3(#i,9) + 1 I could really put this report on a diet if I could code something like this if a variable = 1 let $column_number = 'col' end-if if a variable = 2 let $column_number = 'col2' end-if if a variable = 3 let $column_number = 'col3' end-if let Array1.[$column_number](#i,9) = Array1.[$column_number](#i,9) + 1 I know you can use dynamic SQR for select where and order by. Can it done for arrays or is there a better way that I have missed? Thanks to all Kevin LaRoche at the Canadian Human Rights Commision Ottawa Ontario _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 13:10:23 2003 Subject: Re: [sqr-users] FTP From SQR From: William Goedicke Date: Thu, 17 Jul 2003 14:09:12 -0400 Dear Stuart - >>>>> "Stuart" == Stuart Wood writes: Stuart> Does anyone have some sample code that FTPs a file from NT Stuart> to Unix? Thanks, This question is repeated every month or two. You should check the archive: http://www.sqrug.org/sqr-users/ Yours - Billy ============================================================ William Goedicke goedicke@goedsole.com http://www.goedsole.com:8080 ============================================================ Lest we forget: The devil's in the details _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 17:59:57 2003 From: "the dragon" Date: Thu, 17 Jul 2003 17:57:13 -0500 Subject: [sqr-users] validating date from yyyymodd input Hi all. I am searching the database as we speak, but there are 281 matches to week through with my search criteria, so I'll ask here also. Maybe save some time. I am having users enter a date as YYYYMODD into a flat file and then checking to make certain what they have entered is a valid date in the sqr before I continue processing. If the date entered is invalid, I am going to write an error message and continue processing the remaining records - I don't want the entire sqr to blow up if the users act as users. I know I can check to make sure the field in numeric, but then how can I check to see if the date is valid? I am trying to leverage datetime.sqc, and use begin-procedure Get-DateComponents ($indate,:#wkYears,:#wkMonths,:#wkDays) but I am not sure this will really do what I want - any ideas? I haven't been using sqr as much as I would have liked over the past 18 months and I am rustier than I should be, so pardon the questions. Boy does it feel good to use it again though!!! clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 20:15:47 2003 From: "Paul Hoyte" Subject: RE: [sqr-users] validating date from yyyymodd input Date: Thu, 17 Jul 2003 21:12:52 -0400 Clark: I'm sure there are other ways to do this but the thing that comes to mind right away is the substr the field into 3 variables and then evaluate each one to see if it meets the correct values for year, month, and date....... If all 3 pass then you know you have a valid field.... Paul Hoyte (248) 752-6970 Cell (248) 559-6868 Office (586) 421-9640 Fax paul.hoyte@sharidionne.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf Of the dragon Sent: Thursday, July 17, 2003 6:57 PM To: sqr-users@sqrug.org Subject: [sqr-users] validating date from yyyymodd input Hi all. I am searching the database as we speak, but there are 281 matches to week through with my search criteria, so I'll ask here also. Maybe save some time. I am having users enter a date as YYYYMODD into a flat file and then checking to make certain what they have entered is a valid date in the sqr before I continue processing. If the date entered is invalid, I am going to write an error message and continue processing the remaining records - I don't want the entire sqr to blow up if the users act as users. I know I can check to make sure the field in numeric, but then how can I check to see if the date is valid? I am trying to leverage datetime.sqc, and use begin-procedure Get-DateComponents ($indate,:#wkYears,:#wkMonths,:#wkDays) but I am not sure this will really do what I want - any ideas? I haven't been using sqr as much as I would have liked over the past 18 months and I am rustier than I should be, so pardon the questions. Boy does it feel good to use it again though!!! clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 17 21:12:49 2003 From: "Steve Cavill" Subject: RE: [sqr-users] validating date from yyyymodd input Date: Fri, 18 Jul 2003 12:12:01 +1000 You can verify if the date is correct using the format= and status= options of input. This will input the date as a sqr date variable. I don't know what datetime.sqc does, I assume it is expecting a date as input. begin-setup declare-variable date $indate end-declare end-setup begin-program input $indate format=yyyymmdd status=#stat if #stat=0 print 'date was ok : ' (1,1) print $indate () edit dd-mon-yyyy else print 'date was bad : ' (1,1) end-if end-program Cheers, Steve. -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of the dragon Sent: Friday, 18 July 2003 8:57 AM To: sqr-users@sqrug.org Subject: [sqr-users] validating date from yyyymodd input Hi all. I am searching the database as we speak, but there are 281 matches to week through with my search criteria, so I'll ask here also. Maybe save some time. I am having users enter a date as YYYYMODD into a flat file and then checking to make certain what they have entered is a valid date in the sqr before I continue processing. If the date entered is invalid, I am going to write an error message and continue processing the remaining records - I don't want the entire sqr to blow up if the users act as users. I know I can check to make sure the field in numeric, but then how can I check to see if the date is valid? I am trying to leverage datetime.sqc, and use begin-procedure Get-DateComponents ($indate,:#wkYears,:#wkMonths,:#wkDays) but I am not sure this will really do what I want - any ideas? I haven't been using sqr as much as I would have liked over the past 18 months and I am rustier than I should be, so pardon the questions. Boy does it feel good to use it again though!!! clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 06:21:33 2003 From: "Schelske, Steve K." Subject: RE: [sqr-users] validating date from yyyymodd input Date: Fri, 18 Jul 2003 07:19:40 -0400 Here's some code I just checked out to see if it would work (my RDBMS is DB2). In the example below, it detected that the date was invalid and went to the bad-date procedure. On a good date, the program completed successfully. You might want more sophistication in the bad-date procedure or to use a different table in the select, but I don't think you should use any table other than one you know will only have one row. begin-program let $d = '2003-14-31' begin-select on-error=bad-date 'x' from dbadb2tm.psstatus where date(lastrefreshdttm) = $d end-select end-program begin-procedure bad-date show 'date ' $d ' is invalid' end-procedure -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Thursday, July 17, 2003 6:57 PM To: sqr-users@sqrug.org Subject: [sqr-users] validating date from yyyymodd input Hi all. I am searching the database as we speak, but there are 281 matches to week through with my search criteria, so I'll ask here also. Maybe save some time. I am having users enter a date as YYYYMODD into a flat file and then checking to make certain what they have entered is a valid date in the sqr before I continue processing. If the date entered is invalid, I am going to write an error message and continue processing the remaining records - I don't want the entire sqr to blow up if the users act as users. I know I can check to make sure the field in numeric, but then how can I check to see if the date is valid? I am trying to leverage datetime.sqc, and use begin-procedure Get-DateComponents ($indate,:#wkYears,:#wkMonths,:#wkDays) but I am not sure this will really do what I want - any ideas? I haven't been using sqr as much as I would have liked over the past 18 months and I am rustier than I should be, so pardon the questions. Boy does it feel good to use it again though!!! clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 07:34:31 2003 From: "Mezzullo, Paul" Subject: RE: [sqr-users] SQR calling another sqr Date: Fri, 18 Jul 2003 08:40:28 -0400 Jay, Here's a working code example on how to call one sqr from another sqr ... - Paul Mezzullo pmezzull@esboces.org !*---------------------------------- !*---- CAll SYSTEM CODE ------------ !* Code to run a secondary SQR from the !* primary SQR using the CALL SYSTEM command let $command_str = 't:\apps\hr_sys\sqrbinw\sqrw.exe ' || 'c:\user\sqr\hr_main.sqr. ' || 'OWNER/SYS@HRDATABASE ' || '-fc:\ ' || '-it:\apps\hr_sys\sqr\ ' || '-mt:\apps\hr_sys\sqr\allmaxes.max ' || '-ZIFt:\apps\hr_sys\sqr\pssqr.ini ' !* perform the actual operating system call CALL SYSTEM USING $Command_str #return_status NOWAIT -----Original Message----- From: Jay Sagadraca [mailto:knight7883@yahoo.ca] Sent: Wednesday, July 16, 2003 2:59 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR calling another sqr Hello !!! Is it possible to call another sqr within an sqr program? I checked the commands like call, call system and execute and it didn't say anything. Please help and Thank You !!! Jay V. Sagadraca Markham, Ontario, Canada email : knight7883@yahoo.ca --------------------------------- Post your free ad now! Yahoo! Canada Personals _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 08:39:25 2003 From: "Bambach, Tom" Subject: RE: [sqr-users] FTP From SQR Date: Fri, 18 Jul 2003 09:41:02 -0400 Stu, create a file with contents like this: open 123.456.789.12 ftpusr 4ftponly ascii append g:\PeopleSoft\mxiss_grw.txt /home/ftpusr/files/mxissuef_grw.txt literal site chmod 777 /home/ftpusr/files/mxissuef_grw.txt quit EXIT (use put instead of append if you want to overwrite the file if it exists) this file could be created and written by your SQR program; assume that it is and that $local_file = 'g:\PeopleSoft\mxiss_grw.txt' and that $ftp_file is the name of the above file close $ftp_file after writing it... then in your SQR program, do this: let $syscmd = 'FTP -s:' || $ftp_file CALL SYSTEM USING $syscmd #stat WAIT if #stat = 0 let $disp = 'FTP successful...' display $disp let #stat1 = delete($local_file) if #stat1 <> 0 let $disp = 'Error ' || to_char(#stat1) || ' deleting ' || $local_file display $disp end-if else let $disp = 'Error ' || to_char(#stat) || ' attempting FTP...' display $disp end-if end-if Tom > -----Original Message----- > From: Wood, Stuart [SMTP:Stuart.Wood@tfn.com] > Sent: Thursday, July 17, 2003 1:59 PM > To: 'sqr-users@sqrug.org' > Subject: [sqr-users] FTP From SQR > > Does anyone have some sample code that FTPs a file from NT to Unix? > > Thanks, > > Stu > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 09:43:09 2003 From: "Mezzullo, Paul" Date: Fri, 18 Jul 2003 10:48:39 -0400 Subject: [sqr-users] SQR Viewer using CALL SYSTEM COMMAND Hi, Has anyone ever used the CALL SYSTEM command to invoke the SQR Viewer and display an .SPF file? I have the viewer opening correctly but I'm not sure how to pass the .SPF file name in?? Getting error --> "cannot open or read file " Any help would be greatly appreciated............. Thanks Paul M. Mezzullo pmezzull@esboces.org _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 09:57:06 2003 From: "Paul Hoyte" Subject: RE: [sqr-users] SQR Viewer using CALL SYSTEM COMMAND Date: Fri, 18 Jul 2003 10:55:06 -0400 Here is an example that works - this shows the structure of the command that will have to be formatted and placed into the variable. You might not need the double quotes if you are using the old dos naming standards: "E:\Program Files\Brio8\SQR\ORA\BINW\sqrwv.exe" E:\student\yum\yum1.spf Paul Hoyte (248) 752-6970 Cell (248) 559-6868 Office (586) 421-9640 Fax paul.hoyte@sharidionne.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf Of Mezzullo, Paul Sent: Friday, July 18, 2003 10:49 AM To: SQR RUG (E-mail) Subject: [sqr-users] SQR Viewer using CALL SYSTEM COMMAND Hi, Has anyone ever used the CALL SYSTEM command to invoke the SQR Viewer and display an .SPF file? I have the viewer opening correctly but I'm not sure how to pass the .SPF file name in?? Getting error --> "cannot open or read file " Any help would be greatly appreciated............. Thanks Paul M. Mezzullo pmezzull@esboces.org _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 10:00:06 2003 Date: Fri, 18 Jul 2003 10:59:17 -0400 From: Christine Sessler Subject: [sqr-users] Illegal Instruction & Memory Fault (coredump) Folks - I'm looking for some help on resolving the coredump problem that I'm having with an SQR. The SQR is pretty basic with no complicated JOINS. It selects about 300,000+ Emplids and then goes through a series of selects to get Bio/Demo and Degree data for each person selected. Ultimately, two output files will be created - one for Bio/Demo and one for Degree data - and these will be sent to a vendor. It also inserts each row processed into a custom SQL table. I'm committing after every 15K Emplids processed. I've commented out the WRITEs to the file and I'm still encountering the following coredump errors. I've tried chunking the main SQL in batches of 100,000 Emplids but that's when I got the "illegal instruction" error after it processed 124K Emplids. [...snip...]SQR_AVP601CU_115467/prcs_sqr[96]: 54986 Memory fault(coredump) [...snip...]SQR_AVP601CU_115478/prcs_sqr[96]: 75854 Illegal instruction(coredump) I'd really rather not have the operator have to run this job numerous times, running in batches of 100K Emplids from outside of the program but that's what I'm considering now. I expect that as we bring Contributor Relations into Production (scheduled for 7/28) and this interface is run in Production, that the number of EmplIds processed is going to continue to grow. Does anyone have any thoughts on how else to handle this situation? Thanks, Chris ************************************************************ Christine Sessler Cornell University CIT/Business Information Systems 120 Maple Avenue Ithaca, NY 14850 607.255.2816 - MARS Project 607.255.8149 - Maple Ave 607.255.6982 - Fax cms41@cornell.edu ************************************************************ "Live in such a way that you would not be ashamed to sell your parrot to the town gossip." - Will Rogers "If a dog jumps in your lap, it is because he is fond of you; but if a cat does the same thing, it is because your lap is warmer." - Alfred North Whitehead "When the eagles are silent, the parrots begin to jabber." - Sir Winston Churchill _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 10:06:06 2003 From: skirklin@stl-inc.com Subject: RE: [sqr-users] SQR Viewer using CALL SYSTEM COMMAND Date: Fri, 18 Jul 2003 09:05:48 -0600 Here's how we do that: BEGIN-PROCEDURE sendFileToViewer ! The device_seq is an input parameter - select from the database the device_name from the dev_mode table ! Issue a system command to "COPY" the file to the device name ! Use SQR's call system using command (need to get info about the ENVIRONMENT first) use-report mdls new-report 'junk.lis' let $CmdLine = 'sqrwv '||$FullFileName||'.spf' call system using $CmdLine #callStatus WAIT END-PROCEDURE ! sendFileToViewer Regards, Sherri Kirklin STL-Austin -----Original Message----- From: Mezzullo, Paul [mailto:pmezzull@esboces.org] Sent: Friday, July 18, 2003 9:49 AM To: SQR RUG (E-mail) Subject: [sqr-users] SQR Viewer using CALL SYSTEM COMMAND Hi, Has anyone ever used the CALL SYSTEM command to invoke the SQR Viewer and display an .SPF file? I have the viewer opening correctly but I'm not sure how to pass the .SPF file name in?? Getting error --> "cannot open or read file " Any help would be greatly appreciated............. Thanks Paul M. Mezzullo pmezzull@esboces.org _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users Confidentiality Notice: The information contained in this message is intended only for the use of the addressee, and may be confidential and/or privileged. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 10:49:38 2003 Subject: RE: [sqr-users] Illegal Instruction & Memory Fault (coredump) Date: Fri, 18 Jul 2003 10:48:33 -0500 From: "Knapp, Richard" What's the OS and version. Is this a memory leak? Ask your DBA/sysadmin. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: Christine Sessler [mailto:cms41@cornell.edu] Sent: Friday, July 18, 2003 9:59 AM To: sqr-users@sqrug.org Subject: [sqr-users] Illegal Instruction & Memory Fault (coredump) Folks - I'm looking for some help on resolving the coredump problem that I'm having with an SQR. The SQR is pretty basic with no complicated JOINS. It selects about 300,000+ Emplids and then goes through a series of selects to get Bio/Demo and Degree data for each person selected. Ultimately, two output files will be created - one for Bio/Demo and one for Degree data - and these will be sent to a vendor. It also inserts each row processed into a custom SQL table. I'm committing after every 15K Emplids processed. I've commented out the WRITEs to the file and I'm still encountering the following coredump errors. I've tried chunking the main SQL in batches of 100,000 Emplids but that's when I got the "illegal instruction" error after it processed 124K Emplids. [...snip...]SQR_AVP601CU_115467/prcs_sqr[96]: 54986 Memory fault(coredump) [...snip...]SQR_AVP601CU_115478/prcs_sqr[96]: 75854 Illegal instruction(coredump) I'd really rather not have the operator have to run this job numerous times, running in batches of 100K Emplids from outside of the program but that's what I'm considering now. I expect that as we bring Contributor Relations into Production (scheduled for 7/28) and this interface is run in Production, that the number of EmplIds processed is going to continue to grow. Does anyone have any thoughts on how else to handle this situation? Thanks, Chris ************************************************************ Christine Sessler Cornell University CIT/Business Information Systems 120 Maple Avenue Ithaca, NY 14850 607.255.2816 - MARS Project 607.255.8149 - Maple Ave 607.255.6982 - Fax cms41@cornell.edu ************************************************************ "Live in such a way that you would not be ashamed to sell your parrot to the town gossip." - Will Rogers "If a dog jumps in your lap, it is because he is fond of you; but if a cat does the same thing, it is because your lap is warmer." - Alfred North Whitehead "When the eagles are silent, the parrots begin to jabber." - Sir Winston Churchill _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 12:00:33 2003 Date: Fri, 18 Jul 2003 12:59:50 -0400 From: Christine Sessler Subject: RE: [sqr-users] Illegal Instruction & Memory Fault (coredump) Richard - Here's the info from my DBAs: OS: AIX Version: 4.3.3 Database Version: 8.1.7.4 SQR Version: SQR for PeopleSoft/8.18/IBM RS6000/AIX 4.3.3/Oracle 8.0.6/Jun 05 2002 We ran into similar problems running the CR Conversion SQRs. Those were reading in huge flat files. Breaking the files up into chunks helped. Seeing as this one doesn't read a flat file, I'm open to trying anything else. Chris At 10:48 AM 7/18/2003 -0500, you wrote: >What's the OS and version. Is this a memory leak? Ask your DBA/sysadmin. > >Richard Knapp >Database Programmer/Analyst >Institutional Research and Planning >University of Missouri System >573-882-8856 >knappr@umsystem.edu > > >-----Original Message----- >From: Christine Sessler [mailto:cms41@cornell.edu] >Sent: Friday, July 18, 2003 9:59 AM >To: sqr-users@sqrug.org >Subject: [sqr-users] Illegal Instruction & Memory Fault (coredump) > > >Folks - > >I'm looking for some help on resolving the coredump problem that I'm having >with an SQR. > >The SQR is pretty basic with no complicated JOINS. It selects about >300,000+ Emplids and then goes through a series of selects to get Bio/Demo >and Degree data for each person selected. Ultimately, two output files >will be created - one for Bio/Demo and one for Degree data - and these will >be sent to a vendor. It also inserts each row processed into a custom SQL >table. I'm committing after every 15K Emplids processed. > >I've commented out the WRITEs to the file and I'm still encountering the >following coredump errors. I've tried chunking the main SQL in batches of >100,000 Emplids but that's when I got the "illegal instruction" error after >it processed 124K Emplids. > >[...snip...]SQR_AVP601CU_115467/prcs_sqr[96]: 54986 Memory fault(coredump) >[...snip...]SQR_AVP601CU_115478/prcs_sqr[96]: 75854 Illegal >instruction(coredump) > >I'd really rather not have the operator have to run this job numerous >times, running in batches of 100K Emplids from outside of the program but >that's what I'm considering now. > >I expect that as we bring Contributor Relations into Production (scheduled >for 7/28) and this interface is run in Production, that the number of >EmplIds processed is going to continue to grow. > >Does anyone have any thoughts on how else to handle this situation? > >Thanks, >Chris > > > >************************************************************ >Christine Sessler >Cornell University >CIT/Business Information Systems >120 Maple Avenue >Ithaca, NY 14850 > >607.255.2816 - MARS Project >607.255.8149 - Maple Ave >607.255.6982 - Fax >cms41@cornell.edu >************************************************************ >"Live in such a way that you would not be ashamed to sell your parrot to >the town gossip." - Will Rogers >"If a dog jumps in your lap, it is because he is fond of you; >but if a cat does the same thing, it is because your lap is warmer." - >Alfred North Whitehead >"When the eagles are silent, the parrots begin to jabber." - Sir Winston >Churchill > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users ************************************************************ Christine Sessler Cornell University CIT/Business Information Systems 120 Maple Avenue Ithaca, NY 14850 607.255.2816 - MARS Project 607.255.8149 - Maple Ave 607.255.6982 - Fax cms41@cornell.edu ************************************************************ "Live in such a way that you would not be ashamed to sell your parrot to the town gossip." - Will Rogers "If a dog jumps in your lap, it is because he is fond of you; but if a cat does the same thing, it is because your lap is warmer." - Alfred North Whitehead "When the eagles are silent, the parrots begin to jabber." - Sir Winston Churchill _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 13:05:22 2003 Date: Fri, 18 Jul 2003 14:02:51 -0400 From: "George Jansen" Subject: RE: [sqr-users] Illegal Instruction & Memory Fault (coredump) Given that you're running on Oracle, could you move some of the processing logic back into PL/SQL? You have some very powerful tools at your disposal, including (indexable) temporary tables. You could conceivably build two temporary tables in PL/SQL then simply extract, write, and truncate the temp tables. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 18 20:28:17 2003 From: "the dragon" Subject: Re: [sqr-users] Illegal Instruction & Memory Fault (coredump) Date: Fri, 18 Jul 2003 20:25:37 -0500 Chris, I don't know what your OS ( I am guessing mainframe) or db (I am guessing db2) is because you haven't told us, but I'd check for tablespace/container limits or a space problem in your file system. This is a SWAG, so I'll be surprised if it helps, but that's what happens when you barnstorm. clark 'the dragon' willis dragon enterprises, consulting services. PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Folks - I'm looking for some help on resolving the coredump problem that I'm having with an SQR. The SQR is pretty basic with no complicated JOINS. It selects about 300,000+ Emplids and then goes through a series of selects to get Bio/Demo and Degree data for each person selected. Ultimately, two output files will be created - one for Bio/Demo and one for Degree data - and these will be sent to a vendor. It also inserts each row processed into a custom SQL table. I'm committing after every 15K Emplids processed. I've commented out the WRITEs to the file and I'm still encountering the following coredump errors. I've tried chunking the main SQL in batches of 100,000 Emplids but that's when I got the "illegal instruction" error after it processed 124K Emplids. [...snip...]SQR_AVP601CU_115467/prcs_sqr[96]: 54986 Memory fault(coredump) [...snip...]SQR_AVP601CU_115478/prcs_sqr[96]: 75854 Illegal instruction(coredump) I'd really rather not have the operator have to run this job numerous times, running in batches of 100K Emplids from outside of the program but that's what I'm considering now. I expect that as we bring Contributor Relations into Production (scheduled for 7/28) and this interface is run in Production, that the number of EmplIds processed is going to continue to grow. Does anyone have any thoughts on how else to handle this situation? Thanks, Chris _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Sat Jul 19 09:13:21 2003 From: Pamela Lantzy Subject: RE: [sqr-users] Illegal Instruction & Memory Fault (coredump) Date: Sat, 19 Jul 2003 10:09:29 -0400 What do you get back when you do "ulimit -a"? We had similiar problems a few weeks, and some of these values were way to low, and have requested our unix administrators increase them. -----Original Message----- From: Christine Sessler [mailto:cms41@cornell.edu] Sent: Friday, July 18, 2003 10:59 AM To: sqr-users@sqrug.org Subject: [sqr-users] Illegal Instruction & Memory Fault (coredump) Folks - I'm looking for some help on resolving the coredump problem that I'm having with an SQR. The SQR is pretty basic with no complicated JOINS. It selects about 300,000+ Emplids and then goes through a series of selects to get Bio/Demo and Degree data for each person selected. Ultimately, two output files will be created - one for Bio/Demo and one for Degree data - and these will be sent to a vendor. It also inserts each row processed into a custom SQL table. I'm committing after every 15K Emplids processed. I've commented out the WRITEs to the file and I'm still encountering the following coredump errors. I've tried chunking the main SQL in batches of 100,000 Emplids but that's when I got the "illegal instruction" error after it processed 124K Emplids. [...snip...]SQR_AVP601CU_115467/prcs_sqr[96]: 54986 Memory fault(coredump) [...snip...]SQR_AVP601CU_115478/prcs_sqr[96]: 75854 Illegal instruction(coredump) I'd really rather not have the operator have to run this job numerous times, running in batches of 100K Emplids from outside of the program but that's what I'm considering now. I expect that as we bring Contributor Relations into Production (scheduled for 7/28) and this interface is run in Production, that the number of EmplIds processed is going to continue to grow. Does anyone have any thoughts on how else to handle this situation? Thanks, Chris ************************************************************ Christine Sessler Cornell University CIT/Business Information Systems 120 Maple Avenue Ithaca, NY 14850 607.255.2816 - MARS Project 607.255.8149 - Maple Ave 607.255.6982 - Fax cms41@cornell.edu ************************************************************ "Live in such a way that you would not be ashamed to sell your parrot to the town gossip." - Will Rogers "If a dog jumps in your lap, it is because he is fond of you; but if a cat does the same thing, it is because your lap is warmer." - Alfred North Whitehead "When the eagles are silent, the parrots begin to jabber." - Sir Winston Churchill _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 21 09:28:18 2003 Date: Mon, 21 Jul 2003 10:24:54 -0400 From: Christine Sessler Subject: Re: [sqr-users] Illegal Instruction & Memory Fault (coredump) Clark - Here's my OS info: OS: AIX Version: 4.3.3 Database Version: 8.1.7.4 SQR Version: SQR for PeopleSoft/8.18/IBM RS6000/AIX 4.3.3/Oracle 8.0.6/Jun 05 2002 I'll have the DBAs check the tablespace limits as well as the other suggestion from Pamela to run it with the "ulimit -a" flags on. I'm definitely open to any other suggestions. Chris At 08:25 PM 7/18/2003 -0500, you wrote: >Chris, > >I don't know what your OS ( I am guessing mainframe) or db (I am guessing >db2) is because you haven't told us, but I'd check for >tablespace/container limits or a space problem in your file system. > >This is a SWAG, so I'll be surprised if it helps, but that's what happens >when you barnstorm. > >clark 'the dragon' willis >dragon enterprises, consulting services. > >PSA: Salary <> Slavery. If you earn a salary, your employer is renting >your services for 40 hours a week, not purchasing your soul. Your time is >the only real finite asset that you have, and once used it can never be >recovered, so don't waste it by giving it away. > >"Time is the coin of your life. It is the only coin you have, and only you >can determine how it will be spent. Be careful lest you let other people >spend it for you." > >Carl Sandburg >(1878 - 1967) > > >----Original Message Follows---- > >Folks - > >I'm looking for some help on resolving the coredump problem that I'm >having with an SQR. > >The SQR is pretty basic with no complicated JOINS. It selects about >300,000+ Emplids and then goes through a series of selects to get Bio/Demo >and Degree data for each person selected. Ultimately, two output files >will be created - one for Bio/Demo and one for Degree data - and these >will be sent to a vendor. It also inserts each row processed into a >custom SQL table. I'm committing after every 15K Emplids processed. > >I've commented out the WRITEs to the file and I'm still encountering the >following coredump errors. I've tried chunking the main SQL in batches of >100,000 Emplids but that's when I got the "illegal instruction" error >after it processed 124K Emplids. > >[...snip...]SQR_AVP601CU_115467/prcs_sqr[96]: 54986 Memory fault(coredump) >[...snip...]SQR_AVP601CU_115478/prcs_sqr[96]: 75854 Illegal >instruction(coredump) > >I'd really rather not have the operator have to run this job numerous >times, running in batches of 100K Emplids from outside of the program but >that's what I'm considering now. > >I expect that as we bring Contributor Relations into Production (scheduled >for 7/28) and this interface is run in Production, that the number of >EmplIds processed is going to continue to grow. > >Does anyone have any thoughts on how else to handle this situation? > >Thanks, >Chris > >_________________________________________________________________ >Protect your PC - get McAfee.com VirusScan Online >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users ************************************************************ Christine Sessler Cornell University CIT/Business Information Systems 120 Maple Avenue Ithaca, NY 14850 607.255.2816 - MARS Project 607.255.8149 - Maple Ave 607.255.6982 - Fax cms41@cornell.edu ************************************************************ "Live in such a way that you would not be ashamed to sell your parrot to the town gossip." - Will Rogers "If a dog jumps in your lap, it is because he is fond of you; but if a cat does the same thing, it is because your lap is warmer." - Alfred North Whitehead "When the eagles are silent, the parrots begin to jabber." - Sir Winston Churchill _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 22 18:43:04 2003 Date: Tue, 22 Jul 2003 16:39:57 -0700 (PDT) From: "Kristin Cagan" Subject: [sqr-users] Delete from UNIX after N days Hi, I've got a script that runs nightly and adds a new file to the output directory each time it runs. I've been asked to have the SQR delete existing files that are more than 5 days old. If I were doing this in UNIX directly, I would write: find /work8/outdir/names -type f -ctime +5 -exec rm {} \; I tried the following in SQR: let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm {} \;' call SYSTEM using $DelCommand #status SQR thinks that {} is a substitution variable and errors out. Can anyone recommend an alternative method? Thanks, KC -- Kristin Cagan Champion Strategeis, Inc. kcagan@pobox.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 22 19:46:45 2003 From: Franck Masson Subject: RE: [sqr-users] Delete from UNIX after N days Date: Tue, 22 Jul 2003 17:25:19 -0700 try this let $a = '{' let $b = '}' let $cmdline = 'find /work8/outdir/names -type f -ctime +5 -exec rm ' ||$a||$b||'\;' -----Original Message----- From: Kristin Cagan [mailto:kcagan@pobox.com] Sent: mercredi 23 juillet 2003 01:40 To: sqr-users@sqrug.org Subject: [sqr-users] Delete from UNIX after N days Hi, I've got a script that runs nightly and adds a new file to the output directory each time it runs. I've been asked to have the SQR delete existing files that are more than 5 days old. If I were doing this in UNIX directly, I would write: find /work8/outdir/names -type f -ctime +5 -exec rm {} \; I tried the following in SQR: let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm {} \;' call SYSTEM using $DelCommand #status SQR thinks that {} is a substitution variable and errors out. Can anyone recommend an alternative method? Thanks, KC -- Kristin Cagan Champion Strategeis, Inc. kcagan@pobox.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 23 07:29:11 2003 From: "Bambach, Tom" Subject: RE: [sqr-users] Delete from UNIX after N days Date: Wed, 23 Jul 2003 08:30:15 -0400 or try this: let $cmdline = 'find /work8/outdir/names -type f -ctime +5 -exec rm ' || chr(123) || chr(125) || ' \;' Tom > -----Original Message----- > From: Kristin Cagan [SMTP:kcagan@pobox.com] > Sent: Tuesday, July 22, 2003 7:40 PM > To: sqr-users@sqrug.org > Subject: [sqr-users] Delete from UNIX after N days > > Hi, > > I've got a script that runs nightly and adds a new file to the output > directory each time it runs. I've been asked to have the SQR delete > existing files that are more than 5 days old. > > If I were doing this in UNIX directly, I would write: > > find /work8/outdir/names -type f -ctime +5 -exec rm {} \; > > I tried the following in SQR: > > let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm {} > \;' > call SYSTEM using $DelCommand #status > > SQR thinks that {} is a substitution variable and errors out. > Can anyone recommend an alternative method? > > Thanks, > KC > -- > Kristin Cagan > Champion Strategeis, Inc. > kcagan@pobox.com > > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 23 07:50:07 2003 From: Nathan Stratton Treadway Date: Wed, 23 Jul 2003 07:49:12 -0500 Subject: [sqr-users] Re: Delete from UNIX after N days On Tue, Jul 22, 2003 at 04:39:57PM -0700, Kristin Cagan wrote: > I tried the following in SQR: > > let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm {} > \;' > call SYSTEM using $DelCommand #status > > SQR thinks that {} is a substitution variable and errors out. > Can anyone recommend an alternative method? The workaround I usually use is just to split the { and } onto separate lines of the source code: let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm {' || '}\;' call SYSTEM using $DelCommand #status Nathan ---------------------------------------------------------------------------- Nathan Stratton Treadway | nathanst@ontko.com | Mid-Atlantic region Software consulting services | Ray Ontko & Co. | http://www.ontko.com/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 23 08:01:06 2003 Date: Wed, 23 Jul 2003 08:00:42 -0500 From: "Schneider, Theresa M" Subject: [sqr-users] PeopleSoft pay003.sqr printing We're looking to print paychecks and advices to multiple remote printers OR use the Acrobat MICR package to print PDF. Has anyone successfully implemented either of these options? If so, what customizations did you have to implement? I haven't found any solutions for the MICR encoding, signature, and duplex printing. We are running PS 8 SP 1 on PT 8.17. Currently, we print our paychecks and advices using ACOM's software. We use HP and Xerox printers at six different locations. We use a customized version of pay003.sqr. We print duplex and use a Signature card. Terri Schneider Systems Analyst, Solutia Inc Phone: 314/674-5999 Solutia Net: 544-5999 Email: tmschn@solutia.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 23 08:28:07 2003 From: "the dragon" Subject: Re: [sqr-users] PeopleSoft pay003.sqr printing Date: Wed, 23 Jul 2003 08:27:13 -0500 Terri, At my last job we had that functionality up and running. I didn't set it up, so I don't know if there is anything special to do, but I do know it was running. They would run payroll on the NT server, and the micr printer was attached there, and print from NT print services. So, while I don't know what needed to be setup, I do know it is possible. We were using PT 7.5, on NT 4.x with the DB (db2) on a Unix (AIX) RS/6000. We were starting our 8 upgrade, so I don't know if thst would have presented any challenges. clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- We're looking to print paychecks and advices to multiple remote printers OR use the Acrobat MICR package to print PDF. Has anyone successfully implemented either of these options? If so, what customizations did you have to implement? I haven't found any solutions for the MICR encoding, signature, and duplex printing. We are running PS 8 SP 1 on PT 8.17. Currently, we print our paychecks and advices using ACOM's software. We use HP and Xerox printers at six different locations. We use a customized version of pay003.sqr. We print duplex and use a Signature card. Terri Schneider Systems Analyst, Solutia Inc Phone: 314/674-5999 Solutia Net: 544-5999 Email: tmschn@solutia.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 23 08:30:15 2003 From: "the dragon" Subject: RE: [sqr-users] Delete from UNIX after N days Date: Wed, 23 Jul 2003 08:29:35 -0500 Kristin, Or, probably easier, create a shell script with the Unix user and cron it to run every night. clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- or try this: let $cmdline = 'find /work8/outdir/names -type f -ctime +5 -exec rm ' || chr(123) || chr(125) || ' \;' Tom > -----Original Message-----> > Hi, > > I've got a script that runs nightly and adds a new file to the output > directory each time it runs. I've been asked to have the SQR delete > existing files that are more than 5 days old. > > If I were doing this in UNIX directly, I would write: > > find /work8/outdir/names -type f -ctime +5 -exec rm {} \; > > I tried the following in SQR: > > let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm {} > \;' > call SYSTEM using $DelCommand #status > > SQR thinks that {} is a substitution variable and errors out. > Can anyone recommend an alternative method? > > Thanks, > KC > -- > Kristin Cagan > Champion Strategeis, Inc. > kcagan@pobox.com > > _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 23 13:09:54 2003 Date: Wed, 23 Jul 2003 11:08:01 -0700 (PDT) Subject: Re: [sqr-users] Re: Delete from UNIX after N days From: "Kristin Cagan" I tried that. It gave me the same error. Nathan Stratton Treadway said: > On Tue, Jul 22, 2003 at 04:39:57PM -0700, Kristin Cagan wrote: >> I tried the following in SQR: >> >> let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec >> rm {} >> \;' >> call SYSTEM using $DelCommand #status >> >> SQR thinks that {} is a substitution variable and errors out. >> Can anyone recommend an alternative method? > > The workaround I usually use is just to split the { and } onto separate > lines of the source code: > > let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm > {' || > '}\;' > call SYSTEM using $DelCommand #status > > > Nathan > > ---------------------------------------------------------------------------- > Nathan Stratton Treadway | nathanst@ontko.com | Mid-Atlantic > region Software consulting services | Ray Ontko & Co. | > http://www.ontko.com/ > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 23 13:33:06 2003 Date: Wed, 23 Jul 2003 11:32:10 -0700 (PDT) Subject: RE: [sqr-users] Delete from UNIX after N days From: "Kristin Cagan" Thank you. This worked. Franck Masson said: > try this > let $a = '{' > let $b = '}' > let $cmdline = 'find /work8/outdir/names -type f -ctime +5 -exec rm ' > ||$a||$b||'\;' > > -----Original Message----- > From: Kristin Cagan [mailto:kcagan@pobox.com] > Sent: mercredi 23 juillet 2003 01:40 > To: sqr-users@sqrug.org > Subject: [sqr-users] Delete from UNIX after N days > > > Hi, > > I've got a script that runs nightly and adds a new file to the output > directory each time it runs. I've been asked to have the SQR delete > existing files that are more than 5 days old. > > If I were doing this in UNIX directly, I would write: > > find /work8/outdir/names -type f -ctime +5 -exec rm {} \; > > I tried the following in SQR: > > let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm > {} > \;' > call SYSTEM using $DelCommand #status > > SQR thinks that {} is a substitution variable and errors out. > Can anyone recommend an alternative method? > > Thanks, > KC > -- > Kristin Cagan > Champion Strategeis, Inc. > kcagan@pobox.com > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003 > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 24 07:40:39 2003 From: Nathan Stratton Treadway Date: Thu, 24 Jul 2003 07:38:20 -0500 Subject: [sqr-users] Re: Delete from UNIX after N days -- "{}" string literal in SQR On Wed, Jul 23, 2003 at 11:08:01AM -0700, Kristin Cagan wrote: > I tried that. It gave me the same error. > > Nathan Stratton Treadway said: [...] > > The workaround I usually use is just to split the { and } onto separate > > lines of the source code: > > > > let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm > > {' || > > '}\;' > > call SYSTEM using $DelCommand #status Sounds like one of the other suggestions is already working for you so this may not matter any more, but the "{-and-}-on-separate-lines" trick should work. Be sure there really is a line break in your source file between the open and close braces. In other words, this will NOT work: let $DelCommand = 'find work8/outdir/names -type f ' || '-ctime +5 -exec rm {' || '}\;' but this should: let $DelCommand = 'find work8/outdir/names -type f ' || '-ctime +5 -exec rm {' || '}\;' if you make sure there are true line breaks between the lines instead of just your editor wrapping the lines on the screen. If you do try this approach again but it still doesn't work, please send me a copy of the SQR code lines you are trying and the exact error message you are getting, as well as the version of SQR you are using. Nathan ---------------------------------------------------------------------------- Nathan Stratton Treadway | nathanst@ontko.com | Mid-Atlantic region Software consulting services | Ray Ontko & Co. | http://www.ontko.com/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 24 16:44:10 2003 From: "the dragon" Date: Thu, 24 Jul 2003 16:42:06 -0500 Subject: [sqr-users] Is there any way to do this? Hi all, I am getting tired of typing in the database and user id in the sqr dialogue box every time I run my sqr to test it. I know I can append report parameters in the icon properties (see below). Is there any way to modify the icon so that it will autopopulate the database and username each time I double click it?? W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s thanks in advance, clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 24 17:21:06 2003 From: "Paul Hoyte" Subject: RE: [sqr-users] Is there any way to do this? Date: Thu, 24 Jul 2003 18:20:46 -0400 Here you go... "E:\Program Files\Brio8\SQR\ORA\BINW\sqrw.exe" C:\STUDENT\bar100 sqr/sqr -e -keep -ziv Just modify the command above - right click on the sqr icon, select properties, and modify the target field under the shortcut tab..... Paul Hoyte (248) 752-6970 Cell (248) 559-6868 Office (586) 421-9640 Fax paul.hoyte@sharidionne.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org] On Behalf Of the dragon Sent: Thursday, July 24, 2003 5:42 PM To: sqr-users@sqrug.org Subject: [sqr-users] Is there any way to do this? Hi all, I am getting tired of typing in the database and user id in the sqr dialogue box every time I run my sqr to test it. I know I can append report parameters in the icon properties (see below). Is there any way to modify the icon so that it will autopopulate the database and username each time I double click it?? W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s thanks in advance, clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 05:06:21 2003 Date: Fri, 25 Jul 2003 07:03:45 -0300 From: "Peter Clark" Subject: Re: [sqr-users] Is there any way to do this? Try this: W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe ? sysadm/password@dbname -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s Modify password and dbname to what you need. All you will be prompted for is the name of the SQR. >>> ceprn@hotmail.com 2003/07/24 18:42:06 >>> Hi all, I am getting tired of typing in the database and user id in the sqr dialogue box every time I run my sqr to test it. I know I can append report parameters in the icon properties (see below). Is there any way to modify the icon so that it will autopopulate the database and username each time I double click it?? W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s thanks in advance, clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 08:19:19 2003 From: "the dragon" Subject: Solution [sqr-users] Is there any way to do this? Date: Fri, 25 Jul 2003 08:17:12 -0500 All, Thank you for your ideas. I was finally able to get it to work through trial and error, using your suggestions to start with - the solution is below: If I use this string W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe [username]/[password]@psfssyg -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s then I get [username]/[password]@psfssyg in the report box. If I use W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe ? [username]/[password]@psfssyg -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s I get report name blank, [username] in the database box and [password]@psfssyg in the user name box. And if I use W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe ? [username]/[password]/psfssyg -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s I get [username] in the database box, [password] in the username box and psfssyg in the password box. lol if I do this W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe ? psfssyg/[username]/[password] -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s all the value end up where they belong and it finally works. (db2 on wintel odbc) Thanks, clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 08:37:09 2003 From: "Benzenhafer, Dave" Date: Fri, 25 Jul 2003 08:32:56 -0500 Subject: [sqr-users] A "Between" Question I have two very similar queries that are looking at date fields in the same table in an Oracle database using the BETWEEN predicate that returns different date results. The first statement returns data for dates July 1 and July 2. The second query returns data for dates July 1,2 and 3. I have confirmed that there is data available for July 3 for the first query. The only difference between the two fields is that the wo.ENTRY_DATE is a required field and the wo.ACT_COMP_DATE is not. Does anyone have any ideas why the BETWEEN in the two queries is acting so differently? Select wo.work_order_no, wo.ENTRY_DATE FROM EWM_WORK_ORDERS wo WHERE wo.DEPARTMENT_ID = 10432 And wo.Entry_DATE BETWEEN '01-JUL-03' and '03-JUL-03' Select wo.work_order_no, wo.ACT_COMP_DATE FROM EWM_WORK_ORDERS wo WHERE wo.DEPARTMENT_ID = 10432 And wo.ACT_COMP_DATE BETWEEN '01-JUL-03' and '03-JUL-03' Thanks for your help. Dave Benzenhafer dbenzenhafer@houston.deepwater.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 08:47:06 2003 Date: Fri, 25 Jul 2003 08:46:07 -0500 From: David Ward Subject: [sqr-users] Running SQR's from Textpad One option which I have found pretty slick is submitting a sqr from within an edit session if using Textpad(although other editors probably also have this capability). It's pretty simple to setup the DOS command line, and you can include the DB signon stuff(instance, userid, pass), along with any flags you use. You can designate a pull down menu selection or hotkey for different database instances. I have a document which I created for our staff outlining the steps to set this up I'd be willing to share. Contact me directly if you'd like a copy as an attachment. David Ward Hi all, I am getting tired of typing in the database and user id in the sqr dialogue box every time I run my sqr to test it. I know I can append report parameters in the icon properties (see below). Is there any way to modify the icon so that it will autopopulate the database and username each time I double click it?? W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s thanks in advance, clark 'the dragon' willis David Ward Technology & Information Resources UW-Whitewater 800 W. Main St. Whitewater, WI 53190 262-472-1039 Fax: 262-472-5733 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 08:49:05 2003 Subject: RE: [sqr-users] A "Between" Question Date: Fri, 25 Jul 2003 15:45:58 +0200 From: "Wim Wolfs" I'm not an expert in this field, but a guess: 1. Check the nls_date_format parameters (i.e. 'dd-mon-yy'') 2. Is the time part fooling you? 03-jul-03 23:59:59, 04-jul-03 00:00:01 etc. 3. Is between actually including total day of 01-jul-03 up to and including 03-jul-03 (01-jul-03 starts on 00:00:01 and 03-jul-03 ends on 23:59:59) HTH, W.Wolfs Royal Mosa b.v. Netherlands -----Oorspronkelijk bericht----- Van: Benzenhafer, Dave [mailto:DBenzenhafer@houston.deepwater.com] Verzonden: vrijdag 25 juli 2003 15:33 Aan: sqr-users@sqrug.org Onderwerp: [sqr-users] A "Between" Question I have two very similar queries that are looking at date fields in the same table in an Oracle database using the BETWEEN predicate that returns different date results. The first statement returns data for dates July 1 and July 2. The second query returns data for dates July 1,2 and 3. I have confirmed that there is data available for July 3 for the first query. The only difference between the two fields is that the wo.ENTRY_DATE is a required field and the wo.ACT_COMP_DATE is not. Does anyone have any ideas why the BETWEEN in the two queries is acting so differently? Select wo.work_order_no, wo.ENTRY_DATE FROM EWM_WORK_ORDERS wo WHERE wo.DEPARTMENT_ID = 10432 And wo.Entry_DATE BETWEEN '01-JUL-03' and '03-JUL-03' Select wo.work_order_no, wo.ACT_COMP_DATE FROM EWM_WORK_ORDERS wo WHERE wo.DEPARTMENT_ID = 10432 And wo.ACT_COMP_DATE BETWEEN '01-JUL-03' and '03-JUL-03' Thanks for your help. Dave Benzenhafer dbenzenhafer@houston.deepwater.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 09:09:11 2003 Date: Fri, 25 Jul 2003 10:04:52 -0400 From: "Jamie Harris" Subject: Re: [sqr-users] Running SQR's from Textpad I do the same thing in my editor (TSE Pro). I have a dos batch file that gets called which removes "c:\temp\sqr.pdf", then runs the SQR to create that .pdf file then use the windows "start" command to make the .pdf file open. It works great, the only problem is that I must remember to close the .pdf before I try to run the SQR again because Acrobat locks the file as read-only if it's open. :) ----------------------------------------------------- James Harris Junior Systems Programmer/Analyst Information Technology Division Frederick Community College ----------------------------------------------------- >>> wardd@mail.uww.edu 7/25/2003 9:46:07 AM >>> One option which I have found pretty slick is submitting a sqr from within an edit session if using Textpad(although other editors probably also have this capability). It's pretty simple to setup the DOS command line, and you can include the DB signon stuff(instance, userid, pass), along with any flags you use. You can designate a pull down menu selection or hotkey for different database instances. I have a document which I created for our staff outlining the steps to set this up I'd be willing to share. Contact me directly if you'd like a copy as an attachment. David Ward Hi all, I am getting tired of typing in the database and user id in the sqr dialogue box every time I run my sqr to test it. I know I can append report parameters in the icon properties (see below). Is there any way to modify the icon so that it will autopopulate the database and username each time I double click it?? W:\UUSOFT\PSFS840\bin\sqr\DB2\BINW\sqrw.exe -Iw:\UUSOFT\PSFS840\sqr\ -Mc:\dragon\code\startup.cfg -fc:\temp -oc:\temp\sqr.log -s thanks in advance, clark 'the dragon' willis David Ward Technology & Information Resources UW-Whitewater 800 W. Main St. Whitewater, WI 53190 262-472-1039 Fax: 262-472-5733 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 09:34:11 2003 From: "Benzenhafer, Dave" Subject: RE: [sqr-users] A "Between" Question Date: Fri, 25 Jul 2003 09:29:32 -0500 You were correct. It had to do with the time added to the date. I found that this works. And trunc(wo.Entry_DATE) BETWEEN '01-JUL-03' and '03-JUL-03' Thanks for your help. Dave Benzenhafer dbenzenhafer@houston.deepwater.com -----Original Message----- From: Wim Wolfs [mailto:Wim.Wolfs@mosa.nl] Sent: Friday, July 25, 2003 8:46 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] A "Between" Question I'm not an expert in this field, but a guess: 1. Check the nls_date_format parameters (i.e. 'dd-mon-yy'') 2. Is the time part fooling you? 03-jul-03 23:59:59, 04-jul-03 00:00:01 etc. 3. Is between actually including total day of 01-jul-03 up to and including 03-jul-03 (01-jul-03 starts on 00:00:01 and 03-jul-03 ends on 23:59:59) HTH, W.Wolfs Royal Mosa b.v. Netherlands > -----Oorspronkelijk bericht----- > Van: Benzenhafer, Dave [mailto:DBenzenhafer@houston.deepwater.com] > Verzonden: vrijdag 25 juli 2003 15:33 > Aan: sqr-users@sqrug.org > Onderwerp: [sqr-users] A "Between" Question > > I have two very similar queries that are looking at date fields in the > same > table in an Oracle database using the BETWEEN predicate that returns > different date results. > > The first statement returns data for dates July 1 and July 2. The second > query returns data for dates July 1,2 and 3. I have confirmed that there > is > data available for July 3 for the first query. > > The only difference between the two fields is that the wo.ENTRY_DATE is a > required field and the wo.ACT_COMP_DATE is not. > > Does anyone have any ideas why the BETWEEN in the two queries is acting so > differently? > > Select > wo.work_order_no, > wo.ENTRY_DATE > FROM EWM_WORK_ORDERS wo > WHERE wo.DEPARTMENT_ID = 10432 > And wo.Entry_DATE BETWEEN '01-JUL-03' and '03-JUL-03' > > Select > wo.work_order_no, > wo.ACT_COMP_DATE > > FROM EWM_WORK_ORDERS wo > WHERE wo.DEPARTMENT_ID = 10432 > And wo.ACT_COMP_DATE BETWEEN '01-JUL-03' and '03-JUL-03' > > > Thanks for your help. > Dave Benzenhafer > dbenzenhafer@houston.deepwater.com > > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 10:03:09 2003 From: "Hood Louise (app1lxh)" Date: Fri, 25 Jul 2003 11:02:14 -0400 Subject: [sqr-users] Automated testing tools/apps Does anyone know whether there are any automated testing tools that will enable regression testing of output (i.e., pdf files as well as grids)? Another team here uses Rational Robot for their testing, but they're not testing reports. Robot will work for us to test things like whether a message box returns, but according to Rational it cannot verify that the content of a pdf report generated by the test script is identical to the pdf created when the script was originally created. Thanks, Louise _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 13:49:24 2003 From: "the dragon" Date: Fri, 25 Jul 2003 13:45:08 -0500 Subject: [sqr-users] curious flat file behavior This is a multi-part message in MIME format... ------=_NextPart_000_d5d_1775_4fbe Content-Type: text/plain; format=flowed Hi all. I have a flat file (attached) that is acting strangely. The size is 300 characters. When I read the flat file in, and there is a character in the last space (number 300) everything works correctly (see A below) but if there are only spaces until the end, my substr does not get the spaces (see B below) Any ideas? BTW, this looks much better in fixed font.... I have never seen this happen before. thanks in advance clark 'the dragon' willis A Account start |111100 | Dept Id start |0200 | Oper Unit start |0100 | Product start | | Afilliate start | | Project start | | CF1 start | | CF2 start | | CF3 start | | Line Descr start |JUST A LINE DESCRIPTION A | JLine Ref start | | OI Key start | | Account end |111100| Dept Id end |0200| Oper Unit end |0100| Product end | | Afilliate end | | Project end | | CF1 end | | CF2 end | | CF3 end | | Line Descr end |JUST A LINE DESCRIPTION A| JLine Ref end | | OI Key end | | B Account start |111100 | Dept Id start |0200 | Oper Unit start |0100 | Product start | | Afilliate start | | Project start | | CF1 start | | CF2 start | | CF3 start | | Line Descr start |JUST A LINE DESCRIPTION B| JLine Ref start || OI Key start || Account end |111100| Dept Id end |0200| Oper Unit end |0100| Product end | | Afilliate end | | Project end | | CF1 end | | CF2 end | | CF3 end | | Line Descr end |JUST A LINE DESCRIPTION B| JLine Ref end || OI Key end || PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 ------=_NextPart_000_d5d_1775_4fbe Content-Type: text/plain; name="UGHVAINN"; format=flowed Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="UGHVAINN" XXXXX00945ACTUALS 20030720 111100 0200 0100 00000000000000500000USDJUST A LINE DESCRIPTION A X 00945ACTUALS 20030720 111100 0200 0100 -0000000000000500000USDJUST A LINE DESCRIPTION B 00945ACTUALS 20030720 176014 8151 00951 00000000000001000000USDJUST A LINE DESCRIPTION C 00945ACTUALS 20030720 176014 8151 00951 -0000000000001000000USDJUST A LINE DESCRIPTION D 00945ACTUALS 20030720 293100 0200 1000 5114 00951 00000000000005000000USDJUST A LINE DESCRIPTION F 00945ACTUALS 20030720 293100 0200 1000 5114 00951 00000000000001000000USDJUST A LINE DESCRIPTION G 00945ACTUALS 20030720 511050 0200 5110 00951 00000000000001000000USDJUST A LINE DESCRIPTION H 00945ACTUALS 20030720 660330 0160 1000 5112 00951 00000000000001000000USDJUST A LINE DESCRIPTION I XXXXX00951ACTUALS 20030720 111100 0200 1000 00000000000001000000USDJUST A LINE DESCRIPTION J 00951ACTUALS 20030720 111100 0200 1000 00923 00000000000001000000USDJUST A LINE DESCRIPTION K 00951ACTUALS 20030720 176014 00966 00000000000001000000USDJUST A LINE DESCRIPTION L 00951ACTUALS 20030720 176100 0200 1000 5112 00967 00000000000001000000USDJUST A LINE DESCRIPTION M XXXXX00966ACTUALS 20030720 111200 0200 8000 00000000000000100000USDJUST A LINE DESCRIPTION N 00966ACTUALS 20030720 111200 0100 8000 00000000000000100000USDJUST A LINE DESCRIPTION O 00966ACTUALS 20030720 111300 0100 8000 00000000000000100000USDJUST A LINE DESCRIPTION P 00966ACTUALS 20030720 111599 0200 8000 00000000000000100000USDJUST A LINE DESCRIPTION Q 00966ACTUALS 20030720 113100 8000 00000000000000100000USDJUST A LINE DESCRIPTION R 00966ACTUALS 20030720 113100 00000000000000100000USDJUST A LINE DESCRIPTION S 00966ACTUALS 20030720 113100 0200 8000 00951 00000000000000100000USDJUST A LINE DESCRIPTION T 00966ACTUALS 20030720 113100 0100 8000 00000000000000100000USDJUST A LINE DESCRIPTION U 00966ACTUALS 20030720 114500 0000001475 00000000000000100000USDJUST A LINE DESCRIPTION V 00966ACTUALS 20030720 114500 0100 8000 00000000000000100000USDJUST A LINE DESCRIPTION W 00966ACTUALS 20030720 114500 1475 8000 00000000000000100000USDJUST A LINE DESCRIPTION X ------=_NextPart_000_d5d_1775_4fbe-- _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 13:57:06 2003 Subject: RE: [sqr-users] curious flat file behavior Date: Fri, 25 Jul 2003 13:56:06 -0500 From: "Knapp, Richard" Did you open the file as fixed or vary? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Friday, July 25, 2003 1:45 PM To: sqr-users@sqrug.org Subject: [sqr-users] curious flat file behavior Hi all. I have a flat file (attached) that is acting strangely. The size is 300 characters. When I read the flat file in, and there is a character in the last space (number 300) everything works correctly (see A below) but if there are only spaces until the end, my substr does not get the spaces (see B below) Any ideas? BTW, this looks much better in fixed font.... I have never seen this happen before. thanks in advance clark 'the dragon' willis A Account start |111100 | Dept Id start |0200 | Oper Unit start |0100 | Product start | | Afilliate start | | Project start | | CF1 start | | CF2 start | | CF3 start | | Line Descr start |JUST A LINE DESCRIPTION A | JLine Ref start | | OI Key start | | Account end |111100| Dept Id end |0200| Oper Unit end |0100| Product end | | Afilliate end | | Project end | | CF1 end | | CF2 end | | CF3 end | | Line Descr end |JUST A LINE DESCRIPTION A| JLine Ref end | | OI Key end | | B Account start |111100 | Dept Id start |0200 | Oper Unit start |0100 | Product start | | Afilliate start | | Project start | | CF1 start | | CF2 start | | CF3 start | | Line Descr start |JUST A LINE DESCRIPTION B| JLine Ref start || OI Key start || Account end |111100| Dept Id end |0200| Oper Unit end |0100| Product end | | Afilliate end | | Project end | | CF1 end | | CF2 end | | CF3 end | | Line Descr end |JUST A LINE DESCRIPTION B| JLine Ref end || OI Key end || PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 14:18:06 2003 From: "the dragon" Subject: RE: [sqr-users] curious flat file behavior Date: Fri, 25 Jul 2003 14:17:38 -0500 fixed PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Did you open the file as fixed or vary? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- Hi all. I have a flat file (attached) that is acting strangely. The size is 300 characters. When I read the flat file in, and there is a character in the last space (number 300) everything works correctly (see A below) but if there are only spaces until the end, my substr does not get the spaces (see B below) Any ideas? BTW, this looks much better in fixed font.... I have never seen this happen before. thanks in advance clark 'the dragon' willis _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 14:40:06 2003 Subject: RE: [sqr-users] curious flat file behavior Date: Fri, 25 Jul 2003 14:39:51 -0500 From: "Knapp, Richard" I just verified the "feature" so I _had_ to resort to the documentation. It say trailing blanks are trimmed. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Friday, July 25, 2003 2:18 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] curious flat file behavior fixed PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Did you open the file as fixed or vary? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- Hi all. I have a flat file (attached) that is acting strangely. The size is 300 characters. When I read the flat file in, and there is a character in the last space (number 300) everything works correctly (see A below) but if there are only spaces until the end, my substr does not get the spaces (see B below) Any ideas? BTW, this looks much better in fixed font.... I have never seen this happen before. thanks in advance clark 'the dragon' willis _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Fri Jul 25 14:42:05 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] curious flat file behavior Date: Fri, 25 Jul 2003 12:47:10 -0700 When you read a variable from a flat file (fixed or vary), SQR automatically trims the trailing spaces. -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Friday, July 25, 2003 12:18 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] curious flat file behavior fixed PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Did you open the file as fixed or vary? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- Hi all. I have a flat file (attached) that is acting strangely. The size is 300 characters. When I read the flat file in, and there is a character in the last space (number 300) everything works correctly (see A below) but if there are only spaces until the end, my substr does not get the spaces (see B below) Any ideas? BTW, this looks much better in fixed font.... I have never seen this happen before. thanks in advance clark 'the dragon' willis _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Sun Jul 27 12:37:00 2003 From: Ray Ontko Date: Sun, 27 Jul 2003 12:33:12 -0500 Subject: Re: [sqr-users] curious flat file behavior Clark, As others have noted, you are observing the correct behavior: trailing blanks are automatically deleted. In situations where I want to read every character, I open the file as fixed:1, and read the file byte-by-byte. This also allows me to read and process null characters (character 0). Hope this helps. Ray On Fri, Jul 25, 2003 at 01:45:08PM -0500, the dragon wrote: > Hi all. I have a flat file (attached) that is acting strangely. The size is > 300 characters. When I read the flat file in, and there is a character in > the last space (number 300) everything works correctly (see A below) but if > there are only spaces until the end, my substr does not get the spaces (see > B below) Any ideas? BTW, this looks much better in fixed font.... > > I have never seen this happen before. > > thanks in advance > clark 'the dragon' willis > > > A > Account start |111100 | > Dept Id start |0200 | > Oper Unit start |0100 | > Product start | | > Afilliate start | | > Project start | | > CF1 start | | > CF2 start | | > CF3 start | | > Line Descr start |JUST A LINE DESCRIPTION A | > JLine Ref start | | > OI Key start | | > Account end |111100| > Dept Id end |0200| > Oper Unit end |0100| > Product end | | > Afilliate end | | > Project end | | > CF1 end | | > CF2 end | | > CF3 end | | > Line Descr end |JUST A LINE DESCRIPTION A| > JLine Ref end | | > OI Key end | | > > B > > Account start |111100 | > Dept Id start |0200 | > Oper Unit start |0100 | > Product start | | > Afilliate start | | > Project start | | > CF1 start | | > CF2 start | | > CF3 start | | > Line Descr start |JUST A LINE DESCRIPTION B| > JLine Ref start || > OI Key start || > Account end |111100| > Dept Id end |0200| > Oper Unit end |0100| > Product end | | > Afilliate end | | > Project end | | > CF1 end | | > CF2 end | | > CF3 end | | > Line Descr end |JUST A LINE DESCRIPTION B| > JLine Ref end || > OI Key end || > > > PSA: Salary <> Slavery. If you earn a salary, your employer is renting your > services for 40 hours a week, not purchasing your soul. Your time is the > only real finite asset that you have, and once used it can never be > recovered, so don't waste it by giving it away. > > "Time is the coin of your life. It is the only coin you have, and only you > can determine how it will be spent. Be careful lest you let other people > spend it for you." > > Carl Sandburg > (1878 - 1967) > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > XXXXX00945ACTUALS 20030720 111100 0200 0100 > 00000000000000500000USDJUST A LINE > DESCRIPTION A > X > 00945ACTUALS 20030720 111100 0200 0100 > -0000000000000500000USDJUST A LINE > DESCRIPTION B > 00945ACTUALS 20030720 176014 8151 00951 > 00000000000001000000USDJUST A LINE > DESCRIPTION C > 00945ACTUALS 20030720 176014 8151 00951 > -0000000000001000000USDJUST A LINE > DESCRIPTION D > 00945ACTUALS 20030720 293100 0200 1000 5114 00951 > 00000000000005000000USDJUST A LINE > DESCRIPTION F > 00945ACTUALS 20030720 293100 0200 1000 5114 00951 > 00000000000001000000USDJUST A LINE > DESCRIPTION G > 00945ACTUALS 20030720 511050 0200 5110 00951 > 00000000000001000000USDJUST A LINE > DESCRIPTION H > 00945ACTUALS 20030720 660330 0160 1000 5112 00951 > 00000000000001000000USDJUST A LINE > DESCRIPTION I > XXXXX00951ACTUALS 20030720 111100 0200 1000 > 00000000000001000000USDJUST A LINE > DESCRIPTION J > 00951ACTUALS 20030720 111100 0200 1000 00923 > 00000000000001000000USDJUST A LINE > DESCRIPTION K > 00951ACTUALS 20030720 176014 00966 > 00000000000001000000USDJUST A LINE > DESCRIPTION L > 00951ACTUALS 20030720 176100 0200 1000 5112 00967 > 00000000000001000000USDJUST A LINE > DESCRIPTION M > XXXXX00966ACTUALS 20030720 111200 0200 8000 > 00000000000000100000USDJUST A LINE > DESCRIPTION N > 00966ACTUALS 20030720 111200 0100 8000 > 00000000000000100000USDJUST A LINE > DESCRIPTION O > 00966ACTUALS 20030720 111300 0100 8000 > 00000000000000100000USDJUST A LINE > DESCRIPTION P > 00966ACTUALS 20030720 111599 0200 8000 > 00000000000000100000USDJUST A LINE > DESCRIPTION Q > 00966ACTUALS 20030720 113100 8000 > 00000000000000100000USDJUST A LINE > DESCRIPTION R > 00966ACTUALS 20030720 113100 > 00000000000000100000USDJUST A LINE > DESCRIPTION S > 00966ACTUALS 20030720 113100 0200 8000 00951 > 00000000000000100000USDJUST A LINE > DESCRIPTION T > 00966ACTUALS 20030720 113100 0100 8000 > 00000000000000100000USDJUST A LINE > DESCRIPTION U > 00966ACTUALS 20030720 114500 0000001475 > 00000000000000100000USDJUST A LINE > DESCRIPTION V > 00966ACTUALS 20030720 114500 0100 8000 > 00000000000000100000USDJUST A LINE > DESCRIPTION W > 00966ACTUALS 20030720 114500 1475 8000 > 00000000000000100000USDJUST A LINE > DESCRIPTION X > > ---------------------------------------------------------------------- Ray Ontko rayo@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko & Co. Software Consulting Services http://www.ontko.com/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 28 09:48:49 2003 Date: Mon, 28 Jul 2003 09:46:03 -0500 From: "Chrisman, Dan:" Subject: [sqr-users] SQR 3719 I keep receiving SQR 3719 error on the following code. I am trying to modify an SQR program to check for an Emp_num. begin-procedure Process-Pay-Period move 0 to #Nbr_Of_Empls move ' ' to $h_Emp_Num begin-SELECT -B10000 TK_Emp.Emp_Id TK_Emp.Emp_SS TK_Emp.People_Soft_Id !DC TK_Emp.Emp_Last_Name||','||TK_Emp.Emp_First_Name &TK_Emp.FullName TK_Emp.Emp_WorkLocation B.Work_Lunch_Hrs_Mult B.Work_Lunch_Pay_Hours B.Work_Min_CallOut_Hours B.Work_CallOut_Mult B.Work_Meal_Allowance if isnull(&TK_Emp.People_Soft_Id) move &TK_Emp.Emp_id to $h_Emp_Num !DC <--- get the error on this line else move &TK_Emp.People_Soft_id to $h_Emp_Num !DC <---- get an SQR3701 on this line endif !DC move &TK_Emp.Emp_Id to $h_Emp_Id !DC move &TK_Emp.Emp_SS to $h_SSN move &TK_Emp.FullName to $h_Name move &TK_Emp.Emp_WorkLocation to $h_Emp_WorkLocation Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 28 10:05:07 2003 From: "Wood, Stuart" Subject: RE: [sqr-users] SQR 3719 Date: Mon, 28 Jul 2003 11:03:45 -0400 Move your if statements out of the first column, this column is reserved for fields being selected. if isnull(&TK_Emp.People_Soft_Id) move &TK_Emp.Emp_id to $h_Emp_Num !DC <--- get the error on this line else move &TK_Emp.People_Soft_id to $h_Emp_Num !DC <---- get an SQR3701 on this line endif !DC Hope this helps, Stu -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Monday, July 28, 2003 10:46 AM To: sqr-users@sqrug.org Subject: [sqr-users] SQR 3719 I keep receiving SQR 3719 error on the following code. I am trying to modify an SQR program to check for an Emp_num. begin-procedure Process-Pay-Period move 0 to #Nbr_Of_Empls move ' ' to $h_Emp_Num begin-SELECT -B10000 TK_Emp.Emp_Id TK_Emp.Emp_SS TK_Emp.People_Soft_Id !DC TK_Emp.Emp_Last_Name||','||TK_Emp.Emp_First_Name &TK_Emp.FullName TK_Emp.Emp_WorkLocation B.Work_Lunch_Hrs_Mult B.Work_Lunch_Pay_Hours B.Work_Min_CallOut_Hours B.Work_CallOut_Mult B.Work_Meal_Allowance if isnull(&TK_Emp.People_Soft_Id) move &TK_Emp.Emp_id to $h_Emp_Num !DC <--- get the error on this line else move &TK_Emp.People_Soft_id to $h_Emp_Num !DC <---- get an SQR3701 on this line endif !DC move &TK_Emp.Emp_Id to $h_Emp_Id !DC move &TK_Emp.Emp_SS to $h_SSN move &TK_Emp.FullName to $h_Name move &TK_Emp.Emp_WorkLocation to $h_Emp_WorkLocation Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 28 10:06:06 2003 Date: Mon, 28 Jul 2003 11:05:38 -0400 From: don.barclay@srs.gov Subject: Re: [sqr-users] SQR 3719 Your statements cannot start in the first character position inside of a SQL statement Your "if", "else", and "endif" statements need to be indented at least one position. Don Barclay Westinghouse Savannah River Co. Aiken, SC >> I keep receiving SQR 3719 error on the following code. I am trying to modify an SQR program to check for an Emp_num. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 28 10:54:15 2003 From: "Alexander, Steve" Date: Mon, 28 Jul 2003 08:58:52 -0700 Subject: [sqr-users] Hyperion to Acquire Brio I just got an e-mail from Brio announcing that Hyperion would acquire Brio. I wonder what impact that will have on SQR. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 28 14:09:48 2003 Date: Mon, 28 Jul 2003 12:08:31 -0700 From: Jim Engebretson Subject: [sqr-users] PeopleSoft and Tablespaces It is my understanding that a tablespace is a logical group of records/tables. What is the purpose of tablespaces within PeopleSoft? Jim Engebretson _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Mon Jul 28 15:13:21 2003 Date: Mon, 28 Jul 2003 13:12:14 -0700 (PDT) Subject: Re: [sqr-users] PeopleSoft and Tablespaces From: "Kristin Cagan" same purpose as in any other database. If a company has more than one peoplesoft applications (e.g. HRMS and Financials) they could have separate tablespaces for each application. Within an application, they may also want to keep things like benefits and job data separate. I suppose the extent to which tablespaces are used would depend on the size of the company and the number of modules installed. But good database design is good database design. I always recommend to clients that they work with their DBA's to determine guidelines for assigning tablespace within each application. -- Kristin Cagan Champion Strategeis, Inc. 650-245-2856 kcagan@pobox.com Jim Engebretson said: > It is my understanding that a tablespace is a logical group of > records/tables. What is the purpose of tablespaces within PeopleSoft? > > > > Jim Engebretson > > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 08:07:15 2003 From: "Edwin Hommes" Subject: Re: [sqr-users] PeopleSoft and Tablespaces Date: Tue, 29 Jul 2003 15:04:07 +0200 Jim, not entirely correct. A tablespace is a physsical amount of hard disk you assign in your database. the next step is to write particular records into that tablespace. When making your database design you must consider how much physsical storage some records will take. PS_JOB for example will be your largest table, therefor require a lot of hard disk space. Some databases tend to lock an entire tablespace (and thus all records in that tablespace) when altering data in one of the records. Some systems do not allow you to automatically extend the seize of your tablespace. It is much more than just a logical group of tables. You have to find a balance between all records in one tablespace and each record it's own tablespace. Edwin ----- Original Message ----- From: "Jim Engebretson" To: ; "peoplesoft-hr-l" ; Sent: Monday, July 28, 2003 9:08 PM Subject: [sqr-users] PeopleSoft and Tablespaces > It is my understanding that a tablespace is a logical group of > records/tables. What is the purpose of tablespaces within PeopleSoft? > > > > Jim Engebretson > > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 24/07/2003 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 13:19:23 2003 Date: Tue, 29 Jul 2003 13:16:06 -0500 From: "Chrisman, Dan:" Subject: [sqr-users] SQR 4407 get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 13:26:09 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] SQR 4407 Date: Tue, 29 Jul 2003 11:30:07 -0700 You don't need, and can't have, a "&" for a field in the "where" clause or the "order by" clause of the select statement that has that table in the "from" clause. -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Tuesday, July 29, 2003 11:16 AM To: sqr-users@sqrug.org Subject: [sqr-users] SQR 4407 get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 13:28:07 2003 From: Bill Beckner Subject: RE: [sqr-users] SQR 4407 Date: Tue, 29 Jul 2003 13:26:58 -0500 Just remove the '&' from your WHERE and ORDER BY clauses...they're not needed there.. -- William Beckner -- Stunt Programmer (Just call me "Bill") Illinois Central College, Rm L141 -- East Peoria, IL 61635-0001 PH: (309) 694-8419 -- FAX: (309) 694-8995 "Failure is not an option...it comes bundled with the software." -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Tuesday, July 29, 2003 1:16 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR 4407 get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 13:30:08 2003 From: "Mezzullo, Paul" Subject: RE: [sqr-users] SQR 4407 Date: Tue, 29 Jul 2003 14:34:06 -0400 Dan, Remove the "&'s" from the where clause ... where TK_TSC.amount = #old_diff order by TK_TSC.amount - Paul -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Tuesday, July 29, 2003 2:16 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR 4407 get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 13:32:07 2003 From: Jim McKeever Subject: RE: [sqr-users] SQR 4407 Date: Tue, 29 Jul 2003 12:25:30 -0600 When you use the field within your where clause or order by , you don't use the '&'. Just TK_TSC.AMOUNT. -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Tuesday, July 29, 2003 12:16 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR 4407 get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 13:33:19 2003 From: "Patel, Samir" Subject: RE: [sqr-users] SQR 4407 Date: Tue, 29 Jul 2003 14:28:20 -0400 Get rid of the '&' in the where & order by clause... Samir -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Tuesday, July 29, 2003 2:16 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR 4407 get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 13:42:07 2003 Subject: RE: [sqr-users] SQR 4407 Date: Tue, 29 Jul 2003 13:29:52 -0500 From: "Sengupta, Rajib (CAG-CC-Contractor)" you have to take out the & ,TK_TSC should do fine. Rajib Sengupta Systems Analyst and Team Lead Peoplesoft Financial Consultant Conagra Business Systems Phone: 402-595-5749 -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Tuesday, July 29, 2003 1:16 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR 4407 get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 14:01:07 2003 From: "Mark Hall" Date: Tue, 29 Jul 2003 13:45:43 -0500 Subject: Re: [sqr-users] SQR 4407 remove the & from in front of TK_TSC amount in the sql criteria. You don't need them there. Mark Hall IS Analyst ERP Team 260-373-8796 mark.hall@parkview.com >>> Daniel.E.Chrisman@conocophillips.com 07/29/03 01:16PM >>> get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 14:08:09 2003 From: "the dragon" Subject: RE: [sqr-users] SQR 4407 Date: Tue, 29 Jul 2003 14:06:36 -0500 Dan, So, what Steve is saying is change the order by &TK_TSC.amount and where &TK_TSC.amount = #old_diff to order by TK_TSC.amount and where TK_TSC.amount = #old_diff also, get in the habit of using let commands rather than move commands - they are more powerful in the long run and faster except for numeric values. clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- You don't need, and can't have, a "&" for a field in the "where" clause or the "order by" clause of the select statement that has that table in the "from" clause. -----Original Message----- get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 15:01:02 2003 From: "the dragon" Date: Tue, 29 Jul 2003 14:58:05 -0500 Subject: [sqr-users] possible bug Hi all, I think I found an sqr bug, but it doesn't cause anything to crash, when I would have expected a compile erro at the least. I fat-fingered the following lines in a procedure: #ifdef debugb show 'Exiting GET THE RECORDS' #endif 'show leaving curr = |' $currency_cd '|' <----- look at first tick end-procedure ! GET THE RECORDS and in my log file it prints like this: Exiting GET THE RECORDSshow leaving curr = |USD| weird, huh? Can anyone explain this behavior? clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 15:13:29 2003 Subject: Re: [sqr-users] possible bug From: rwulfson@bost.com Date: Tue, 29 Jul 2003 14:14:09 -0600 SO IT LOOKS LIKE THE #ENDIF DOESN'T TERMINATE THE SHOW COMMAND. YOUR SECOND STRING JUST GETS ADDED TO THE SHOW STATEMENT. Thanks, Russ Wulfson Developer Boston Market Corporation Office: 303-216-5614 Fax: 303 -216- 8727 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 15:17:05 2003 Subject: RE: [sqr-users] possible bug Date: Tue, 29 Jul 2003 16:11:09 -0400 From: "Hardy, Kathi" What do you think it should look like? >From what I see, the output is correct for what you have. -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 29, 2003 3:58 PM To: sqr-users@sqrug.org Subject: [sqr-users] possible bug Hi all, I think I found an sqr bug, but it doesn't cause anything to crash, when I would have expected a compile erro at the least. I fat-fingered the following lines in a procedure: #ifdef debugb show 'Exiting GET THE RECORDS' #endif 'show leaving curr = |' $currency_cd '|' <----- look at first tick end-procedure ! GET THE RECORDS and in my log file it prints like this: Exiting GET THE RECORDSshow leaving curr = |USD| weird, huh? Can anyone explain this behavior? clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 15:24:40 2003 Date: Tue, 29 Jul 2003 16:22:52 -0400 From: don.barclay@srs.gov Subject: Re: [sqr-users] possible bug Dragon, After running a couple of simple tests, this kind of makes sense that it is behaving like this. Apparently, because you have debugb "turned on", the show statement executes and continues to execute until it finds another command. Because the next line seems to be a quoted string, it can continue to execute the show statement. If you "turn off" debugb, you will probably get a compile error (depending on what line precedes the #ifdef debugb statement). Think of it this way -- when the SQR compiles and it includes the show statement, the process looks like this: | show 'Exiting GET THE RECORDS' | 'show leaving curr = |' $currency_cd '|' <----- look at first tick | | end-procedure ! GET THE RECORDS The odd combination (the typo following a show statement) ended up compiling just fine. Don Barclay Westinghouse Savannah River Co. Aiken, SC "the dragon" Sent by: sqr-users-admin@sqrug.org 07/29/2003 03:58 PM Please respond to sqr-users To: sqr-users@sqrug.org cc: Subject: [sqr-users] possible bug Hi all, I think I found an sqr bug, but it doesn't cause anything to crash, when I would have expected a compile erro at the least. I fat-fingered the following lines in a procedure: #ifdef debugb show 'Exiting GET THE RECORDS' #endif 'show leaving curr = |' $currency_cd '|' <----- look at first tick end-procedure ! GET THE RECORDS and in my log file it prints like this: Exiting GET THE RECORDSshow leaving curr = |USD| weird, huh? Can anyone explain this behavior? clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 15:35:26 2003 Date: Tue, 29 Jul 2003 15:34:24 -0500 (EST) From: Don Mellen Subject: RE: [sqr-users] SQR 4407 On Tue, 29 Jul 2003, the dragon wrote: > Dan, > > also, get in the habit of using let commands rather than move commands - > they are more powerful in the long run and faster except for numeric values. Actually, just to be nit-picky, "move" is more efficient than "let" for all simple assignments. Just like "add" is more efficient than let, "subtract" is more ...etc. For complex assignments that would take multiple "single-purpose" commands, then "let" is more efficient. See archives for many discussions thereof. ----------------------------------------------------------------------- Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/ donm@ontko.com | "In the beginning, there was nothing, which exploded" _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 15:54:29 2003 From: "the dragon" Subject: RE: [sqr-users] possible bug Date: Tue, 29 Jul 2003 15:53:27 -0500 Kathy, the command 'show leaving curr = |' $currency_cd '|' should cause a compile error, because there is no command 'show .... I should be getting some kind of error because it should be treating everything between the ticks as a literal string, yet it is executing the show...... oh, wait, I see what is happening, but I don't know why - it is treating the show statement within the #ifdef and the string outside as a concatination of just one string. I would not have expected it to work that way because show is supposed to stop at the end of a line...... Hmmm, on further testing a quoted string on a line following a show with a quoted string will just concatenate the two strings together. I just thought it would stop the show at the end of the line. learn something new every day, and the day isn't a complete loss. clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- What do you think it should look like? >From what I see, the output is correct for what you have. -----Original Message----- Hi all, I think I found an sqr bug, but it doesn't cause anything to crash, when I would have expected a compile erro at the least. I fat-fingered the following lines in a procedure: #ifdef debugb show 'Exiting GET THE RECORDS' #endif 'show leaving curr = |' $currency_cd '|' <----- look at first tick end-procedure ! GET THE RECORDS and in my log file it prints like this: Exiting GET THE RECORDSshow leaving curr = |USD| weird, huh? Can anyone explain this behavior? clark 'the dragon' willis _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Tue Jul 29 16:59:03 2003 From: "the dragon" Date: Tue, 29 Jul 2003 16:56:06 -0500 Subject: [sqr-users] let vs move discussion part deaux Don, I cordially disagree. Unless brio has changed anything lately, numeric assignments are faster with move but character assignments are faster with let because there is more overhead associated with the move command. Maybe someone from brio/sqribe in Ohio can give the definitive answer on this. As for searching the sqrug database, there isn't really that much and everything I see in the database is 4 years old. in this message http://www.sqrug.org/sqr-users/sqrusers_97/msg00690.html the values are all numeric. ditto http://www.sqrug.org/sqr-users/sqrusers_97/msg00696.html clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- On Tue, 29 Jul 2003, the dragon wrote: > Dan, > > also, get in the habit of using let commands rather than move commands - > they are more powerful in the long run and faster except for numeric values. Actually, just to be nit-picky, "move" is more efficient than "let" for all simple assignments. Just like "add" is more efficient than let, "subtract" is more ...etc. For complex assignments that would take multiple "single-purpose" commands, then "let" is more efficient. See archives for many discussions thereof. _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 08:14:30 2003 Subject: RE: [sqr-users] possible bug Date: Wed, 30 Jul 2003 09:11:30 -0400 From: "Beller, Jay" Clark, The fact that SHOW allows continuation over multiple lines is great! Makes it much more useful than DISPLAY. Consider the following: show 'For employee ' $Emplid '-' #Empl_rcd edit '9' ', starting from ' $Input_Date edit 'MM/DD/YYYY' ', we processed ' #Rec_read edit '88,889' ' records.' Regards...jay -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 29, 2003 4:53 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] possible bug Kathy, the command 'show leaving curr = |' $currency_cd '|' should cause a compile error, because there is no command 'show .... I should be getting some kind of error because it should be treating everything between the ticks as a literal string, yet it is executing the show...... oh, wait, I see what is happening, but I don't know why - it is treating the show statement within the #ifdef and the string outside as a concatination of just one string. I would not have expected it to work that way because show is supposed to stop at the end of a line...... Hmmm, on further testing a quoted string on a line following a show with a quoted string will just concatenate the two strings together. I just thought it would stop the show at the end of the line. learn something new every day, and the day isn't a complete loss. clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- What do you think it should look like? >From what I see, the output is correct for what you have. -----Original Message----- Hi all, I think I found an sqr bug, but it doesn't cause anything to crash, when I would have expected a compile erro at the least. I fat-fingered the following lines in a procedure: #ifdef debugb show 'Exiting GET THE RECORDS' #endif 'show leaving curr = |' $currency_cd '|' <----- look at first tick end-procedure ! GET THE RECORDS and in my log file it prints like this: Exiting GET THE RECORDSshow leaving curr = |USD| weird, huh? Can anyone explain this behavior? clark 'the dragon' willis _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 08:35:08 2003 Date: Wed, 30 Jul 2003 08:33:02 -0500 From: "Chrisman, Dan:" Subject: [sqr-users] SQR Reference Manuals Could anyone suggest some good reference manuals with error code explanations that I could pick up at the local book store (Walden's or B Daltons)? I am trying to make changes to an SQR program with only the help files from SQR available. Bear in mind that I AM NOT an SQR programmer, my experience is limited to VB and Powerbuilder. Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 08:36:37 2003 Date: Wed, 30 Jul 2003 09:33:35 -0400 From: "White, Denise" Subject: [sqr-users] RE: let vs move discussion part deux I was taught what Don said - that 'move' is more efficient than 'let'. To be more specific, I was taught that 'move' is three times faster than 'let'. I wasn't told anything about numeric vs. character values. This is interesting - I am always interested in programming as efficiently as possible (even though some people think I'm weird because computer processors are so fast that the differences are minuscule). I routinely use 'move' wherever possible (unless I have a group of statements together, have to use 'let' in some of them, and want them to line up and look pretty!). Denise M. White Sr. Software Engineer Vicor --__--__-- Message: 17 From: "the dragon" To: sqr-users@sqrug.org Date: Tue, 29 Jul 2003 16:56:06 -0500 Subject: [sqr-users] let vs move discussion part deaux Reply-To: sqr-users@sqrug.org Don, I cordially disagree. Unless brio has changed anything lately, numeric assignments are faster with move but character assignments are faster with let because there is more overhead associated with the move command. Maybe someone from brio/sqribe in Ohio can give the definitive answer on this. As for searching the sqrug database, there isn't really that much and everything I see in the database is 4 years old. in this message http://www.sqrug.org/sqr-users/sqrusers_97/msg00690.html the values are all numeric. ditto http://www.sqrug.org/sqr-users/sqrusers_97/msg00696.html clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- On Tue, 29 Jul 2003, the dragon wrote: > Dan, > > also, get in the habit of using let commands rather than move commands - > they are more powerful in the long run and faster except for numeric values. Actually, just to be nit-picky, "move" is more efficient than "let" for all simple assignments. Just like "add" is more efficient than let, "subtract" is more ...etc. For complex assignments that would take multiple "single-purpose" commands, then "let" is more efficient. See archives for many discussions thereof. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 08:51:06 2003 From: "Jacqueline Smith" Date: Wed, 30 Jul 2003 09:49:18 -0400 Subject: [sqr-users] Rounding up to the nearest 1000 in SQR Please help ! I am fairly new to writing reports in SQR, I have to do some calculations that will round up the salary to the next $1000. I know about rounding after the decimal ,but is there a way in SQR development to round to the next 1000, before the decimal place. I hope this doesn't tick anyone off. Just trying to earn a living! Will greatly appreciate any help I can get. Thanks a million ! v/r Jacquelin Smith Telephone 631-4545 Code IH PeopleSoft ***************************defiant************************************ This email and any files transmitted with it are intended solely for the use of the individual or agency to whom they are addressed. If you have received this email in error please notify the Navy Exchange Service Command e-mail administrator. This footnote also confirms that this email message has been scanned for the presence of computer viruses. messaging_support_team@nexnet.navy.mil ********************************************************************** _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 09:31:14 2003 Date: Wed, 30 Jul 2003 10:28:28 -0400 From: "George Jansen" Subject: Re: [sqr-users] Rounding up to the nearest 1000 in SQR Oracle will let you round to an explicit number of places, positive for after the decimal, negative for before. But that's rounding, not rounding up. Pehaps the Ontko.com clan knows a cleaner way, but I'd use the ceil function: begin-setup declare-variable integer #y end-declare end-setup begin-procedure k-round(#raw, :#rounded) let #rounded = ceil(#raw/1000) * 1000 end-procedure begin-program let #x = 950.00 while #x < 1100 do k-round(#x, #y) show #y let #x = #x + 50 end-while end-program _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 09:33:24 2003 From: "the dragon" Subject: RE: [sqr-users] possible bug Date: Wed, 30 Jul 2003 09:28:55 -0500 Jay, I agree, but I don't think it used to work that way. I am sure I have gotten compile errors before if the show isn't correct. clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Clark, The fact that SHOW allows continuation over multiple lines is great! Makes it much more useful than DISPLAY. Consider the following: show 'For employee ' $Emplid '-' #Empl_rcd edit '9' ', starting from ' $Input_Date edit 'MM/DD/YYYY' ', we processed ' #Rec_read edit '88,889' ' records.' Regards...jay -----Original Message----- Kathy, the command 'show leaving curr = |' $currency_cd '|' should cause a compile error, because there is no command 'show .... I should be getting some kind of error because it should be treating everything between the ticks as a literal string, yet it is executing the show...... oh, wait, I see what is happening, but I don't know why - it is treating the show statement within the #ifdef and the string outside as a concatination of just one string. I would not have expected it to work that way because show is supposed to stop at the end of a line...... Hmmm, on further testing a quoted string on a line following a show with a quoted string will just concatenate the two strings together. I just thought it would stop the show at the end of the line. learn something new every day, and the day isn't a complete loss. clark 'the dragon' willis ----Original Message Follows---- What do you think it should look like? >From what I see, the output is correct for what you have. -----Original Message----- Hi all, I think I found an sqr bug, but it doesn't cause anything to crash, when I would have expected a compile erro at the least. I fat-fingered the following lines in a procedure: #ifdef debugb show 'Exiting GET THE RECORDS' #endif 'show leaving curr = |' $currency_cd '|' <----- look at first tick end-procedure ! GET THE RECORDS and in my log file it prints like this: Exiting GET THE RECORDSshow leaving curr = |USD| weird, huh? Can anyone explain this behavior? clark 'the dragon' willis _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 09:52:18 2003 From: "Hood Louise (app1lxh)" Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Date: Wed, 30 Jul 2003 10:50:32 -0400 Hi, Try something like this: Begin-setup Declare-variable integer #Ksal . . . End-declare End-setup In the procedure where you need the evaluation of the amount, something like this: let #salary = 51090 ! The actual salary amount let #increment = 1000 ! The incremental value (i.e., in thousands) let #Ksal = #salary/#increment ! Number of increments let #rem = mod(#salary,#increment) if #rem <> 0 ! Determine if there is a remainder let #newsal = (#Ksal + 1) * #increment ! Bump up the increment by 1 and multiply else ! Otherwise, salary is already in even thousands let #newsal = #salary end-if display '#Ksal = ' noline display #Ksal display '#rem = ' noline display #rem display '#newsal = ' noline display #newsal There may be a better, whiz-bang way of doing it, but this will get you there. HTH, Louise -----Original Message----- From: Jacqueline Smith [mailto:Jacqueline_Smith@nexnet.navy.mil] Sent: Wednesday, July 30, 2003 9:49 AM To: sqr-users@sqrug.org Subject: [sqr-users] Rounding up to the nearest 1000 in SQR Please help ! I am fairly new to writing reports in SQR, I have to do some calculations that will round up the salary to the next $1000. I know about rounding after the decimal ,but is there a way in SQR development to round to the next 1000, before the decimal place. I hope this doesn't tick anyone off. Just trying to earn a living! Will greatly appreciate any help I can get. Thanks a million ! v/r Jacquelin Smith Telephone 631-4545 Code IH PeopleSoft ***************************defiant************************************ This email and any files transmitted with it are intended solely for the use of the individual or agency to whom they are addressed. If you have received this email in error please notify the Navy Exchange Service Command e-mail administrator. This footnote also confirms that this email message has been scanned for the presence of computer viruses. messaging_support_team@nexnet.navy.mil ********************************************************************** _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 09:55:05 2003 From: EricRection@aol.com Date: Wed, 30 Jul 2003 10:50:59 EDT Subject: Re: [sqr-users] Rounding up to the nearest 1000 in SQR There may well be a one line solution to this, but the thingies below will round up or down. begin-procedure round_down(#old_number,:$number) ! 9000 => 9000 ! 9001 => 9000 ! 9501 => 9000 ! 10000 => 10000 let #number = #old_number/1000 let $number = to_char(#number) if instr($number,'.',1) <> length($number) let $number = $number || '.' end-if let $number = substr($number,1,instr($number,'.',1)) let #number = $number let #number = #number*1000 end-procedure begin-procedure round_up(#old_number,:$number) ! 9000 => 9000 ! 9001 => 10000 ! 9501 => 10000 ! 10000 => 10000 let #number = (-1+#old_number)/1000 let $number = to_char(#number+1) if instr($number,'.',1) <> length($number) let $number = $number || '.' end-if let $number = substr($number,1,instr($number,'.',1)) let #number = $number let #number = (#number+1)*1000 end-procedure _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 10:03:06 2003 From: Peter Burton Subject: RE: [sqr-users] SQR 4407 Date: Wed, 30 Jul 2003 11:01:03 -0400 Clark, You are incorrect --- "MOVE", "ADD", "SUBTRACT", "MULTIPLY" and "DIVIDE" are much faster than performing the same functionality with a "LET". Peter -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Tuesday, July 29, 2003 3:07 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] SQR 4407 Dan, So, what Steve is saying is change the order by &TK_TSC.amount and where &TK_TSC.amount = #old_diff to order by TK_TSC.amount and where TK_TSC.amount = #old_diff also, get in the habit of using let commands rather than move commands - they are more powerful in the long run and faster except for numeric values. clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- You don't need, and can't have, a "&" for a field in the "where" clause or the "order by" clause of the select statement that has that table in the "from" clause. -----Original Message----- get the following error when I compile my program, The field is in the table definition correctly. What am I doing wrong? (SQR 4407) Referenced variables not defined: &tk_tsc.amount here is the code. move ' ' to $shift_code begin-select TK_TSC.shift_code &shift_code move &shift_code to $shift_code from TK_TESS_SHIFT_CODES TK_TSC where &TK_TSC.amount = #old_diff order by &TK_TSC.amount end-select Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 10:09:06 2003 Subject: RE: [sqr-users] possible bug Date: Wed, 30 Jul 2003 11:07:41 -0400 From: "Michael Johnson" #ifdef #endif is not part of the generated code, therefore you could also do something like (just wanted to get on the Let/move thread also): Let $Debuga = '' Let $Debugb = '' #ifdef debuga Let #Endif #ifdef debuga $Debuga = 'Debuga Set' #Endif #ifdef debugb Move #endif #ifdef debugb 'Debugb Set' to $Debugb #Endif show $Debuga show $Debugb Mike Johnson -----Original Message----- From: the dragon [mailto:ceprn@hotmail.com] Sent: Wednesday, July 30, 2003 10:29 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] possible bug Jay, I agree, but I don't think it used to work that way. I am sure I have gotten compile errors before if the show isn't correct. clark PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Clark, The fact that SHOW allows continuation over multiple lines is great! Makes it much more useful than DISPLAY. Consider the following: show 'For employee ' $Emplid '-' #Empl_rcd edit '9' ', starting from ' $Input_Date edit 'MM/DD/YYYY' ', we processed ' #Rec_read edit '88,889' ' records.' Regards...jay -----Original Message----- Kathy, the command 'show leaving curr = |' $currency_cd '|' should cause a compile error, because there is no command 'show .... I should be getting some kind of error because it should be treating everything between the ticks as a literal string, yet it is executing the show...... oh, wait, I see what is happening, but I don't know why - it is treating the show statement within the #ifdef and the string outside as a concatination of just one string. I would not have expected it to work that way because show is supposed to stop at the end of a line...... Hmmm, on further testing a quoted string on a line following a show with a quoted string will just concatenate the two strings together. I just thought it would stop the show at the end of the line. learn something new every day, and the day isn't a complete loss. clark 'the dragon' willis ----Original Message Follows---- What do you think it should look like? >From what I see, the output is correct for what you have. -----Original Message----- Hi all, I think I found an sqr bug, but it doesn't cause anything to crash, when I would have expected a compile erro at the least. I fat-fingered the following lines in a procedure: #ifdef debugb show 'Exiting GET THE RECORDS' #endif 'show leaving curr = |' $currency_cd '|' <----- look at first tick end-procedure ! GET THE RECORDS and in my log file it prints like this: Exiting GET THE RECORDSshow leaving curr = |USD| weird, huh? Can anyone explain this behavior? clark 'the dragon' willis _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 10:52:37 2003 From: Nathan Stratton Treadway Date: Wed, 30 Jul 2003 10:50:41 -0500 Subject: [sqr-users] Re: curious flat file behavior On Sun, Jul 27, 2003 at 12:33:12PM -0500, Ray Ontko wrote: > As others have noted, you are observing the correct behavior: trailing > blanks are automatically deleted. > > In situations where I want to read every character, I open the file as > fixed:1, and read the file byte-by-byte. This also allows me to read > and process null characters (character 0). Note that in Clark's particular situation, the easiest solution might just be to use RPAD within the SQR to pad the final value back out to the expected length (since you know ahead of time how long it is supposed to be). The situation where the auto-space-stripping really hurts is when you don't know ahead of time how many trailing spaces are found on each line (i.e. the file has variable line lengths and each line could end with a different number of spaces) but you need to preserve that information. In this case, the SQR-only solution is to go through byte-by-byte as Ray mentions. Alternatively, you can use some other utility (e.g. "sed") to append a specific non-space character at the end of each line before processing the input file. Then you just be sure modify your code to ignore that trailing character when you parse the input line; you can leave the rest of your SQR processing unchanged. Nathan ---------------------------------------------------------------------------- Nathan Stratton Treadway | nathanst@ontko.com | Mid-Atlantic region Software consulting services | Ray Ontko & Co. | http://www.ontko.com/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 11:09:07 2003 Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Date: Wed, 30 Jul 2003 11:07:48 -0500 From: "Knapp, Richard" Or... you could add 500 and round. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: George Jansen [mailto:GJANSEN@aflcio.org] Sent: Wednesday, July 30, 2003 9:28 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Rounding up to the nearest 1000 in SQR Oracle will let you round to an explicit number of places, positive for after the decimal, negative for before. But that's rounding, not rounding up. Pehaps the Ontko.com clan knows a cleaner way, but I'd use the ceil function: begin-setup declare-variable integer #y end-declare end-setup begin-procedure k-round(#raw, :#rounded) let #rounded = ceil(#raw/1000) * 1000 end-procedure begin-program let #x = 950.00 while #x < 1100 do k-round(#x, #y) show #y let #x = #x + 50 end-while end-program _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 11:15:50 2003 From: Al H Subject: Re: [sqr-users] RE: let vs move discussion part deux Date: Wed, 30 Jul 2003 09:11:59 -0700 The difference between MOVE and LET mattered when we were programming on 80386 machines. In today's world, the time you spent typing the command probably took more clock time than the difference it will ever make between the two in your program. The best efforts of optimization are spent on making sure you are using indices efficiently (explain plan is your friend ;)) and keeping network traffic to a minimum by doing as much as you can using SQL commands rather than SQR commands (caveat: As with all rules, there are exceptions). BTW I don't think you're weird Denise :), your posts prove otherwise! On Wed, 30 Jul 2003 09:33:35 -0400, you wrote: >I was taught what Don said - that 'move' is more efficient than 'let'. To be more specific, I was taught that 'move' is three times faster than 'let'. I wasn't told anything about numeric vs. character values. This is interesting - I am always interested in programming as efficiently as possible (even though some people think I'm weird because computer processors are so fast that the differences are minuscule). I routinely use 'move' wherever possible (unless I have a group of statements together, have to use 'let' in some of them, and want them to line up and look pretty!) > >Denise M. White >Sr. Software Engineer >Vicor >--__--__-- > >Message: 17 >From: "the dragon" >To: sqr-users@sqrug.org >Date: Tue, 29 Jul 2003 16:56:06 -0500 >Subject: [sqr-users] let vs move discussion part deaux >Reply-To: sqr-users@sqrug.org > >Don, > >I cordially disagree. Unless brio has changed anything lately, numeric >assignments are faster with move but character assignments are faster with >let because there is more overhead associated with the move command. Maybe >someone from brio/sqribe in Ohio can give the definitive answer on this. > >As for searching the sqrug database, there isn't really that much and >everything I see in the database is 4 years old. > >in this message http://www.sqrug.org/sqr-users/sqrusers_97/msg00690.html the >values are all numeric. >ditto http://www.sqrug.org/sqr-users/sqrusers_97/msg00696.html > >clark 'the dragon' willis > > >PSA: Salary <> Slavery. If you earn a salary, your employer is renting your >services for 40 hours a week, not purchasing your soul. Your time is the >only real finite asset that you have, and once used it can never be >recovered, so don't waste it by giving it away. > >"Time is the coin of your life. It is the only coin you have, and only you >can determine how it will be spent. Be careful lest you let other people >spend it for you." > >Carl Sandburg >(1878 - 1967) > > >----Original Message Follows---- > >On Tue, 29 Jul 2003, the dragon wrote: > > > Dan, > > > > > also, get in the habit of using let commands rather than move commands - > > they are more powerful in the long run and faster except for numeric >values. > >Actually, just to be nit-picky, "move" is more efficient than "let" for >all simple assignments. Just like "add" is more efficient than let, >"subtract" is more ...etc. > >For complex assignments that would take multiple "single-purpose" >commands, then "let" is more efficient. > >See archives for many discussions thereof. > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 11:18:06 2003 From: Peter Burton Date: Wed, 30 Jul 2003 12:15:02 -0400 Subject: [sqr-users] Some LET timings All, Values adjusted 0.182940 seconds for looping (100,000) overhead. 1.337228 seconds to do LET commands. 0.927615 seconds to do MOVE (STRING) commands. ===== 0.669077 seconds to do LET commands. 0.475877 seconds to do MOVE (FLOAT) commands. ===== 1.218661 seconds to do LET commands. 0.392715 seconds to do ADD commands. ===== 1.213833 seconds to do LET commands. 0.403296 seconds to do SUBTRACT commands. ===== 1.156984 seconds to do LET commands. 0.470526 seconds to do MULTIPLY commands. ===== 1.180882 seconds to do LET commands. 0.595128 seconds to do DIVIDE commands. Peter _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 11:27:06 2003 Date: Wed, 30 Jul 2003 11:25:33 -0500 (EST) From: Don Mellen Subject: Re: [sqr-users] let vs move discussion part deaux On Tue, 29 Jul 2003, the dragon wrote: > Don, > > I cordially disagree. Unless brio has changed anything lately, numeric > assignments are faster with move but character assignments are faster with > let because there is more overhead associated with the move command. Nope, nothing has changed. As you point out later, messages on this subject are years old and "let" has always had more 'overhead' for simple assignment than "move" > Maybe someone from brio/sqribe in Ohio can give the definitive answer on > this. I believe Peter Burton's answer(s) suffice. > As for searching the sqrug database, there isn't really that much and > everything I see in the database is 4 years old. > > in this message http://www.sqrug.org/sqr-users/sqrusers_97/msg00690.html the > values are all numeric. > ditto http://www.sqrug.org/sqr-users/sqrusers_97/msg00696.html Check out http://www.sqrug.org/sqr-users/sqrusers_97/msg00671.html ----------------------------------------------------------------------- Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/ donm@ontko.com | "In the beginning, there was nothing, which exploded" _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 11:32:05 2003 From: "Turner, Ivan" Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Date: Wed, 30 Jul 2003 12:30:14 -0400 Richard,Knapp, Rounding rounds to the nearest integer or to a specified number of decimal places. Adding 500 won't work. -----Original Message----- From: Knapp, Richard [mailto:KnappR@umsystem.edu] Sent: Wednesday, July 30, 2003 12:08 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Or... you could add 500 and round. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: George Jansen [mailto:GJANSEN@aflcio.org] Sent: Wednesday, July 30, 2003 9:28 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Rounding up to the nearest 1000 in SQR Oracle will let you round to an explicit number of places, positive for after the decimal, negative for before. But that's rounding, not rounding up. Pehaps the Ontko.com clan knows a cleaner way, but I'd use the ceil function: begin-setup declare-variable integer #y end-declare end-setup begin-procedure k-round(#raw, :#rounded) let #rounded = ceil(#raw/1000) * 1000 end-procedure begin-program let #x = 950.00 while #x < 1100 do k-round(#x, #y) show #y let #x = #x + 50 end-while end-program _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 11:33:39 2003 From: "Brown, Bryan" Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Date: Wed, 30 Jul 2003 08:30:41 -0800 Jacqueline, I see there have already been several different responses....hope they helped. I wanted to point out that while I don't post to the group often (usually get beat to the answer anyway), I do read a lot of the messages. There is a really great bunch of people on this list...never feel bad about asking a question. The odds are that more than one person will benefit from any question asked/answered. Welcome to the world of SQR :-) Bryan -----Original Message----- From: Jacqueline Smith [mailto:Jacqueline_Smith@nexnet.navy.mil] Sent: Wednesday, July 30, 2003 5:49 AM To: sqr-users@sqrug.org Subject: [sqr-users] Rounding up to the nearest 1000 in SQR Please help ! I am fairly new to writing reports in SQR, I have to do some calculations that will round up the salary to the next $1000. I know about rounding after the decimal ,but is there a way in SQR development to round to the next 1000, before the decimal place. I hope this doesn't tick anyone off. Just trying to earn a living! Will greatly appreciate any help I can get. Thanks a million ! v/r Jacquelin Smith Telephone 631-4545 Code IH PeopleSoft ***************************defiant************************************ This email and any files transmitted with it are intended solely for the use of the individual or agency to whom they are addressed. If you have received this email in error please notify the Navy Exchange Service Command e-mail administrator. This footnote also confirms that this email message has been scanned for the presence of computer viruses. messaging_support_team@nexnet.navy.mil ********************************************************************** _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users This transmittal may contain confidential information intended solely for the addressee. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error; any review, dissemination, distribution or copying of this transmittal is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (collect at 907-564-1000) and ask to speak with the message sender. In addition, please immediately delete this message and all attachments. Thank you. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 11:41:06 2003 Date: Wed, 30 Jul 2003 12:38:35 -0400 From: "George Jansen" Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Depends on what you had in mind... Oracle rounds 1500 to 2000 SQL> select round(1500,-3) from dual; ROUND(1500,-3) -------------- 2000 and SQR rounds x.5 up to x+1. >>> KnappR@umsystem.edu 07/30/03 12:07PM >>> Or... you could add 500 and round. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 11:56:10 2003 From: "Turner, Ivan" Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Date: Wed, 30 Jul 2003 12:54:41 -0400 For SQL/Plus this didn't round up to the nearest thousand. I was refering SQR's round function in my previous message. SQL> select round(1,-3) from dual; ROUND(1,-3) ----------- 0 -----Original Message----- From: George Jansen [mailto:GJANSEN@aflcio.org] Sent: Wednesday, July 30, 2003 12:39 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Depends on what you had in mind... Oracle rounds 1500 to 2000 SQL> select round(1500,-3) from dual; ROUND(1500,-3) -------------- 2000 and SQR rounds x.5 up to x+1. >>> KnappR@umsystem.edu 07/30/03 12:07PM >>> Or... you could add 500 and round. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 12:33:07 2003 Date: Wed, 30 Jul 2003 10:31:02 -0700 (PDT) From: Alden Huen Subject: [sqr-users] Reading a CSV file Does any one have any sample code as to how to have sqr read the values in a csv file? Thanks _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 13:11:17 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] Some LET timings Date: Wed, 30 Jul 2003 11:15:05 -0700 I used to avoid move, add, subtract, etc. because they seemed like relics of COBOL, and I am a relic of FORTRAN, BASIC, and C. When I heard they were faster, I adopted them for limited use; incrementing a loop counter or summing a total. As people have noted, it would be a rare database application in which the performance of these commands outweighed the performance of the SQL functions. I'm more concerned about maintaining the code than accelerating the arithmetic. People who are familiar with it have no problem, I'm sure, but I still hesitate when reading "divide #x into #y." Tell me again, which variable stays the same and which variable has a new value? Is the new value "#x/#y" or "#y/#x?" Of course I know the answers - by mentally translating the statement into "let #y = #y / #x." There's also the problem of changing the formula. It's not hard to change from "let #x = #y" to "let #x = #y * 1.05," but the same change to a move command means adding an additional (multiply) command. And as soon as we want to use an array value or a built-in function, we have to switch to the "let" command. But most of all, these commands can make variable names a lie. We might write "let #average = #total / #count" truthfully, but if we write "divide #count into #total," then #total is no longer a total, it is misnamed. Similarly "multiply 1.05 times #salary" gives someone a 5% raise, but it uses the same variable, #salary, for what should be #starting_salary and #ending_salary. In summary, the half second savings for every hundred thousand operations may be lost in a single late night debugging session. -----Original Message----- From: Peter Burton [mailto:pburton@brio.com] Sent: Wednesday, July 30, 2003 9:15 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Some LET timings All, Values adjusted 0.182940 seconds for looping (100,000) overhead. 1.337228 seconds to do LET commands. 0.927615 seconds to do MOVE (STRING) commands. ===== 0.669077 seconds to do LET commands. 0.475877 seconds to do MOVE (FLOAT) commands. ===== 1.218661 seconds to do LET commands. 0.392715 seconds to do ADD commands. ===== 1.213833 seconds to do LET commands. 0.403296 seconds to do SUBTRACT commands. ===== 1.156984 seconds to do LET commands. 0.470526 seconds to do MULTIPLY commands. ===== 1.180882 seconds to do LET commands. 0.595128 seconds to do DIVIDE commands. Peter _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 13:24:07 2003 From: "Patel, Samir" Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Date: Wed, 30 Jul 2003 14:22:23 -0400 Jacquelin, The following MAY not be the best way to accomplish what you want, but it just might work for you. There is a SQR function which will give you the remainder when dividing 2 numbers. Unfortunately, I cannot recall what the function is, but you can look it up in a reference book (or someone in the group will know). In your case, you are dividing by 1000. If #remainder >= 500 Let #rounded_value = #your_value + 1000 - #remainder Else Let #rounded_value = #your_value - 1000 + #remainder End-If Example 1: ---------- Your value = 10600 Rounded = 10600 + 1000 - 600 = 11000 Example 2: ---------- Your value = 10400 Rounded = 10400 - 1000 + 600 = 10000 Hope that helps, Samir -----Original Message----- From: Turner, Ivan [mailto:Ivan.Turner@qwest.com] Sent: Wednesday, July 30, 2003 12:30 PM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Richard,Knapp, Rounding rounds to the nearest integer or to a specified number of decimal places. Adding 500 won't work. -----Original Message----- From: Knapp, Richard [mailto:KnappR@umsystem.edu] Sent: Wednesday, July 30, 2003 12:08 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Or... you could add 500 and round. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: George Jansen [mailto:GJANSEN@aflcio.org] Sent: Wednesday, July 30, 2003 9:28 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Rounding up to the nearest 1000 in SQR Oracle will let you round to an explicit number of places, positive for after the decimal, negative for before. But that's rounding, not rounding up. Pehaps the Ontko.com clan knows a cleaner way, but I'd use the ceil function: begin-setup declare-variable integer #y end-declare end-setup begin-procedure k-round(#raw, :#rounded) let #rounded = ceil(#raw/1000) * 1000 end-procedure begin-program let #x = 950.00 while #x < 1100 do k-round(#x, #y) show #y let #x = #x + 50 end-while end-program _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 13:31:06 2003 From: "Patel, Samir" Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Date: Wed, 30 Jul 2003 14:29:06 -0400 Oops, made a typo Example 2: ---------- Your value = 10400 Rounded = 10400 - 1000 + 400 = 10000 -----Original Message----- From: Patel, Samir Sent: Wednesday, July 30, 2003 2:22 PM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Jacquelin, The following MAY not be the best way to accomplish what you want, but it just might work for you. There is a SQR function which will give you the remainder when dividing 2 numbers. Unfortunately, I cannot recall what the function is, but you can look it up in a reference book (or someone in the group will know). In your case, you are dividing by 1000. If #remainder >= 500 Let #rounded_value = #your_value + 1000 - #remainder Else Let #rounded_value = #your_value - 1000 + #remainder End-If Example 1: ---------- Your value = 10600 Rounded = 10600 + 1000 - 600 = 11000 Example 2: ---------- Your value = 10400 Rounded = 10400 - 1000 + 600 = 10000 Hope that helps, Samir -----Original Message----- From: Turner, Ivan [mailto:Ivan.Turner@qwest.com] Sent: Wednesday, July 30, 2003 12:30 PM To: 'sqr-users@sqrug.org' Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Richard,Knapp, Rounding rounds to the nearest integer or to a specified number of decimal places. Adding 500 won't work. -----Original Message----- From: Knapp, Richard [mailto:KnappR@umsystem.edu] Sent: Wednesday, July 30, 2003 12:08 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Or... you could add 500 and round. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: George Jansen [mailto:GJANSEN@aflcio.org] Sent: Wednesday, July 30, 2003 9:28 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Rounding up to the nearest 1000 in SQR Oracle will let you round to an explicit number of places, positive for after the decimal, negative for before. But that's rounding, not rounding up. Pehaps the Ontko.com clan knows a cleaner way, but I'd use the ceil function: begin-setup declare-variable integer #y end-declare end-setup begin-procedure k-round(#raw, :#rounded) let #rounded = ceil(#raw/1000) * 1000 end-procedure begin-program let #x = 950.00 while #x < 1100 do k-round(#x, #y) show #y let #x = #x + 50 end-while end-program _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 14:05:11 2003 From: "Vallabhu, Bindu" Date: Wed, 30 Jul 2003 15:04:03 -0400 Subject: [sqr-users] Brio portal question Hi Guys, I have a question about the Brio Portal. Is this the right group to ask the question or should i go to a different user group. Thank you, Bindu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 17:53:05 2003 From: "the dragon" Subject: Re: [sqr-users] SQR Reference Manuals Date: Wed, 30 Jul 2003 17:51:13 -0500 Dan, Go to http://www.amazon.com and search on SQR. Pick up "SQR in peoplesoft and other applications" and "SQR language reference manual (ver 2??)". Or order sqribe's from brio/your distributer. Brio also has it on cd in pdf form I think. clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- Could anyone suggest some good reference manuals with error code explanations that I could pick up at the local book store (Walden's or B Daltons)? I am trying to make changes to an SQR program with only the help files from SQR available. Bear in mind that I AM NOT an SQR programmer, my experience is limited to VB and Powerbuilder. Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Wed Jul 30 22:03:28 2003 Date: Thu, 31 Jul 2003 13:01:02 +1000 From: Steve Cavill Subject: RE: [sqr-users] Brio portal question Bindhu, there are two groups I know of that discuss portal issues, rm-users (find it a sqrug.org) or brio portal users group - a yahoo group. Steve. -----Original Message----- From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On Behalf Of Vallabhu, Bindu Sent: Thursday, 31 July 2003 5:04 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Brio portal question Hi Guys, I have a question about the Brio Portal. Is this the right group to ask the question or should i go to a different user group. Thank you, Bindu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 08:12:17 2003 From: "Bambach, Tom" Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Date: Thu, 31 Jul 2003 09:09:49 -0400 10400 - 1000 + 400 = 9800 ... after the "Else" should be: Let #rounded_value = #your_value - #remainder 10000 = 10400 - 400 > -----Original Message----- > From: Patel, Samir [SMTP:SPatel@FDIC.gov] > Sent: Wednesday, July 30, 2003 2:29 PM > To: 'sqr-users@sqrug.org' > Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR > > Oops, made a typo > > Example 2: > ---------- > Your value = 10400 > Rounded = 10400 - 1000 + 400 = 10000 > > -----Original Message----- > From: Patel, Samir > Sent: Wednesday, July 30, 2003 2:22 PM > To: 'sqr-users@sqrug.org' > Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR > > Jacquelin, > > The following MAY not be the best way to accomplish what you want, but it > just might work for you. > > There is a SQR function which will give you the remainder when dividing 2 > numbers. Unfortunately, I cannot recall what the function is, but you can > look it up in a reference book (or someone in the group will know). In > your > case, you are dividing by 1000. > > If #remainder >= 500 > Let #rounded_value = #your_value + 1000 - #remainder > Else > Let #rounded_value = #your_value - 1000 + #remainder > End-If > > Example 1: > ---------- > Your value = 10600 > Rounded = 10600 + 1000 - 600 = 11000 > > Example 2: > ---------- > Your value = 10400 > Rounded = 10400 - 1000 + 600 = 10000 > > Hope that helps, > Samir > > > -----Original Message----- > From: Turner, Ivan [mailto:Ivan.Turner@qwest.com] > Sent: Wednesday, July 30, 2003 12:30 PM > To: 'sqr-users@sqrug.org' > Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR > > Richard,Knapp, > Rounding rounds to the nearest integer or to a specified number of > decimal places. Adding 500 won't work. > > -----Original Message----- > From: Knapp, Richard [mailto:KnappR@umsystem.edu] > Sent: Wednesday, July 30, 2003 12:08 PM > To: sqr-users@sqrug.org > Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR > > > > Or... you could add 500 and round. > > Richard Knapp > Database Programmer/Analyst > Institutional Research and Planning > University of Missouri System > 573-882-8856 > knappr@umsystem.edu > > > -----Original Message----- > From: George Jansen [mailto:GJANSEN@aflcio.org] > Sent: Wednesday, July 30, 2003 9:28 AM > To: sqr-users@sqrug.org > Subject: Re: [sqr-users] Rounding up to the nearest 1000 in SQR > > > Oracle will let you round to an explicit number of places, positive for > after the decimal, negative for before. But that's rounding, not > rounding up. Pehaps the Ontko.com clan knows a cleaner way, but I'd use > the ceil function: > > begin-setup > declare-variable > integer #y > end-declare > end-setup > > begin-procedure k-round(#raw, :#rounded) > let #rounded = ceil(#raw/1000) * 1000 > end-procedure > > > begin-program > > let #x = 950.00 > while #x < 1100 > do k-round(#x, #y) > show #y > let #x = #x + 50 > end-while > end-program > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 08:34:07 2003 From: "VanDenBerghe, Art" Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR Date: Thu, 31 Jul 2003 08:32:37 -0500 Why not use the ceil function...something like this.. let #mynum = 1611 let #myceil = ceil(#mynum/1000) !results are 2 let #myceil = #myceil*1000 !results are 2000 -----Original Message----- From: Bambach, Tom [mailto:TBambach@genchemcorp.com] Sent: Thursday, July 31, 2003 8:10 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR 10400 - 1000 + 400 = 9800 ... after the "Else" should be: Let #rounded_value = #your_value - #remainder 10000 = 10400 - 400 > -----Original Message----- > From: Patel, Samir [SMTP:SPatel@FDIC.gov] > Sent: Wednesday, July 30, 2003 2:29 PM > To: 'sqr-users@sqrug.org' > Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR > > Oops, made a typo > > Example 2: > ---------- > Your value = 10400 > Rounded = 10400 - 1000 + 400 = 10000 > > -----Original Message----- > From: Patel, Samir > Sent: Wednesday, July 30, 2003 2:22 PM > To: 'sqr-users@sqrug.org' > Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR > > Jacquelin, > > The following MAY not be the best way to accomplish what you want, but it > just might work for you. > > There is a SQR function which will give you the remainder when dividing 2 > numbers. Unfortunately, I cannot recall what the function is, but you can > look it up in a reference book (or someone in the group will know). In > your > case, you are dividing by 1000. > > If #remainder >= 500 > Let #rounded_value = #your_value + 1000 - #remainder > Else > Let #rounded_value = #your_value - 1000 + #remainder > End-If > > Example 1: > ---------- > Your value = 10600 > Rounded = 10600 + 1000 - 600 = 11000 > > Example 2: > ---------- > Your value = 10400 > Rounded = 10400 - 1000 + 600 = 10000 > > Hope that helps, > Samir > > > -----Original Message----- > From: Turner, Ivan [mailto:Ivan.Turner@qwest.com] > Sent: Wednesday, July 30, 2003 12:30 PM > To: 'sqr-users@sqrug.org' > Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR > > Richard,Knapp, > Rounding rounds to the nearest integer or to a specified number of > decimal places. Adding 500 won't work. > > -----Original Message----- > From: Knapp, Richard [mailto:KnappR@umsystem.edu] > Sent: Wednesday, July 30, 2003 12:08 PM > To: sqr-users@sqrug.org > Subject: RE: [sqr-users] Rounding up to the nearest 1000 in SQR > > > > Or... you could add 500 and round. > > Richard Knapp > Database Programmer/Analyst > Institutional Research and Planning > University of Missouri System > 573-882-8856 > knappr@umsystem.edu > > > -----Original Message----- > From: George Jansen [mailto:GJANSEN@aflcio.org] > Sent: Wednesday, July 30, 2003 9:28 AM > To: sqr-users@sqrug.org > Subject: Re: [sqr-users] Rounding up to the nearest 1000 in SQR > > > Oracle will let you round to an explicit number of places, positive for > after the decimal, negative for before. But that's rounding, not > rounding up. Pehaps the Ontko.com clan knows a cleaner way, but I'd use > the ceil function: > > begin-setup > declare-variable > integer #y > end-declare > end-setup > > begin-procedure k-round(#raw, :#rounded) > let #rounded = ceil(#raw/1000) * 1000 > end-procedure > > > begin-program > > let #x = 950.00 > while #x < 1100 > do k-round(#x, #y) > show #y > let #x = #x + 50 > end-while > end-program > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 08:51:06 2003 Date: Thu, 31 Jul 2003 09:50:09 -0400 From: "White, Denise" Subject: [sqr-users] RE: Rounding up to the nearest 1000 in SQR Oh, goodness gracious. Not saying that about your question, but about the quantity of different solutions offered! You apparently have handed us an interesting challenge. Try this one: let #rounded_sal = trunc((#sal + 999) / 1000,0) * 1000 Here are the values I tested as #sal, and the resulting #rounded_sal: 10000 10000.000000 10001 11000.000000 10010 11000.000000 10500 11000.000000 11000 11000.000000 19999 20000.000000 HTH, Denise M. White Sr. Software Engineer Vicor --__--__-- Message: 4 To: sqr-users@sqrug.org From: "Jacqueline Smith" Date: Wed, 30 Jul 2003 09:49:18 -0400 Subject: [sqr-users] Rounding up to the nearest 1000 in SQR Reply-To: sqr-users@sqrug.org Please help ! I am fairly new to writing reports in SQR, I have to do some calculations that will round up the salary to the next $1000. I know about rounding after the decimal ,but is there a way in SQR development to round to the next 1000, before the decimal place. I hope this doesn't tick anyone off. Just trying to earn a living! Will greatly appreciate any help I can get. Thanks a million ! v/r Jacquelin Smith Telephone 631-4545 Code IH PeopleSoft _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 10:38:13 2003 Date: Thu, 31 Jul 2003 10:34:33 -0500 From: "Chrisman, Dan:" Subject: [sqr-users] Inconsistent Data Types I get the following error when I test my program code. SQR 5528 ORACLE OEXEC error -932 in cursor 1: ORA-00932: inconsistent datatypes error on Line 344: (SQR 3735) could not execute SQL. I am trying to execute the following code ! Lock the current pay period begin-SQL update TK_Calendar set Cal_Payroll_Code = {LOCKED} where trunc(Cal_Date) <= trunc($Pay_End_Dt) AND Cal_Payroll_Code = {OPEN} end-SQL where Cal_Date is a Data field in the Table and Cal_Payroll_Code is CHAR (1) field. $Pay_end_Dt is keyed in on an input statement as the date dd-mmm-yy. As I understand it $ can mean either a Date or character field. Could someone tell me what I'm doing wrong? Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 10:53:13 2003 From: "Lynds,Rick" Subject: RE: [sqr-users] Inconsistent Data Types Date: Thu, 31 Jul 2003 08:49:22 -0700 The TRUNC function is more commonly used with numerics. You could try a to_char such as... where to_char(cal_date, 'yyyymmdd') <= to_char(to_date($pay_end_dt), 'yyyymmdd') -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Thursday, July 31, 2003 8:35 AM To: sqr-users@sqrug.org Subject: [sqr-users] Inconsistent Data Types I get the following error when I test my program code. SQR 5528 ORACLE OEXEC error -932 in cursor 1: ORA-00932: inconsistent datatypes error on Line 344: (SQR 3735) could not execute SQL. I am trying to execute the following code ! Lock the current pay period begin-SQL update TK_Calendar set Cal_Payroll_Code = {LOCKED} where trunc(Cal_Date) <= trunc($Pay_End_Dt) AND Cal_Payroll_Code = {OPEN} end-SQL where Cal_Date is a Data field in the Table and Cal_Payroll_Code is CHAR (1) field. $Pay_end_Dt is keyed in on an input statement as the date dd-mmm-yy. As I understand it $ can mean either a Date or character field. Could someone tell me what I'm doing wrong? Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 10:56:06 2003 Date: Thu, 31 Jul 2003 10:50:57 -0500 From: Daniel Vandenberg Subject: [sqr-users] Location of Form-Feed We have been having problems printing the output from our SQR programs when we put them into production that were not occurring in our test environment. The form-feeds (^L) are not in the same location, so the printing on labels and forms is not aligned properly. We compared the programs, the files they included and the SQR initialization files and could not find any differences. Finally, we noticed we are running an older version of SQR in our test environment than we had thought we were. Test Environment: SQR for PeopleSoft/8.18/HP 9000/HPUX B.11.00/Oracle 8.0.6/Jun 05 2002 Production Environment: SQR for PeopleSoft/8.19/HP 9000/HPUX B.11.00/Oracle 8.0.6/Jan 02 2003 I wrote a very simple program and ran it in both environments to see if how we were declaring the printer and layout was causing the problem. begin-heading 5 print $sqr-ver (3,1) end-heading begin-program show $sqr_ver move 200 to #line print 'Start' (+1, 1) while #line > 0 print 'Line' (+1, 1) print #line ( , 10) edit '999' subtract 1 from #line end-while print 'End' (+1, 1) end-program Even with these minimal commands, the output was still different. The form-feeds from the 8.18 version were at the end of each page, while those from the 8.19 version were at the top. In the output from our regular programs, 8.18 always puts the form-feeds at the end of the page, but 8.19 sometimes puts it at the end of the heading instead of the start of the page. Line Printer (LP) was the printer type in all cases. Has anyone experienced this change in the output from different versions of SQR? Daniel Vandenberg Administrative Computing University of Wisconsin Oshkosh Email : vandberg@uwosh.edu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 10:58:22 2003 From: "m rapson" Date: Thu, 31 Jul 2003 11:50:55 -0400 Subject: [sqr-users] File Help Hello All! This is the first SQR I have written. I am outputting to a file employee information. The sqr has 2 procedures, one pulls information about active employees and the second pulls information about terminated employees. The file should only contain around 1200 records but is returning about 40000 or so. Not really sure where to look so I thought I would post this and see if someone can help. Much appreciated Mel #include 'setenv.sqc' !Set environment #Include 'setup07.sqc' !Printer and page-size initialization begin-REPORT do Init-DateTime do Get-Current-DateTime do Stdapi-Init display 'Building Interface File for Employee Website' do Open-file do MAIN do close do Commit-Transaction display 'Finished Building Interface File for Employee Website' end-REPORT !************************************************************************ begin-Procedure Open-file LET $OUTFILE = 'c:\ep_empwebsite.csv' open $OUTFILE as 1 for-writing record = 200 let $csv = ',' end-procedure !************************************************************************ begin-procedure close close 1 end-procedure !************************************************************************ begin-PROCEDURE MAIN begin-SELECT distinct EMP.EMPLID JOB.EMPL_STATUS NAM.LAST_NAME NAM.FIRST_NAME NAM.PREF_FIRST_NAME JOB.DEPTID DEPT.DESCR JOBJR.SUPV_LVL_ID JOB.GL_PAY_TYPE EMP.BUSINESS_TITLE LOC.ADDRESS1 LOC.ADDRESS2 LOC.CITY LOC.STATE LOC.POSTAL LOC.COUNTRY PHN.PHONE POS.REG_TEMP POS.FULL_PART_TIME NAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&JOB.GL_PAY_TYPE, 0, 1) IF &POS.REG_TEMP = 'T' let $EMPL_STATUS = 'Temp' ELSE IF &POS.FULL_PART_TIME = 'F' let $EMPL_STATUS = 'FT' ELSE let $EMPL_STATUS = 'PT' END-IF END-IF IF &JOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &EMP.EMPLID LET $LASTNAME = &NAM.LAST_NAME LET $FIRSTNAME = &NAM.FIRST_NAME LET $PREFNAME = &NAM.PREF_FIRST_NAME LET $DEPTID = substr(&JOB.DEPTID, 2, 3) LET $WORKAT = &JOBJR.SUPV_LVL_ID LET $DIVISION = substr(&JOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &EMP.BUSINESS_TITLE LET $ADDRESS1 = &LOC.ADDRESS1 LET $ADDRESS2 =&LOC.ADDRESS2 LET $CITY = &LOC.CITY LET $STATE = &LOC.STATE LET $ZIPCODE = &LOC.POSTAL LET $COUNTRY = &LOC.COUNTRY LET $PHONE = &PHN.PHONE LET $REGTEMP = &POS.REG_TEMP LET $FULLPART = &POS.FULL_PART_TIME LET $SUPERVISOR = &NAM2.NAME DO WRITE-FILE DO TERMINATE FROM SYSADM.PS_LOCATION_TBL LOC, SYSADM.PS_DEPT_TBL DEPT, SYSADM.PS_PERSONAL_PHONE PHN, SYSADM.PS_POSITION_DATA POS2, SYSADM.PS_POSITION_DATA POS, SYSADM.PS_NAMES NAM2, SYSADM.PS_NAMES NAM, SYSADM.PS_JOB JOB2, SYSADM.PS_JOB_JR JOBJR, SYSADM.PS_JOB JOB, SYSADM.PS_EMPLOYMENT EMP WHERE EMP.EMPLID = JOB.EMPLID AND JOB.EMPL_STATUS in ('A', 'L', 'T', 'S') AND JOBJR.EMPLID = JOB.EMPLID AND POS.POSITION_NBR = JOB.POSITION_NBR AND POS2.POSITION_NBR = JOB.REPORTS_TO AND JOB2.POSITION_NBR = POS2.POSITION_NBR AND NAM.EMPLID = EMP.EMPLID AND NAM.NAME_TYPE = 'PRI' AND NAM2.Emplid = JOB2.EMPLID AND NAM2.NAME_TYPE = 'PRI' AND PHN.EMPLID(+) = EMP.EMPLID AND PHN.PHONE_TYPE(+) = 'BUSN' AND LOC.LOCATION(+) = JOB.LOCATION AND DEPT.DEPTID = JOB.DEPTID end-SELECT end-PROCEDURE ! ****** This will pull terminated employees begin-PROCEDURE TERMINATE begin-SELECT distinct TEMP.EMPLID TJOB.EMPL_STATUS TNAM.LAST_NAME TNAM.FIRST_NAME TNAM.PREF_FIRST_NAME TJOB.DEPTID TDEPT.DESCR TJOBJR.SUPV_LVL_ID TJOB.GL_PAY_TYPE TEMP.BUSINESS_TITLE TLOC.ADDRESS1 TLOC.ADDRESS2 TLOC.CITY TLOC.STATE TLOC.POSTAL TLOC.COUNTRY TPHN.PHONE TPOS.REG_TEMP TPOS.FULL_PART_TIME TNAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&TJOB.GL_PAY_TYPE, 0, 1) LET $EMPL_STATUS = '' IF &TJOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &TEMP.EMPLID LET $LASTNAME = &TNAM.LAST_NAME LET $FIRSTNAME = &TNAM.FIRST_NAME LET $PREFNAME = &TNAM.PREF_FIRST_NAME LET $DEPTID = substr(&TJOB.DEPTID, 2, 3) LET $WORKAT = &TJOBJR.SUPV_LVL_ID LET $DIVISION = substr(&TJOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &TEMP.BUSINESS_TITLE LET $ADDRESS1 = &TLOC.ADDRESS1 LET $ADDRESS2 =&TLOC.ADDRESS2 LET $CITY = &TLOC.CITY LET $STATE = &TLOC.STATE LET $ZIPCODE = &TLOC.POSTAL LET $COUNTRY = &TLOC.COUNTRY LET $PHONE = &TPHN.PHONE LET $REGTEMP = &TPOS.REG_TEMP LET $FULLPART = &TPOS.FULL_PART_TIME LET $SUPERVISOR = &TNAM2.NAME DO WRITE-FILE FROM SYSADM.PS_LOCATION_TBL TLOC, SYSADM.PS_DEPT_TBL TDEPT, SYSADM.PS_PERSONAL_PHONE TPHN, SYSADM.PS_POSITION_DATA TPOS2, SYSADM.PS_POSITION_DATA TPOS, SYSADM.PS_NAMES TNAM2, SYSADM.PS_NAMES TNAM, SYSADM.PS_JOB TJOB2, SYSADM.PS_JOB_JR TJOBJR, SYSADM.PS_JOB TJOB, SYSADM.PS_EMPLOYMENT TEMP WHERE TEMP.EMPLID = TJOB.EMPLID AND TJOB.EMPL_STATUS in ('T', 'S') AND TNAM.EMPLID = TEMP.EMPLID AND TNAM.NAME_TYPE = 'PRI' AND TJOBJR.EMPLID(+) = TJOB.EMPLID AND TPOS.POSITION_NBR(+) = TJOB.POSITION_NBR AND TPOS2.POSITION_NBR(+) = TJOB.REPORTS_TO AND TJOB2.POSITION_NBR(+) = TPOS2.POSITION_NBR AND TNAM2.Emplid(+) = TJOB2.EMPLID AND TNAM2.NAME_TYPE(+) = 'PRI' AND TPHN.EMPLID(+) = TEMP.EMPLID AND TPHN.PHONE_TYPE(+) = 'BUSN' AND TLOC.LOCATION(+) = TJOB.LOCATION AND TDEPT.DEPTID(+) = TJOB.DEPTID end-SELECT end-PROCEDURE !********************************************************************** begin-Procedure Write-File write 1 from $TERM_FLAG $csv $EMPLID $csv $LASTNAME $csv $FIRSTNAME $csv $PREFNAME $csv $EMPL_STATUS $csv $DEPTID $csv $WORKAT $csv $GL_PAY_TYPE $csv $DIVISIONDESCR $csv $TITLE $csv $ADDRESS1 $csv $ADDRESS2 $csv $CITY $csv $STATE $csv $ZIPCODE $csv $COUNTRY $csv $PHONE $csv $SUPERVISOR end-PROCEDURE !************************************************************************ #include 'askaod.sqc' !Ask As Of Date input #Include 'datetime.sqc' !Routine for Date and Time formatting #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'ldorgsb.sqc' !Load Orgcode Symbols procedure #Include 'getorgsb.sqc' !Get Orgcode Symbol procedure #Include 'tranctrl.sqc' !Common Transaction Handling #Include 'sqrtrans.sqc' !sql error procedure #include 'prcsapi.sqc' #include 'prcsdef.sqc' #include 'stdapi.sqc' !Routine to Update Run Status _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 11:01:09 2003 Subject: RE: [sqr-users] Inconsistent Data Types Date: Thu, 31 Jul 2003 10:53:07 -0500 From: "Bob Helm" I think the problem is here: trunc($Pay_End_Dt) trunc is a numerical operator but you are passing it a sting or date variable. Also, you may need a second argument in the trunc call, something like this: trunc(#number, #trunc_position) Not sure if you really need trunc or something else, maybe a dateadd??? -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Thursday, July 31, 2003 10:35 AM To: sqr-users@sqrug.org Subject: [sqr-users] Inconsistent Data Types I get the following error when I test my program code. SQR 5528 ORACLE OEXEC error -932 in cursor 1: ORA-00932: inconsistent datatypes error on Line 344: (SQR 3735) could not execute SQL. I am trying to execute the following code ! Lock the current pay period begin-SQL update TK_Calendar set Cal_Payroll_Code = {LOCKED} where trunc(Cal_Date) <= trunc($Pay_End_Dt) AND Cal_Payroll_Code = {OPEN} end-SQL where Cal_Date is a Data field in the Table and Cal_Payroll_Code is CHAR (1) field. $Pay_end_Dt is keyed in on an input statement as the date dd-mmm-yy. As I understand it $ can mean either a Date or character field. Could someone tell me what I'm doing wrong? Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 11:04:46 2003 From: "m rapson" Date: Thu, 31 Jul 2003 12:02:03 -0400 Subject: [sqr-users] File Help - addl info This is for an ORACLE 9 database. Sorry about that Mel _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 11:12:47 2003 Subject: RE: [sqr-users] File Help Date: Thu, 31 Jul 2003 11:10:21 -0500 From: "Knapp, Richard" I don't see anything about effective dating. That could bump up your record count. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: m rapson [mailto:mrapson@hotmail.com] Sent: Thursday, July 31, 2003 10:51 AM To: sqr-users@sqrug.org Subject: [sqr-users] File Help Hello All! This is the first SQR I have written. I am outputting to a file employee information. The sqr has 2 procedures, one pulls information about active employees and the second pulls information about terminated employees. The file should only contain around 1200 records but is returning about 40000 or so. Not really sure where to look so I thought I would post this and see if someone can help. Much appreciated Mel #include 'setenv.sqc' !Set environment #Include 'setup07.sqc' !Printer and page-size initialization begin-REPORT do Init-DateTime do Get-Current-DateTime do Stdapi-Init display 'Building Interface File for Employee Website' do Open-file do MAIN do close do Commit-Transaction display 'Finished Building Interface File for Employee Website' end-REPORT !************************************************************************ begin-Procedure Open-file LET $OUTFILE = 'c:\ep_empwebsite.csv' open $OUTFILE as 1 for-writing record = 200 let $csv = ',' end-procedure !************************************************************************ begin-procedure close close 1 end-procedure !************************************************************************ begin-PROCEDURE MAIN begin-SELECT distinct EMP.EMPLID JOB.EMPL_STATUS NAM.LAST_NAME NAM.FIRST_NAME NAM.PREF_FIRST_NAME JOB.DEPTID DEPT.DESCR JOBJR.SUPV_LVL_ID JOB.GL_PAY_TYPE EMP.BUSINESS_TITLE LOC.ADDRESS1 LOC.ADDRESS2 LOC.CITY LOC.STATE LOC.POSTAL LOC.COUNTRY PHN.PHONE POS.REG_TEMP POS.FULL_PART_TIME NAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&JOB.GL_PAY_TYPE, 0, 1) IF &POS.REG_TEMP = 'T' let $EMPL_STATUS = 'Temp' ELSE IF &POS.FULL_PART_TIME = 'F' let $EMPL_STATUS = 'FT' ELSE let $EMPL_STATUS = 'PT' END-IF END-IF IF &JOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &EMP.EMPLID LET $LASTNAME = &NAM.LAST_NAME LET $FIRSTNAME = &NAM.FIRST_NAME LET $PREFNAME = &NAM.PREF_FIRST_NAME LET $DEPTID = substr(&JOB.DEPTID, 2, 3) LET $WORKAT = &JOBJR.SUPV_LVL_ID LET $DIVISION = substr(&JOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &EMP.BUSINESS_TITLE LET $ADDRESS1 = &LOC.ADDRESS1 LET $ADDRESS2 =&LOC.ADDRESS2 LET $CITY = &LOC.CITY LET $STATE = &LOC.STATE LET $ZIPCODE = &LOC.POSTAL LET $COUNTRY = &LOC.COUNTRY LET $PHONE = &PHN.PHONE LET $REGTEMP = &POS.REG_TEMP LET $FULLPART = &POS.FULL_PART_TIME LET $SUPERVISOR = &NAM2.NAME DO WRITE-FILE DO TERMINATE FROM SYSADM.PS_LOCATION_TBL LOC, SYSADM.PS_DEPT_TBL DEPT, SYSADM.PS_PERSONAL_PHONE PHN, SYSADM.PS_POSITION_DATA POS2, SYSADM.PS_POSITION_DATA POS, SYSADM.PS_NAMES NAM2, SYSADM.PS_NAMES NAM, SYSADM.PS_JOB JOB2, SYSADM.PS_JOB_JR JOBJR, SYSADM.PS_JOB JOB, SYSADM.PS_EMPLOYMENT EMP WHERE EMP.EMPLID = JOB.EMPLID AND JOB.EMPL_STATUS in ('A', 'L', 'T', 'S') AND JOBJR.EMPLID = JOB.EMPLID AND POS.POSITION_NBR = JOB.POSITION_NBR AND POS2.POSITION_NBR = JOB.REPORTS_TO AND JOB2.POSITION_NBR = POS2.POSITION_NBR AND NAM.EMPLID = EMP.EMPLID AND NAM.NAME_TYPE = 'PRI' AND NAM2.Emplid = JOB2.EMPLID AND NAM2.NAME_TYPE = 'PRI' AND PHN.EMPLID(+) = EMP.EMPLID AND PHN.PHONE_TYPE(+) = 'BUSN' AND LOC.LOCATION(+) = JOB.LOCATION AND DEPT.DEPTID = JOB.DEPTID end-SELECT end-PROCEDURE ! ****** This will pull terminated employees begin-PROCEDURE TERMINATE begin-SELECT distinct TEMP.EMPLID TJOB.EMPL_STATUS TNAM.LAST_NAME TNAM.FIRST_NAME TNAM.PREF_FIRST_NAME TJOB.DEPTID TDEPT.DESCR TJOBJR.SUPV_LVL_ID TJOB.GL_PAY_TYPE TEMP.BUSINESS_TITLE TLOC.ADDRESS1 TLOC.ADDRESS2 TLOC.CITY TLOC.STATE TLOC.POSTAL TLOC.COUNTRY TPHN.PHONE TPOS.REG_TEMP TPOS.FULL_PART_TIME TNAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&TJOB.GL_PAY_TYPE, 0, 1) LET $EMPL_STATUS = '' IF &TJOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &TEMP.EMPLID LET $LASTNAME = &TNAM.LAST_NAME LET $FIRSTNAME = &TNAM.FIRST_NAME LET $PREFNAME = &TNAM.PREF_FIRST_NAME LET $DEPTID = substr(&TJOB.DEPTID, 2, 3) LET $WORKAT = &TJOBJR.SUPV_LVL_ID LET $DIVISION = substr(&TJOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &TEMP.BUSINESS_TITLE LET $ADDRESS1 = &TLOC.ADDRESS1 LET $ADDRESS2 =&TLOC.ADDRESS2 LET $CITY = &TLOC.CITY LET $STATE = &TLOC.STATE LET $ZIPCODE = &TLOC.POSTAL LET $COUNTRY = &TLOC.COUNTRY LET $PHONE = &TPHN.PHONE LET $REGTEMP = &TPOS.REG_TEMP LET $FULLPART = &TPOS.FULL_PART_TIME LET $SUPERVISOR = &TNAM2.NAME DO WRITE-FILE FROM SYSADM.PS_LOCATION_TBL TLOC, SYSADM.PS_DEPT_TBL TDEPT, SYSADM.PS_PERSONAL_PHONE TPHN, SYSADM.PS_POSITION_DATA TPOS2, SYSADM.PS_POSITION_DATA TPOS, SYSADM.PS_NAMES TNAM2, SYSADM.PS_NAMES TNAM, SYSADM.PS_JOB TJOB2, SYSADM.PS_JOB_JR TJOBJR, SYSADM.PS_JOB TJOB, SYSADM.PS_EMPLOYMENT TEMP WHERE TEMP.EMPLID = TJOB.EMPLID AND TJOB.EMPL_STATUS in ('T', 'S') AND TNAM.EMPLID = TEMP.EMPLID AND TNAM.NAME_TYPE = 'PRI' AND TJOBJR.EMPLID(+) = TJOB.EMPLID AND TPOS.POSITION_NBR(+) = TJOB.POSITION_NBR AND TPOS2.POSITION_NBR(+) = TJOB.REPORTS_TO AND TJOB2.POSITION_NBR(+) = TPOS2.POSITION_NBR AND TNAM2.Emplid(+) = TJOB2.EMPLID AND TNAM2.NAME_TYPE(+) = 'PRI' AND TPHN.EMPLID(+) = TEMP.EMPLID AND TPHN.PHONE_TYPE(+) = 'BUSN' AND TLOC.LOCATION(+) = TJOB.LOCATION AND TDEPT.DEPTID(+) = TJOB.DEPTID end-SELECT end-PROCEDURE !********************************************************************** begin-Procedure Write-File write 1 from $TERM_FLAG $csv $EMPLID $csv $LASTNAME $csv $FIRSTNAME $csv $PREFNAME $csv $EMPL_STATUS $csv $DEPTID $csv $WORKAT $csv $GL_PAY_TYPE $csv $DIVISIONDESCR $csv $TITLE $csv $ADDRESS1 $csv $ADDRESS2 $csv $CITY $csv $STATE $csv $ZIPCODE $csv $COUNTRY $csv $PHONE $csv $SUPERVISOR end-PROCEDURE !************************************************************************ #include 'askaod.sqc' !Ask As Of Date input #Include 'datetime.sqc' !Routine for Date and Time formatting #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'ldorgsb.sqc' !Load Orgcode Symbols procedure #Include 'getorgsb.sqc' !Get Orgcode Symbol procedure #Include 'tranctrl.sqc' !Common Transaction Handling #Include 'sqrtrans.sqc' !sql error procedure #include 'prcsapi.sqc' #include 'prcsdef.sqc' #include 'stdapi.sqc' !Routine to Update Run Status _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 11:17:32 2003 Date: Thu, 31 Jul 2003 12:14:32 -0400 From: "Vishali Chandramouli" Subject: Re: [sqr-users] File Help Hi, I guess the problem is that you have not taken care of effective dating. Also, you need to match all keys. FROM SYSADM.PS_LOCATION_TBL LOC, SYSADM.PS_DEPT_TBL DEPT, SYSADM.PS_PERSONAL_PHONE PHN, SYSADM.PS_POSITION_DATA POS2, SYSADM.PS_POSITION_DATA POS, SYSADM.PS_NAMES NAM2, SYSADM.PS_NAMES NAM, SYSADM.PS_JOB JOB2, SYSADM.PS_JOB_JR JOBJR, SYSADM.PS_JOB JOB, SYSADM.PS_EMPLOYMENT EMP WHERE EMP.EMPLID = JOB.EMPLID AND JOB.EMPL_STATUS in ('A', 'L', 'T', 'S') AND JOBJR.EMPLID = JOB.EMPLID AND POS.POSITION_NBR = JOB.POSITION_NBR AND POS2.POSITION_NBR = JOB.REPORTS_TO AND JOB2.POSITION_NBR = POS2.POSITION_NBR AND NAM.EMPLID = EMP.EMPLID AND NAM.NAME_TYPE = 'PRI' AND NAM2.Emplid = JOB2.EMPLID AND NAM2.NAME_TYPE = 'PRI' AND PHN.EMPLID(+) = EMP.EMPLID AND PHN.PHONE_TYPE(+) = 'BUSN' AND LOC.LOCATION(+) = JOB.LOCATION AND DEPT.DEPTID = JOB.DEPTID ! My changes - Begin AND JOB.EFFDT = (SELECT MAX(JOB_1.EFFDT) FROM PS_JOB JOB_1 WHERE JOB_1.EMPLID = JOB.EMPLID AND JOB_1.EMPL_RCD# = JOB.EMPL_RCD# AND JOB_1.EFFDT <= $AsOfToday) !$AsOfToday is got from some sqc AND JOB.EFFSEQ = (SELECT MAX(JOB_1.EFFSEQ) FROM PS_JOB JOB_1 WHERE JOB_1.EMPLID = JOB.EMPLID AND JOB_1.EMPL_RCD# = JOB.EMPL_RCD# AND JOB_1.EFFDT = JOB.EFFDT) AND LOC.EFFDT = (SELECT MAX(LOC_1.EFFDT) FROM PS_LOCATION_TBL LOC_1 WHERE LOC_1. LOCATION = LOC.LOCATION AND LOC_1.SETID = LOC.SETID AND LOC_1.EFFDT <= $AsOfToday) AND DEPT.EFFDT = (SELECT MAX(DEPT_1.EFFDT) FROM PS_DEPT_TBL DEPT_1 WHERE DEPT_1. DEPTID = DEPT.DEPTID AND DEPT_1.SETID = DEPT.SETID AND DEPT_1.EFFDT <= $AsOfToday) AND JOB.SETID_DEPT = DEPT.SETID AND JOB.SETID_LOCATION = LOC.SETID ! Also take care of taking most current position data for table - POSITION _DATA and matching all keys ! My changes - End Do the same for fetching terminated employees also. HTH, Vishali >>> mrapson@hotmail.com 07/31/03 11:50AM >>> Hello All! This is the first SQR I have written. I am outputting to a file employee information. The sqr has 2 procedures, one pulls information about active employees and the second pulls information about terminated employees. The file should only contain around 1200 records but is returning about 40000 or so. Not really sure where to look so I thought I would post this and see if someone can help. Much appreciated Mel #include 'setenv.sqc' !Set environment #Include 'setup07.sqc' !Printer and page-size initialization begin-REPORT do Init-DateTime do Get-Current-DateTime do Stdapi-Init display 'Building Interface File for Employee Website' do Open-file do MAIN do close do Commit-Transaction display 'Finished Building Interface File for Employee Website' end-REPORT !************************************************************************ begin-Procedure Open-file LET $OUTFILE = 'c:\ep_empwebsite.csv' open $OUTFILE as 1 for-writing record = 200 let $csv = ',' end-procedure !************************************************************************ begin-procedure close close 1 end-procedure !************************************************************************ begin-PROCEDURE MAIN begin-SELECT distinct EMP.EMPLID JOB.EMPL_STATUS NAM.LAST_NAME NAM.FIRST_NAME NAM.PREF_FIRST_NAME JOB.DEPTID DEPT.DESCR JOBJR.SUPV_LVL_ID JOB.GL_PAY_TYPE EMP.BUSINESS_TITLE LOC.ADDRESS1 LOC.ADDRESS2 LOC.CITY LOC.STATE LOC.POSTAL LOC.COUNTRY PHN.PHONE POS.REG_TEMP POS.FULL_PART_TIME NAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&JOB.GL_PAY_TYPE, 0, 1) IF &POS.REG_TEMP = 'T' let $EMPL_STATUS = 'Temp' ELSE IF &POS.FULL_PART_TIME = 'F' let $EMPL_STATUS = 'FT' ELSE let $EMPL_STATUS = 'PT' END-IF END-IF IF &JOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &EMP.EMPLID LET $LASTNAME = &NAM.LAST_NAME LET $FIRSTNAME = &NAM.FIRST_NAME LET $PREFNAME = &NAM.PREF_FIRST_NAME LET $DEPTID = substr(&JOB.DEPTID, 2, 3) LET $WORKAT = &JOBJR.SUPV_LVL_ID LET $DIVISION = substr(&JOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &EMP.BUSINESS_TITLE LET $ADDRESS1 = &LOC.ADDRESS1 LET $ADDRESS2 =&LOC.ADDRESS2 LET $CITY = &LOC.CITY LET $STATE = &LOC.STATE LET $ZIPCODE = &LOC.POSTAL LET $COUNTRY = &LOC.COUNTRY LET $PHONE = &PHN.PHONE LET $REGTEMP = &POS.REG_TEMP LET $FULLPART = &POS.FULL_PART_TIME LET $SUPERVISOR = &NAM2.NAME DO WRITE-FILE DO TERMINATE FROM SYSADM.PS_LOCATION_TBL LOC, SYSADM.PS_DEPT_TBL DEPT, SYSADM.PS_PERSONAL_PHONE PHN, SYSADM.PS_POSITION_DATA POS2, SYSADM.PS_POSITION_DATA POS, SYSADM.PS_NAMES NAM2, SYSADM.PS_NAMES NAM, SYSADM.PS_JOB JOB2, SYSADM.PS_JOB_JR JOBJR, SYSADM.PS_JOB JOB, SYSADM.PS_EMPLOYMENT EMP WHERE EMP.EMPLID = JOB.EMPLID AND JOB.EMPL_STATUS in ('A', 'L', 'T', 'S') AND JOBJR.EMPLID = JOB.EMPLID AND POS.POSITION_NBR = JOB.POSITION_NBR AND POS2.POSITION_NBR = JOB.REPORTS_TO AND JOB2.POSITION_NBR = POS2.POSITION_NBR AND NAM.EMPLID = EMP.EMPLID AND NAM.NAME_TYPE = 'PRI' AND NAM2.Emplid = JOB2.EMPLID AND NAM2.NAME_TYPE = 'PRI' AND PHN.EMPLID(+) = EMP.EMPLID AND PHN.PHONE_TYPE(+) = 'BUSN' AND LOC.LOCATION(+) = JOB.LOCATION AND DEPT.DEPTID = JOB.DEPTID end-SELECT end-PROCEDURE ! ****** This will pull terminated employees begin-PROCEDURE TERMINATE begin-SELECT distinct TEMP.EMPLID TJOB.EMPL_STATUS TNAM.LAST_NAME TNAM.FIRST_NAME TNAM.PREF_FIRST_NAME TJOB.DEPTID TDEPT.DESCR TJOBJR.SUPV_LVL_ID TJOB.GL_PAY_TYPE TEMP.BUSINESS_TITLE TLOC.ADDRESS1 TLOC.ADDRESS2 TLOC.CITY TLOC.STATE TLOC.POSTAL TLOC.COUNTRY TPHN.PHONE TPOS.REG_TEMP TPOS.FULL_PART_TIME TNAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&TJOB.GL_PAY_TYPE, 0, 1) LET $EMPL_STATUS = '' IF &TJOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &TEMP.EMPLID LET $LASTNAME = &TNAM.LAST_NAME LET $FIRSTNAME = &TNAM.FIRST_NAME LET $PREFNAME = &TNAM.PREF_FIRST_NAME LET $DEPTID = substr(&TJOB.DEPTID, 2, 3) LET $WORKAT = &TJOBJR.SUPV_LVL_ID LET $DIVISION = substr(&TJOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &TEMP.BUSINESS_TITLE LET $ADDRESS1 = &TLOC.ADDRESS1 LET $ADDRESS2 =&TLOC.ADDRESS2 LET $CITY = &TLOC.CITY LET $STATE = &TLOC.STATE LET $ZIPCODE = &TLOC.POSTAL LET $COUNTRY = &TLOC.COUNTRY LET $PHONE = &TPHN.PHONE LET $REGTEMP = &TPOS.REG_TEMP LET $FULLPART = &TPOS.FULL_PART_TIME LET $SUPERVISOR = &TNAM2.NAME DO WRITE-FILE FROM SYSADM.PS_LOCATION_TBL TLOC, SYSADM.PS_DEPT_TBL TDEPT, SYSADM.PS_PERSONAL_PHONE TPHN, SYSADM.PS_POSITION_DATA TPOS2, SYSADM.PS_POSITION_DATA TPOS, SYSADM.PS_NAMES TNAM2, SYSADM.PS_NAMES TNAM, SYSADM.PS_JOB TJOB2, SYSADM.PS_JOB_JR TJOBJR, SYSADM.PS_JOB TJOB, SYSADM.PS_EMPLOYMENT TEMP WHERE TEMP.EMPLID = TJOB.EMPLID AND TJOB.EMPL_STATUS in ('T', 'S') AND TNAM.EMPLID = TEMP.EMPLID AND TNAM.NAME_TYPE = 'PRI' AND TJOBJR.EMPLID(+) = TJOB.EMPLID AND TPOS.POSITION_NBR(+) = TJOB.POSITION_NBR AND TPOS2.POSITION_NBR(+) = TJOB.REPORTS_TO AND TJOB2.POSITION_NBR(+) = TPOS2.POSITION_NBR AND TNAM2.Emplid(+) = TJOB2.EMPLID AND TNAM2.NAME_TYPE(+) = 'PRI' AND TPHN.EMPLID(+) = TEMP.EMPLID AND TPHN.PHONE_TYPE(+) = 'BUSN' AND TLOC.LOCATION(+) = TJOB.LOCATION AND TDEPT.DEPTID(+) = TJOB.DEPTID end-SELECT end-PROCEDURE !********************************************************************** begin-Procedure Write-File write 1 from $TERM_FLAG $csv $EMPLID $csv $LASTNAME $csv $FIRSTNAME $csv $PREFNAME $csv $EMPL_STATUS $csv $DEPTID $csv $WORKAT $csv $GL_PAY_TYPE $csv $DIVISIONDESCR $csv $TITLE $csv $ADDRESS1 $csv $ADDRESS2 $csv $CITY $csv $STATE $csv $ZIPCODE $csv $COUNTRY $csv $PHONE $csv $SUPERVISOR end-PROCEDURE !************************************************************************ #include 'askaod.sqc' !Ask As Of Date input #Include 'datetime.sqc' !Routine for Date and Time formatting #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'ldorgsb.sqc' !Load Orgcode Symbols procedure #Include 'getorgsb.sqc' !Get Orgcode Symbol procedure #Include 'tranctrl.sqc' !Common Transaction Handling #Include 'sqrtrans.sqc' !sql error procedure #include 'prcsapi.sqc' #include 'prcsdef.sqc' #include 'stdapi.sqc' !Routine to Update Run Status _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 11:22:46 2003 Subject: RE: [sqr-users] File Help From: Ramzi_Salameh@daveandbusters.com Date: Thu, 31 Jul 2003 11:20:39 -0500 Run your queries in a SQL tool and see how many records are returned there. More than likely there's either something missing, i.e. effective date logic, or join problems. Ramzi "Knapp, Richard" edu> cc: Sent by: Subject: RE: [sqr-users] File Help sqr-users-admin@s qrug.org 07/31/03 11:10 AM Please respond to sqr-users I don't see anything about effective dating. That could bump up your record count. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: m rapson [mailto:mrapson@hotmail.com] Sent: Thursday, July 31, 2003 10:51 AM To: sqr-users@sqrug.org Subject: [sqr-users] File Help Hello All! This is the first SQR I have written. I am outputting to a file employee information. The sqr has 2 procedures, one pulls information about active employees and the second pulls information about terminated employees. The file should only contain around 1200 records but is returning about 40000 or so. Not really sure where to look so I thought I would post this and see if someone can help. Much appreciated Mel #include 'setenv.sqc' !Set environment #Include 'setup07.sqc' !Printer and page-size initialization begin-REPORT do Init-DateTime do Get-Current-DateTime do Stdapi-Init display 'Building Interface File for Employee Website' do Open-file do MAIN do close do Commit-Transaction display 'Finished Building Interface File for Employee Website' end-REPORT !************************************************************************ begin-Procedure Open-file LET $OUTFILE = 'c:\ep_empwebsite.csv' open $OUTFILE as 1 for-writing record = 200 let $csv = ',' end-procedure !************************************************************************ begin-procedure close close 1 end-procedure !************************************************************************ begin-PROCEDURE MAIN begin-SELECT distinct EMP.EMPLID JOB.EMPL_STATUS NAM.LAST_NAME NAM.FIRST_NAME NAM.PREF_FIRST_NAME JOB.DEPTID DEPT.DESCR JOBJR.SUPV_LVL_ID JOB.GL_PAY_TYPE EMP.BUSINESS_TITLE LOC.ADDRESS1 LOC.ADDRESS2 LOC.CITY LOC.STATE LOC.POSTAL LOC.COUNTRY PHN.PHONE POS.REG_TEMP POS.FULL_PART_TIME NAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&JOB.GL_PAY_TYPE, 0, 1) IF &POS.REG_TEMP = 'T' let $EMPL_STATUS = 'Temp' ELSE IF &POS.FULL_PART_TIME = 'F' let $EMPL_STATUS = 'FT' ELSE let $EMPL_STATUS = 'PT' END-IF END-IF IF &JOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &EMP.EMPLID LET $LASTNAME = &NAM.LAST_NAME LET $FIRSTNAME = &NAM.FIRST_NAME LET $PREFNAME = &NAM.PREF_FIRST_NAME LET $DEPTID = substr(&JOB.DEPTID, 2, 3) LET $WORKAT = &JOBJR.SUPV_LVL_ID LET $DIVISION = substr(&JOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &EMP.BUSINESS_TITLE LET $ADDRESS1 = &LOC.ADDRESS1 LET $ADDRESS2 =&LOC.ADDRESS2 LET $CITY = &LOC.CITY LET $STATE = &LOC.STATE LET $ZIPCODE = &LOC.POSTAL LET $COUNTRY = &LOC.COUNTRY LET $PHONE = &PHN.PHONE LET $REGTEMP = &POS.REG_TEMP LET $FULLPART = &POS.FULL_PART_TIME LET $SUPERVISOR = &NAM2.NAME DO WRITE-FILE DO TERMINATE FROM SYSADM.PS_LOCATION_TBL LOC, SYSADM.PS_DEPT_TBL DEPT, SYSADM.PS_PERSONAL_PHONE PHN, SYSADM.PS_POSITION_DATA POS2, SYSADM.PS_POSITION_DATA POS, SYSADM.PS_NAMES NAM2, SYSADM.PS_NAMES NAM, SYSADM.PS_JOB JOB2, SYSADM.PS_JOB_JR JOBJR, SYSADM.PS_JOB JOB, SYSADM.PS_EMPLOYMENT EMP WHERE EMP.EMPLID = JOB.EMPLID AND JOB.EMPL_STATUS in ('A', 'L', 'T', 'S') AND JOBJR.EMPLID = JOB.EMPLID AND POS.POSITION_NBR = JOB.POSITION_NBR AND POS2.POSITION_NBR = JOB.REPORTS_TO AND JOB2.POSITION_NBR = POS2.POSITION_NBR AND NAM.EMPLID = EMP.EMPLID AND NAM.NAME_TYPE = 'PRI' AND NAM2.Emplid = JOB2.EMPLID AND NAM2.NAME_TYPE = 'PRI' AND PHN.EMPLID(+) = EMP.EMPLID AND PHN.PHONE_TYPE(+) = 'BUSN' AND LOC.LOCATION(+) = JOB.LOCATION AND DEPT.DEPTID = JOB.DEPTID end-SELECT end-PROCEDURE ! ****** This will pull terminated employees begin-PROCEDURE TERMINATE begin-SELECT distinct TEMP.EMPLID TJOB.EMPL_STATUS TNAM.LAST_NAME TNAM.FIRST_NAME TNAM.PREF_FIRST_NAME TJOB.DEPTID TDEPT.DESCR TJOBJR.SUPV_LVL_ID TJOB.GL_PAY_TYPE TEMP.BUSINESS_TITLE TLOC.ADDRESS1 TLOC.ADDRESS2 TLOC.CITY TLOC.STATE TLOC.POSTAL TLOC.COUNTRY TPHN.PHONE TPOS.REG_TEMP TPOS.FULL_PART_TIME TNAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&TJOB.GL_PAY_TYPE, 0, 1) LET $EMPL_STATUS = '' IF &TJOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &TEMP.EMPLID LET $LASTNAME = &TNAM.LAST_NAME LET $FIRSTNAME = &TNAM.FIRST_NAME LET $PREFNAME = &TNAM.PREF_FIRST_NAME LET $DEPTID = substr(&TJOB.DEPTID, 2, 3) LET $WORKAT = &TJOBJR.SUPV_LVL_ID LET $DIVISION = substr(&TJOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &TEMP.BUSINESS_TITLE LET $ADDRESS1 = &TLOC.ADDRESS1 LET $ADDRESS2 =&TLOC.ADDRESS2 LET $CITY = &TLOC.CITY LET $STATE = &TLOC.STATE LET $ZIPCODE = &TLOC.POSTAL LET $COUNTRY = &TLOC.COUNTRY LET $PHONE = &TPHN.PHONE LET $REGTEMP = &TPOS.REG_TEMP LET $FULLPART = &TPOS.FULL_PART_TIME LET $SUPERVISOR = &TNAM2.NAME DO WRITE-FILE FROM SYSADM.PS_LOCATION_TBL TLOC, SYSADM.PS_DEPT_TBL TDEPT, SYSADM.PS_PERSONAL_PHONE TPHN, SYSADM.PS_POSITION_DATA TPOS2, SYSADM.PS_POSITION_DATA TPOS, SYSADM.PS_NAMES TNAM2, SYSADM.PS_NAMES TNAM, SYSADM.PS_JOB TJOB2, SYSADM.PS_JOB_JR TJOBJR, SYSADM.PS_JOB TJOB, SYSADM.PS_EMPLOYMENT TEMP WHERE TEMP.EMPLID = TJOB.EMPLID AND TJOB.EMPL_STATUS in ('T', 'S') AND TNAM.EMPLID = TEMP.EMPLID AND TNAM.NAME_TYPE = 'PRI' AND TJOBJR.EMPLID(+) = TJOB.EMPLID AND TPOS.POSITION_NBR(+) = TJOB.POSITION_NBR AND TPOS2.POSITION_NBR(+) = TJOB.REPORTS_TO AND TJOB2.POSITION_NBR(+) = TPOS2.POSITION_NBR AND TNAM2.Emplid(+) = TJOB2.EMPLID AND TNAM2.NAME_TYPE(+) = 'PRI' AND TPHN.EMPLID(+) = TEMP.EMPLID AND TPHN.PHONE_TYPE(+) = 'BUSN' AND TLOC.LOCATION(+) = TJOB.LOCATION AND TDEPT.DEPTID(+) = TJOB.DEPTID end-SELECT end-PROCEDURE !********************************************************************** begin-Procedure Write-File write 1 from $TERM_FLAG $csv $EMPLID $csv $LASTNAME $csv $FIRSTNAME $csv $PREFNAME $csv $EMPL_STATUS $csv $DEPTID $csv $WORKAT $csv $GL_PAY_TYPE $csv $DIVISIONDESCR $csv $TITLE $csv $ADDRESS1 $csv $ADDRESS2 $csv $CITY $csv $STATE $csv $ZIPCODE $csv $COUNTRY $csv $PHONE $csv $SUPERVISOR end-PROCEDURE !************************************************************************ #include 'askaod.sqc' !Ask As Of Date input #Include 'datetime.sqc' !Routine for Date and Time formatting #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'ldorgsb.sqc' !Load Orgcode Symbols procedure #Include 'getorgsb.sqc' !Get Orgcode Symbol procedure #Include 'tranctrl.sqc' !Common Transaction Handling #Include 'sqrtrans.sqc' !sql error procedure #include 'prcsapi.sqc' #include 'prcsdef.sqc' #include 'stdapi.sqc' !Routine to Update Run Status _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 11:29:47 2003 Date: Thu, 31 Jul 2003 13:27:01 -0300 From: "Peter Clark" Subject: Re: [sqr-users] File Help JOB contains effective dated and effective sequenced rows. You will need to add code such as the following to select the "latest" JOB row for each employee (as it is, you are selecting all (current and history) rows): AND job.effdt = (select max(effdt) from ps_job where emplid = job.emplid and empl_rcd# = job.empl_rcd# and effdt <= $AsOfToday) AND job.effseq = (select max(effseq) from ps_job where emplid = job.emplid and empl_rcd# = job.empl_rcd# and effdt = job.effdt) >>> mrapson@hotmail.com 2003/07/31 12:50:55 >>> Hello All! This is the first SQR I have written. I am outputting to a file employee information. The sqr has 2 procedures, one pulls information about active employees and the second pulls information about terminated employees. The file should only contain around 1200 records but is returning about 40000 or so. Not really sure where to look so I thought I would post this and see if someone can help. Much appreciated Mel #include 'setenv.sqc' !Set environment #Include 'setup07.sqc' !Printer and page-size initialization begin-REPORT do Init-DateTime do Get-Current-DateTime do Stdapi-Init display 'Building Interface File for Employee Website' do Open-file do MAIN do close do Commit-Transaction display 'Finished Building Interface File for Employee Website' end-REPORT !************************************************************************ begin-Procedure Open-file LET $OUTFILE = 'c:\ep_empwebsite.csv' open $OUTFILE as 1 for-writing record = 200 let $csv = ',' end-procedure !************************************************************************ begin-procedure close close 1 end-procedure !************************************************************************ begin-PROCEDURE MAIN begin-SELECT distinct EMP.EMPLID JOB.EMPL_STATUS NAM.LAST_NAME NAM.FIRST_NAME NAM.PREF_FIRST_NAME JOB.DEPTID DEPT.DESCR JOBJR.SUPV_LVL_ID JOB.GL_PAY_TYPE EMP.BUSINESS_TITLE LOC.ADDRESS1 LOC.ADDRESS2 LOC.CITY LOC.STATE LOC.POSTAL LOC.COUNTRY PHN.PHONE POS.REG_TEMP POS.FULL_PART_TIME NAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&JOB.GL_PAY_TYPE, 0, 1) IF &POS.REG_TEMP = 'T' let $EMPL_STATUS = 'Temp' ELSE IF &POS.FULL_PART_TIME = 'F' let $EMPL_STATUS = 'FT' ELSE let $EMPL_STATUS = 'PT' END-IF END-IF IF &JOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &EMP.EMPLID LET $LASTNAME = &NAM.LAST_NAME LET $FIRSTNAME = &NAM.FIRST_NAME LET $PREFNAME = &NAM.PREF_FIRST_NAME LET $DEPTID = substr(&JOB.DEPTID, 2, 3) LET $WORKAT = &JOBJR.SUPV_LVL_ID LET $DIVISION = substr(&JOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &EMP.BUSINESS_TITLE LET $ADDRESS1 = &LOC.ADDRESS1 LET $ADDRESS2 =&LOC.ADDRESS2 LET $CITY = &LOC.CITY LET $STATE = &LOC.STATE LET $ZIPCODE = &LOC.POSTAL LET $COUNTRY = &LOC.COUNTRY LET $PHONE = &PHN.PHONE LET $REGTEMP = &POS.REG_TEMP LET $FULLPART = &POS.FULL_PART_TIME LET $SUPERVISOR = &NAM2.NAME DO WRITE-FILE DO TERMINATE FROM SYSADM.PS_LOCATION_TBL LOC, SYSADM.PS_DEPT_TBL DEPT, SYSADM.PS_PERSONAL_PHONE PHN, SYSADM.PS_POSITION_DATA POS2, SYSADM.PS_POSITION_DATA POS, SYSADM.PS_NAMES NAM2, SYSADM.PS_NAMES NAM, SYSADM.PS_JOB JOB2, SYSADM.PS_JOB_JR JOBJR, SYSADM.PS_JOB JOB, SYSADM.PS_EMPLOYMENT EMP WHERE EMP.EMPLID = JOB.EMPLID AND JOB.EMPL_STATUS in ('A', 'L', 'T', 'S') AND JOBJR.EMPLID = JOB.EMPLID AND POS.POSITION_NBR = JOB.POSITION_NBR AND POS2.POSITION_NBR = JOB.REPORTS_TO AND JOB2.POSITION_NBR = POS2.POSITION_NBR AND NAM.EMPLID = EMP.EMPLID AND NAM.NAME_TYPE = 'PRI' AND NAM2.Emplid = JOB2.EMPLID AND NAM2.NAME_TYPE = 'PRI' AND PHN.EMPLID(+) = EMP.EMPLID AND PHN.PHONE_TYPE(+) = 'BUSN' AND LOC.LOCATION(+) = JOB.LOCATION AND DEPT.DEPTID = JOB.DEPTID end-SELECT end-PROCEDURE ! ****** This will pull terminated employees begin-PROCEDURE TERMINATE begin-SELECT distinct TEMP.EMPLID TJOB.EMPL_STATUS TNAM.LAST_NAME TNAM.FIRST_NAME TNAM.PREF_FIRST_NAME TJOB.DEPTID TDEPT.DESCR TJOBJR.SUPV_LVL_ID TJOB.GL_PAY_TYPE TEMP.BUSINESS_TITLE TLOC.ADDRESS1 TLOC.ADDRESS2 TLOC.CITY TLOC.STATE TLOC.POSTAL TLOC.COUNTRY TPHN.PHONE TPOS.REG_TEMP TPOS.FULL_PART_TIME TNAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&TJOB.GL_PAY_TYPE, 0, 1) LET $EMPL_STATUS = '' IF &TJOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &TEMP.EMPLID LET $LASTNAME = &TNAM.LAST_NAME LET $FIRSTNAME = &TNAM.FIRST_NAME LET $PREFNAME = &TNAM.PREF_FIRST_NAME LET $DEPTID = substr(&TJOB.DEPTID, 2, 3) LET $WORKAT = &TJOBJR.SUPV_LVL_ID LET $DIVISION = substr(&TJOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &TEMP.BUSINESS_TITLE LET $ADDRESS1 = &TLOC.ADDRESS1 LET $ADDRESS2 =&TLOC.ADDRESS2 LET $CITY = &TLOC.CITY LET $STATE = &TLOC.STATE LET $ZIPCODE = &TLOC.POSTAL LET $COUNTRY = &TLOC.COUNTRY LET $PHONE = &TPHN.PHONE LET $REGTEMP = &TPOS.REG_TEMP LET $FULLPART = &TPOS.FULL_PART_TIME LET $SUPERVISOR = &TNAM2.NAME DO WRITE-FILE FROM SYSADM.PS_LOCATION_TBL TLOC, SYSADM.PS_DEPT_TBL TDEPT, SYSADM.PS_PERSONAL_PHONE TPHN, SYSADM.PS_POSITION_DATA TPOS2, SYSADM.PS_POSITION_DATA TPOS, SYSADM.PS_NAMES TNAM2, SYSADM.PS_NAMES TNAM, SYSADM.PS_JOB TJOB2, SYSADM.PS_JOB_JR TJOBJR, SYSADM.PS_JOB TJOB, SYSADM.PS_EMPLOYMENT TEMP WHERE TEMP.EMPLID = TJOB.EMPLID AND TJOB.EMPL_STATUS in ('T', 'S') AND TNAM.EMPLID = TEMP.EMPLID AND TNAM.NAME_TYPE = 'PRI' AND TJOBJR.EMPLID(+) = TJOB.EMPLID AND TPOS.POSITION_NBR(+) = TJOB.POSITION_NBR AND TPOS2.POSITION_NBR(+) = TJOB.REPORTS_TO AND TJOB2.POSITION_NBR(+) = TPOS2.POSITION_NBR AND TNAM2.Emplid(+) = TJOB2.EMPLID AND TNAM2.NAME_TYPE(+) = 'PRI' AND TPHN.EMPLID(+) = TEMP.EMPLID AND TPHN.PHONE_TYPE(+) = 'BUSN' AND TLOC.LOCATION(+) = TJOB.LOCATION AND TDEPT.DEPTID(+) = TJOB.DEPTID end-SELECT end-PROCEDURE !********************************************************************** begin-Procedure Write-File write 1 from $TERM_FLAG $csv $EMPLID $csv $LASTNAME $csv $FIRSTNAME $csv $PREFNAME $csv $EMPL_STATUS $csv $DEPTID $csv $WORKAT $csv $GL_PAY_TYPE $csv $DIVISIONDESCR $csv $TITLE $csv $ADDRESS1 $csv $ADDRESS2 $csv $CITY $csv $STATE $csv $ZIPCODE $csv $COUNTRY $csv $PHONE $csv $SUPERVISOR end-PROCEDURE !************************************************************************ #include 'askaod.sqc' !Ask As Of Date input #Include 'datetime.sqc' !Routine for Date and Time formatting #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'ldorgsb.sqc' !Load Orgcode Symbols procedure #Include 'getorgsb.sqc' !Get Orgcode Symbol procedure #Include 'tranctrl.sqc' !Common Transaction Handling #Include 'sqrtrans.sqc' !sql error procedure #include 'prcsapi.sqc' #include 'prcsdef.sqc' #include 'stdapi.sqc' !Routine to Update Run Status _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 11:32:45 2003 From: "Alexander, Steve" Subject: RE: [sqr-users] File Help Date: Thu, 31 Jul 2003 09:34:27 -0700 Also, you have three copies of PS_JOB, two copies of PS_PERSONAL_DATA, and two copies of PS_NAME. Why are you doing that? Even if you don't use fields from the redundant copies, they can cause you to multiply your records if, for instance, there are more than one employee with the same POSITION_NBR. You should probably get FULL_PART_TIME and REG_TEMP from PS_JOB, not PS_POSITION_DATA. The values in PS_POSITION_DATA are the defaults for that position. The values in PS_JOB are either the same, or may override those defaults. You could save a lot of work, time, complication, and perhaps row duplication by removing PS_POSITION_DATA from the query. -----Original Message----- From: Knapp, Richard [mailto:KnappR@umsystem.edu] Sent: Thursday, July 31, 2003 9:10 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] File Help I don't see anything about effective dating. That could bump up your record count. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: m rapson [mailto:mrapson@hotmail.com] Sent: Thursday, July 31, 2003 10:51 AM To: sqr-users@sqrug.org Subject: [sqr-users] File Help Hello All! This is the first SQR I have written. I am outputting to a file employee information. The sqr has 2 procedures, one pulls information about active employees and the second pulls information about terminated employees. The file should only contain around 1200 records but is returning about 40000 or so. Not really sure where to look so I thought I would post this and see if someone can help. Much appreciated Mel #include 'setenv.sqc' !Set environment #Include 'setup07.sqc' !Printer and page-size initialization begin-REPORT do Init-DateTime do Get-Current-DateTime do Stdapi-Init display 'Building Interface File for Employee Website' do Open-file do MAIN do close do Commit-Transaction display 'Finished Building Interface File for Employee Website' end-REPORT !************************************************************************ begin-Procedure Open-file LET $OUTFILE = 'c:\ep_empwebsite.csv' open $OUTFILE as 1 for-writing record = 200 let $csv = ',' end-procedure !************************************************************************ begin-procedure close close 1 end-procedure !************************************************************************ begin-PROCEDURE MAIN begin-SELECT distinct EMP.EMPLID JOB.EMPL_STATUS NAM.LAST_NAME NAM.FIRST_NAME NAM.PREF_FIRST_NAME JOB.DEPTID DEPT.DESCR JOBJR.SUPV_LVL_ID JOB.GL_PAY_TYPE EMP.BUSINESS_TITLE LOC.ADDRESS1 LOC.ADDRESS2 LOC.CITY LOC.STATE LOC.POSTAL LOC.COUNTRY PHN.PHONE POS.REG_TEMP POS.FULL_PART_TIME NAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&JOB.GL_PAY_TYPE, 0, 1) IF &POS.REG_TEMP = 'T' let $EMPL_STATUS = 'Temp' ELSE IF &POS.FULL_PART_TIME = 'F' let $EMPL_STATUS = 'FT' ELSE let $EMPL_STATUS = 'PT' END-IF END-IF IF &JOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &EMP.EMPLID LET $LASTNAME = &NAM.LAST_NAME LET $FIRSTNAME = &NAM.FIRST_NAME LET $PREFNAME = &NAM.PREF_FIRST_NAME LET $DEPTID = substr(&JOB.DEPTID, 2, 3) LET $WORKAT = &JOBJR.SUPV_LVL_ID LET $DIVISION = substr(&JOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &EMP.BUSINESS_TITLE LET $ADDRESS1 = &LOC.ADDRESS1 LET $ADDRESS2 =&LOC.ADDRESS2 LET $CITY = &LOC.CITY LET $STATE = &LOC.STATE LET $ZIPCODE = &LOC.POSTAL LET $COUNTRY = &LOC.COUNTRY LET $PHONE = &PHN.PHONE LET $REGTEMP = &POS.REG_TEMP LET $FULLPART = &POS.FULL_PART_TIME LET $SUPERVISOR = &NAM2.NAME DO WRITE-FILE DO TERMINATE FROM SYSADM.PS_LOCATION_TBL LOC, SYSADM.PS_DEPT_TBL DEPT, SYSADM.PS_PERSONAL_PHONE PHN, SYSADM.PS_POSITION_DATA POS2, SYSADM.PS_POSITION_DATA POS, SYSADM.PS_NAMES NAM2, SYSADM.PS_NAMES NAM, SYSADM.PS_JOB JOB2, SYSADM.PS_JOB_JR JOBJR, SYSADM.PS_JOB JOB, SYSADM.PS_EMPLOYMENT EMP WHERE EMP.EMPLID = JOB.EMPLID AND JOB.EMPL_STATUS in ('A', 'L', 'T', 'S') AND JOBJR.EMPLID = JOB.EMPLID AND POS.POSITION_NBR = JOB.POSITION_NBR AND POS2.POSITION_NBR = JOB.REPORTS_TO AND JOB2.POSITION_NBR = POS2.POSITION_NBR AND NAM.EMPLID = EMP.EMPLID AND NAM.NAME_TYPE = 'PRI' AND NAM2.Emplid = JOB2.EMPLID AND NAM2.NAME_TYPE = 'PRI' AND PHN.EMPLID(+) = EMP.EMPLID AND PHN.PHONE_TYPE(+) = 'BUSN' AND LOC.LOCATION(+) = JOB.LOCATION AND DEPT.DEPTID = JOB.DEPTID end-SELECT end-PROCEDURE ! ****** This will pull terminated employees begin-PROCEDURE TERMINATE begin-SELECT distinct TEMP.EMPLID TJOB.EMPL_STATUS TNAM.LAST_NAME TNAM.FIRST_NAME TNAM.PREF_FIRST_NAME TJOB.DEPTID TDEPT.DESCR TJOBJR.SUPV_LVL_ID TJOB.GL_PAY_TYPE TEMP.BUSINESS_TITLE TLOC.ADDRESS1 TLOC.ADDRESS2 TLOC.CITY TLOC.STATE TLOC.POSTAL TLOC.COUNTRY TPHN.PHONE TPOS.REG_TEMP TPOS.FULL_PART_TIME TNAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&TJOB.GL_PAY_TYPE, 0, 1) LET $EMPL_STATUS = '' IF &TJOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &TEMP.EMPLID LET $LASTNAME = &TNAM.LAST_NAME LET $FIRSTNAME = &TNAM.FIRST_NAME LET $PREFNAME = &TNAM.PREF_FIRST_NAME LET $DEPTID = substr(&TJOB.DEPTID, 2, 3) LET $WORKAT = &TJOBJR.SUPV_LVL_ID LET $DIVISION = substr(&TJOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &TEMP.BUSINESS_TITLE LET $ADDRESS1 = &TLOC.ADDRESS1 LET $ADDRESS2 =&TLOC.ADDRESS2 LET $CITY = &TLOC.CITY LET $STATE = &TLOC.STATE LET $ZIPCODE = &TLOC.POSTAL LET $COUNTRY = &TLOC.COUNTRY LET $PHONE = &TPHN.PHONE LET $REGTEMP = &TPOS.REG_TEMP LET $FULLPART = &TPOS.FULL_PART_TIME LET $SUPERVISOR = &TNAM2.NAME DO WRITE-FILE FROM SYSADM.PS_LOCATION_TBL TLOC, SYSADM.PS_DEPT_TBL TDEPT, SYSADM.PS_PERSONAL_PHONE TPHN, SYSADM.PS_POSITION_DATA TPOS2, SYSADM.PS_POSITION_DATA TPOS, SYSADM.PS_NAMES TNAM2, SYSADM.PS_NAMES TNAM, SYSADM.PS_JOB TJOB2, SYSADM.PS_JOB_JR TJOBJR, SYSADM.PS_JOB TJOB, SYSADM.PS_EMPLOYMENT TEMP WHERE TEMP.EMPLID = TJOB.EMPLID AND TJOB.EMPL_STATUS in ('T', 'S') AND TNAM.EMPLID = TEMP.EMPLID AND TNAM.NAME_TYPE = 'PRI' AND TJOBJR.EMPLID(+) = TJOB.EMPLID AND TPOS.POSITION_NBR(+) = TJOB.POSITION_NBR AND TPOS2.POSITION_NBR(+) = TJOB.REPORTS_TO AND TJOB2.POSITION_NBR(+) = TPOS2.POSITION_NBR AND TNAM2.Emplid(+) = TJOB2.EMPLID AND TNAM2.NAME_TYPE(+) = 'PRI' AND TPHN.EMPLID(+) = TEMP.EMPLID AND TPHN.PHONE_TYPE(+) = 'BUSN' AND TLOC.LOCATION(+) = TJOB.LOCATION AND TDEPT.DEPTID(+) = TJOB.DEPTID end-SELECT end-PROCEDURE !********************************************************************** begin-Procedure Write-File write 1 from $TERM_FLAG $csv $EMPLID $csv $LASTNAME $csv $FIRSTNAME $csv $PREFNAME $csv $EMPL_STATUS $csv $DEPTID $csv $WORKAT $csv $GL_PAY_TYPE $csv $DIVISIONDESCR $csv $TITLE $csv $ADDRESS1 $csv $ADDRESS2 $csv $CITY $csv $STATE $csv $ZIPCODE $csv $COUNTRY $csv $PHONE $csv $SUPERVISOR end-PROCEDURE !************************************************************************ #include 'askaod.sqc' !Ask As Of Date input #Include 'datetime.sqc' !Routine for Date and Time formatting #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'ldorgsb.sqc' !Load Orgcode Symbols procedure #Include 'getorgsb.sqc' !Get Orgcode Symbol procedure #Include 'tranctrl.sqc' !Common Transaction Handling #Include 'sqrtrans.sqc' !sql error procedure #include 'prcsapi.sqc' #include 'prcsdef.sqc' #include 'stdapi.sqc' !Routine to Update Run Status _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 11:51:17 2003 From: "m rapson" Subject: RE: [sqr-users] File Help Date: Thu, 31 Jul 2003 12:49:54 -0400 Job Jr is needed to grab a field to tell whether a user works from home Job is used a second time so I can join it back to position to get the Reports To Position number position is used twice to join the position number back to an employee and the supervisor(JOB1 and Job2) That is the reason for duplicating the tables. Effective dating I didn't even think about. We have only been working with PS for 5 months to get HR up and running(HR info and Payroll) while converting over legacy systems. I will update with eft dting and look at the rest. Thanks for your help! Melissa ----Original Message Follows---- From: "Alexander, Steve" Reply-To: sqr-users@sqrug.org To: "'sqr-users@sqrug.org'" Subject: RE: [sqr-users] File Help Date: Thu, 31 Jul 2003 09:34:27 -0700 Also, you have three copies of PS_JOB, two copies of PS_PERSONAL_DATA, and two copies of PS_NAME. Why are you doing that? Even if you don't use fields from the redundant copies, they can cause you to multiply your records if, for instance, there are more than one employee with the same POSITION_NBR. You should probably get FULL_PART_TIME and REG_TEMP from PS_JOB, not PS_POSITION_DATA. The values in PS_POSITION_DATA are the defaults for that position. The values in PS_JOB are either the same, or may override those defaults. You could save a lot of work, time, complication, and perhaps row duplication by removing PS_POSITION_DATA from the query. -----Original Message----- From: Knapp, Richard [mailto:KnappR@umsystem.edu] Sent: Thursday, July 31, 2003 9:10 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] File Help I don't see anything about effective dating. That could bump up your record count. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: m rapson [mailto:mrapson@hotmail.com] Sent: Thursday, July 31, 2003 10:51 AM To: sqr-users@sqrug.org Subject: [sqr-users] File Help Hello All! This is the first SQR I have written. I am outputting to a file employee information. The sqr has 2 procedures, one pulls information about active employees and the second pulls information about terminated employees. The file should only contain around 1200 records but is returning about 40000 or so. Not really sure where to look so I thought I would post this and see if someone can help. Much appreciated Mel #include 'setenv.sqc' !Set environment #Include 'setup07.sqc' !Printer and page-size initialization begin-REPORT do Init-DateTime do Get-Current-DateTime do Stdapi-Init display 'Building Interface File for Employee Website' do Open-file do MAIN do close do Commit-Transaction display 'Finished Building Interface File for Employee Website' end-REPORT !************************************************************************ begin-Procedure Open-file LET $OUTFILE = 'c:\ep_empwebsite.csv' open $OUTFILE as 1 for-writing record = 200 let $csv = ',' end-procedure !************************************************************************ begin-procedure close close 1 end-procedure !************************************************************************ begin-PROCEDURE MAIN begin-SELECT distinct EMP.EMPLID JOB.EMPL_STATUS NAM.LAST_NAME NAM.FIRST_NAME NAM.PREF_FIRST_NAME JOB.DEPTID DEPT.DESCR JOBJR.SUPV_LVL_ID JOB.GL_PAY_TYPE EMP.BUSINESS_TITLE LOC.ADDRESS1 LOC.ADDRESS2 LOC.CITY LOC.STATE LOC.POSTAL LOC.COUNTRY PHN.PHONE POS.REG_TEMP POS.FULL_PART_TIME NAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&JOB.GL_PAY_TYPE, 0, 1) IF &POS.REG_TEMP = 'T' let $EMPL_STATUS = 'Temp' ELSE IF &POS.FULL_PART_TIME = 'F' let $EMPL_STATUS = 'FT' ELSE let $EMPL_STATUS = 'PT' END-IF END-IF IF &JOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &EMP.EMPLID LET $LASTNAME = &NAM.LAST_NAME LET $FIRSTNAME = &NAM.FIRST_NAME LET $PREFNAME = &NAM.PREF_FIRST_NAME LET $DEPTID = substr(&JOB.DEPTID, 2, 3) LET $WORKAT = &JOBJR.SUPV_LVL_ID LET $DIVISION = substr(&JOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &EMP.BUSINESS_TITLE LET $ADDRESS1 = &LOC.ADDRESS1 LET $ADDRESS2 =&LOC.ADDRESS2 LET $CITY = &LOC.CITY LET $STATE = &LOC.STATE LET $ZIPCODE = &LOC.POSTAL LET $COUNTRY = &LOC.COUNTRY LET $PHONE = &PHN.PHONE LET $REGTEMP = &POS.REG_TEMP LET $FULLPART = &POS.FULL_PART_TIME LET $SUPERVISOR = &NAM2.NAME DO WRITE-FILE DO TERMINATE FROM SYSADM.PS_LOCATION_TBL LOC, SYSADM.PS_DEPT_TBL DEPT, SYSADM.PS_PERSONAL_PHONE PHN, SYSADM.PS_POSITION_DATA POS2, SYSADM.PS_POSITION_DATA POS, SYSADM.PS_NAMES NAM2, SYSADM.PS_NAMES NAM, SYSADM.PS_JOB JOB2, SYSADM.PS_JOB_JR JOBJR, SYSADM.PS_JOB JOB, SYSADM.PS_EMPLOYMENT EMP WHERE EMP.EMPLID = JOB.EMPLID AND JOB.EMPL_STATUS in ('A', 'L', 'T', 'S') AND JOBJR.EMPLID = JOB.EMPLID AND POS.POSITION_NBR = JOB.POSITION_NBR AND POS2.POSITION_NBR = JOB.REPORTS_TO AND JOB2.POSITION_NBR = POS2.POSITION_NBR AND NAM.EMPLID = EMP.EMPLID AND NAM.NAME_TYPE = 'PRI' AND NAM2.Emplid = JOB2.EMPLID AND NAM2.NAME_TYPE = 'PRI' AND PHN.EMPLID(+) = EMP.EMPLID AND PHN.PHONE_TYPE(+) = 'BUSN' AND LOC.LOCATION(+) = JOB.LOCATION AND DEPT.DEPTID = JOB.DEPTID end-SELECT end-PROCEDURE ! ****** This will pull terminated employees begin-PROCEDURE TERMINATE begin-SELECT distinct TEMP.EMPLID TJOB.EMPL_STATUS TNAM.LAST_NAME TNAM.FIRST_NAME TNAM.PREF_FIRST_NAME TJOB.DEPTID TDEPT.DESCR TJOBJR.SUPV_LVL_ID TJOB.GL_PAY_TYPE TEMP.BUSINESS_TITLE TLOC.ADDRESS1 TLOC.ADDRESS2 TLOC.CITY TLOC.STATE TLOC.POSTAL TLOC.COUNTRY TPHN.PHONE TPOS.REG_TEMP TPOS.FULL_PART_TIME TNAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&TJOB.GL_PAY_TYPE, 0, 1) LET $EMPL_STATUS = '' IF &TJOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &TEMP.EMPLID LET $LASTNAME = &TNAM.LAST_NAME LET $FIRSTNAME = &TNAM.FIRST_NAME LET $PREFNAME = &TNAM.PREF_FIRST_NAME LET $DEPTID = substr(&TJOB.DEPTID, 2, 3) LET $WORKAT = &TJOBJR.SUPV_LVL_ID LET $DIVISION = substr(&TJOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &TEMP.BUSINESS_TITLE LET $ADDRESS1 = &TLOC.ADDRESS1 LET $ADDRESS2 =&TLOC.ADDRESS2 LET $CITY = &TLOC.CITY LET $STATE = &TLOC.STATE LET $ZIPCODE = &TLOC.POSTAL LET $COUNTRY = &TLOC.COUNTRY LET $PHONE = &TPHN.PHONE LET $REGTEMP = &TPOS.REG_TEMP LET $FULLPART = &TPOS.FULL_PART_TIME LET $SUPERVISOR = &TNAM2.NAME DO WRITE-FILE FROM SYSADM.PS_LOCATION_TBL TLOC, SYSADM.PS_DEPT_TBL TDEPT, SYSADM.PS_PERSONAL_PHONE TPHN, SYSADM.PS_POSITION_DATA TPOS2, SYSADM.PS_POSITION_DATA TPOS, SYSADM.PS_NAMES TNAM2, SYSADM.PS_NAMES TNAM, SYSADM.PS_JOB TJOB2, SYSADM.PS_JOB_JR TJOBJR, SYSADM.PS_JOB TJOB, SYSADM.PS_EMPLOYMENT TEMP WHERE TEMP.EMPLID = TJOB.EMPLID AND TJOB.EMPL_STATUS in ('T', 'S') AND TNAM.EMPLID = TEMP.EMPLID AND TNAM.NAME_TYPE = 'PRI' AND TJOBJR.EMPLID(+) = TJOB.EMPLID AND TPOS.POSITION_NBR(+) = TJOB.POSITION_NBR AND TPOS2.POSITION_NBR(+) = TJOB.REPORTS_TO AND TJOB2.POSITION_NBR(+) = TPOS2.POSITION_NBR AND TNAM2.Emplid(+) = TJOB2.EMPLID AND TNAM2.NAME_TYPE(+) = 'PRI' AND TPHN.EMPLID(+) = TEMP.EMPLID AND TPHN.PHONE_TYPE(+) = 'BUSN' AND TLOC.LOCATION(+) = TJOB.LOCATION AND TDEPT.DEPTID(+) = TJOB.DEPTID end-SELECT end-PROCEDURE !********************************************************************** begin-Procedure Write-File write 1 from $TERM_FLAG $csv $EMPLID $csv $LASTNAME $csv $FIRSTNAME $csv $PREFNAME $csv $EMPL_STATUS $csv $DEPTID $csv $WORKAT $csv $GL_PAY_TYPE $csv $DIVISIONDESCR $csv $TITLE $csv $ADDRESS1 $csv $ADDRESS2 $csv $CITY $csv $STATE $csv $ZIPCODE $csv $COUNTRY $csv $PHONE $csv $SUPERVISOR end-PROCEDURE !************************************************************************ #include 'askaod.sqc' !Ask As Of Date input #Include 'datetime.sqc' !Routine for Date and Time formatting #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'ldorgsb.sqc' !Load Orgcode Symbols procedure #Include 'getorgsb.sqc' !Get Orgcode Symbol procedure #Include 'tranctrl.sqc' !Common Transaction Handling #Include 'sqrtrans.sqc' !sql error procedure #include 'prcsapi.sqc' #include 'prcsdef.sqc' #include 'stdapi.sqc' !Routine to Update Run Status _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 11:52:06 2003 From: "m rapson" Subject: RE: [sqr-users] File Help Date: Thu, 31 Jul 2003 12:50:58 -0400 When I run it in our SQL tool it only returns 1700 records? Melissa ----Original Message Follows---- From: Ramzi_Salameh@daveandbusters.com Reply-To: sqr-users@sqrug.org To: sqr-users@sqrug.org Subject: RE: [sqr-users] File Help Date: Thu, 31 Jul 2003 11:20:39 -0500 Run your queries in a SQL tool and see how many records are returned there. More than likely there's either something missing, i.e. effective date logic, or join problems. Ramzi "Knapp, Richard" edu> cc: Sent by: Subject: RE: [sqr-users] File Help sqr-users-admin@s qrug.org 07/31/03 11:10 AM Please respond to sqr-users I don't see anything about effective dating. That could bump up your record count. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: m rapson [mailto:mrapson@hotmail.com] Sent: Thursday, July 31, 2003 10:51 AM To: sqr-users@sqrug.org Subject: [sqr-users] File Help Hello All! This is the first SQR I have written. I am outputting to a file employee information. The sqr has 2 procedures, one pulls information about active employees and the second pulls information about terminated employees. The file should only contain around 1200 records but is returning about 40000 or so. Not really sure where to look so I thought I would post this and see if someone can help. Much appreciated Mel #include 'setenv.sqc' !Set environment #Include 'setup07.sqc' !Printer and page-size initialization begin-REPORT do Init-DateTime do Get-Current-DateTime do Stdapi-Init display 'Building Interface File for Employee Website' do Open-file do MAIN do close do Commit-Transaction display 'Finished Building Interface File for Employee Website' end-REPORT !************************************************************************ begin-Procedure Open-file LET $OUTFILE = 'c:\ep_empwebsite.csv' open $OUTFILE as 1 for-writing record = 200 let $csv = ',' end-procedure !************************************************************************ begin-procedure close close 1 end-procedure !************************************************************************ begin-PROCEDURE MAIN begin-SELECT distinct EMP.EMPLID JOB.EMPL_STATUS NAM.LAST_NAME NAM.FIRST_NAME NAM.PREF_FIRST_NAME JOB.DEPTID DEPT.DESCR JOBJR.SUPV_LVL_ID JOB.GL_PAY_TYPE EMP.BUSINESS_TITLE LOC.ADDRESS1 LOC.ADDRESS2 LOC.CITY LOC.STATE LOC.POSTAL LOC.COUNTRY PHN.PHONE POS.REG_TEMP POS.FULL_PART_TIME NAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&JOB.GL_PAY_TYPE, 0, 1) IF &POS.REG_TEMP = 'T' let $EMPL_STATUS = 'Temp' ELSE IF &POS.FULL_PART_TIME = 'F' let $EMPL_STATUS = 'FT' ELSE let $EMPL_STATUS = 'PT' END-IF END-IF IF &JOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &EMP.EMPLID LET $LASTNAME = &NAM.LAST_NAME LET $FIRSTNAME = &NAM.FIRST_NAME LET $PREFNAME = &NAM.PREF_FIRST_NAME LET $DEPTID = substr(&JOB.DEPTID, 2, 3) LET $WORKAT = &JOBJR.SUPV_LVL_ID LET $DIVISION = substr(&JOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &EMP.BUSINESS_TITLE LET $ADDRESS1 = &LOC.ADDRESS1 LET $ADDRESS2 =&LOC.ADDRESS2 LET $CITY = &LOC.CITY LET $STATE = &LOC.STATE LET $ZIPCODE = &LOC.POSTAL LET $COUNTRY = &LOC.COUNTRY LET $PHONE = &PHN.PHONE LET $REGTEMP = &POS.REG_TEMP LET $FULLPART = &POS.FULL_PART_TIME LET $SUPERVISOR = &NAM2.NAME DO WRITE-FILE DO TERMINATE FROM SYSADM.PS_LOCATION_TBL LOC, SYSADM.PS_DEPT_TBL DEPT, SYSADM.PS_PERSONAL_PHONE PHN, SYSADM.PS_POSITION_DATA POS2, SYSADM.PS_POSITION_DATA POS, SYSADM.PS_NAMES NAM2, SYSADM.PS_NAMES NAM, SYSADM.PS_JOB JOB2, SYSADM.PS_JOB_JR JOBJR, SYSADM.PS_JOB JOB, SYSADM.PS_EMPLOYMENT EMP WHERE EMP.EMPLID = JOB.EMPLID AND JOB.EMPL_STATUS in ('A', 'L', 'T', 'S') AND JOBJR.EMPLID = JOB.EMPLID AND POS.POSITION_NBR = JOB.POSITION_NBR AND POS2.POSITION_NBR = JOB.REPORTS_TO AND JOB2.POSITION_NBR = POS2.POSITION_NBR AND NAM.EMPLID = EMP.EMPLID AND NAM.NAME_TYPE = 'PRI' AND NAM2.Emplid = JOB2.EMPLID AND NAM2.NAME_TYPE = 'PRI' AND PHN.EMPLID(+) = EMP.EMPLID AND PHN.PHONE_TYPE(+) = 'BUSN' AND LOC.LOCATION(+) = JOB.LOCATION AND DEPT.DEPTID = JOB.DEPTID end-SELECT end-PROCEDURE ! ****** This will pull terminated employees begin-PROCEDURE TERMINATE begin-SELECT distinct TEMP.EMPLID TJOB.EMPL_STATUS TNAM.LAST_NAME TNAM.FIRST_NAME TNAM.PREF_FIRST_NAME TJOB.DEPTID TDEPT.DESCR TJOBJR.SUPV_LVL_ID TJOB.GL_PAY_TYPE TEMP.BUSINESS_TITLE TLOC.ADDRESS1 TLOC.ADDRESS2 TLOC.CITY TLOC.STATE TLOC.POSTAL TLOC.COUNTRY TPHN.PHONE TPOS.REG_TEMP TPOS.FULL_PART_TIME TNAM2.NAME LET $GL_PAY_TYPE = SUBSTR(&TJOB.GL_PAY_TYPE, 0, 1) LET $EMPL_STATUS = '' IF &TJOB.EMPL_STATUS = 'T' let $TERM_FLAG = 'yes' ELSE let $TERM_FLAG = ' ' END-IF LET $EMPLID = &TEMP.EMPLID LET $LASTNAME = &TNAM.LAST_NAME LET $FIRSTNAME = &TNAM.FIRST_NAME LET $PREFNAME = &TNAM.PREF_FIRST_NAME LET $DEPTID = substr(&TJOB.DEPTID, 2, 3) LET $WORKAT = &TJOBJR.SUPV_LVL_ID LET $DIVISION = substr(&TJOB.GL_PAY_TYPE, 1, 1) EVALUATE $DIVISION WHEN = '1' LET $DIVISIONDESCR = 'Local Sales' WHEN = '2' LET $DIVISIONDESCR = 'Sales Administration Support' WHEN = '3' LET $DIVISIONDESCR = 'Duncan' WHEN = '4' LET $DIVISIONDESCR = 'Colorado Springs' WHEN = '5' LET $DIVISIONDESCR = 'Partnership Marketing' WHEN = '6' LET $DIVISIONDESCR = 'Headquarters' WHEN = '7' LET $DIVISIONDESCR = 'Sally Foster' WHEN-OTHER BREAK END-EVALUATE LET $TITLE = &TEMP.BUSINESS_TITLE LET $ADDRESS1 = &TLOC.ADDRESS1 LET $ADDRESS2 =&TLOC.ADDRESS2 LET $CITY = &TLOC.CITY LET $STATE = &TLOC.STATE LET $ZIPCODE = &TLOC.POSTAL LET $COUNTRY = &TLOC.COUNTRY LET $PHONE = &TPHN.PHONE LET $REGTEMP = &TPOS.REG_TEMP LET $FULLPART = &TPOS.FULL_PART_TIME LET $SUPERVISOR = &TNAM2.NAME DO WRITE-FILE FROM SYSADM.PS_LOCATION_TBL TLOC, SYSADM.PS_DEPT_TBL TDEPT, SYSADM.PS_PERSONAL_PHONE TPHN, SYSADM.PS_POSITION_DATA TPOS2, SYSADM.PS_POSITION_DATA TPOS, SYSADM.PS_NAMES TNAM2, SYSADM.PS_NAMES TNAM, SYSADM.PS_JOB TJOB2, SYSADM.PS_JOB_JR TJOBJR, SYSADM.PS_JOB TJOB, SYSADM.PS_EMPLOYMENT TEMP WHERE TEMP.EMPLID = TJOB.EMPLID AND TJOB.EMPL_STATUS in ('T', 'S') AND TNAM.EMPLID = TEMP.EMPLID AND TNAM.NAME_TYPE = 'PRI' AND TJOBJR.EMPLID(+) = TJOB.EMPLID AND TPOS.POSITION_NBR(+) = TJOB.POSITION_NBR AND TPOS2.POSITION_NBR(+) = TJOB.REPORTS_TO AND TJOB2.POSITION_NBR(+) = TPOS2.POSITION_NBR AND TNAM2.Emplid(+) = TJOB2.EMPLID AND TNAM2.NAME_TYPE(+) = 'PRI' AND TPHN.EMPLID(+) = TEMP.EMPLID AND TPHN.PHONE_TYPE(+) = 'BUSN' AND TLOC.LOCATION(+) = TJOB.LOCATION AND TDEPT.DEPTID(+) = TJOB.DEPTID end-SELECT end-PROCEDURE !********************************************************************** begin-Procedure Write-File write 1 from $TERM_FLAG $csv $EMPLID $csv $LASTNAME $csv $FIRSTNAME $csv $PREFNAME $csv $EMPL_STATUS $csv $DEPTID $csv $WORKAT $csv $GL_PAY_TYPE $csv $DIVISIONDESCR $csv $TITLE $csv $ADDRESS1 $csv $ADDRESS2 $csv $CITY $csv $STATE $csv $ZIPCODE $csv $COUNTRY $csv $PHONE $csv $SUPERVISOR end-PROCEDURE !************************************************************************ #include 'askaod.sqc' !Ask As Of Date input #Include 'datetime.sqc' !Routine for Date and Time formatting #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'ldorgsb.sqc' !Load Orgcode Symbols procedure #Include 'getorgsb.sqc' !Get Orgcode Symbol procedure #Include 'tranctrl.sqc' !Common Transaction Handling #Include 'sqrtrans.sqc' !sql error procedure #include 'prcsapi.sqc' #include 'prcsdef.sqc' #include 'stdapi.sqc' !Routine to Update Run Status _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 13:11:18 2003 Subject: RE: [sqr-users] Inconsistent Data Types Date: Thu, 31 Jul 2003 14:10:44 -0400 From: "Ven Garlapati" Hi Dan: Couple of questions: what is the data type of call_date (I know you mentioned it as DATA field?) and how is the data there (format)? if call_date is in the 'DD-MON-YY' format (with no minutes and seconds stored, then you do not need to use trunc function. Thanks, Ven Garlapati vxg@creditacceptance.com -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Thursday, July 31, 2003 11:35 AM To: sqr-users@sqrug.org Subject: [sqr-users] Inconsistent Data Types I get the following error when I test my program code. SQR 5528 ORACLE OEXEC error -932 in cursor 1: ORA-00932: inconsistent datatypes error on Line 344: (SQR 3735) could not execute SQL. I am trying to execute the following code ! Lock the current pay period begin-SQL update TK_Calendar set Cal_Payroll_Code = {LOCKED} where trunc(Cal_Date) <= trunc($Pay_End_Dt) AND Cal_Payroll_Code = {OPEN} end-SQL where Cal_Date is a Data field in the Table and Cal_Payroll_Code is CHAR (1) field. $Pay_end_Dt is keyed in on an input statement as the date dd-mmm-yy. As I understand it $ can mean either a Date or character field. Could someone tell me what I'm doing wrong? Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 13:25:14 2003 Subject: RE: [sqr-users] Inconsistent Data Types Date: Thu, 31 Jul 2003 13:24:25 -0500 From: "Chrisman, Dan:" The data type is Date and I have solved the problem by using where to_char(Cal_Date, 'yyyymmdd') <= to_char(to_date($Pay_End_Dt),'yyyymmdd') instead. This works quite well. -----Original Message----- From: Ven Garlapati [mailto:VXG@creditacceptance.com] Sent: Thursday, July 31, 2003 1:11 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Inconsistent Data Types Hi Dan: Couple of questions: what is the data type of call_date (I know you mentioned it as DATA field?) and how is the data there (format)? if call_date is in the 'DD-MON-YY' format (with no minutes and seconds stored, then you do not need to use trunc function. Thanks, Ven Garlapati vxg@creditacceptance.com -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Thursday, July 31, 2003 11:35 AM To: sqr-users@sqrug.org Subject: [sqr-users] Inconsistent Data Types I get the following error when I test my program code. SQR 5528 ORACLE OEXEC error -932 in cursor 1: ORA-00932: inconsistent datatypes error on Line 344: (SQR 3735) could not execute SQL. I am trying to execute the following code ! Lock the current pay period begin-SQL update TK_Calendar set Cal_Payroll_Code = {LOCKED} where trunc(Cal_Date) <= trunc($Pay_End_Dt) AND Cal_Payroll_Code = {OPEN} end-SQL where Cal_Date is a Data field in the Table and Cal_Payroll_Code is CHAR (1) field. $Pay_end_Dt is keyed in on an input statement as the date dd-mmm-yy. As I understand it $ can mean either a Date or character field. Could someone tell me what I'm doing wrong? Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 15:00:25 2003 Date: Thu, 31 Jul 2003 15:58:21 -0400 From: "White, Denise" Subject: [sqr-users] RE: Inconsistent Data Types To set the record straight, since there were several responses that you can't use trunc() on dates, the Oracle function trunc() can be used with a datetime field, in which case it will strip off the time part of the value (you can probably use it on a date as well, but there would be no difference). This can be very useful when comparing such fields. For example, if you are looking for dates <= 2/1/2003, and the field is datetime, this comparison will not pick up dates on 2/1/2003 itself, unless the time portion is missing or all zeroes. If you use trunc(), it will pick up all dates on 2/1/2003, regardless of the time. Using trunc() like this does not require a second argument (I assume it defaults to 0). If Cal_Date is a datetime field, you may well want to use trunc() on it to compare it against the straight date you are inputting. However, I don't think you want to use it on $Pay_End_Dt. You are correct that a variable beginning with $ can be character or date, but SQR will not actually treat it as a date unless you first declare the variable to be one (look in reference for DECLARE-VARIABLE). I find that using date variables in such comparisons is not completely reliable (in some versions of SQR, for example, the system will consider the last day of a month and the first day of the next month as equal, so you will get unpredictable results). Since you are presumably entering the date in the format recognized by the database, you might get away with using it as a string. You could test this in your query tool. I find the most consistently reliable way of handling an input date in a WHERE clause is to treat it as a string (don't declare it as a date) and use the TO_DATE() function on it. I have never had ANY problem doing it like that. I would suggest the following: where trunc(Cal_Date) <= to_date($Pay_End_Dt,'dd-mon-yy') HTH, Denise M. White Sr. Software Engineer Vicor --__--__-- Message: 8 Subject: RE: [sqr-users] Inconsistent Data Types Date: Thu, 31 Jul 2003 10:53:07 -0500 From: "Bob Helm" To: Reply-To: sqr-users@sqrug.org I think the problem is here: trunc($Pay_End_Dt) trunc is a numerical operator but you are passing it a sting or date variable. Also, you may need a second argument in the trunc call, something like this: trunc(#number, #trunc_position) Not sure if you really need trunc or something else, maybe a dateadd??? -----Original Message----- From: Chrisman, Dan: [mailto:Daniel.E.Chrisman@conocophillips.com] Sent: Thursday, July 31, 2003 10:35 AM To: sqr-users@sqrug.org Subject: [sqr-users] Inconsistent Data Types I get the following error when I test my program code. SQR 5528 ORACLE OEXEC error -932 in cursor 1: ORA-00932: inconsistent datatypes error on Line 344: (SQR 3735) could not execute SQL. I am trying to execute the following code ! Lock the current pay period begin-SQL update TK_Calendar set Cal_Payroll_Code = {LOCKED} where trunc(Cal_Date) <= trunc($Pay_End_Dt) AND Cal_Payroll_Code = {OPEN} end-SQL where Cal_Date is a Data field in the Table and Cal_Payroll_Code is CHAR (1) field. $Pay_end_Dt is keyed in on an input statement as the date dd-mmm-yy. As I understand it $ can mean either a Date or character field. Could someone tell me what I'm doing wrong? Daniel E. Chrisman Senior Analyst Ponca City Refinery ETN 442.5654 DDE 580.767.5654 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 15:02:33 2003 Date: Thu, 31 Jul 2003 15:49:07 -0400 From: Jae Lee Subject: [sqr-users] Suppress TwoDigitYearWarningMsg hi, all, we have SQR server 6.2 running on our Sun Solaris(UNIX). i have put in OutputTwoDigitYearWarningMsg=FALSE in the section marked [locale:US-English] in SQR.ini file on it, to suppress the 2-digit year warning message. but even after we put this in, it still generates this message in our logs, which make them big files. does anyone know why this is still going on? it's depleting space on the machine fast. i also have person SQR server 6.2 running on my windows xp machine. i did exact same thing to the sqr.ini file on windows machine, and i don't get this message. what's the difference? help would be greatly appreciated! -- jae, appalachian state university, in nc mountains _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-admin@sqrug.org Thu Jul 31 15:15:21 2003 From: "Lynds,Rick" Subject: RE: [sqr-users] RE: Inconsistent Data Types Date: Thu, 31 Jul 2003 13:13:34 -0700 Well written and much better than my suggestion - this is why this forum is so good. Thank you Denise! Rick -----Original Message----- From: White, Denise [mailto:DEWhite@vicr.com] Sent: Thursday, July 31, 2003 12:58 PM To: SQR Users Group (E-mail) Subject: [sqr-users] RE: Inconsistent Data Types To set the record straight, since there were several responses that you can't use trunc() on dates, the Oracle function trunc() can be used with a datetime field, in which case it will strip off the time part of the value (you can probably use it on a date as well, but there would be no difference). This can be very useful when comparing such fields. For example, if you are looking for dates <= 2/1/2003, and the field is datetime, this comparison will not pick up dates on 2/1/2003 itself, unless the time portion is missing or all zeroes. If you use trunc(), it will pick up all dates on 2/1/2003, regardless of the time. Using trunc() like this does not require a second argument (I assume it defaults to 0). If Cal_Date is a datetime field, you may well want to use trunc() on it to compare it against the straight date you are inputting. However, I don't think you want to use it on $Pay_End_Dt. You