[U2] UniData Hash File Viewer
Before I go and reinvent the wheel, I was wondering if anyone has already created a program that will display the technical data within an UniData hash file? I'm talking Header information, being able to jump to any group, look at the keys in the group, look at the data in the group, see the overflow pointers, etc. I checked the Wiki but didn't see anything like this. I have written a cool program like this that just allows one to traverse an OS file, but isn't hash file smart. Before I go and modify it I thought I'd ask the list first. David A. Green (480) 201-7953 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Multi-threaded phantom processing
Yes of course there are many solutions: rcp, ftp, nfa, http, mapped drives, etc. But the one that has the most security is the socket to socket communications with your own protocol. You get to control who has access and what commands they have access to. And of course you get to add logging as you need. Plus it runs native from U2 so that you can do command like compile, or move just a single attribute or sub-value. My customer needed a tool to keep the developers out of the live data server. By disabling the normal data transfer methods and installing a socket-to-socket approach we made the auditors very happy. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls Sent: Wednesday, March 05, 2014 5:57 PM To: U2 Users List Cc: U2 Users List Subject: Re: [U2] Multi-threaded phantom processing As elegant as some of these ideas are, it might be possible, depending on the number and nature of the transactions, to batch them up every n seconds and use rcp to copy them to an in box on the remote machine. -Rick On Mar 5, 2014, at 4:19 PM, Horacio Pellegrino pellegrin...@gmail.com wrote: Why don't you have one port listening for requests, and as soon as they come in, you create a new phantom to answer that request ( liberating the listener immediately for the next request ), then when the phantom finishes it could log off. Might be you want to keep a pool of phantoms alive for a while, on the assumption they might be reused. That way you are sill using one license per request, but you have the benefit of pooling... You can always set min-max limit for those phantom-workers. Horacio Pellegrino On Tue, Mar 4, 2014 at 11:30 PM, Peter Cheney peter.che...@firstmac.com.auwrote: Thanks David. As they say Bigger than Ben-Hur! That's a great idea. The server I have is listening on a predetermined port. I trolled through /etc/services and a netstat on the remote host to select something that looked unused. So then if it the main phantom spawns 1-n children (presumably more phantoms?), it would also need to select 1-n ports which I suppose must also be predetermined? Or is there a call to the OS that can return an unused port? We're on AIX but the remote host is HPUX. Cheers Peter Peter Cheney Ultracs Developer t 07 3017 8837 | f 07 3002 8400 e peter.che...@firstmac.com.au w firstmac.com.au -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto: u2-users-boun...@listserver.u2ug.org] On Behalf Of David A. Green Sent: Wednesday, 5 March 2014 13:01 To: 'U2 Users List' Subject: Re: [U2] Multi-threaded phantom processing Peter, first of all let me congratulate you on this achievement. Having just finished a similar feat using UniData I understand the complexities that went into it. The system I'm current working with will be relatively low traffic. But I was pondering on the method of having a server socket that would just spawn a transfer server socket and send the socket address to the calling client. Then the client disconnects from the main server and just uses the transfer server to complete the task. Having 10 open phantoms with sockets will use up 10 licenses. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto: u2-users-boun...@listserver.u2ug.org] On Behalf Of Peter Cheney Sent: Tuesday, March 04, 2014 6:18 PM To: U2 Users List (u2-users@listserver.u2ug.org) Subject: [U2] Multi-threaded phantom processing Hi Everyone, A project that I'm currently working on requires transmission of transactional and ancillary data from one UV site to site to another. I have the communications all set up and it is working very well via the UV socket functions with a client at one end and a server at the other. Both the client and the server both run as a UV phantom processes written in UV basic and the data being transferred (also encrypted) is more or less real time with various UV file triggers on the client end creating queue items for transmission based on the data content / transaction type. This set up is a single threaded affair and I am wondering how it will cope and what options I'll have as the volume of data increases. Multi-threading my server process to dish out some of the load might be one possibility and I've seen examples in the past where the last digit of a numeric key (i.e. 0-9) is used to determine which one of 10 phantoms to call thus providing an effective distribution of the work. But even then, reading/writing processing data to a file for each child process seems to me to be the only way to achieve parent - child phantom communications at either end. Is there another way perhaps? It may be that I will need 2 sets of phantoms
Re: [U2] Multi-threaded phantom processing
Will you kinda lost me on this approach. Since the Server socket is on a different machine than the client they don't see each other's locks. Different clients might be on different servers too. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Wednesday, March 05, 2014 5:26 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Multi-threaded phantom processing Peter is the only point of the parent child communications to address points like 1 I'm busy go away; OR 2 I'm available to work If so, you could simply use a lock-semaphore to address both of those issues.\ -Original Message- From: Horacio Pellegrino pellegrin...@gmail.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Wed, Mar 5, 2014 4:19 pm Subject: Re: [U2] Multi-threaded phantom processing Why don't you have one port listening for requests, and as soon as they come in, you create a new phantom to answer that request ( liberating the listener immediately for the next request ), then when the phantom finishes it could log off. Might be you want to keep a pool of phantoms alive for a while, on the assumption they might be reused. That way you are sill using one license per request, but you have the benefit of pooling... You can always set min-max limit for those phantom-workers. Horacio Pellegrino On Tue, Mar 4, 2014 at 11:30 PM, Peter Cheney peter.che...@firstmac.com.auwrote: Thanks David. As they say Bigger than Ben-Hur! That's a great idea. The server I have is listening on a predetermined port. I trolled through /etc/services and a netstat on the remote host to select something that looked unused. So then if it the main phantom spawns 1-n children (presumably more phantoms?), it would also need to select 1-n ports which I suppose must also be predetermined? Or is there a call to the OS that can return an unused port? We're on AIX but the remote host is HPUX. Cheers Peter Peter Cheney Ultracs Developer t 07 3017 8837 | f 07 3002 8400 e peter.che...@firstmac.com.au w firstmac.com.au -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto: u2-users-boun...@listserver.u2ug.org] On Behalf Of David A. Green Sent: Wednesday, 5 March 2014 13:01 To: 'U2 Users List' Subject: Re: [U2] Multi-threaded phantom processing Peter, first of all let me congratulate you on this achievement. Having just finished a similar feat using UniData I understand the complexities that went into it. The system I'm current working with will be relatively low traffic. But I was pondering on the method of having a server socket that would just spawn a transfer server socket and send the socket address to the calling client. Then the client disconnects from the main server and just uses the transfer server to complete the task. Having 10 open phantoms with sockets will use up 10 licenses. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto: u2-users-boun...@listserver.u2ug.org] On Behalf Of Peter Cheney Sent: Tuesday, March 04, 2014 6:18 PM To: U2 Users List (u2-users@listserver.u2ug.org) Subject: [U2] Multi-threaded phantom processing Hi Everyone, A project that I'm currently working on requires transmission of transactional and ancillary data from one UV site to site to another. I have the communications all set up and it is working very well via the UV socket functions with a client at one end and a server at the other. Both the client and the server both run as a UV phantom processes written in UV basic and the data being transferred (also encrypted) is more or less real time with various UV file triggers on the client end creating queue items for transmission based on the data content / transaction type. This set up is a single threaded affair and I am wondering how it will cope and what options I'll have as the volume of data increases. Multi-threading my server process to dish out some of the load might be one possibility and I've seen examples in the past where the last digit of a numeric key (i.e. 0-9) is used to determine which one of 10 phantoms to call thus providing an effective distribution of the work. But even then, reading/writing processing data to a file for each child process seems to me to be the only way to achieve parent - child phantom communications at either end. Is there another way perhaps? It may be that I will need 2 sets of phantoms, 1 for the transactions and one for the ancillary data. Although we run UV on AIX the only other requirement is that I must be able to do it within UV Basic. Does anyone out there on the list know of a better way or any alternatives/advice so I can get a better appreciation of what else might be possible please? Many thanks in advance, Peter
Re: [U2] Multi-threaded phantom processing
I don't know how you would query the OS on the fly, but you can do a manual search for a bank of 10 or 20 unused ports and claim them. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Peter Cheney Sent: Tuesday, March 04, 2014 9:30 PM To: 'U2 Users List' Subject: Re: [U2] Multi-threaded phantom processing Thanks David. As they say Bigger than Ben-Hur! That's a great idea. The server I have is listening on a predetermined port. I trolled through /etc/services and a netstat on the remote host to select something that looked unused. So then if it the main phantom spawns 1-n children (presumably more phantoms?), it would also need to select 1-n ports which I suppose must also be predetermined? Or is there a call to the OS that can return an unused port? We're on AIX but the remote host is HPUX. Cheers Peter Peter Cheney Ultracs Developer t 07 3017 8837 | f 07 3002 8400 e peter.che...@firstmac.com.au w firstmac.com.au ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Multi-threaded phantom processing
Peter, first of all let me congratulate you on this achievement. Having just finished a similar feat using UniData I understand the complexities that went into it. The system I'm current working with will be relatively low traffic. But I was pondering on the method of having a server socket that would just spawn a transfer server socket and send the socket address to the calling client. Then the client disconnects from the main server and just uses the transfer server to complete the task. Having 10 open phantoms with sockets will use up 10 licenses. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Peter Cheney Sent: Tuesday, March 04, 2014 6:18 PM To: U2 Users List (u2-users@listserver.u2ug.org) Subject: [U2] Multi-threaded phantom processing Hi Everyone, A project that I’m currently working on requires transmission of transactional and ancillary data from one UV site to site to another. I have the communications all set up and it is working very well via the UV socket functions with a client at one end and a server at the other. Both the client and the server both run as a UV phantom processes written in UV basic and the data being transferred (also encrypted) is more or less real time with various UV file triggers on the client end creating queue items for transmission based on the data content / transaction type. This set up is a single threaded affair and I am wondering how it will cope and what options I’ll have as the volume of data increases. Multi-threading my server process to dish out some of the load might be one possibility and I’ve seen examples in the past where the last digit of a numeric key (i.e. 0-9) is used to determine which one of 10 phantoms to call thus providing an effective distribution of the work. But even then, reading/writing processing data to a file for each child process seems to me to be the only way to achieve parent - child phantom communications at either end. Is there another way perhaps? It may be that I will need 2 sets of phantoms, 1 for the transactions and one for the ancillary data. Although we run UV on AIX the only other requirement is that I must be able to do it within UV Basic. Does anyone out there on the list know of a better way or any alternatives/advice so I can get a better appreciation of what else might be possible please? Many thanks in advance, Peter Peter Cheney Ultracs Developer t 07 3017 8837 | f 07 3002 8400 e peter.che...@firstmac.com.au w firstmac.com.au --- Note: This email (inc all attachments) is for the use of the intended recipient(s) only. Privileged or confidential information may be contained in this communication. If you have received this email in error, please notify the sender immediately and then delete all copies of this message from your computer network. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this email without the author's prior permission. If you are the intended recipient and you do not wish to receive similar electronic messages from us in future, then please respond to the sender to this effect. We have taken precautions to minimise the risk of transmitting software viruses, but advise you to carry out your own virus checks on this email and its attachments. We do not accept liability for any loss or damage caused by software viruses and do not represent that this transmission is free from viruses or other defects. Firstmac Limited (ABN 59 094 145 963) (AFSL 290600) --- ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Left Outer Join Question
Remove the TO 3 on the MERGE command. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of randyleesmith Sent: Monday, March 03, 2014 3:37 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Left Outer Join Question I must be doing something wrong. When I try this I get; SELECT FILE1 TO 1 SELECT FILE2 TO 2 MERGE.LIST 1 INTERSECT 2 TO 3 SELECT list 1 is not active. - I used to be an Optimist until I knocked over the glass. -- View this message in context: http://u2-universe-unidata.1073795.n5.nabble.com/Left-Outer-Join-Question-tp 42740p42762.html Sent from the U2 - Users mailing list archive at Nabble.com. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [UD] Who's locking a record
Can you get what you need using GETREADU? David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett Sent: Tuesday, January 28, 2014 1:18 PM To: U2 Mail List Subject: [U2] [UD] Who's locking a record In UniData, if you do a READU you can find out the User ID who has the record locked by using the STATUS() function; this returns the 'UID' value. Here's a list of users: 3 Dev (0)- lu Licensed(UDT+CP)/Effective Udt Sql iPhtm Pooled Total ( 24 + 1 ) / 25 1 0 0 0 1 UDTNO USRNBR UID USRNAME USRTYPE TTYIP-ADDRESS TIME DATE 1 2488 197612 AsiAdmin phantom pts/1 Console 10:42:32 Jan 15 2014 2 3920 197610 JohnSmith udt pts/2 192.168.1.52 08:15:33 Jan 28 2014 3180 197608 udcsuser udcspts/3 udcs 09:22:57 Jan 28 2014 4 3840 197608 udcsuser udcspts/4 udcs 09:23:08 Jan 28 2014 Now, if John Smith goes to read and lock a record that is locked by port#3, how can I figure out which port# actually has the record locked, since the UniData GETUSER() function only returns the UID, and that user, because it is a UniObjects user, is connected on more than one port#? I have a file managed at login that keeps track of the PORT#s and the associated users assigned by our application. I want our logging to report that a record lock by user so-and-so on port {n} is already in place. Thanks. Bill ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Regarding: LISTING SUB-VALUES
Shan is CUSTOMER.PHONE.NUMBER an associated MV? If you have an association with a field like CUSTOMER.PHONE.TYPE and you want just the FAX numbers then you can use the WITH keyword in your query like: :LIST CUSTOMER CUSTOMER.NAME WHEN CUSTOMER.PHONE.TYPE EQ FAX CUSTOMER.PHONE.NUMBER David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Shanmukh Nandha Sent: Thursday, December 26, 2013 11:26 PM To: U2-Users@listserver.u2ug.org Subject: [U2] Regarding: LISTING SUB-VALUES Hi Everyone, Always a pleasure to read the useful advice and varying personalities on this list. Generally we are using SB+ account. There will be many multi-value field available in files, How to list specific Multi values of a field in specific file . For example:- CUSTOMER FILE contains fields like 1. CUSTOMER.NAME http://customer.name/ (single value) 2. CUSTOMER.SALARY (single value) 3.CUSTOMER.PHONE.NUMBER (multi value) 1. JOHN (Cust name with single value) 2. 70$/hr (Cust salary with single value) 3. 123454ý 655656ý 767787ý 87887 (Cust Ph No with Multi value) General to list specific field we use LIST CUSTOMER F3. How to list 3rd position of 3rd field of CUSTOMER file. Could any one of you can please let me know Thank you, Shan ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] BASIC code - upper, lower, CamelCase, what say you?
For me I work a lot with javascript, html, and css. So having my UniBasic in all caps is something I'm use to and it sticks out from the other programming languages that I must use to create. I've had a UniBasic line of code that generated a javascript line that did a writeln of an HTML line that contained CSS code in. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bobby Worley Sent: Friday, December 20, 2013 12:02 PM To: U2 Users List Subject: [U2] BASIC code - upper, lower, CamelCase, what say you? First off - Merry Christmas and Happy New Year to all. I'm starting to write a lot of new BASIC (Universe 11.1) subroutines for our DesignBais application, and since I'll be starting with a blank code template instead of modifying existing code, and I thought 'hey why not join the 21st century' and make the code look more mainstream, and readable. (falling back on our last TEXMUG presentation by Clif Oliver on refactoring). And considering Universe 11.2 now supports local subroutines and functions, I should make the code look and behave more object-like. Does anyone know of a set of rules or guidelines on how to do this?Just experimenting briefly, Universe BASIC compiler will allow any mix of cases for keywords, but variables are case sensitive. Example: ED BP TEST ABC=1 Abc=2 abc=3 PRINT ABC Print Abc pRiNt abc stop end RUN TEST 1 2 3 So, how are developers mixed case in their code these day? Do keywords, local variables, common variable, equates follow a standard method? thanks in advance, ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Unidata index/query ?
Jeffrey, And index is a B(Binary)+ tree, the plus means that it auto adjusts and balances itself as it builds or shrinks. After UniData 5.2 UniQuery will use as many indices as it can. In your case it is the equivalent of doing two UniQuery selects to two different lists and then doing a MERGE.LIST. If you are always wanting a combined index lookup on those two values you can create an I-Descriptor that combines them and index the I-Descriptor. Then use the I-Descriptor in your select statements. Remember using an Index doesn't always mean faster selects. If your index brings back a lot of records then you are processing them by index pointer and the disk reads will be all over the file. Whereas without the index you are reading the file going through it by groups and it will minimize the disk reads. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of jeffrey Butera Sent: Friday, December 06, 2013 8:09 AM To: U2 Users List Subject: [U2] Unidata index/query ? Unidata 7.3.3 on RedHat: I have a table with numerous indicies built: File.. H08.CR.COURSE.EVALS Alternate key length.. 20 Node/Block size... 4K OV blocks. 1 (0 in use, 0 overflowed) Indices... 6 (6 D-type) Index updates. Enabled, No updates pending Index-Name.. F-type K-type Built Empties Dups In-DICT S/M F-no/VF-expr XCCE.STUDENT.ID D NumYes Yes Yes Yes S 8 XCCE.STATUS D TxtYes No Yes Yes S 17 XCCE.COURSE.NAME D TxtYes No Yes Yes S 14 XCCE.TERM D TxtYes No Yes Yes S 12 XCCE.TYPE D TxtYes No Yes Yes S 22 XCCE.SUBJECT D TxtYes No Yes Yes S 23 Since these are data fields (nothing computed on-the-fly) and indexed, queries should be fast.The table has approximately 737,000 records. This query runs in under 1 second: SELECT H08.CR.COURSE.EVALS WITH XCCE.TERM EQ '2013F' However this query takes 10+ seconds (or longer) - even with two indexed fields: SELECT H08.CR.COURSE.EVALS WITH XCCE.TERM EQ '2013F' AND XCCE.TYPE EQ 'FINCRSE' I'm at a loss to explain the second, any insight appreciated. -- Jeffrey Butera, PhD Associate Director for Application and Web Services Information Technology Hampshire College 413-559-5556 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Unidata index/query ?
Yes, Doug if an index is properly done it will make a huge difference. But there are times when using an index can be slower. And this is the point I'm making. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Averch Sent: Friday, December 06, 2013 9:13 AM To: U2 Users List Subject: Re: [U2] Unidata index/query ? Hi David: In Unidata indexes DO mean faster selects. I have file with millions of records with about 14 indexes and most every select on the index comes back in under a second. Our disks are 90,000 IO's per second with a 16GB main memory, without indexes to select and read through that data takes 5 to 10 minutes minimum. I have an open ticket with Rocket Software about indexes failing after 7.3.2. I had a similar problem and reduced my version from 7.3.4 to 7.3.2. Regards, Doug www.u2logic.com XLr8Tools for Universe and Unidata programmers On Fri, Dec 6, 2013 at 9:00 AM, David A. Green dgr...@dagconsulting.com wrote: Jeffrey, And index is a B(Binary)+ tree, the plus means that it auto adjusts and balances itself as it builds or shrinks. After UniData 5.2 UniQuery will use as many indices as it can. In your case it is the equivalent of doing two UniQuery selects to two different lists and then doing a MERGE.LIST. If you are always wanting a combined index lookup on those two values you can create an I-Descriptor that combines them and index the I-Descriptor. Then use the I-Descriptor in your select statements. Remember using an Index doesn't always mean faster selects. If your index brings back a lot of records then you are processing them by index pointer and the disk reads will be all over the file. Whereas without the index you are reading the file going through it by groups and it will minimize the disk reads. David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of jeffrey Butera Sent: Friday, December 06, 2013 8:09 AM To: U2 Users List Subject: [U2] Unidata index/query ? Unidata 7.3.3 on RedHat: I have a table with numerous indicies built: File.. H08.CR.COURSE.EVALS Alternate key length.. 20 Node/Block size... 4K OV blocks. 1 (0 in use, 0 overflowed) Indices... 6 (6 D-type) Index updates. Enabled, No updates pending Index-Name.. F-type K-type Built Empties Dups In-DICT S/M F-no/VF-expr XCCE.STUDENT.ID D NumYes Yes Yes Yes S 8 XCCE.STATUS D TxtYes No Yes Yes S 17 XCCE.COURSE.NAME D TxtYes No Yes Yes S 14 XCCE.TERM D TxtYes No Yes Yes S 12 XCCE.TYPE D TxtYes No Yes Yes S 22 XCCE.SUBJECT D TxtYes No Yes Yes S 23 Since these are data fields (nothing computed on-the-fly) and indexed, queries should be fast.The table has approximately 737,000 records. This query runs in under 1 second: SELECT H08.CR.COURSE.EVALS WITH XCCE.TERM EQ '2013F' However this query takes 10+ seconds (or longer) - even with two indexed fields: SELECT H08.CR.COURSE.EVALS WITH XCCE.TERM EQ '2013F' AND XCCE.TYPE EQ 'FINCRSE' I'm at a loss to explain the second, any insight appreciated. -- Jeffrey Butera, PhD Associate Director for Application and Web Services Information Technology Hampshire College 413-559-5556 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Working with accented characters
Bob, I have never been satisfied with MCT so I wrote my own, feel free to use what you will and add your accented characters logic to it. SUBROUTINE DAG.MCT(OUT.DATA, IN.DATA) * MCT - Masked Character Title * A better option than using UniBasic's MCT Conversion Code * by David A. Green -- 5/20/02 -- www.dagconsulting.com * GOSUB INIT BEGIN CASE CASE IN.DATA = UPCASE(IN.DATA) ; GOSUB DO.MCT CASE IN.DATA = DOWNCASE(IN.DATA) ; GOSUB DO.MCT CASE 1 ; OUT.DATA = IN.DATA END CASE * RETURN ! INIT: WORD.EXCEPTIONS= WORD.EXCEPTIONS1, -1 = BY WORD.EXCEPTIONS1, -1 = IN WORD.EXCEPTIONS1, -1 = OF WORD.EXCEPTIONS1, -1 = AND WORD.EXCEPTIONS1, -1 = ON WORD.EXCEPTIONS1, -1 = THE * WORD.BOUNDRYS = WORD.BOUNDRYS := WORD.BOUNDRYS := - WORD.BOUNDRYS := . WORD.BOUNDRYS := _ WORD.BOUNDRYS := WORD.BOUNDRYS := / WORD.BOUNDRYS := ( WORD.BOUNDRYS := ) WORD.BOUNDRYS := @AM WORD.BOUNDRYS := @VM WORD.BOUNDRYS := @SM WORD.BOUNDRYS := @TM * OUT.DATA = RETURN ! DO.MCT: DATA.LEN = LEN(IN.DATA) THIS.WORD = FOR DATA.PTR = 1 TO DATA.LEN DATA.CHAR = IN.DATA[DATA.PTR, 1] BEGIN CASE CASE INDEX(WORD.BOUNDRYS, DATA.CHAR, 1) ; GOSUB DO.THIS.WORD CASE 1 ; THIS.WORD := DATA.CHAR END CASE NEXT DATA.PTR DATA.CHAR = GOSUB DO.THIS.WORD RETURN ! DO.THIS.WORD: IF THIS.WORD THEN BEGIN CASE CASE THIS.WORD[1, 3] = MCC ; THIS.WORD = OCONV(THIS.WORD[1,2], MCT):OCONV(THIS.WORD[3,], MCT) CASE OUT.DATA = ; THIS.WORD = OCONV(THIS.WORD, MCT) CASE THIS.WORD MATCHES WORD.EXCEPTIONS ; THIS.WORD = OCONV(THIS.WORD, MCL) ;* Lower Case CASE 1 ; THIS.WORD = OCONV(THIS.WORD, MCT) ;* Title Case END CASE OUT.DATA := THIS.WORD:DATA.CHAR THIS.WORD = END ELSE OUT.DATA := DATA.CHAR END RETURN ! END David A. Green (480) 201-7953 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bob Little Sent: Monday, November 25, 2013 1:10 PM To: U2 Users List [u2-users@listserver.u2ug.org] Subject: [U2] Working with accented characters To convert the first character of a regular ASCII string to uppercase, I'd use OCONV(STRING,'MCT') so that STRING is output as String. However, this doesn't seem to work for Spanish accented characters. The machine is UV 11.1.11 with NLS enabled. What is the most elegant way to convert a name, such as JOSÉ to José ? I'm not a sys admin, so if it requires setting up an NLS map or something along those lines, I'm probably out of luck. bob little applications architect independent contractor market america, inc. 1302 pleasant ridge rd. greensboro, nc 27409 Phone: 336-698-4367 Cell: 248-675-5515 Skype: boblittle904 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [OT] Interview Questions
Why not let HR handle the personality questions and background checks, that's what they do. That leaves you to concentrate on their technical abilities. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Susan Joslyn Sent: Tuesday, October 08, 2013 12:54 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] [OT] Interview Questions Kevin, Not that I have any real experience - at least not for what seems like a lifetime - with hiring. But my instinct might be to let the applicant tell me whatever they want. You know, just an open ended Tell me what you would like me to know about your skills, your ambitions and your work ethic. Probably that's an approach you've already tried. Susan -Original Message- From: mailto:u2-users-boun...@listserver.u2ug.org u2-users-boun...@listserver.u2ug.org [ mailto:u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Leverett, Brendon Sent: Tuesday, 8 October 2013 1:40 PM To: U2 Users List Subject: Re: [U2] [OT] Interview Questions Interviewer: What is one of your weak points? Applicant: My honesty. Interviewer: I would have thought that was a strong point. Applicant: I don't give a %^* what you think you stupid ^^%$ ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] What is the equivalent to UNNEST in Universe
Does UniVerse have ASD( ... ) keyword? That's what you would use in UniData. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Halid Sent: Tuesday, August 20, 2013 4:39 PM To: U2-Users@listserver.u2ug.org Subject: [U2] What is the equivalent to UNNEST in Universe Hi All, How do you perform a LIST or SELECT in Universe which will unnest or explode its Associated Multi Value Data before the query. For example. If I have a file called CUSTOMERS which has an association ORDERS. The DICT on CUSTOMERS have the following. A single value attribute called CUSTOMER.NAME. And then a set of a multi value attributes below. ORDER.DATE PRODUCT.KEY AMOUNT How to I perform a query to get all the records that have an ORDER.DATE 20/08/2013 and PRODUCT.KEY = ABC and AMOUNT = 100 when comparing against the same multi value position. I know I can use a Universe SQL query below with the UNNEST keyword to get the data. SELECT CUSTOMER.NAME, ORDER.DATE, PRODUCT.KEY, AMOUNT FROM UNNEST ON ORDERS WHERE ORDER.DATE '20/08/2013' AND PRODUCT.KEY = 'ABC' AND AMOUNT = '100'; How would you achieve the same result using a standard Universe LIST or SELECT command. Not a Universe SQL command. Regards Adrian Halid ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] KeyPressed
Try a HUSH ON/OFF around your input. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman Sent: Friday, August 09, 2013 1:04 PM To: 'U2 Users List' Subject: [U2] KeyPressed With Dynamic Connect... and UniBasic... I need a screen that continuously displays time... as we have an inspection screen where press operators enter fresh data each hour. Something like... loop call *timeOfDay call *displayOtherStuff input thisKey, -1 until (thisKey = '1') sleep repeat gosub secondScreen The trouble with this thing is... when a key is pressed... it wants to display the key on asubsequent screen. I tried...inputclear... but it is not doing what I want. Suggestions would be appreciated. --Bill ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [UD] BASIC Code Failing
Intermittent data issues can be one of the hardest to debug. One way that has helped me out is to create a log file to log the transaction information, then verify the data and when it is incorrect, send off an email with the log file key to investigate. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of dale kelley Sent: Friday, July 26, 2013 9:32 AM To: U2 Users List Subject: Re: [U2] [UD] BASIC Code Failing Thanks Bob, I'll try that validation, maybe even write SUPREC and read it back for another validation. (It's a low intensity system.) At least that way I could be telling them rather than them telling me! dale ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
Here is what I use: SUBROUTINE RUNNING_TOTAL(CUR.TOT, AM.PTR, AMT, RESET.DATA) * RUNNING_TOTAL Keeps a Running Total for Reports * by David A. Green -- 9/12/01 * COMMON /RUNTOT/ RUNTOT.REC(10) * EQUATE RUNTOT.FLAG TO RUNTOT.REC(1) EQUATE RUNTOT.TOTS TO RUNTOT.REC(2) EQUATE RUNTOT.LAST TO RUNTOT.REC(3) * TEST.FLAG = @DATE:@TIME * IF TEST.FLAG # RUNTOT.FLAG THEN RUNTOT.FLAG = TEST.FLAG RUNTOT.TOTS = RUNTOT.LAST = END * IF RESET.DATA # RUNTOT.LASTAM.PTR THEN RUNTOT.LASTAM.PTR = RESET.DATA RUNTOT.TOTSAM.PTR = 0 END * RUNTOT.TOTSAM.PTR += AMT CUR.TOT = RUNTOT.TOTSAM.PTR * RETURN Your formula for the I-Descriptor is: SUBR(RUNNING_TOTAL, n, Dict_Name, Reset_Dict_Name) Where n is a unique number for the Query statement, so you can have more than one running total per query. Dict_Name is the Dictionary Name to use for Totalling. Reset_Dict_Name is the Dictionary Name for 'Zeroing out' the Totals when it changes values. If you don't wish to 'Zero out' the totals then use . Note: The reset option only works on presorted data! Technical: Running Total supports Multi-Values. For optimal performance use smaller unique numbers like 1, 2, etc. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Monday, July 01, 2013 5:36 PM To: u2-users@listserver.u2ug.org Subject: [U2] Running total Teach me again how to do a running total in a Access/Recall/English report. I haven't done one in years, but I seem to recall that it's possible. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] DEBUG in a Phantom issue
Has anyone seen a phantom process get stuck in a loop because of an embedded DEBUG statement? I would think the input at the ! prompt would have aborted the phantom, but it just kept going saying invalid input over and over and over. just about filled the disk. UniData 6.1 David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] UniData PreStore to change the KEY of a record?
I would take my saved list and copy it to a text editor then using copy commands and a quick macro convert the list into a bunch of COPY FROM FILE.A BAD.KEY, GOOD.KEY commands. Then save it as a PA and then execute it. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David Wolverton Sent: Tuesday, May 28, 2013 10:48 AM To: 'U2 Users List' Subject: [U2] UniData PreStore to change the KEY of a record? I am always using what I call 'PreStore' command... In the AE editor, I need to change Attb 2 from A]thisbad]C]D to be A]thisgood]C]D on a list of items... So I get the list, AE FILENAME and then... =FIX 2`R/thisbad/thisgood/`FI`=FIX Viola! The data is updated. I have a need to 'fix' a KEY to a record... Is there a way to use a PreStore command that could do that? It's 95 records. Too many to hand edit. Too few to write a program. A PreStore would be JUST RIGHT... if there was a way to do it! DW ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Selecting a special character in a SELECT (UV)
Try: ALT-160 Example: SELECT MY.FILE WITH @ID LIKE ...á... (By holding down the alt key and pressing 160 on the numeric keypad. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Thursday, May 16, 2013 6:41 AM To: U2 Users Subject: [U2] Selecting a special character in a SELECT (UV) Ok. I'm trying to find all the ID's in a file that contain the character ^160 I tried : SELECT filename WITH @ID LIKE ...^160... But that didn't work. Aside from writing a program to scan the file, is there a way from TCL? George ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [uv] Phantom question
Robert you can free yourself of these iphantoms for sendmail. I've written a program that talks to SMTP directly from UniBasic. You can do HTML, plain text, or both and you can do any kind of attachements. If you are a programmer you can do it yourself, here is what you'll need: * Knowledge of sockets * Knowledge of SMTP protocol * A subroutine to encode BASE64 David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Robert Frailey Sent: Wednesday, March 27, 2013 2:01 PM To: U2 Users List Subject: Re: [U2] [uv] Phantom question sendmail uses a phantom In each of my plant accounts we send sales-orders,invoices and statements via e-mail. the first person to loginto the account becomes the phantom user for sendmail. I have 4 active unidata accounts, so 4 phantoms. Dead uses can become phantoms if their session gets terminated unexpectantly. LP printers use phantoms to print to print servers - Original Message - From: Mark Eastwood ma...@afsi.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Wednesday, March 27, 2013 11:59 AM Subject: [U2] [uv] Phantom question I see several phantoms running with I do a PORT.STATUS Question is - is it possible to determine which Account they are running in? I have several accounts and not sure where they are actually running. They launch with the BRIEF option, so no output in PH TIA, Mark Uv 10.2 RH Linux ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] REDBACK Fatal UniBasic errors
Bill, thanks for the post, I will check this location for debugging purposes. But it doesn't help my issue of having Redback send back an error message that makes more sense when the UniBasic program aborts. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett Sent: Friday, March 22, 2013 3:56 PM To: U2 Users List Subject: Re: [U2] REDBACK Fatal UniBasic errors David: Have you turned on UniObjects error logging? If not, create the following item in the UDTHOME directory: serverdebug 001 udcs 10 E:\U2\ud\log\udcs\udcs.log My UDTHOME is located at E:\U2\ud so your path should replace mine from above. Also, I've created a udcs subdirectory under the UDTHOME log subdirectory. You can actually just name (and place) this log file whatever and wherever you like. After each UO connection there's a bunch of stuff in it that most often helps me. HTH, Bill Untitled Page - - - */Fav Icon Advantos Systems, Inc./* ☎ Tel: 760-944-5570 x7002 | ☏ Fax: 760-655-1583 The Property Management Advantage. - Original Message - *From:* dgr...@dagconsulting.com *To:* 'U2 Users List' u2-users@listserver.u2ug.org *Date:* 3/22/2013 1:43 PM *Subject:* [U2] REDBACK Fatal UniBasic errors I'm accessing UniData via .NET and Redback. But if there is a fatal UniBasic error, like trying to access an unopened file, I get the following: dagLink.DOAdoExecute - ADO Record Set Execute - Connection to Application Server lost Responder Error: (errno=32 The process cannot access the file because it is being used by another process.) Responder Error: (errno=32 The process cannot access the file because it is being used by another process.) Responder Error: Server Err: SpGetLen error, rc=-109 Output Log: none. Error Log: none. * It then goes on to tell me that we have a Responder Error. The rgw.log has this: 102340,RESP,spdr.c,1219,SpGetLen error, rc=-109 (ErrorCode=109 The pipe has been ended.) 102340,RESP,ntbackend.c,720,Resp1 killing pid=122680 102340,RESP,ntbackend.c,701,WriteFile (ErrorCode=232 The pipe is being closed.) 102340,RESP,ntbackend.c,769,Sent 0 stop failed. (ErrorCode=232 The pipe is being closed.) 102340,RESP,ntbackend.c,626,try SafeTerminateProcess (ErrorCode=232 The pipe is being closed.) 102340,RESP,ntbackend.c,630,Did not respond to SafeTerminateProcess: try TerminateProcess (gag) (ErrorCode=232 The pipe is being closed.) 102340,RESP,ntbackend.c,633,TerminateProcess (ErrorCode=5 Access is denied.) 102340,RESP,ntbackend.c,790,Resp1 kill of pid=0 complete, rc=1. 102340,SCHD,ntresp.c,368,2.child slot=6 thandle=-1 102340,SCHD,ntresp.c,370,child died aidx=3 102340,RESP,respcmn.c,428,Responder terminating now. Is there a way to capture a better error message? David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] REDBACK Fatal UniBasic errors
I'm accessing UniData via .NET and Redback. But if there is a fatal UniBasic error, like trying to access an unopened file, I get the following: dagLink.DOAdoExecute - ADO Record Set Execute - Connection to Application Server lost Responder Error: (errno=32 The process cannot access the file because it is being used by another process.) Responder Error: (errno=32 The process cannot access the file because it is being used by another process.) Responder Error: Server Err: SpGetLen error, rc=-109 Output Log: none. Error Log: none. * It then goes on to tell me that we have a Responder Error. The rgw.log has this: 102340,RESP,spdr.c,1219,SpGetLen error, rc=-109 (ErrorCode=109 The pipe has been ended.) 102340,RESP,ntbackend.c,720,Resp1 killing pid=122680 102340,RESP,ntbackend.c,701,WriteFile (ErrorCode=232 The pipe is being closed.) 102340,RESP,ntbackend.c,769,Sent 0 stop failed. (ErrorCode=232 The pipe is being closed.) 102340,RESP,ntbackend.c,626,try SafeTerminateProcess (ErrorCode=232 The pipe is being closed.) 102340,RESP,ntbackend.c,630,Did not respond to SafeTerminateProcess: try TerminateProcess (gag) (ErrorCode=232 The pipe is being closed.) 102340,RESP,ntbackend.c,633,TerminateProcess (ErrorCode=5 Access is denied.) 102340,RESP,ntbackend.c,790,Resp1 kill of pid=0 complete, rc=1. 102340,SCHD,ntresp.c,368,2.child slot=6 thandle=-1 102340,SCHD,ntresp.c,370,child died aidx=3 102340,RESP,respcmn.c,428,Responder terminating now. Is there a way to capture a better error message? David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] ISO Date Format
In UniData you can just use D-YMD. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Monday, March 11, 2013 6:57 AM To: U2-Users@listserver.u2ug.org Subject: [U2] ISO Date Format Has anyone come up with an OCONV string that will product an ISO standard date (-MM-DD)? After a vendor insisted on this last week I ended up creating a subroutine called by an I descriptor but it seems like there should be an easier way. A quick trip through the Universe Basic manual, my old Prime Info-Basic manual, and Pick Basic: A programmer's guide didn't shed any light. -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Unidata WHEN/ASSOCIATED
Jeff, This could be a good enhancement. How do you want it to work? 1. SELECT just the IDs or whatever the SAVING clause points to. Or 2. SELECT the IDs,MV pointers that match But until it goes through I'm sure someone has already written the code to do it in a UniBasic program. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeffrey Butera Sent: Friday, March 08, 2013 1:23 PM To: U2 Users List Subject: [U2] Unidata WHEN/ASSOCIATED Stupid question: is there a good reason why WHEN/ASSOCIATED can only be used with LIST and not SELECT? -- Jeffrey Butera, PhD Associate Director for Applications and Web Services Information Technology Hampshire College 413-559-5556 http://www.hampshire.edu http://www.facebook.com/hampshirecollegeit ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] I Descriptor no longer working in UniSQL after UD upgrade
Have your compiled your i-descriptor? Is it marked as MV? David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mecki Foerthmann Sent: Tuesday, March 05, 2013 5:42 AM To: U2 Users List Subject: [U2] I Descriptor no longer working in UniSQL after UD upgrade Hi we upgraded from UD 5.2/Solaris to UD 7.2/RH about a month ago and so it looked fine so far. Now I had a call that there are purchase orders missing on a Cognos report. When I investigated I noticed that from the day of the upgrade I have rows in the table used for that report with missing dates. The report is based on a SQL Server 2000 table that gets updated every night with Purchasing information from UD using DTS. We want to track supplier performance so I take a snapshot of the outstanding Purchase order deliveries every night and add them to this table. Each row also contains the date the snapshot was done. Some order line have multiple deliveries so I created a I-type dictionary item using REUSE(@DATE). This is mapped in the schema and was working just fine under 5.2 but now there is only a date for the first multivalue. I created a new subtable using the 7.2 VSG and the result is the same. The dictionary works just fine from ECL but in SQL only the first row has a date and all others are null. Any idea why this doesn't work anymore under UD 7.2? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] UV full screen editor
Is there a way to have BDT use a TCL command besides BASIC/CATALOG to do my compile and cataloging? David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen Sent: Monday, February 25, 2013 10:03 AM To: 'U2 Users List' Subject: Re: [U2] UV full screen editor On the UV clients CD in the eclipse based tools there is the Basic Development toolkit (BDT) this will probably give you most of what you want. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Nirvan Wijesekera Sent: 25 February 2013 14:04 To: u2-users@listserver.u2ug.org Subject: [U2] UV full screen editor Hello all, I'm new to this forum, so apologies if this topic has been brought up before. Can anyone recommend a decent full-screen editor for Universe? I require it for editing source code as well as modifying data files. Seems like most of them can do one or the other, but not both. We do not run System Builder, so is there anything else available? We are trying to move away from the native UV line editor. Many thanks. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] FW: Clearing Input Buffer
CLEARINPUT David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Friday, February 22, 2013 12:52 PM To: 'U2 Users List' Subject: Re: [U2] FW: Clearing Input Buffer How do I flush the buffer? What is the name or function I need? I can't put my finger on the right page in the Unidata manuals. Thanks. Al DeWitt -Original Message- From: Kevin King [mailto:ke...@precisonline.com] Sent: Friday, February 22, 2013 1:25 PM To: U2 Users List Subject: Re: [U2] FW: Clearing Input Buffer I would think flushing the input buffer in either location would be sufficient, assuming the problem is as you described. I've seen situations where there's something in the second field, for example, that is data stacking something new and the data stacking from the gun is conflicting with that. If you're confident that's not the case, flushing the input before that third field should suffice. On Fri, Feb 22, 2013 at 12:20 PM, Al DeWitt adew...@stylmark.com wrote: I have an input screen (built with System Builder) where data can either be entered manually or via a barcode scanner. The screen has 3 text boxes for input. The barcode option fills two of the text boxes and is supposed to land on the third box to await input. However, the scanner must be adding an extra return or something because when I scan it the third field's Process After executes. What can I do to flush the input buffer at the end of my validation routine on my second field...or is it better to do this on the Process Before on my third field. It's more of a nuisance but it would look more professional if I could make it clean. Thanks. Albert DeWitt, CPIM ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn pagination back on
BPIOCP David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, February 07, 2013 1:21 PM To: u2-users@listserver.u2ug.org Subject: [U2] Turn pagination back on Someone remind me, how to do this. If pagination has been turned off, and for my embedded routine, I want to turn it back on again. How do I do this? I've tried HEADING, and PAGE, and CRT @(0,0) I know there's a trick but I can't quite recall what it is ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Record locks (Unidata 7.2)
Jon, Everything is strait forward except the wait until logic. That can get very complex if you want to. RECORDLOCKED(file.var, rec.id.expr) - Returns record lock status, 0 if not locked. MATREADU or READU or RECORDLOCKU - Will lock a record.* MATWRITE or WRITE or RELEASE - Will unlock a record. *Note you can use GETUSERNAME(STATUS()) to see who has it locked. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jon Wells Sent: Wednesday, February 06, 2013 2:53 PM To: U2-Users@listserver.u2ug.org Subject: [U2] Record locks (Unidata 7.2) Hi all, I have not looked at the world of record locks since my R83 Pick days. I'm hoping to add the ability for the program I'm working on to: * Check if a record is locked * Wait until the lock is removed * Once the lock is removed, or if the record is not locked: * Lock the record * Perform the WRITE statement I'm hoping someone can share an example of how to accomplish this in UniBasic. Thank you, Jon Wells Campbell University ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [UD] SETPTR
Bill, sounds like a domain name network issue. How does a ping to UDGENERIC respond? Maybe you can add the IP address to your host file? David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett Sent: Friday, February 01, 2013 6:14 PM To: U2 Mail List Subject: [U2] [UD] SETPTR Does anyone know why UniData (v7.2.12) responds differently to the SETPTR command between two different machines? I created a local printer, which I share as UDGENERIC, that is a generic/text printer to a file. I did this on both machines. Machine 1 - Windows 2008 R2 fully updated - UniData 77 user Standard Edition. :version Module Name Version Licensed UniData RDBMS 7.2 Yes Connection Pooling... 7.2 No Device License... 7.2 No NFA.. 7.2 No RFS.. 7.2 No EDA.. 7.2 No 7212 :SETPTR 0,146,61,0,0,1,BRIEF,NOEJECT,NOHEAD,DEST UDGENERIC This command takes exactly 60 seconds to return to ECL. Machine 2 - Windows 2008 R2 fully updated - UniData 24 user Workgroup Edition. :version Module Name Version Licensed UniData RDBMS 7.2 Yes Connection Pooling... 7.2 Yes Device License... 7.2 Yes NFA.. 7.2 No RFS.. 7.2 No EDA.. 7.2 No 7212 :SETPTR 0,146,61,0,0,1,BRIEF,NOEJECT,NOHEAD,DEST UDGENERIC This command returns to ECL immediately. Both machines are Dell R210 rack-mount servers. I'm having the udt.errlog fill up with messages: Fri Feb 01 18:19:34 pid=2828 In E:\DataTrust\DTA\BP\BP\_RESET.STANDARDS at line 33 Fri Feb 01 18:19:34 pid=2828 errno=1801: The printer name is invalid. Fri Feb 01 18:19:56 pid=3696 pid=3696,uid=197875,udtno=2: ...which is caused by one of our subroutines, used everywhere in our application. This error occurs nowhere else where our application is installed, because I execute the above SETPTR command within the LOGIN process at login. I can't execute it on our 77 user machine because logging on will take over a minute! Any ideas? Thanks, Bill Haskett ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sleeping in Basic
In my latest phantom program I used the PAUSE/WAKE commands as one poster suggested. It was a little bit tricky but this is what I came up with: The driver program has this logic: ... UTP.ID = GETENV(UD_TELNET_PID) CMD = PHANTOM UPDATE.RECORD.PH :REC.KEY: :UTP.ID PRINT START: :TIMEDATE() PRINT CMD PERFORM CMD * PAUSE 60 PRINT FINISH: :TIMEDATE() ... While the Phantomed program has the following: PARAMS = FIELD(TRIM(@SENTENCE), , 2, ) REC.KEY = FIELD(PARAMS, , 1) UTP.ID = FIELD(PARAMS, , 2) PRINT Start UPDATE.REC.PH for :REC.KEY GOSUB UPDATE.REC PRINT Wake up process :UTP.ID WAKE UTP.ID David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Gregor Scott Sent: Wednesday, January 16, 2013 9:41 PM To: U2 Users List Subject: Re: [U2] Sleeping in Basic This might be a bit late, but just be careful about using openSocket() in a phantom. On UV (and I suspect on UD) this will change the phantom to an iPHANTOM because it will consume a license. If you have multiple phantoms running this concurrently you will start to see a licensing impact you were not expecting. Regards, Gregor -Original Message- ... Doug this works for me in UniData: SLEEP.TIME = 500 ;* .5 Second ERR = openSocket(loopback, 25, 1, SLEEP.TIME, hBUFF) David A. Green (480) 813-1725 DAG Consulting ... This email and any attachments to it are confidential. You must not use, disclose or act on the email if you are not the intended recipient. Liability limited by a scheme approved under Professional Standards Legislation. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sleeping in Basic
Try changing the port number to something that doesn't exist. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Farmer Sent: Friday, December 28, 2012 8:22 AM To: 'U2 Users List' Subject: Re: [U2] Sleeping in Basic Wow, thanks of all of the responses. Unfortunately, none of them will seem to work on UniData. I will be using NAP on UniVerse. PAUSE and WAKE, I had not heard of. This is only on UniData so not a UniVerse option. It would seem to be a good way to go, except for if the phantom process aborts, the WAKE is never executed and the invoking process (UniObjects subroutine) hangs forever. David's openSocket suggestion does not wait at all if the socket can be opened. If it cannot (for example host name is bad), the timeout is sometimes much longer, probably due to DNS lookup of the bad host name. I tried these examples in the code below. The results are show below the code. When I run this, using NAP 250, I get 4 times the same, then another 4 times the same etc. This seems to show NAP 250 does sleep for a quarter of a second. Doing NAP 1 for 2000 iterations took 31 seconds. Probably due to overhead of setting up NAP 2000 times. The openSocket came right back all the time. Any other ideas, I am open to testing. Again, thanks for all of the responses! Doug Farmer 952-417-5225 Program Listing 0001 PRINT 'Nap 250' 0002 FOR IDX = 1 TO 20 0003 PRINT IDX R#2:' ':OCONV(TIME(),'MTS') 0004 NAP 250 0005 NEXT IDX 0006 PRINT 'Start of 2000' 0007 PRINT OCONV(TIME(),'MTS') 0008 FOR IDX = 1 TO 2000 0009 NAP 1 0010 NEXT IDX 0011 PRINT OCONV(TIME(),'MTS') 0012 PRINT 'DONE WITH 2000' 0013 PRINT 'Open Socket' 0014 FOR IDX = 1 TO 20 0015 SleepTime = 250 0016 ERR = openSocket('loopback',25,1,SleepTime,HBUFF) 0017 PRINT IDX R#2:' ':OCONV(TIME(),'MTS') 0018 NEXT IDX Output from Program Nap 250 1 09:11:29 2 09:11:29 3 09:11:29 4 09:11:30 5 09:11:30 6 09:11:30 7 09:11:30 8 09:11:31 9 09:11:31 10 09:11:31 11 09:11:31 12 09:11:32 13 09:11:32 14 09:11:32 15 09:11:32 16 09:11:33 17 09:11:33 18 09:11:33 19 09:11:33 20 09:11:34 Start of 2000 09:11:34 09:12:05 DONE WITH 2000 Open Socket 1 09:12:05 2 09:12:05 3 09:12:05 4 09:12:05 5 09:12:05 6 09:12:05 7 09:12:05 8 09:12:05 9 09:12:05 10 09:12:05 11 09:12:05 12 09:12:05 13 09:12:05 14 09:12:05 15 09:12:05 16 09:12:05 17 09:12:05 18 09:12:05 19 09:12:05 20 09:12:05 This message has been scanned for malware by Websense. www.websense.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Sleeping in Basic
Doug this works for me in UniData: SLEEP.TIME = 500 ;* .5 Second ERR = openSocket(loopback, 25, 1, SLEEP.TIME, hBUFF) David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Farmer Sent: Thursday, December 27, 2012 3:47 PM To: 'U2 Users List' Subject: Re: [U2] Sleeping in Basic Thanks for this tip on NAP, The documentation does say it sleeps for milliseconds. I tried it and it works. RQM for UniData says it does the same as sleep. Well 1/2 of the problem solved! Still looking or a UniData answer. Doug Farmer 952-417-5225 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brian Whitehorn Sent: Thursday, December 27, 2012 4:12 PM To: U2 Users List Subject: Re: [U2] Sleeping in Basic If my memory serves correct, I believe on UniData it's RQM . -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Don Robinson Sent: Friday, 28 December 2012 9:07 AM To: U2 Users List Subject: Re: [U2] Sleeping in Basic Doug, If Universe, look at NAP, it does milliseconds. Can't remember what it is in Unidata, maybe SLEEPM? Don From: Doug Farmer dfar...@epicor.com To: 'U2 Users List' u2-users@listserver.u2ug.org Sent: Thursday, December 27, 2012 4:56 PM Subject: [U2] Sleeping in Basic Happy holidays all, I just want to make sure I did not miss something over the U2 releases. Since the Microdata Reality days, I have used SLEEP nn to sleep for nn seconds. Simple, usually does the trick. But in today's gotta have it now, I won't wait, environment, a second is sometimes way too long. Is there anything I missed over the last few years to sleep for less than a second? I am executing a phantom command from a UniObjects subroutine call and waiting for it to finish. I am using a phantom, just in case the program aborts or hangs. I am not in control of what code is being run, it could try to read or write to an unopened file for example. If the program does hang, I get the dreaded Error 30102 message (not helpful at all). In most cases, the program reads the data it needs and finishes in less than a second. The UniObjects subroutine then writes a flag I can pick up to see that the data is ready to return to the UniObjects client. I don't want the subroutine constantly looping and reading for the flag. This would take a lot of the CPU cycles. But, I don't want to wait up to a second to see that the phantom has completed. Any ideas would be helpful. This needs to run on both UniData and UniVerse. Have a great New Year. One more year older for us experienced developers in the PICK community. (circa 1978) Doug Farmer This message has been scanned for malware by Websense. http://www.websense.com/ ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users Click https://www.mailcontrol.com/sr/Tv+r55u8HfPGX2PQPOmvUhQdr9UqjTk1M2f99tr8WdvOy e2VhyKlGIdl6QC!L7u!0ZOMv8J8HrOrbIY9K1KtKg== to report this email as spam. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Wally Terhune
Wally you will be missed. I've enjoyed working with you over the years. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Thursday, December 13, 2012 3:04 PM To: U2 Users List Subject: [U2] Wally Terhune Congratulations on your upcoming retirement. Thanks for all the support you have given us over the years for us Unidata guys. Your breadth of knowledge will surely be missed. Enjoy retirement, -Dan Dan Goble | Senior Systems Engineer Interline Brands, Inc. 804 East Gate Drive Suite 100, Mount Laurel, NJ 08054 Office: 856.533.3110 | Mobile: 609.792.6855 E-mail: dan.go...@interlinebrands.com | Website: www.interlinebrands.com This e-mail and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. Please notify the sender immediately by e-mail if you have received this e-mail in error and delete all copies of this message. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Advantage of indirect call in BASIC
Does anyone have any current benchmarks on this type of call? Several years ago when I tested it in UniData it was very slow call compared to using the name. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Monday, December 03, 2012 5:39 PM To: u2-users@listserver.u2ug.org Subject: [U2] Advantage of indirect call in BASIC I've not encountered this is my career previously, but now I'm seeing a system written almost entirely with the use of indirect calls in Universe BASIC. That is SOURCE = *SOME.PROGRAM ... CALL @SOURCE(INPUTS) Is there some advantage to the use of indirect calls that a system would be written entirely in this fashion? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [UD] Select - Suppress ...IDs do not exist: Message
You can always turn it on and off inside your program or paragraph. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett Sent: Friday, November 30, 2012 1:16 PM To: U2 Users List Subject: Re: [U2] [UD] Select - Suppress ...IDs do not exist: Message Wally: Global, eh? Ouch! I was hoping to find a keyword like NE.SUPP, kind of like NI.SUPP. Anyway, this'll do for the time being. Many thanks for your Christmas spirit! :-) Bill Untitled Page - Original Message - *From:* wterh...@rocketsoftware.com *To:* U2 Users List u2-users@listserver.u2ug.org *Date:* 11/30/2012 12:00 PM *Subject:* Re: [U2] [UD] Select - Suppress ...IDs do not exist: Message I think you are looking for UDT.OPTIONS 55 Wally Terhune Technical Support Engineer Rocket Software 4600 South Ulster Street, Suite 1100 **Denver, CO 80237 **USA t: +1 720 475 8055 **e: wterh...@rocketsoftware.com **w: u2.rocketsoftware.com -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett Sent: Friday, November 30, 2012 12:43 PM To: U2 Mail List Subject: [U2] [UD] Select - Suppress ...IDs do not exist: Message Does anyone know what the keyword is to suppress the The following record ids do not exist: message when items in a select list are not in the target file being selected? Thanks, Bill Haskett ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Improving performance
Reports have the following: 1. Input report parameters (Use whatever tool you want to have as an interface with your users) 2. Select needed data (I use UniQuery here) 3. Manipulate data (I write a UniBasic program to populate a temp file with the combined data from as many tables as I need to use) 4. Sort data (Again using UniQuery to Sort my temp file) 5. Output data (Use whatever reporting tool fits best, web, xml, printer, terminal, email, fax, etc.) The trick is to keep each of the above steps separate. You can capsulate the Report steps in a Paragraph. --- Another method if your just using UniQuery is to create an UniBasic subroutine with a named common area that keeps track of the LAST.PERSON.ID and the LAST.PERSON.REC. Only read the PERSON file if the LAST.PERSON.ID doesn't equal the current @ID. --- Another way is: if you are getting most of your report data from PERSON then create the I-Desc to get the needed DONOR data and use PERSON as the base file. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Butera Sent: Saturday, November 10, 2012 12:55 PM To: U2 Users List Subject: [U2] Improving performance At the outset, I'm a lover of Pick/MV but also have experience with 1NF (mostly mysql/postgresql). Here's my delimma: For the sake of simplicity, let's say I have two tables with the following data attributes: PERSON: id, first_name, last_name, email, phone, spouse DONOR: id, given_amt, pledge_amt The ID for PERSON and DONOR are same, and spouse is a X-pointer to another PERSON record (if populated). Often our fundraisers write reports out of DONOR and often want spouse info (name, email, phone). This is typically accomplished with I-desc in DONOR such as: spouse_first: TRANS('PERSON',TRANS('PERSON',@ID,'spouse','X'),'first_name','X') spouse_last: TRANS('PERSON',TRANS('PERSON',@ID,'spouse','X'),'last_name','X') spouse_email: TRANS('PERSON',TRANS('PERSON',@ID,'spouse','X'),'email','X') spouse_phone: TRANS('PERSON',TRANS('PERSON',@ID,'spouse','X'),'phone','X') Thus, for each DONOR record in my report if I want the four fields above I've got to perform 8 reads of the PERSON table. Sure, caching will improve this performance - but let's forget that for the moment. So for 8 DONOR records I'm doing 64 PERSON reads. Am I correct about how TRANS is working in these cases? In an attempt to improve performance, I've taken to replicating the spouse field in the DONOR record by using an update trigger on PERSON to ensure spouse is updated in DONOR as well. By replicating the spouse in DONOR, I eliminate one TRANS in each field and cut my 64 PERSON reads to 32 reads. That said, I'm looking for other means - this is one place where Pick isn't my friend as we often have reports written out of various tables and need to use 32+ TRANS statements to pull in PERSON demographic info. Any insight appreciated. -- Jeff Butera, PhD Associate Director for Applications and Web Services Information Technology Hampshire College 413-559-5556 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Multiple UniData Indexes in same select
It will never use both. Usually the first index command possible will be used. Although I believe an EQ will override an index with GE. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Farmer Sent: Wednesday, November 07, 2012 7:35 AM To: U2 Users List Subject: [U2] Multiple UniData Indexes in same select Good morning, I should know this, but as the gray gets thicker, some of the old knowledge seeps away. If you have indexes on multiple attributes on a file in UniData AND you include both of those indexed attributes in the same Select statement, how does UniData know which index to use? Does it use both? Neither? Thanks in advance, Doug This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's prior permission. We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses. Any views and/or opinions expressed in this e-mail are of the author only and do not represent the views of Epicor Software Corporation or any other company within its group. This message has been scanned for malware by Websense. www.websense.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Accessing an https:// server with callHTTP
Kevin my UniBasic is the client. Have you this line in your code? protocolLogging(_PH_\HTTP.LOG.FILE, ON, 10) it might provide some important clues. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Friday, October 19, 2012 8:55 PM To: U2 Users List Subject: Re: [U2] Accessing an https:// server with callHTTP David, are you hosting an HTTPS server with this, or is this a client of an HTTPS connection? Just wondering about the 2 in the below context. On Fri, Oct 19, 2012 at 5:36 PM, David A. Green dgr...@dagconsulting.comwrote: I just used this and it worked for me: addCertificate(_PH_\HTTP.CERT, 2, 1, 1, SEC.CONTEXT) David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Friday, October 19, 2012 11:07 AM To: U2 Users List Subject: [U2] Accessing an https:// server with callHTTP Does anyone have a working sample of communicating with an https server from Unidata 7.1 using callHTTP? We've pulled the certificate and put it on the server, but every time we try to use addCertificate() we get error 2: Certificate file could not be opened or directory does not exist. Must be missing something simple... ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Accessing an https:// server with callHTTP
I get a lot of logging information, maybe you need to bump up the log level. I'm glad you're having success, here is where I'm having an issue: Peer certificate not verified. Reason: 20, unable to get local issuer certificate I'm still researching this one, not sure what a peer certificate is, or how to create one that works. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Saturday, October 20, 2012 3:55 PM To: U2 Users List Subject: Re: [U2] Accessing an https:// server with callHTTP I do have the logging enabled, but it doesn't log anything up to the point of the submit request. I finally got it working with some combination of things that as of yet I am uncertain of why it works. But I think it's due to the name of the certificate. Once I named the certificate with a .PEM extension and reloaded the cert, things began working. On Sat, Oct 20, 2012 at 11:38 AM, David A. Green dgr...@dagconsulting.comwrote: Kevin my UniBasic is the client. Have you this line in your code? protocolLogging(_PH_\HTTP.LOG.FILE, ON, 10) it might provide some important clues. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Friday, October 19, 2012 8:55 PM To: U2 Users List Subject: Re: [U2] Accessing an https:// server with callHTTP David, are you hosting an HTTPS server with this, or is this a client of an HTTPS connection? Just wondering about the 2 in the below context. On Fri, Oct 19, 2012 at 5:36 PM, David A. Green dgr...@dagconsulting.comwrote: I just used this and it worked for me: addCertificate(_PH_\HTTP.CERT, 2, 1, 1, SEC.CONTEXT) David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Friday, October 19, 2012 11:07 AM To: U2 Users List Subject: [U2] Accessing an https:// server with callHTTP Does anyone have a working sample of communicating with an https server from Unidata 7.1 using callHTTP? We've pulled the certificate and put it on the server, but every time we try to use addCertificate() we get error 2: Certificate file could not be opened or directory does not exist. Must be missing something simple... ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Speeding sort
I was thinking of a similar solution, but the op said that they have lots of disks space, so I am thinking why not just add the field from the other file into the your reporting file. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of dennis bartlett Sent: Thursday, October 18, 2012 8:10 PM To: U2 Users List Subject: Re: [U2] Speeding sort however the absolute fastest would be to add an itype to FILE-1 that accesses FILE-2 SORT_VALUE [you're already prepared to do multiple read on 2 files ] OTH_FILE_SORT_KEY 001 I 002 TRANS('OTHER_FILE', SOME_KEY, '', 'X') where SOME_KEY is the value you were saving from your example below and using as key to the second file FANCY_ITYPE 001 I 002 OTH_FILE_SORT_KEY : '*' : SOME_KEY etc {you could combine these two - separated for clarity} The index on FILE-1 remains THIS_FILE_FIELD then Step 1 - SELECT FILE WITH *THIS_FILE_FIELD*='VALUE' SAVING UNIQUE FANCY_ITYPE NO.NULLS -- gives you a list that is complete (ie doesn't need to access the other file again) -- the combo key doesn't detract from the unique because the other-file accesses are done using SOME_KEY -- the SAVING is doing the ITYPE work, using a reduced list, thereby saving more processing Step 2 - Your final step is to sort a list -- altho this represents another step, it does not involve reprocessing a file, and therefore should be very quick. A sort on the saved list will provide the result you were looking for... and the field you ultimately want saved { SOME_KEY } is extractable from FANCY_ITYPE. Bring on the flames... ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Accessing an https:// server with callHTTP
I just used this and it worked for me: addCertificate(_PH_\HTTP.CERT, 2, 1, 1, SEC.CONTEXT) David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Friday, October 19, 2012 11:07 AM To: U2 Users List Subject: [U2] Accessing an https:// server with callHTTP Does anyone have a working sample of communicating with an https server from Unidata 7.1 using callHTTP? We've pulled the certificate and put it on the server, but every time we try to use addCertificate() we get error 2: Certificate file could not be opened or directory does not exist. Must be missing something simple... ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Selection Suggestions for using UV instead of SQL
And to do this from UniBasic: CMD = CMD-1 = PA CMD-1 = SELECT REGISTRATION WITH EID = '1' SAVING UNIQUE PID TO 1 CMD-1 = IF @SYSTEM.RETURN.CODE 1 THEN GO THE.END CMD-1 = SELECT PEOPLE TO 2 CMD-1 = IF @SYSTEM.RETURN.CODE 1 THEN GO THE.END CMD-1 = MERGE.LIST 2 DIFF 1 CMD-1 = THE.END: EXECUTE CMD David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock Sent: Wednesday, October 17, 2012 10:54 AM To: 'U2 Users List' Subject: Re: [U2] Selection Suggestions for using UV instead of SQL select registration with EID = '1' saving unique PID to 1 select people to 2 merge.list 2 diff 1 Larry Hiscock Western Computer Services -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Wednesday, October 17, 2012 6:59 AM To: U2 Users Subject: [U2] Selection Suggestions for using UV instead of SQL Ok. I have file1 - people that has @ID of PID I have file2 - registration that has @ID of PID+EID+RID (EID = event id, RID = registration id) I want to select people who are not in the registration file with an EID of 1. With an SQL statement - I could join the two, then do the select or use a subquery (I'm on UV 10.0.2 - not sure if sub querys work) Just curious how this could be done with UV Native, and without involving a program. I first tried SELECT REGISTRATION WITH EID = '1' SAVING UNIQUE PID - NSELECT PEOPLE But that returned 0 - since the NSELECT only works off the current select list, not the whole file Yes, I could create a temporary file, then select off that Yes, I could read each people record, then loop through registration to see if it doesn't exist. Both of the above require programming I guess I could create a subroutine that does the looping through registration, and put that into an I descriptor - looking for another option. George ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] U2-Users Digest, Vol 42, Issue 7
GOTO doesn't return. I guess you're stuck in the US... stuck in the US... stuck in the USSR. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Hammerle Sent: Monday, October 08, 2012 7:08 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] U2-Users Digest, Vol 42, Issue 7 Inside the latest Welcome to the MV Market Place Weekly Briefing was the following job postings. Hmmm, did someone get confused? Or do those jets run on Unibasic code : GOTO USSR ( yeah, I am old ) CRT PHOTOS.OF.MISSLE.SILOS RETURN U-2 Aircrew Trainer - D3 Air and Space Operations - United States D3 Air amp; Space Operations has a contingency opening... Training Tasks List (TTL) database for U-2/T-38 aircrew training. D3 Air amp; Space Operations, Inc is an... br/ From D3 Air and Space Operations - 04 Oct 2012 15:03:01 GMT ... more U-2 Aircrew Trainer - D3 Air and Space Operations, Inc - Beale AFB, CA Tasks List (TTL) database for U-2/T-38 aircrew... civilian equivalent, within 6 months after hire. D3 Air amp; Space Operations, Inc is an equal opportunity... br/ From Indeed - 04 Oct 2012 18:29:38 GMT ... more This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or company to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and delete this e-mail including all attachments from your system. Thank you ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
By definition you can only have one active list at a time in UniData. But you can use list 1-9 in your subroutine (or at TCL) by using the TO and FROM keywords. PERFORM SELECT CUSTOMERS WITH STATE = 'CO' TO 1 LOOP READNEXT CUST.KEY FROM 1 ELSE ... David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Monday, September 24, 2012 9:43 AM To: U2 Users List Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists How does one manage multiple active select lists in Unidata? I could have sworn I've done this before, but for some reason it's not working at all as I recall. I have this SUBR(..) type field in file A that selects records from file B to calculate an aggregate. This works fine when listing file A and showing the field. However, if there's an active select list when file A is listed with this field, the select statement in my SUBR(..) is consuming the active select list 0 and returning incorrect results. My subroutine is $BASICTYPE U and is selecting records using the lower case select and selecting to active list #3. It then processes from list #3 and returns its result. I've tried using the RTNLIST and PASSLIST options on the EXECUTE statements and I get a Misuse of Reserved Word 'PASSLIST' or Misuse of Reserved Word 'RTNLIST'. I've tried UDTEXECUTE with no compilation errors but also no improvement on the problem. I've even tried MDPERFORM but I get the misuse errors with the RTNLIST and PASSLIST options. Oddly enough, removing $BASICTYPE U I don't get an error on MDPERFORM but I can't READNEXT from a numbered select without the $BASICTYPE U. How should I structure this SUBR(..) so that it does not consume list 0 when selecting to list 3? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
If you already have an active list then you'll have to save it, then restore it. See READLIST and FORMLIST. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Monday, September 24, 2012 10:11 AM To: U2 Users List Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists It's all fine if the program controls both lists, but in this case the SUBR(..) type field could be accessed in just about any context, from TCL, from a download, from MITS, from another BASIC routine, with or without a select list... The RTNLIST doesn't solve the problem of my select command consuming the active list 0. It seems that the PASSLIST extension to EXECUTE is designed specifically for this purpose, but it produces nothing but compilation errors: CMD = select ... EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2 ...produces a compilation error about the misuse of RTNLIST, despite the documentation saying this should be possible. The point is that I want to leave select list 0 entirely alone, which is why I'm using $BASICTYPE U. BASICTYPE P - standard on these SB+ systems - does not allow one to READNEXT from anything but list 0, and I want to leave list zero untouched. Gotta be a way, right? -K On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid mbr...@epicor.com wrote: Hi Kevin, Any reason why you are using type U ? This certainly works using P ... S='SELECT SOMEFILE WITH SOMETHING = OOJIT' EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT EOF=0 LOOP UNTIL EOF DO READNEXT MYID FROM MYLIST THEN GSOUB MYMESS END ELSE EOF=1 REPEAT Martin -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker Hughes Sent: 24 September 2012 17:49 To: 'U2 Users List' Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists Can you use SELECT yourfile WITH whatever TO 8 {specific list number} in the master process, and let your SUBR virtual field default to list 0 {zero}? The other option could be to do a READLIST within the SUBR function and reset the list when RETURNing, but this could be onerous in terms of processing speed. HTH -Baker -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Monday, September 24, 2012 11:43 AM To: U2 Users List Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists How does one manage multiple active select lists in Unidata? I could have sworn I've done this before, but for some reason it's not working at all as I recall. I have this SUBR(..) type field in file A that selects records from file B to calculate an aggregate. This works fine when listing file A and showing the field. However, if there's an active select list when file A is listed with this field, the select statement in my SUBR(..) is consuming the active select list 0 and returning incorrect results. My subroutine is $BASICTYPE U and is selecting records using the lower case select and selecting to active list #3. It then processes from list #3 and returns its result. I've tried using the RTNLIST and PASSLIST options on the EXECUTE statements and I get a Misuse of Reserved Word 'PASSLIST' or Misuse of Reserved Word 'RTNLIST'. I've tried UDTEXECUTE with no compilation errors but also no improvement on the problem. I've even tried MDPERFORM but I get the misuse errors with the RTNLIST and PASSLIST options. Oddly enough, removing $BASICTYPE U I don't get an error on MDPERFORM but I can't READNEXT from a numbered select without the $BASICTYPE U. How should I structure this SUBR(..) so that it does not consume list 0 when selecting to list 3? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users This communication, its contents and any file attachments transmitted with it are intended solely for the addressee(s) and may contain confidential proprietary information. Access by any other party without the express written permission of the sender is STRICTLY PROHIBITED. If you have received this communication in error you may not copy, distribute or use the contents, attachments or information in any way. Please destroy it and contact the sender. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users Click https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg== 04y!LlOoL8USVGrPZehFfPKcPPmbfFPdrr1lqOECv!Swg== to report this email as spam. Epicor Software (UK) is a limited company registered in England Wales. Registration
Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
One thing to look out for is when using FORMLIST make sure your variable ACTIVE.LIST has stuff in it. Otherwise you get a null active list. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Monday, September 24, 2012 10:43 AM To: U2 Users List Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists Well, that success was short lived. While the READLIST and FORMLIST allow my SUBR(..) field to not consume the active select list zero, these two commands produce different results: LIST ORDER.LINE WITH fieldName fieldName ...this will show the lines that have this field set, and will show the field properly. However, this command returns no items: SELECT ORDER.LINE WITH fieldName Basically my program is doing this: READLIST ACTIVE.LIST FROM 0 ELSE NULL * CMD = select ... TO 2 EXECUTE CMD CAPTURING OUTPUT * EOF = @FALSE LOOP READNEXT ID FROM 2 ELSE EOF = @TRUE UNTIL EOF DO .. REPEAT * CLEARSELECT 2 * FORMLIST ACTIVE.LIST TO 0 All other input/ideas appreciated. On Mon, Sep 24, 2012 at 11:26 AM, Kevin King ke...@precisonline.com wrote: And we have a winner! Thank you everyone! The READLIST and FORMLIST will work; seems kinda kludgy, but hey, it's working. On Mon, Sep 24, 2012 at 11:21 AM, David A. Green dgr...@dagconsulting.com wrote: If you already have an active list then you'll have to save it, then restore it. See READLIST and FORMLIST. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Monday, September 24, 2012 10:11 AM To: U2 Users List Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists It's all fine if the program controls both lists, but in this case the SUBR(..) type field could be accessed in just about any context, from TCL, from a download, from MITS, from another BASIC routine, with or without a select list... The RTNLIST doesn't solve the problem of my select command consuming the active list 0. It seems that the PASSLIST extension to EXECUTE is designed specifically for this purpose, but it produces nothing but compilation errors: CMD = select ... EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2 ...produces a compilation error about the misuse of RTNLIST, despite the documentation saying this should be possible. The point is that I want to leave select list 0 entirely alone, which is why I'm using $BASICTYPE U. BASICTYPE P - standard on these SB+ systems - does not allow one to READNEXT from anything but list 0, and I want to leave list zero untouched. Gotta be a way, right? -K On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid mbr...@epicor.com wrote: Hi Kevin, Any reason why you are using type U ? This certainly works using P ... S='SELECT SOMEFILE WITH SOMETHING = OOJIT' EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT EOF=0 LOOP UNTIL EOF DO READNEXT MYID FROM MYLIST THEN GSOUB MYMESS END ELSE EOF=1 REPEAT Martin -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker Hughes Sent: 24 September 2012 17:49 To: 'U2 Users List' Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists Can you use SELECT yourfile WITH whatever TO 8 {specific list number} in the master process, and let your SUBR virtual field default to list 0 {zero}? The other option could be to do a READLIST within the SUBR function and reset the list when RETURNing, but this could be onerous in terms of processing speed. HTH -Baker -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Monday, September 24, 2012 11:43 AM To: U2 Users List Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists How does one manage multiple active select lists in Unidata? I could have sworn I've done this before, but for some reason it's not working at all as I recall. I have this SUBR(..) type field in file A that selects records from file B to calculate an aggregate. This works fine when listing file A and showing the field. However, if there's an active select list when file A is listed with this field, the select statement in my SUBR(..) is consuming the active select list 0 and returning incorrect results. My subroutine is $BASICTYPE U and is selecting records using the lower case select and selecting to active list #3. It then processes from list #3 and returns its result. I've tried using the RTNLIST and PASSLIST options on the EXECUTE statements and I get a Misuse of Reserved Word 'PASSLIST' or Misuse of Reserved Word 'RTNLIST'. I've tried
Re: [U2] [UV] Nice gotcha
When I began working at Unidata one of the first things I tried was :DELETE.FILE VOC and it of course did, things at TCL began to get really weird, until it stopped working. I was of course on a test machine and had a backup. But when the UniQuery keyword TO first came out it would let you do things like LIST CUSTOMERS NAME ADDRESS TO VOC. And without warning boom! They have added some dummy proofing since those days. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark Sent: Wednesday, September 12, 2012 7:25 PM To: U2 Users List Subject: Re: [U2] [UV] Nice gotcha IIRC, universe doesn't let you run *any* query commands, including LIST-ITEM, on a file if there isn't a dict defined. So at some point someone had edited the voc f-pointer for LISTU.HISTORY, and put VOC into attribute 3? That's slightly dangerous. Good thing uv warns. On Sep 12, 2012, at 6:17 PM, Wjhonson wjhon...@aol.com wrote: So I was deleting a file so I could recreate it as a different file TYPE when the following DICT entry VOC does not match expected DICT D_LISTU.HISTORY. Do you wish to DELETE this DICT file (Y/N)? Wow that's really really nasty. Yes delete the VOC ? I can see people doing this. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [ud] Sub-second delay?
Bob UniData was spelled two ways because one was the company name and one was the product name. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bob Wyatt Sent: Tuesday, August 28, 2012 9:24 PM To: 'U2 Users List' Subject: Re: [U2] [ud] Sub-second delay? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of dennis bartlett Sent: Tuesday, August 28, 2012 10:20 PM To: U2 Users List Subject: Re: [U2] [ud] Sub-second delay? Who on earth is going to understand what 'release quantum' (RQM) means? Still, it worked.. and such a clever, 'techie-appealing' concept - tho I don't know that it ever did what I was told it did, it sure sounded good! -- UniBasic User's Guide, Release 2.1, Copyright 1991 by Unidata, Inc. The original purpose of RQM was to release remaining execution time reserved for a program, allowing other programs to use the time. If a particular program was very computation-intensive, RQM could improve overall system performance. In UniData, this command functions like the SLEEP command. For further information, refer to the SLEEP statement later in this chapter. It is kind-of interesting to note the undecided way to spell Unidata/UniData back then (or that UniData hadn't been registered yet); there are no typo's (by me) in the above... Also note that the SLEEP page of the document makes no mention of RQM... REALITY by Microdata. DATA/BASIC Programming Manual, Series 3.0 - 4.0, Release 4.0, February, 1981 The time-shared environment of the REALITY system allows concurrent execution of several programs, with each program executing for a specific time period (called a timeslice or quantum) and then pausing while other programs continue execution. The RQM statement causes a one-second sleep, terminating the program's current timeslice. The RQM statement may be used in heavy compute loops to allow increased execution speed of other concurrently executing programs by giving up time. It may also be used to cause pauses. IIRC, the 'M' was measurement; the measurement was whatever remained of the processes timeslice. Documentation back to UniVerse 6.3.3 makes no mention of RQM... ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] trimming a list (a test of your ability)
Ah, but try it with := instead of Y = Y: David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Daniel McGrath Sent: Thursday, July 12, 2012 8:56 AM To: U2 Users List Subject: Re: [U2] trimming a list (a test of your ability) ROUNDS = 1 LOOP X = '' ; Y = '' START.TIME = TIME() FOR I = 1 TO ROUNDS X-1 = I NEXT I END.TIME = TIME() CRT END.TIME-START.TIME : vs : START.TIME = TIME() FOR I = 1 TO ROUNDS Y = Y:CHAR(254):I NEXT I END.TIME = TIME() CRT END.TIME-START.TIME ROUNDS *= 2 REPEAT Results suggest that you should od -1, not the multiple concatenation. Dan McGrath Product Manager Rocket Software 4600 S. Ulster Street ..Suite 1100 ..Denver, CO 80237 . USA t: +1.720.475.8098 . m: +1.617.630.7392 . e:dmcgr...@rocketsoftware.com w: rocketsoftware.com/u2 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Thursday, July 12, 2012 7:30 AM To: U2 Users List Subject: Re: [U2] trimming a list (a test of your ability) Instead of -1, use string=string:char(254):additionalelement George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Laansma Sent: Thursday, July 12, 2012 9:20 AM To: Marco Manyevere; U2 Users List Subject: Re: [U2] trimming a list (a test of your ability) This is the best solution, using REMOVE and building a new list instead of constantly 'shrinking' the original table. That being said, as NEW.LIST gets rather large, adding new elements to it can get 'time' consuming. Just like the REMOVE keeps track of the pointer as you spin through a table, I wish there was a comparable statement that kept track of the pointer as we added new elements -1 to tables. Sincerely, David Laansma IT Manager Hubbard Supply Co. Direct: 810-342-7143 Office: 810-234-8681 Fax: 810-234-6142 www.hubbardsupply.com Delivering Products, Services and Innovative Solutions -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Marco Manyevere Sent: Thursday, July 12, 2012 4:14 AM To: U2 Users List Subject: Re: [U2] trimming a list (a test of your ability) Is this what the OP is asking about or I'm missing something? The 2 code fragments look totally different. We dont know what's happening in GET.UTILITY.RECORD or the significance of UTILITY.NAME and LAST.NAME to totally eliminate them during the 'optimisation' I would rather do: NEW.LIST = '' LOOP REMOVE UTILITY.ID FROM KEY.LIST SETTING MORE WHILE MORE:UTILITY.ID GOSUB GET.UTILITY.RECORD IF INDEX(UTILITY.NAME,LAST.NAME,1) = 0 THEN CONTINUE NEW.LIST-1 = UTILITY.ID REPEAT KEY.LIST = NEW.LIST NEW.LIST = '' ;* free the memory From: Kate Stanton k...@walstan.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thursday, 12 July 2012, 4:27 Subject: Re: [U2] trimming a list (a test of your ability) I am getting sucked in! NLST = ;* For new list MAXI = DCOUNT(KEY.LIST1,@vM) ;* Count items FOR INO =1 TO MAXI ;* Each key in list KEY.ID = KEY.LIST1,INO ;* A key ID LOCATE(KEY.ID,NLST,1;POS;'AL') ELSE ;* see if there INS KEY.ID BEFORE NLIST1,POS ;* Sort to list END NEXT INO ;* Check all keys On 12 July 2012 12:09, Wjhonson wjhon...@aol.com wrote: 1295 FOR DISPLAY.LOOP = 1 TO KEY.COUNT 1296 UTILITY.ID = KEY.LIST1,DISPLAY.LOOP 1297 GOSUB GET.UTILITY.RECORD 1298 IF INDEX(UTILITY.NAME,LAST.NAME,1) = 0 THEN 1299 KEY.LIST = DELETE(KEY.LIST,1,DISPLAY.LOOP,0) 1300 DISPLAY.LOOP -= 1 1301 KEY.COUNT -= 1 1302 END 1303 NEXT DISPLAY.LOOP Comments? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Kate Stanton Walstan Systems Ltd 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand Phone: + 64 9 360 5310 Mobile: + 64 21 400 486 Email: k...@walstan.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users
Re: [U2] Unidata Limits
Since it is stored as a string it can be any length. If it is used as a Key or ID of the record you're limited by to 126 characters or whatever your LIMIT command shows. And if you need to do math with it you might have to use string math. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Tuesday, July 10, 2012 12:03 PM To: U2 Users List Subject: [U2] Unidata Limits I was asked a question today that ... well, it stumped me. Is there a practical limit to an incrementing number on Unidata and if so, what is that limit? I seem to recall something way back on Reality that said that numbers could count to 1+e38 or something ridiculous like that, but is that still applicable? -K ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Regarding: use of I - Descriptor
An alternative method is to create an index on the secondary file then create an I-Desc SUBR to access that index from the primary file. Be sure to setup some COMMON variables to only OPEN the secondary file once. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Bullard Sent: Thursday, June 28, 2012 4:31 AM To: U2 Users List Subject: Re: [U2] Regarding: use of I - Descriptor You can even put alternate indexes on I-Desc, though this can lead to serious problems if you are indexing a translate. I read this comment (from an earlier thread on this list) and started worrying: I have a requirement to select records based on a field that is not currently in the record. I have been planning on creating an I-Desc that uses a TRANS() function to look up the data and then building an index on that field. What sort of serious problems would I expect from indexing a TRANS() I-descriptor? John B. This message and all attachments are intended for the use of the individual or entity to whom or which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure. If the reader of this message is not the intended recipient or the agent responsible for delivering the message 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 e-mail in error, please notify me immediately at the number listed above. U.S. export law as contained in the International Traffic In Arms Regulations (ITAR) and the Export Administration Regulations (EAR) may be applicable to any technical information submitted with this communication. This technical information is not to be placed in the public domain, exported from the U.S., or given to any foreign person in the U.S., without the prior, specific written authorization of TeligentEMS LLC and the U.S. Department of State or the U.S. Department of Commerce as applicable. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Regarding: use of I - Descriptor
Sure, Let's say you have a file B that has a customer number in the data and not the key. And you want to build a link from file A that also has a customer number in the data. You would build an index on file B for customer number. Then create a generic subroutine that takes in a filename and index data field that returns keys. Example: GET_KEYS_FROM_INDEX( KEYS, FILENAME, IDXDATA ) This program has a COMMON block that sets LAST.FILENAME and F.FILENAME open variable and checks to see if it needs to open the FILENAME. Then do a SELECTINDEX to an unused LIST and convert it to an MV list or you can step through the index to create a list of KEYS to return. Lastly create your I-Descriptor in file A calling the SUBR(GET_KEYS_FROM_INDEX, B, Cust_Nbr) David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, June 28, 2012 9:34 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Regarding: use of I - Descriptor Could you expand on this? -Original Message- An alternative method is to create an index on the secondary file then reate an I-Desc SUBR to access that index from the primary file. Be sure to setup some COMMON variables to only OPEN the secondary file once. David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Is there any way to tell if I am in an EXECUTE level andCAPTURING is turned on?
How about creating a COMMON variable that the program can set before executing the command with a CAPTURING clause? David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Farmer Sent: Friday, June 22, 2012 6:49 AM To: U2 Users List Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level andCAPTURING is turned on? UniData Looks like there is no easy solution. Messages are shown in a generic subroutine and I do not want to do a lot of IO or CPU time to determine if CAPTURING is on. The subroutine is called thousands of times a day for a user. For the few times this has happened over the years, I guess I will just fix the problems when they come up. Thanks everyone for their input. Doug -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark Sent: Thursday, June 21, 2012 5:22 PM To: U2 Users List Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level andCAPTURING is turned on? universe or unidata? I don't have a full answer either way, but I seem to recall that unidata holds CAPTURING output in a temporary file. Maybe that file can be checked for. On Jun 21, 2012, at 10:08 AM, Doug Farmer wrote: I just had a situation where a program was printing an error message and waiting for the user to respond by pressing Enter. But, the program was being executed by another program using the CAPTURING option. Is there any way someone knows of to tell if the CAPTURING option is on? If so, I can write the error message to a log file instead of displaying it and waiting for a response. I looked at all the SYSTEM(xx) options and do not see anything there. Thanks in Advance Doug This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's prior permission. We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses. Any views and/or opinions expressed in this e-mail are of the author only and do not represent the views of Epicor Software Corporation or any other company within its group. This message has been scanned for malware by Websense. www.websense.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users Click https://www.mailcontrol.com/sr/ZHJSQLX+SpPTndxI!oX7Us7Qlo!t9IHt4WE2DA5Hj !kWNSr8qrt6LXg6vr6+3RaGatMIqsrnApW1yubdBaCdqw== to report this email as spam. This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's prior permission. We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses. Any views and/or opinions expressed in this e-mail are of the author only and do not represent the views of Epicor Software Corporation or any other company within its group. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] FW: Multivalue Question
X = RECORD31 isn't your issue. This is your issue: CNT = DCOUNT(MVDATA, @VM) FOR PTR=1 TO CNT SNGDATA = MVDATA1, PTR ... NEXT PTR Use instead: MORE.FLAG = (MVDATA # ) LOOP WHILE MORE.FLAG DO SNGDATA = REMOVE(MVDATA, MORE.FLAG) ... REPEAT Of course other factors can help your decision on how to store your data. 1. Does it need to be sorted? 2. How do you need to retrieve it? David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt Sent: Thursday, June 07, 2012 9:30 AM To: u2-users@listserver.u2ug.org Subject: [U2] FW: Multivalue Question Unidata 7.1.20 Pick Flavor I am going to end up with a situation where I will have a multivalue field that contains 5500 +/- values. Each value will be 5-characters long. I'm concerned that this will issues with the following statement: X = RECORD31 I've tried searching the manuals and can't find a good answer. Appreciate your input. Albert DeWitt, CPIM ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] FW: Multivalue Question
George, The REMOVE will set the MORE.FLAG to 0 when it reaches the last value. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Thursday, June 07, 2012 10:04 AM To: U2 Users List Subject: Re: [U2] FW: Multivalue Question You will need to add MORE.FLAG = (MVDATA# ) again to just before the REPEAT, for the WHILE To function properly, otherwise, it's just using the flag set prior To starting the LOOP George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David A. Green Sent: Thursday, June 07, 2012 12:45 PM To: 'U2 Users List' Subject: Re: [U2] FW: Multivalue Question Use instead: MORE.FLAG = (MVDATA # ) LOOP WHILE MORE.FLAG DO SNGDATA = REMOVE(MVDATA, MORE.FLAG) ... REPEAT ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] READU vs READ and CRT
How about something like this? This way it doesn't get displayed for the quick updates. function doServerUpdate() { var serverUpdateTimer = setTimeout(showServerUpdateWait(), 5000); ... hideServerUpdateWait(); clearTimeout(serverUpdateTimer); } David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dawn Wolthuis Sent: Wednesday, May 02, 2012 7:08 AM To: U2 Users List Subject: Re: [U2] READU vs READ and CRT You are correct that the animated gif does not harm the processing time on the server. I think it is obnoxious to the user when it is there for too short a time, so I hauled some out and stopped putting them in, figuring we will wait to see where they are really needed once we do volume testing. I have not researched it to see if there are any studies that suggest that an animated gif that flashes quickly provides a bad user experience. My UX testing in this case was not formal -- it was me going oh, yuck, I don't want that gif to be there for so short a time. You are right that this is not of the same ilk regarding performance. Yes, it only shows while the server is doing something -- when a process returns it hides the gif. --dawn On Wed, May 2, 2012 at 8:21 AM, George Gallen ggal...@wyanokegroup.comwrote: For a webapp, does an animated gif really detract processing time? The gif should be running client side, And the processing of the app would be running server side. Maybe you could only show the gif while The app is waiting for the server to push some more data? George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto: u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Tuesday, May 01, 2012 8:38 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] READU vs READ and CRT It's better for peace of mind to know that the computer thinks it's doing something Rather than wondering Is it DOING something -Original Message- From: Dawn Wolthuis dw...@tincat-group.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Tue, May 1, 2012 5:30 pm Subject: Re: [U2] READU vs READ and CRT Well, I get it even if it seems foolish at first blush -- it's all about he user experience. --dawn On Tue, May 1, 2012 at 7:24 PM, Charlie Noah cwn...@comcast.net wrote: Hi Laura and Dawn, This reminds me of a program I wrote about 20 years ago for a multilevel marketing company. Its job was to audit a seller's downline, which in many cases ran into thousands or tens of thousands of transactions. For some larger sellers it ran for several minutes. The users insisted on seeing what progress it was making, and settled on a whirly-gig. I explained that it would only slow the process down, but they didn't care. They were quite willing to sacrifice speed for a stupid little character twirling around. Go figure... Regards, Charlie Noah ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Dawn M. Wolthuis Take and give some delight today ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] User ID of a LOCKED record
John, this might not help Andy, but instead of parsing LIST.READU I would just use GETREADU() in UniData UniBasic. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Israel, John R. Sent: Monday, April 30, 2012 1:56 PM To: 'U2 Users List' Subject: Re: [U2] User ID of a LOCKED record LIST.READU It is not pretty (at least in UniData) because of the truncation of columns, but it should be a start. John -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Andy Krause Sent: Monday, April 30, 2012 4:55 PM To: U2 Users List Subject: [U2] User ID of a LOCKED record I am trying to notify a user of a locked record so they can ask the person locking that record to GET OUT. Is there a simple way to retrieve the user ID given the port number in a BASIC program? The only method I have found is to call !GET.USERS and then loop through the USER.INFO param comparing port numbers until I find the user and pull their user ID from there. Thanks in advance. Andy Krause ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] READU vs READ
Dave, I tend to cringe when I hear sizable records and updating MV fields. These are red flags. If you don't have the luxury of reconstructing the database then make sure you are using the right UniBasic tools like REMOVE and not FOR...NEXT. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Laansma Sent: Monday, April 30, 2012 6:01 PM To: U2 Users List Subject: Re: [U2] READU vs READ Yes, using SELECT and READNEXT. These are sizable records. The logic is very straight forward, just updating several multi-valued fields in each record (month end). 500,000 have been updated and I'm 2:45:00 into the process. Sincerely, David Laansma IT Manager Hubbard Supply Co. Direct: 810-342-7143 Office: 810-234-8681 Fax: 810-234-6142 www.hubbardsupply.com Delivering Products, Services and Innovative Solutions -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Buss, Troy (Contractor, Logitek Systems) Sent: Monday, April 30, 2012 8:48 PM To: U2 Users List Subject: Re: [U2] READU vs READ Depends on how much twisted logic you have... Seriously, I would guess that your bottleneck is disk access. Are you using basic SELECT and READNEXT ? Is your list in sorted order (SSELECT) or not (SELECT). Processing the updates in group order will minimize the I/O. I don't think the READU overhead on today's machines are anything that would slow it down. I just tested 100,000 records with and without locking and I get six seconds both ways. Because it was cached data, my test eliminates disk i/o and measures the lock overhead which seems to be negligible on universe 11.1.1. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Laansma Sent: Monday, April 30, 2012 5:33 PM To: U2-Users@listserver.u2ug.org Subject: [U2] READU vs READ If I don't HAVE TO lock a record before modifying it writing it back, will a program run significantly faster if I just WRITE it back without locking it first? I'm updating about 700,000 records and it's just taking TOO long. I DO understand the risks of other users changing the record's content during so let's not go down that road. I'm interested in the SPEED dialog. Thank you folks! Sincerely, David Laansma IT Manager Hubbard Supply Co. Direct: 810-342-7143 Office: 810-234-8681 Fax: 810-234-6142 www.hubbardsupply.com http://www.hubbardsupply.com Delivering Products, Services and Innovative Solutions ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _ Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com This email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law. If you are not the intended recipient you are hereby notified that any dissemination, copying or distribution of the email or its contents is strictly prohibited. If you have received this message in error, please notify us immediately, by replying to the message and deleting it from your computer. WARNING: Internet communications are not assured to be secure or clear of inaccuracies as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this email, or any attachment, that have arisen as a result of e-mail transmission. _ ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] YYMMDD easy way?
I use: YYMMDD = CONVERT( , , OCONV(TODAY, DYMD2)) David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Tuesday, April 24, 2012 4:52 PM To: u2-users@listserver.u2ug.org Subject: [U2] YYMMDD easy way? YYMMDD = OCONV(TODAY,'DY2'):OCONV(TODAY,'DM'):OCONV(TODAY,'DD') easier way to do this? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] EXIT ; EXIT inside a loop
I think people are missing the original post. A WHILE or UNTIL on the FOR...NEXT doesn't work for this scenario. That is why I suggested the LOOP...UNTIL...DO...REPEAT construct. David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] EXIT ; EXIT inside a loop
yes adding the case statement solves the issue of hitting unwanted code, but... now you've defined your criteria in two places. How about something like: DONE.FLAG = @FALSE FOR A1 = 1 TO X UNTIL DONE.FLAG FOR A2 = 1 TO Y UNTIL DONE.FLAG LOOP little twisted logic IF G # H THEN DONE.FLAG = @TRUE UNTIL DONE.FLAG DO twisted little logic REPEAT NEXT A2 NEXT A1 David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Boydell, Stuart Sent: Thursday, April 19, 2012 3:05 PM To: U2 Users List Subject: Re: [U2] EXIT ; EXIT inside a loop FOR A1 = 1 TO X until G = H FOR A2 = 1 TO Y until G = H little twisted logic case G # H twisted little logic End case NEXT A2 case G # H twisting little logic End case NEXT A1 does that not work for the OPs mise en scène? (see what else I did there using case instead of if? More of a Volvo than a Ford a little bit boxy, but quite safe). From: David A. Green Sent: 20-Apr-12 7:36 To: 'U2 Users List' Subject: Re: [U2] EXIT ; EXIT inside a loop I think people are missing the original post. A WHILE or UNTIL on the FOR...NEXT doesn't work for this scenario. That is why I suggested the LOOP...UNTIL...DO...REPEAT construct. David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] EXIT ; EXIT inside a loop
Will, The DONE.FLAG allows the program to gracefully exit out without having to go thru frivolous loops. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, April 19, 2012 3:18 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] EXIT ; EXIT inside a loop You don't need a DONE.FLAG at all just loop until the criteria is hit ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] EXIT ; EXIT inside a loop
Will, This type of logic is a common practice when you can have an Abort situation in the middle of processing data. You are correct in your examples they are the same. But that is not the point here. You must remember that we are in two FOR..NEXT loops with possible 1000s or 10,000s loops. If we are processing and suddenly a resource goes off-line, then we need to abort the process. My construct is a great way of handling the abort. Your way doesn't work because the values of G or H can change if you just keep looping on your FOR...NEXT loops. The original poster wanted to EXIT out, and stop processing. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, April 19, 2012 3:24 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] EXIT ; EXIT inside a loop Loop until done.flag do repeat is the same as Loop until (a=b) do repeat You don't need a done.flag in this case -Original Message- From: David A. Green dgr...@dagconsulting.com To: 'U2 Users List' u2-users@listserver.u2ug.org Sent: Thu, Apr 19, 2012 3:21 pm Subject: Re: [U2] EXIT ; EXIT inside a loop Will, The DONE.FLAG allows the program to gracefully exit out without having to go hru frivolous loops. David A. Green 480) 813-1725 AG Consulting Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] n Behalf Of Wjhonson ent: Thursday, April 19, 2012 3:18 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] EXIT ; EXIT inside a loop You don't need a DONE.FLAG at all just loop until the criteria is hit ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] EXIT ; EXIT inside a loop
I was referring to the outer loops. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, April 19, 2012 3:40 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] EXIT ; EXIT inside a loop I have no idea what you mean, they both abort if you want to call it that. They both exit the loop on the exact same condition, at the exact same moment. I don't see the distinction you're trying to draw -Original Message- From: David A. Green dgr...@dagconsulting.com To: 'U2 Users List' u2-users@listserver.u2ug.org Sent: Thu, Apr 19, 2012 3:35 pm Subject: Re: [U2] EXIT ; EXIT inside a loop Will, This type of logic is a common practice when you can have an Abort situation n the middle of processing data. You are correct in your examples they are the same. But that is not the oint here. You must remember that we are in two FOR..NEXT loops with ossible 1000s or 10,000s loops. If we are processing and suddenly a esource goes off-line, then we need to abort the process. My construct is great way of handling the abort. Your way doesn't work because the values of G or H can change if you just eep looping on your FOR...NEXT loops. The original poster wanted to EXIT ut, and stop processing. David A. Green 480) 813-1725 AG Consulting Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Thursday, April 19, 2012 3:24 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] EXIT ; EXIT inside a loop Loop until done.flag do repeat is the same as Loop until (a=b) do repeat You don't need a done.flag in this case -Original Message- rom: David A. Green dgr...@dagconsulting.com o: 'U2 Users List' u2-users@listserver.u2ug.org ent: Thu, Apr 19, 2012 3:21 pm ubject: Re: [U2] EXIT ; EXIT inside a loop ill, he DONE.FLAG allows the program to gracefully exit out without having to go ru frivolous loops. avid A. Green 80) 813-1725 G Consulting Original Message- om: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] Behalf Of Wjhonson nt: Thursday, April 19, 2012 3:18 PM : u2-users@listserver.u2ug.org bject: Re: [U2] EXIT ; EXIT inside a loop You don't need a DONE.FLAG at all just loop until the criteria is hit ___ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] EXIT ; EXIT inside a loop
Will, Two things. First, good programming practice tells you to define the abort logic once. Sure G # H is simple, but this is just an example it could get quite complex. Second, There are statements before and after the abort situation, and your code doesn't handle it. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, April 19, 2012 4:33 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] EXIT ; EXIT inside a loop You don't need a DONE.FLAG A1 = 0 LOOP UNTIL (G=H) OR (A1=X) DO A1 += 1; A2 = 0 LOOP UNTIL (G=H) OR (A2=Y) DO A2 += 1 You're in a maze of twisty little passages all alike REPEAT REPEAT -Original Message- From: David A. Green dgr...@dagconsulting.com To: 'U2 Users List' u2-users@listserver.u2ug.org Sent: Thu, Apr 19, 2012 4:28 pm Subject: Re: [U2] EXIT ; EXIT inside a loop I was referring to the outer loops. David A. Green 480) 813-1725 AG Consulting Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Thursday, April 19, 2012 3:40 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] EXIT ; EXIT inside a loop I have no idea what you mean, they both abort if you want to call it hat. They both exit the loop on the exact same condition, at the exact same oment. I don't see the distinction you're trying to draw -Original Message- rom: David A. Green dgr...@dagconsulting.com o: 'U2 Users List' u2-users@listserver.u2ug.org ent: Thu, Apr 19, 2012 3:35 pm ubject: Re: [U2] EXIT ; EXIT inside a loop ill, his type of logic is a common practice when you can have an Abort situation the middle of processing data. ou are correct in your examples they are the same. But that is not the int here. You must remember that we are in two FOR..NEXT loops with ssible 1000s or 10,000s loops. If we are processing and suddenly a esource oes off-line, then we need to abort the process. My construct is great ay of handling the abort. our way doesn't work because the values of G or H can change if you just ep looping on your FOR...NEXT loops. The original poster wanted to EXIT t, and stop processing. avid A. Green 80) 813-1725 G Consulting Original Message- om: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson nt: Thursday, April 19, 2012 3:24 PM : u2-users@listserver.u2ug.org bject: Re: [U2] EXIT ; EXIT inside a loop Loop until done.flag do repeat is the same as Loop until (a=b) do repeat You don't need a done.flag in this case -Original Message- om: David A. Green dgr...@dagconsulting.com : 'U2 Users List' u2-users@listserver.u2ug.org nt: Thu, Apr 19, 2012 3:21 pm bject: Re: [U2] EXIT ; EXIT inside a loop ill, e DONE.FLAG allows the program to gracefully exit out without having to go u frivolous loops. vid A. Green 0) 813-1725 Consulting ---Original Message- m: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] Behalf Of Wjhonson t: Thursday, April 19, 2012 3:18 PM u2-users@listserver.u2ug.org ject: Re: [U2] EXIT ; EXIT inside a loop You don't need a DONE.FLAG at all ust loop until the criteria is hit __ Users mailing list us...@listserver.u2ug.org p://listserver.u2ug.org/mailman/listinfo/u2-users __ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users __ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] COMMON Size MisMatch
That's why you would specify. Example: COMMON /SYSSTUFF/ SYSSTUFF(100) COMMON /MYSTUFF/ MYSTUFF.REC(100) -CLEAR.ON.LOGTO Then only the MYSTUFF gets cleared. This is the kind of logic that I have to end up writing over and over again to make sure new files get opened when a person does LOGTO to a different account. Programmers would make all their Account specific data into a single named common that has the flag to initialize on LOGTO. And keep other cross-account data in common that isn't flagged. Easy. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, April 12, 2012 4:56 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] COMMON Size MisMatch Okay that was a bad example. But I think you get my general drift. There are some common variables that are truly universal and should persist. -Original Message- From: Wjhonson wjhon...@aol.com To: u2-users u2-users@listserver.u2ug.org Sent: Thu, Apr 12, 2012 4:49 pm Subject: Re: [U2] COMMON Size MisMatch ou don't really want to clear all common variables all the time. ome common variables are actually universal. Take for example that you store in common the say full name of the user who s logged in, and their extension. hat doesn't change on a logto. Some people use things like that in a LOCKED lause to say John Brown has this locked, call him on extension 7204 so the sers don't have to call the help desk on locks, they can peer to peer it. Sure you can reread things like that. It's half white half black. o I clear half the common ? Or reread half the common? -Original Message- rom: David A. Green dgr...@dagconsulting.com o: 'U2 Users List' u2-users@listserver.u2ug.org ent: Thu, Apr 12, 2012 4:44 pm ubject: Re: [U2] COMMON Size MisMatch hile this topic is on the table, can we request some kind of COMMON flag or mmand that would tell the DBM to clear commons on a LOGTO? avid A. Green 80) 813-1725 G Consulting Original Message- om: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman nt: Thursday, April 12, 2012 2:22 PM : U2 Users List bject: Re: [U2] COMMON Size MisMatch ill: our commentary on this matter is very much appreciated. s long as this new fix works... I expect to defer further investigation. -Bill Original Message- om: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson nt: Thursday, April 12, 2012 4:56 PM : u2-users@listserver.u2ug.org bject: Re: [U2] COMMON Size MisMatch ook inside those routines, and determine that they are agnostic about you ming from LOGIN vs LOGTO Perhaps I'm the sole person in history to have ded things that are wise about the distinction ---Original Message- om: Bill Brutzman bi...@hkmetalcraft.com : U2 Users List u2-users@listserver.u2ug.org nt: Thu, Apr 12, 2012 12:46 pm bject: Re: [U2] COMMON Size MisMatch presume that the following is workable... Comments are welcome. LogTo the SandBox it is now just... D VOC LLS 1: PA 2: CLEARCOMMON 3: LOGTO SANDBOX 4: WHO D VOC LOGIN 1: PA 3: PTERM -ECHO DELAY 5: BREAK ON 7: CLEARCOMMON 9: HK.RESET.PRINTER 1: RUN MT.BP GET.STACK.LOGNAME 3: LOGIN.CONTROL 5: PTERM CASE NOINVERT 6: RUN B.USER TERMINAL.SETUP.R0 8: IF @LOGNAME = 'root'THEN GO TCL 9: IF @LOGNAME = 'brutzy' THEN GO TCL 0: IF @LOGNAME = 'raymond' THEN GO TCL 2: MM 4: TCL: tom at line 24. Bill ---Original Message- m: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] Behalf Of Wjhonson t: Thursday, April 12, 2012 3:08 PM u2-users@listserver.u2ug.org ject: Re: [U2] COMMON Size MisMatch you *do* use CLEARCOMMON you have to be alert to gremlins as well. TO is not expecting to have to reinitialize the system and so probably sn't. need to review what the Login process is doing as well. may end up wiping out control information such as the user's port, name, in time, functions they can and can't do, menu access, default printer, d o on and so forth. l depends on how complex the login processor has become at your site. e sites don't do a darn thing. Some have thousands of lines of code at in. Some of which set common (read environment) variables, that you on't t* to clear, or at least that you want to reset if you do clear them. Original Message- m: Bill Brutzman bi...@hkmetalcraft.com U2 Users List u2-users@listserver.u2ug.org t: Thu, Apr 12, 2012 11:52 am ject: Re: [U2] COMMON Size MisMatch ting my own dog food... I cranked CLEARCOMMON into the LOGTO SandBox and TO LIVE paragraph commands. ill m: u2-users-bounces at listserver.u2ug.org mailto:u2-users-bounces at tserver.u2ug.org] On Behalf Of on_Bausili at hcsc.net : Thursday, July 16, 2009 10:17 AM u2-users at listserver.u2ug.org ect: [U2] Fw: COMMON misMatch ce all common variables are cleared when you exit
Re: [U2] Monitoring a U2 server?
Something that has worked for me in the past is to have a phantom process kick off every ? minutes, gathering useful information, and writing it out as HTML on the network. Then a simple browser can view it as often as they want, I also put a refresh in the HTML so if the browser is constantly opened it will refresh automatically with the new data. Be sure to have a last update date/time to make sure the system is up and running. You can get fancy and have thresholds that could send out an email or sms. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rutherford, Marc Sent: Friday, April 13, 2012 8:50 AM To: u2-users@listserver.u2ug.org Subject: [U2] Monitoring a U2 server? I have a request to help setup a monitoring process for Unidata on HP-UX. So far the outside tools have not been specified, but will most likely be MS Windows based. I am looking for any examples/documentation on what can be done to provide visibility into system status. Has anyone done something similar before? What Unidata and/or HP manuals should I look for? Marc Rutherford Principal Programmer Analyst Advanced Bionics LLC 661) 362 1754 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] COMMON Size MisMatch
Yes, but why make all the programmers in the world repeat this same code over and over? It could easily be accomplished by the database engine. It could be a new keyword across MV database systems. And another step in bring the MV worlds closer together. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists Sent: Friday, April 13, 2012 11:00 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] COMMON Size MisMatch On 13/04/12 15:56, David A. Green wrote: That's why you would specify. Example: COMMON /SYSSTUFF/ SYSSTUFF(100) COMMON /MYSTUFF/ MYSTUFF.REC(100) -CLEAR.ON.LOGTO Then only the MYSTUFF gets cleared. This is the kind of logic that I have to end up writing over and over again to make sure new files get opened when a person does LOGTO to a different account. Programmers would make all their Account specific data into a single named common that has the flag to initialize on LOGTO. And keep other cross-account data in common that isn't flagged. Easy. Actually, that IS easy. TODAY. Let's say you want to store a filepointer to VOC in common, you create the following INCLUDE file... COMMON /VOC/ F.VOC, D.VOC, VOC.OPEN IF VOC.OPEN NE @WHO THEN VOC.OPEN = @WHO OPEN , VOC TO F.VOC ... OPEN DICT, VOC TO D.VOC ... END I hope I've got the right @variable, but as soon as you LOGTO, the IF goes false, and next to you try access it, it will re-initialise itself. Cheers, Wol (Moderator moan - I've just snipped an AWFUL lot of text ...) ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] COMMON Size MisMatch
While this topic is on the table, can we request some kind of COMMON flag or command that would tell the DBM to clear commons on a LOGTO? David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman Sent: Thursday, April 12, 2012 2:22 PM To: U2 Users List Subject: Re: [U2] COMMON Size MisMatch Will: Your commentary on this matter is very much appreciated. As long as this new fix works... I expect to defer further investigation. --Bill -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, April 12, 2012 4:56 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] COMMON Size MisMatch Look inside those routines, and determine that they are agnostic about you coming from LOGIN vs LOGTO Perhaps I'm the sole person in history to have coded things that are wise about the distinction -Original Message- From: Bill Brutzman bi...@hkmetalcraft.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Apr 12, 2012 12:46 pm Subject: Re: [U2] COMMON Size MisMatch I presume that the following is workable... Comments are welcome. To LogTo the SandBox it is now just... ED VOC LLS 001: PA 002: CLEARCOMMON 003: LOGTO SANDBOX 004: WHO ED VOC LOGIN 001: PA 003: PTERM -ECHO DELAY 005: BREAK ON 007: CLEARCOMMON 009: HK.RESET.PRINTER 011: RUN MT.BP GET.STACK.LOGNAME 013: LOGIN.CONTROL 015: PTERM CASE NOINVERT 016: RUN B.USER TERMINAL.SETUP.R0 018: IF @LOGNAME = 'root'THEN GO TCL 019: IF @LOGNAME = 'brutzy' THEN GO TCL 020: IF @LOGNAME = 'raymond' THEN GO TCL 022: MM 024: TCL: ottom at line 24. --Bill -Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] n Behalf Of Wjhonson ent: Thursday, April 12, 2012 3:08 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] COMMON Size MisMatch f you *do* use CLEARCOMMON you have to be alert to gremlins as well. OGTO is not expecting to have to reinitialize the system and so probably oesn't. ou need to review what the Login process is doing as well. ou may end up wiping out control information such as the user's port, name, ogin time, functions they can and can't do, menu access, default printer, and o on and so forth. All depends on how complex the login processor has become at your site. ome sites don't do a darn thing. Some have thousands of lines of code at ogin. Some of which set common (read environment) variables, that you *don't ant* to clear, or at least that you want to reset if you do clear them. -Original Message- rom: Bill Brutzman bi...@hkmetalcraft.com o: U2 Users List u2-users@listserver.u2ug.org ent: Thu, Apr 12, 2012 11:52 am ubject: Re: [U2] COMMON Size MisMatch ating my own dog food... I cranked CLEARCOMMON into the LOGTO SandBox and GTO LIVE paragraph commands. -Bill rom: u2-users-bounces at listserver.u2ug.org mailto:u2-users-bounces at istserver.u2ug.org] On Behalf Of on_Bausili at hcsc.net nt: Thursday, July 16, 2009 10:17 AM : u2-users at listserver.u2ug.org bject: [U2] Fw: COMMON misMatch ince all common variables are cleared when you exit UniVerse, and liminates the rror, is it possible your user used a LOGTO command to witch environments that ave different versions of the subroutine OP.R87? e had both a Test and a Prod environment on the same box, and xperienced roblems when enhanced code in Test was being staged for romotion into Prod. xecuting a program in Test that had changes to ts COMMON, and then logging into rod resulted in the size mismatch rror when running the unchanged program. ur solution was to insert CLEARCOMMON in the LOGIN paragraphs. on --- Forwarded by Don Bausili/OK/HCSC on 07/16/2009 09:09 AM - Brutzman, ill BillB at hkMetalCraft.com Sent by: -users-bounces at listserver.u2ug.org /15/2009 06:55 PM ease respond to 2 Users List u2-users at listserver.u2ug.org o 2 Users List u2-users at listserver.u2ug.org c Subject : [U2] COMMON misMatch A user here obtained an error message... COMMON size mismatch in subroutine HOP.R87. pon logging out and then logging back in again... The HOP program was ble to aunch without this error. elp with a diagnosis and more reliable cure would be appreciated. his user is WinXP / Dynamic Connect / UniVerse 10.1 / HP-Ux 11i v2. -Bill __ -Users mailing list -Users at listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users he information contained in this communication is confidential, rivate, oprietary, or otherwise privileged and is intended only for the use of he ddressee. Unauthorized use, disclosure, distribution or copying is trictly rohibited and may be unlawful. If you have received this ommunication in rror, please notify the sender immediately at (312) 3-6000 in Illinois; (800)835-8699 in New Mexico
Re: [U2] Detecting idle time in INPUT statement.
Don, You should at least optimize the code by just checking a counter and not messing with TIME(). Your NAP command automatically takes care of the amount of time spent in each loop. You just need to count how many NAPs it takes to equal the amount of wait time you wish to have. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Don Robinson Sent: Tuesday, March 27, 2012 11:07 AM To: U2 Users List Subject: Re: [U2] Detecting idle time in INPUT statement. Thanks to all who responded. At the point in the programs where this is a problem for us, we know the user has a lock, we just want to release the lock. This will be done where they already have the option of aborting so no problem with partial updates, etc. The only gotcha on this is if they type one character, the INPUTIF will wait forever on the Enter key but this isn't too likely. The following code does this pretty well. * Don Robinson * Testing the INPUTIF statement. * PROMPT '' * ZZ = '' TIME.OUT.TIME = INT(TIME()) + 10 ;* Wait 10 seconds. LOOP INPUTIF ZZ THEN EXIT NAP 100 IF INT(TIME()) TIME.OUT.TIME THEN CRT 'The user is sleeping' STOP ;* Do whatever you want here. END REPEAT * * User entered something, proceed as usual. * CRT CRT 'User entered: ': ZZ * STOP END Regards, Don Robinson From: Wjhonson wjhon...@aol.com To: u2-users@listserver.u2ug.org Sent: Tuesday, March 27, 2012 1:53 PM Subject: Re: [U2] Detecting idle time in INPUT statement. Right, you don't care if they are at input exactly. You care if they are squatting on a lock. So your periodic lock checker thingie, has to be combined with a nasty email-o-gram campaign Until the users are well edumacated. -Original Message- From: George Gallen ggal...@wyanokegroup.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Tue, Mar 27, 2012 10:44 am Subject: Re: [U2] Detecting idle time in INPUT statement. I guess you would need to merge this with the routine to detect who has locks pen (except running every two mins, not five) To determine who is sitting at an input prompt at a menu (which might be ok), s someone who is sitting at an input Prompt and hogging the locks! George -Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] n Behalf Of Wjhonson ent: Tuesday, March 27, 2012 12:18 PM o: donr_w...@yahoo.com; u2-users@listserver.u2ug.org ubject: Re: [U2] Detecting idle time in INPUT statement. Timed* activity on a *line* is controlled by the O/S not within Universe per e. Or at least you shouldn't expect Universe to keep you informed when lines re idle, natively. So (being on AIX a type of Unix) you are going to need to write a onstantly-running background task which queries the last modified timestamp on he lines and reports on idle lines. This is something controlled in AIX you now. Not just the timestamps but the timeout conditions. But *acting* on these in an automatic fashion would be quite dangerous to the ntegrity of your database, I'm sure you know. his should be used for informational purposes only. You get your reports, itch at the users involved, and gradually they learn to stop doing it. That's the best approach, IMHO, having lived through this exact scenario in many ompanies. Original Message- rom: Don Robinson donr_w...@yahoo.com o: U2 listserver u2-users@listserver.u2ug.org ent: Tue, Mar 27, 2012 6:26 am ubject: [U2] Detecting idle time in INPUT statement. ello all, e are running Universe 10.1 on AIX with about 500 users. We have a problem with ers opening up a record which puts a lock on it and just letting it sit at the PUT statement for a long time. ost of the locking within the application does not use the LOCKED clause so en a second person needs the locked record, their session waits. hat is the best way to detect the user hasn't typed anything for a period of me, say 2 minutes? This needs to be simple as we have no desire to rewrite the plication! IRC, some other MV systems have a timeout on the INPUT but I can't find ything about this in the UV manual. hanks, on Robinson _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman
Re: [U2] keeping track of opened files
Look at SYSTEM(50) David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark Sent: Monday, March 05, 2012 11:42 AM To: U2 Users List Subject: [U2] keeping track of opened files So the guru question is: Does either universe or unidata provide a way to get a list of opened files from some internal list or pool? I don't think so. Your application will need to keep track of each file as it opens them. Somewhere there's a universe technical bulletin that describes a method for this. you use a named common which contains 2 arrays, one for file names, and one for file pointers. When you want to open a file, you LOCATE into the name array and use the associated file pointer if found. If not, you open the file and add the name and pointer to the array. On Mar 5, 2012, at 12:57 PM, Wjhonson wrote: I have to guess that the OP really wanted something like N.FILE = CUSTOMER; GOSUB CHECK.IF.FILE.IS.OPEN IF ERROR.FILE THEN OPEN N.FILE TO F.FILE ELSE do something here END ELSE IS.OPEN = TRUE END CHECK.IF.FILE.IS.OPEN: some function which checks if N.FILE exists in some rotating pool of FILE(MAXFILES) if so return file variable pointer set in F.FILE else set error flag in ERROR.FILE RETURN Of course the pseudo code above has to be filled in with appropriate site specific code Here we use a subroutine FILE.OPEN whose pool of open files lives in global named common I really think that is what the OP was after -Original Message- From: David Wolverton dwolv...@flash.net To: 'U2 Users List' u2-users@listserver.u2ug.org Sent: Mon, Mar 5, 2012 9:51 am Subject: Re: [U2] Hello In that case, where every file is named FILE in your programs, but you ant to make sure FILE is opened against CUSTOMER, I would guess you would o this: IF (FILEINFO(FILE, 0) = 0) THEN OPEN 'CUSTOMER' TO FILE ELSE END ND ELSE IF FILEINFO(FILE,17) # CUSTOMER THEN CLOSE FILE OPEN 'CUSTOMER' TO FILE ELSE END END ND David W. Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Monday, March 05, 2012 11:06 AM o: u2-users@listserver.u2ug.org ubject: Re: [U2] Hello don't think this will work. n your example John, you need to know the file variable assigned to the ile. o F (FILEINFO(CUSTOMER,0)=0) THEN OPEN CUSTOMER TO CUSTOMER ELSE... But you can't use FILEINFO to check CUSTOMER, only to check CUSTOMER. o you can't tell if a file is opened already and to what file variable. ou can only tell if a certain file variable is opened. -Original Message- rom: Israel, John R. johnisr...@daytonsuperior.com o: 'U2 Users List' u2-users@listserver.u2ug.org ent: Mon, Mar 5, 2012 7:56 am ubject: Re: [U2] Hello assume you have some way of knowing what files you want. o something like: F (FILEINFO(yourfilename, 0) = 0) THEN PEN yourfilename ... D ohn Original Message- om: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] Behalf Of Dave Laansma nt: Monday, March 05, 2012 10:38 AM : U2 Users List bject: Re: [U2] Hello kay, I've got a pretty simple question ... ow do I get a list of all files that are currently OPEN so I know whether I ed to open a given file again? incerely, vid Laansma Manager bbard Supply Co. rect: 810-342-7143 fice: 810-234-8681 x: 810-234-6142 w.hubbardsupply.com elivering Products, Services and Innovative Solutions Original Message- om: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of u2ug nt: Monday, March 05, 2012 10:32 AM : U2 Users List bject: [U2] Hello s the list alive ? Haven't seen anything for a week. __ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users __ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] keeping track of opened files
Unless, of course, you use a phantom process to do all of your I/O. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett Sent: Monday, March 05, 2012 12:09 PM To: U2 Users List Subject: Re: [U2] keeping track of opened files However, note that if you're using a web-environment, where your state variables are written to disk between browser calls, this won't work at all, since file-variables cannot be written to disk. So file open functions have to be done locally and not kept in common (as common may change from browser call to browser call) and file-variables cannot be saved to disk. Bill - Original Message - *From:* u...@edclark.net *To:* U2 Users List u2-users@listserver.u2ug.org *Date:* 3/5/2012 10:41 AM *Subject:* [U2] keeping track of opened files So the guru question is: Does either universe or unidata provide a way to get a list of opened files from some internal list or pool? I don't think so. Your application will need to keep track of each file as it opens them. Somewhere there's a universe technical bulletin that describes a method for this. you use a named common which contains 2 arrays, one for file names, and one for file pointers. When you want to open a file, you LOCATE into the name array and use the associated file pointer if found. If not, you open the file and add the name and pointer to the array. On Mar 5, 2012, at 12:57 PM, Wjhonson wrote: I have to guess that the OP really wanted something like N.FILE = CUSTOMER; GOSUB CHECK.IF.FILE.IS.OPEN IF ERROR.FILE THEN OPEN N.FILE TO F.FILE ELSE do something here END ELSE IS.OPEN = TRUE END CHECK.IF.FILE.IS.OPEN: some function which checks if N.FILE exists in some rotating pool of FILE(MAXFILES) if so return file variable pointer set in F.FILE else set error flag in ERROR.FILE RETURN Of course the pseudo code above has to be filled in with appropriate site specific code Here we use a subroutine FILE.OPEN whose pool of open files lives in global named common I really think that is what the OP was after -Original Message- From: David Wolvertondwolv...@flash.net To: 'U2 Users List'u2-users@listserver.u2ug.org Sent: Mon, Mar 5, 2012 9:51 am Subject: Re: [U2] Hello In that case, where every file is named FILE in your programs, but you ant to make sure FILE is opened against CUSTOMER, I would guess you would o this: IF (FILEINFO(FILE, 0) = 0) THEN OPEN 'CUSTOMER' TO FILE ELSE END ND ELSE IF FILEINFO(FILE,17) # CUSTOMER THEN CLOSE FILE OPEN 'CUSTOMER' TO FILE ELSE END END ND David W. Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Monday, March 05, 2012 11:06 AM o: u2-users@listserver.u2ug.org ubject: Re: [U2] Hello don't think this will work. n your example John, you need to know the file variable assigned to the ile. o F (FILEINFO(CUSTOMER,0)=0) THEN OPEN CUSTOMER TO CUSTOMER ELSE... But you can't use FILEINFO to check CUSTOMER, only to check CUSTOMER. o you can't tell if a file is opened already and to what file variable. ou can only tell if a certain file variable is opened. -Original Message- rom: Israel, John R.johnisr...@daytonsuperior.com o: 'U2 Users List'u2-users@listserver.u2ug.org ent: Mon, Mar 5, 2012 7:56 am ubject: Re: [U2] Hello assume you have some way of knowing what files you want. o something like: F (FILEINFO(yourfilename, 0) = 0) THEN PEN yourfilename ... D ohn Original Message- om: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] Behalf Of Dave Laansma nt: Monday, March 05, 2012 10:38 AM : U2 Users List bject: Re: [U2] Hello kay, I've got a pretty simple question ... ow do I get a list of all files that are currently OPEN so I know whether I ed to open a given file again? incerely, vid Laansma Manager bbard Supply Co. rect: 810-342-7143 fice: 810-234-8681 x: 810-234-6142 w.hubbardsupply.com elivering Products, Services and Innovative Solutions ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Including Code - A Best Practice?
I don't think using an INCLUDE is bad, but it must be done in the right way. Pros: * It is the fastest way to use reusable code. * It can be debugged just fine if you use the correct compile arguments. Cons: * You must, MUST, address the variable names. I always prefix mine with CODE$NAME where CODE is the prefix I've chosen for my INCLUDE and should be unique for your system. * You must recompile all instances if you want the change to be updated everywhere. * More difficult to edit program logic, unless you have a nice editor that brings in INCLUDES/INSERTS for you automatically. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker Hughes Sent: Tuesday, February 07, 2012 4:05 PM To: U2 Users List (u2-users@listserver.u2ug.org) Subject: [U2] Including Code - A Best Practice? A friendly discussion arose recently among some U2/MV Developers about whether to include code. If any of you have opinions about the positive aspects or negative aspects of this practice, please respond. Should it be adopted as a best practice, or rejected as special situation use only? Many shops probably include long sections of variable assignments, or perhaps globally opened files. This is pretty much accepted everywhere as a good practice. In question here is the insertion of actual code - business logic or screen I/O programs or code snippets. Maybe you know of methods to overcome some of the obvious downsides: unintended reassignment of local variables, difficulty in debugging, others. What are the positive upsides? Performance gains? What is the longest snippet you think should be included, if allowed? What advantage has included code over a CALL or a Function? Reuse. What else? Can the downsides be mitigated satisfactorily to justify the gains? Thanks so much. -Baker This communication, its contents and any file attachments transmitted with it are intended solely for the addressee(s) and may contain confidential proprietary information. Access by any other party without the express written permission of the sender is STRICTLY PROHIBITED. If you have received this communication in error you may not copy, distribute or use the contents, attachments or information in any way. Please destroy it and contact the sender. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Including Code - A Best Practice?
When you INCLUDE code during compile time it becomes as one, thus all your subroutines are now internal subroutines. And internal subroutines execute about 1000 times (just guessing here it's been a while since I have done timing) faster than calling a subroutine. For debugging, we just had some emails that talked about this very thing. I know you need something like -Z2 -D. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: Baker Hughes [mailto:baker.hug...@mouser.com] Sent: Wednesday, February 08, 2012 8:15 AM To: 'dgr...@dagconsulting.com'; 'U2 Users List' Subject: RE: [U2] Including Code - A Best Practice? David, Could you elaborate a little more on your two positive arguments? Thanks for your insights, and all those shared from others so far. Thank you. -Baker -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David A. Green Sent: Wednesday, February 08, 2012 8:21 AM To: 'U2 Users List' Subject: Re: [U2] Including Code - A Best Practice? I don't think using an INCLUDE is bad, but it must be done in the right way. Pros: * It is the fastest way to use reusable code. * It can be debugged just fine if you use the correct compile arguments. Cons: * You must, MUST, address the variable names. I always prefix mine with CODE$NAME where CODE is the prefix I've chosen for my INCLUDE and should be unique for your system. * You must recompile all instances if you want the change to be updated everywhere. * More difficult to edit program logic, unless you have a nice editor that brings in INCLUDES/INSERTS for you automatically. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker Hughes Sent: Tuesday, February 07, 2012 4:05 PM To: U2 Users List (u2-users@listserver.u2ug.org) Subject: [U2] Including Code - A Best Practice? A friendly discussion arose recently among some U2/MV Developers about whether to include code. If any of you have opinions about the positive aspects or negative aspects of this practice, please respond. Should it be adopted as a best practice, or rejected as special situation use only? Many shops probably include long sections of variable assignments, or perhaps globally opened files. This is pretty much accepted everywhere as a good practice. In question here is the insertion of actual code - business logic or screen I/O programs or code snippets. Maybe you know of methods to overcome some of the obvious downsides: unintended reassignment of local variables, difficulty in debugging, others. What are the positive upsides? Performance gains? What is the longest snippet you think should be included, if allowed? What advantage has included code over a CALL or a Function? Reuse. What else? Can the downsides be mitigated satisfactorily to justify the gains? Thanks so much. -Baker This communication, its contents and any file attachments transmitted with it are intended solely for the addressee(s) and may contain confidential proprietary information. Access by any other party without the express written permission of the sender is STRICTLY PROHIBITED. If you have received this communication in error you may not copy, distribute or use the contents, attachments or information in any way. Please destroy it and contact the sender. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Building an Excel File
I have to say amen to Tony's comments. Why try and reinvent the wheel when there is a utility already written? Or throw out some kludgy solution when a native one can be found? David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Tony Gravagno Sent: Monday, February 06, 2012 8:06 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Building an Excel File Not responding to any particular quote here, just the CSV topic in general. Respected colleagues, CSV is not Excel. If you have an end-user that asks for Excel and you give them a CSV you're just perpetuating the myth that Pick is a dinosaur. They will gladly spend tens of thousands of dollars to replace your application with something that creates real Excel (and PDF) despite the fact that such things can be attained at low cost or no cost right now. Trust me, I've seen it happen. This dove-tails with the reasons why people get 20 people to support Oracle when they can have 3 working on Pick. The reason is that the Oracle people say yes, and give them pretty reports, when their Pick guys say no, and give them plain text in columns and rows and call it Excel. Please don't let that happen to you. Be sure you are properly responding to end-user requests. Just ask them what they do with the documents after you generate them. If they really just want raw data, OK. But if they go on to tell you how many days it takes to reformat the data, assemble the multiple CSVs into a single workbook, etc, then you have found a great deal of room for improvement. Yeah, I've been there too. Off the soapbox, thanks. T ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Passing by Value
I always try to use meaningful variable names. CUSTOMER.CNT = DCOUNT(CUSTOMERS, @VM) FOR CUSTOMER.PTR = 1 TO CUSTOMER.CNT CUSTOMER = CUSTOMER1, CUSTOMER.PTR . . . NEXT CUSTOMER.PTR David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Thursday, January 26, 2012 11:09 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Passing by Value On a related note, any clever ideas to localize a variable to a local subroutine? For I = 1 to 10 GOSUB PROCESS Next I Stop 3000 Lines of code later PROCESS: FOR I = 1 TO 20 PRINT I NEXT I RETURN ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Date comparison
Just adding the advice to make sure all your date dictionaries have Right Justified formats. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Barry Rogen Sent: Tuesday, January 24, 2012 6:18 AM To: U2 Users List (u2-users@listserver.u2ug.org) Subject: [U2] Date comparison We have been experiencing this quite a bit and am not sure why we are getting mis-comparisions. Below is a simplified example of our issue B$CHECK.855.SENT: 51: IF ST.DATE # THEN B$CHECK.855.SENT: 52: IF ST.DATE 12-31-11 THEN B$CHECK.855.SENT: 53:PRINT PL:Date is less than 12-31-11...: : ST.DATE/ STRING: T r L=8 `01-20-12' We have this issue with programs and with SELECT statements throughout. When you qualify a date for this year to a date from 2011 it screws up. Barry Rogen Senior Programmer/Analyst PNY Technologies, Inc. (973) 560-5327 bro...@pny.commailto:bro...@pny.com We are continually faced with great opportunities brilliantly disguised as insoluble problems. John W Gardner [http://thinkbeforeprinting.org/struct/signature-1.gif] NOT INTENDED AS A SUBSTITUTE FOR A WRITING NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER. This e-mail message from PNY Technologies, Inc. is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Brilliant? or not?
Are you trying to emulate C? SMAX = (S1 S2) ? S1 : S2; David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, January 13, 2012 10:42 AM To: u2-users@listserver.u2ug.org Subject: [U2] Brilliant? or not? SMAX = (S1 S2) * S1 + (S2 = S1) * S2 ? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Corrupted compiled code
Maybe you could save off the compiled program before recompiling. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett Sent: Wednesday, December 21, 2011 3:12 PM To: U2 Users List Subject: Re: [U2] Corrupted compiled code The reason I suspected object corruption is I've also had a simple data entry program fail to write one of a number of records, even though 100,000 writes occur fine. The write code looked like, after files have been read locked tested for locked status: 1274 WRITE INVOICEREC ON ARINVOICES, INVOICEID 1275 WRITE INVOICEREC ON ARHISTORY, INVOICEID 1276 WRITE CUSTREC ON ARCUSTOMER, CUSTID ...and the customer record was _NOT_ written. There are no subroutines, or anything else. The 3rd write just didn't occur. A recompile resolved the problem. It's possible the SYSTEM parameter was reset but it's set just before the tcl command was built and the BUILD.HEADING subroutine is called. Once things like this occur I have to fix them, thus my ability to re-create the problem to U2, or any other vendor for that matter, is very limited. Bill - Original Message - *From:* aeger...@pobox.com *To:* U2 Users List u2-users@listserver.u2ug.org *Date:* 12/21/2011 1:59 PM *Subject:* Re: [U2] Corrupted compiled code On 12/21/2011 4:45 PM, Bill Haskett wrote: The incredibly weird thing was the code would do: snip ...which they all did except, occasionally, on this one account. The calculation of the amount of spaces to center the report heading data used SYSTEM(2) and GETPTR in the subroutine BUILD.HEADING. For some reason the corrupted value was 1024 instead of actual value of 80. Thus, when I displayed the TclLine variable, it looked like the one above, except when everything failed, whereupon the variable looked like: snip System(2) is set by the TERM command. Perhaps it's getting reset under some obscure circumstances? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Corrupted compiled code
ASSIGN will also modify SYSTEM(2). Although I can't seem to find the documentation for it. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Allen Egerton Sent: Wednesday, December 21, 2011 3:00 PM To: U2 Users List Subject: Re: [U2] Corrupted compiled code On 12/21/2011 4:45 PM, Bill Haskett wrote: The incredibly weird thing was the code would do: snip ...which they all did except, occasionally, on this one account. The calculation of the amount of spaces to center the report heading data used SYSTEM(2) and GETPTR in the subroutine BUILD.HEADING. For some reason the corrupted value was 1024 instead of actual value of 80. Thus, when I displayed the TclLine variable, it looked like the one above, except when everything failed, whereupon the variable looked like: snip System(2) is set by the TERM command. Perhaps it's getting reset under some obscure circumstances? -- allen egerton; aeger...@pobox.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Show.Timestamp
Will, I would change the CRT to PRINT. This way if you are running it to a log file the output will follow. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Tuesday, December 20, 2011 10:53 AM To: u2-users@listserver.u2ug.org Subject: [U2] Show.Timestamp 0001= TODAY = DATE() 0002= NOW = TIME() 0003= CRT TIMESTAMP FOR :OCONV(TODAY,'D4-'): :OCONV(NOW,MTS): IS : 0004= CRT TODAY:*:NOW ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] TAB.TO.UNIVERSE
We should come up with some standards and collaboration guidelines. But until then here is a suggestion. Make it a subroutine and separate the logic from the interface. This way it can be used by everyone, the Desktop world, TCL world, or whatever interface. Here is a good generic method that works for most subs: SUBROUTINE NAME.SUB(OUTPUTS, INPUTS, FLAG) Where OUTPUTS can be single or multivalued, Having it first on the arguments list allows you to use this subroutine for I-Descriptors. INPUTS can be single or multivalued and if they are multivalued should have an external EQUATE that defines each value. This method also saves you time/money/headache later when you need to add another value. FLAG is your communications flag, I use 0 for successful and an error message if unsuccessful, this too can be enhance to a multivalued level for multiple errors or an error code/message format. Back in the day this was necessary for UniObjects to work and so I have just always had it as the last parameter. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Monday, December 12, 2011 10:36 PM To: u2-users@listserver.u2ug.org Subject: [U2] TAB.TO.UNIVERSE 0001 * 0002 * Writen Dec 2011 by Will Johnson 0003 * Input tab delimited file, output universe file 0004 * BATCH mode does not ask for input at error messages, so it's 0005 *appropriate for PHantoms or any other COMO generating job 0006 * TEST mode does not WRITE, useful for debugging logic ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] End of Month date routine
YEAR = OCONV(PASS.DATE, DY) TEST = ICONV(Feb 29 :YEAR, D) LEAP.YEAR = (STATUS() = 0) David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Daniel McGrath Sent: Tuesday, December 06, 2011 4:22 PM To: U2 Users List Subject: Re: [U2] End of Month date routine Leap years are a little more complex than MOD(YEAR,4) From http://en.wikipedia.org/wiki/Leap_years#Algorithm if year modulo 4 is 0 then if year modulo 100 is 0 then if year modulo 400 is 0 then is_leap_year else not_leap_year else is_leap_year else not_leap_year -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Hester Sent: Tuesday, December 06, 2011 4:16 PM To: U2 Users List Subject: Re: [U2] End of Month date routine Your method is also the way I've always done it, but an alternate method just came to mind: MONTH = OCONV(DATE, 'DM') YEAR = OCONV(DATE, 'D Y[Z4]') LEAP = MOD(YEAR, 4) = 0 MONTHS = '' MONTHS1 = 31 MONTHS2 = 28 + LEAP MONTHS3 = 31 MONTHS4 = 30 MONTHS5 = 31 MONTHS6 = 30 MONTHS7 = 31 MONTHS8 = 31 MONTHS9 = 30 MONTHS10 = 31 MONTHS11 = 30 MONTHS12 = 31 LAST.DAY = MONTHSMONTH Not very concise, but you can tell at a glance how many days your dealing with. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Holt, Jake Sent: Tuesday, December 06, 2011 2:34 PM To: U2 Users List Subject: Re: [U2] End of Month date routine Someone has probably already suggested one like this but I use: DATE = ICONV(2-11-11,'D') MONTH = OCONV(DATE,DM) YEAR = OCONV(DATE,DY) MONTH += 1 IF MONTH 12 THEN MONTH = 1 YEAR += 1 END LAST.DAY = ICONV(MONTH:/1/:YEAR,'D')-1 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] End of Month date routine
Try this routine: SUBROUTINE RPT_DATES(OUT.DATES, IN.DATES, IN.DATE.TYPE, FLAG) * DAG_DATES - By David A. Green -- 1Jun05 * www.dagconsulting.com * * Calculate dates and date ranges * ** Inputs: *IN.DATES - Single or Multivalued List of Dates as reference dates *IN.DATE.TYPE - Type of Date to Calculate, Supported Types are: * FIRST.DAY.OF.MONTH * LAST.DAY.OF.MONTH * LAST.DAY.OF.PREVIOUS.MONTH * LAST.DAY.OF.NEXT.MONTH * FIRST.DAY.OF.YEAR * LAST.DAY.OF.YEAR * CALC.NUMBER.OF.MONTHS * YEAR.ARRAY.OF.MONTHS * YEAR.ARRAY.OF.QUARTERS * TODAY * FIRST.DAY.OF.PREVIOUS.MONTH * FIRST.DAY.OF.NEXT.MONTH * YEAR *FLAG - Flag can be used to Fudge a date or Exact dates * FUDGE - Will subtract 7 days from the IN.DATES and return * a First or Last Date based on the fudged IN.DATES. * EXACT - Will use IN.DATES as passed to subroutine. (default) * ** Outputs: *OUT.DATES - Calculated Dates based on Input Parameters *FLAG - Set with error messages if any * EQUATE TRUE TO 1, FALSE TO 0 * GOSUB INIT.SUB * IN.DATES = IN.DATES ;* Reset Remove Pointer (Necessary because variable gets set in another program) MORE.DATES = (IN.DATES # ) LOOP WHILE MORE.DATES AND NOT(ABORT.FLAG) DO IN.DATE = REMOVE(IN.DATES, MORE.DATES) - FUDGE.DAYS GOSUB INIT.DATE IF NOT(ABORT.FLAG) THEN BEGIN CASE CASE IN.DATE.TYPE = FIRST.DAY.OF.MONTH ; GOSUB DO.FIRST.DAY.OF.MONTH CASE IN.DATE.TYPE = LAST.DAY.OF.MONTH ; GOSUB DO.LAST.DAY.OF.MONTH CASE IN.DATE.TYPE = LAST.DAY.OF.PREVIOUS.MONTH ; GOSUB DO.LAST.DAY.OF.PREVIOUS.MONTH CASE IN.DATE.TYPE = LAST.DAY.OF.NEXT.MONTH ; GOSUB DO.LAST.DAY.OF.NEXT.MONTH CASE IN.DATE.TYPE = FIRST.DAY.OF.YEAR ; GOSUB DO.FIRST.DAY.OF.YEAR CASE IN.DATE.TYPE = LAST.DAY.OF.YEAR; GOSUB DO.LAST.DAY.OF.YEAR CASE IN.DATE.TYPE = CALC.NUMBER.OF.MONTHS ; GOSUB DO.CALC.NUMBER.OF.MONTHS CASE IN.DATE.TYPE = YEAR.ARRAY.OF.MONTHS; GOSUB DO.YEAR.ARRAY.OF.MONTHS CASE IN.DATE.TYPE = YEAR.ARRAY.OF.QUARTERS ; GOSUB DO.YEAR.ARRAY.OF.QUARTERS CASE IN.DATE.TYPE = TODAY ; GOSUB DO.TODAY CASE IN.DATE.TYPE = FIRST.DAY.OF.PREVIOUS.MONTH ; GOSUB DO.FIRST.DAY.OF.PREVIOUS.MONTH CASE IN.DATE.TYPE = FIRST.DAY.OF.NEXT.MONTH ; GOSUB DO.FIRST.DAY.OF.NEXT.MONTH CASE IN.DATE.TYPE = YEAR; GOSUB DO.YEAR CASE 1; GOSUB INVALID.TYPE END CASE BEGIN CASE CASE IN.DATE.TYPE = YEAR.ARRAY.OF.MONTHS CASE IN.DATE.TYPE = YEAR.ARRAY.OF.QUARTERS CASE 1; OUT.DATES1, OUT.DATE.PTR = OUT.DATE END CASE END REPEAT * RETURN ! DO.FIRST.DAY.OF.MONTH: BEGIN CASE CASE DATE.FORMAT = MD ; THE.DATE = IN.MONTH:/01/:IN.YEAR CASE DATE.FORMAT = DM ; THE.DATE = 01/:IN.MONTH:/:IN.YEAR END CASE OUT.DATE = ICONV(THE.DATE, D) RETURN ! DO.FIRST.DAY.OF.PREVIOUS.MONTH: GOSUB DEC.IN.MONTH BEGIN CASE CASE DATE.FORMAT = MD ; THE.DATE = IN.MONTH:/01/:IN.YEAR CASE DATE.FORMAT = DM ; THE.DATE = 01/:IN.MONTH:/:IN.YEAR END CASE OUT.DATE = ICONV(THE.DATE, D) RETURN ! DO.FIRST.DAY.OF.NEXT.MONTH: GOSUB INC.IN.MONTH BEGIN CASE CASE DATE.FORMAT = MD ; THE.DATE = IN.MONTH:/01/:IN.YEAR CASE DATE.FORMAT = DM ; THE.DATE = 01/:IN.MONTH:/:IN.YEAR END CASE OUT.DATE = ICONV(THE.DATE, D) RETURN ! DO.LAST.DAY.OF.MONTH: GOSUB INC.IN.MONTH GOSUB DO.FIRST.DAY.OF.MONTH OUT.DATE -= 1 RETURN ! DO.LAST.DAY.OF.PREVIOUS.MONTH: GOSUB DO.FIRST.DAY.OF.MONTH OUT.DATE -= 1 RETURN ! DO.LAST.DAY.OF.NEXT.MONTH: GOSUB INC.IN.MONTH GOSUB DO.LAST.DAY.OF.MONTH RETURN ! INC.IN.MONTH: IN.MONTH += 1 IF IN.MONTH 12 THEN IN.MONTH = 1 ; IN.YEAR += 1 RETURN ! DEC.IN.MONTH: IN.MONTH -= 1 IF IN.MONTH 1 THEN IN.MONTH = 12 ; IN.YEAR -= 1 RETURN ! DO.FIRST.DAY.OF.YEAR: OUT.DATE = ICONV(01 JAN :IN.YEAR, D) RETURN ! DO.LAST.DAY.OF.YEAR: OUT.DATE = ICONV(31 DEC :IN.YEAR, D) RETURN ! DO.CALC.NUMBER.OF.MONTHS: BEGIN CASE CASE
Re: [U2] End of Month date routine
Who wants to take each of the Leap Year calculations and put them into different subroutines and loop 100K times and see which one is faster using profiling? David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] End of Month date routine
Okay I took the fastest routine and made it into an $INSERT piece of code: YEAR = OCONV(THE.DATE, DY) IF MOD(YEAR,4) THEN LEAP.YEAR = 0 END ELSE IF MOD(YEAR, 100) THEN LEAP.YEAR = 1 END ELSE IF MOD(YEAR, 400) THEN LEAP.YEAR = 0 ELSE LEAP.YEAR = 1 END END Then created a Function like: FUNCTION LEAP.YEAR.FUN( THE.DATE ) $INSERT LEAP.YEAR.INS RETURN LEAP.YEAR And a Subroutine like: SUBROUTINE LEAP.YEAR.SUB( LEAP.YEAR, THE.DATE ) $INSERT LEAP.YEAR.INS RETURN Then modified Daniel's test program like: DEFFUN LEAP.YEAR.FUN( THE.DATE ) EQU LC TO 1000 * ST = TIME() FOR THE.DATE = 1 TO LC LEAP.YEAR = LEAP.YEAR.FUN( THE.DATE ) NEXT THE.DATE TS = TIME() CRT TS - ST * * ST = TIME() FOR THE.DATE = 1 TO LC CALL LEAP.YEAR.SUB( LEAP.YEAR, THE.DATE ) NEXT THE.DATE TS = TIME() CRT TS - ST * ST = TIME() FOR THE.DATE = 1 TO LC $INSERT LEAP.YEAR.INS NEXT THE.DATE TS = TIME() CRT TS - ST * END The speed results: Function 24 seconds Subroutine 21 seconds Insert 11 seconds Not surprising results given what we know about these three methods. Although the function method did get better since the last time I've test it. UD 6.1 Other systems will vary. But this is a good example of working together to enhance the U2 products, now we all have the same Leap Year calculation and those that were using the MOD(YEAR, 4) method should now use this method everywhere as to avoid data corruption. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: Daniel McGrath [mailto:dmcgr...@rocketsoftware.com] Sent: Wednesday, December 07, 2011 11:57 AM To: dgr...@dagconsulting.com; U2 Users List Subject: RE: [U2] End of Month date routine I added the code to PasteBin so as to not flood here: http://pastebin.com/JMyqhFud I did a few more than 100K and I cut the OCONV step out from all of them. I took the liberty to adjust Will's version to return correct results. The results I got, in order, was: 16.872 2.804 2.384 5.561 So, if you have a need to account for your milliseconds, the slightly optimized Wikipedia algorithm seems to be the fastest. Interested to see if there are any better? (Or if I made any mistakes...) Regards, Dan -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David A. Green Sent: Wednesday, December 07, 2011 10:48 AM To: 'U2 Users List' Subject: Re: [U2] End of Month date routine Who wants to take each of the Leap Year calculations and put them into different subroutines and loop 100K times and see which one is faster using profiling? David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Avoiding deadly embraces
I find the best practice is to try and lock and read all the necessary components before the first update. That way if an item we need to update as we go along is unavailable we catch it up front and don't get stuck. Or if you have TRANSACTION PROCESSING in place you can just to an ABORT. I would also never just READU but do the RECORDLOCK or the READU with the LOCKED clause to be able to control program flow. You can send messages to those users that have the locked items even a text message or email. If you are in a nightly batch process then do as another suggested and keep a list of IDs and try to process them again at the end. Send an exception report via email to the ones in charge. Set inactivity timeouts on record updates that require user intervention. It would be awfully sad if Shipping can't ship because a Customer Service Rep was going to update the customers email and then got called away. Something else that helps, keep the transactional data in a separate file than the master record. For instance the Last_Shipped data shouldn't be in the same record as the Customer's Address and email. This way the customer screen can show the data in a view only mode with no need to lock the record that the shipping department will need to update to do its job. David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Universe error message 5000
Looks like Chinese year of the ... -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com Sent: Wednesday, August 17, 2011 5:36 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Universe error message 5000 005000 001 Monkey 002 Cock 003 Dog 004 Boar 005 Rat 006 Ox 007 Tiger 008 Rabbit 009 Dragon 010 Snake 011 Horse 012 Sheep ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] uniobjects question
Doug if you need to satisfy an input, you have to write a wrapper that takes the subroutine inputs and converts them into DATA statements, then you call your program with the INPUTS. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Chanco Sent: Monday, August 08, 2011 6:57 AM To: U2 Users List Subject: Re: [U2] uniobjects question I totally agree with your response but what me and the java developer are discussing is if it's even possible (I say nay) I will write a java program to test but I was hoping with the vast sea of knowledge on this group that someone would know, if it was possible or not Yes it should never be done and yes your standards are spot on. This is just a I wonder if this is possible question Dougc email signature There are 10 kinds of people in the world, those that know binary and those that do not. On Aug 6, 2011, at 17:45, Tony Gravagno 3xk547...@sneakemail.com wrote: I thought this coding paradigm was already universally accepted (pun intended). The code below exemplifies a number of techniques for processing remote requests. Specifically: - Never CRT or INPUT. - Never STOP on error, always return - Standardize the subroutine input signature so that all subs look alike to clients, and allow for values that accommodate almost every need. - Modularize every request. In the code below the response could be passed back with the save, but that may not fit the needs. - Return a response for all requests, whether data in OUTVAL or a non-null ERRor value. - Clients need to pass in some sort of state to identify them. Read user state on entry and write it back when you're done. If you're running multiple processes, Common can't be used to maintain state between user sessions. - INVAL and OUTVAL below are used for data. If either value is a full record then MISC can be used for the key or other metadata. - You don't need more than one subroutine as the entry point for an entire application. Below, WEB.IO is the one and only sub ever called by clients. This facilitates and localizes logging, security, and environment setup. - A single entry point can still pass requests for more complex functions to other subs. - Establish a firm protocol between client developers and MV BASIC developers where every Operation is defined and handled. The details below are irrelevant, but I've used this fundamental design principle for the last decade and it works perfectly for every client technology, every MV platform, and every application Every product in the industry that I've seen does exactly the same thing. Emulate success. A major part of my business revolves around writing interfaces like this, fleshing out the details below to suit specific needs, and adding many more features of use in various application scenarios. Inquiries welcome. HTH SUB WEB.IO(OPERATION,INVAL,OUTVAL,MISC,STATEINFO,ERR) OUTVAL = ERR = OPEN WEB.STATE TO WS ELSE ERR = Critical server error, missing WEB.STATE file RETURN END USER = FIELD(STATEINFO,CHAR(9),1) BEGIN CASE CASE OPERATION=GET PROMPT OUTVAL = Enter your name CASE OPERATION = SAVE NAME WRITE INVAL ON WS,WEB.IO.NAME_:USER OUTVAL = SAVED CASE OPERATION = GET RESPONSE READ USER.NAME FROM WS,WEB.IO.NAME_:USER OUTVAL = 'the user said his name was ':USER.NAME CALL OPERATION = SOMETHING COMPLEX CALL WEB.COMPLEX1(OPERATION,INVAL,OUTVAL,MISC,STATEINFO,ERR) CASE 1 ERR = Invalid server operation requested END CASE RETURN Tony Gravagno Nebula Research and Development TG@ remove.pleaseNebula-RnD.com Nebula RD sells mv.NET worldwide and provides related development services remove.pleaseNebula-RnD.com/blog Visit PickWiki.com! Contribute! http://Twitter.com/TonyGravagno ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] CONV MCU on indexed field?
Chris, I would create a new i-descriptor dictionary called UNAME. The formula would do the uppercase logic like: OCONV(NAME, MCU) or UPCASE(NAME). Then build your index on UNAME. And use UNAME in your SELECT statements for a filter and display NAME for output. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin Sent: Tuesday, July 26, 2011 9:25 AM To: u2-users@listserver.u2ug.org Subject: [U2] CONV MCU on indexed field? We've been using the following command to select a name regardless of how it's capitalized: SELECT CLIENT WITH NAME CONV MCU = BRUCE] However, after I indexed the field NAME on the CLIENT table the same command only returns the values that match the case-sensitive. In other words after we indexed the field name it doesn't seem that we can use CONV MCU, is there a work around to this? Thanks, Chris ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Simple FMT question
Works for me on UniData 6.1 :SPOOL BP DAG.TEST -OT PROGRAM DAG.TEST * X = 1 X = FMT(X, 4\0R) PRINT X END :DAG.TEST 0001 : David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bob Woodward Sent: Friday, July 08, 2011 12:17 PM To: u2-users@listserver.u2ug.org Subject: [U2] Simple FMT question Hi Group, I don't know why this is kicking my butt but I'm trying to do a simple X = FMT(X,4\0R) statement, straight out of the HELP UNIBASIC listing and I can't seem to get it to work. The problem is the fill character, in this case the number zero, but what I get back is just the letter R, without the quote marks. I get pretty much the same result no matter what fill character I use. I simply want to format a number to be 4 characters long with leading zeros. If X=1, then it should result in X=0001, or so I've been lead to believe. I know that X = (:X)[4] works to get my results but FMT should work, too. The major benefit is that if the number is more than 4 digits, FMT won't truncate it. I hope. Environment is UniData 6.1 on a Windows server. Comments anyone? Thanks, BobW ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Simple FMT question
Bob, Format will Truncate or add a Text Mark at any overflow. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bob Woodward Sent: Friday, July 08, 2011 12:17 PM To: u2-users@listserver.u2ug.org Subject: [U2] Simple FMT question Hi Group, I don't know why this is kicking my butt but I'm trying to do a simple X = FMT(X,4\0R) statement, straight out of the HELP UNIBASIC listing and I can't seem to get it to work. The problem is the fill character, in this case the number zero, but what I get back is just the letter R, without the quote marks. I get pretty much the same result no matter what fill character I use. I simply want to format a number to be 4 characters long with leading zeros. If X=1, then it should result in X=0001, or so I've been lead to believe. I know that X = (:X)[4] works to get my results but FMT should work, too. The major benefit is that if the number is more than 4 digits, FMT won't truncate it. I hope. Environment is UniData 6.1 on a Windows server. Comments anyone? Thanks, BobW ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Conversion Documentation
FORMAT() David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of jjuser ud2 Sent: Wednesday, June 15, 2011 12:49 PM To: U2 Users List Subject: [U2] Conversion Documentation Good afternoon, Which piece of documentation covers things like VARIABLEONE = VARIABLEL(#33) and VARIABLETWO = VARIABLER(%9) please? I can find OCONV documentation left and right, but I can't seem to find a reference that says what the equivalent of these statements is. I've used them in the past, but I'd like to know what exactly it is that I'm doing when I use them rather than just blindly following examples that I've seen to produce results I want. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Uniquery
Try: X.LIST.STMT:= \HEADER AR Invoices with customer last name \:V.JS.VAR1:\and customer first name John.\ David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Greg Coelho Sent: Friday, May 27, 2011 3:28 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Uniquery U2 Users! I am trying to pass in arguments into a UniQuery form using JSPARAMS. This works fine when I working with a SELECT LIST: V.JS.VAR1 = Smith PROCEDURE LINE SELECT PERSON WITH LAST.NAME EQ :V.JS.VAR1 But when I try to pass this into a literal statement such as a HEADER - things go haywire (process goes into a loop) X.LIST.STMT:= \HEADER AR Invoices with customer last name :V.JS.VAR1: and customer first name John.\ Does anyone have any clues as to what I should be looking for - UDT.OPTIONS, HEADING settings? Also, when I pass in a V.JS.DATE.VAR to the HEADER I get the internal date regardless how I try to format it. Any insight would be greatly appreciated. Thanks, Greg ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [UV] Emulate SQL MAX() function at TCL
What comes to mind are these: 1. Have a the system write the Max key somewhere. 2. Create a Trigger that keeps a max key updated. 3. Create an Index then use a SUBR to access the Max Key. 4. If this statement is used a lot then every time you run it update your own Max Key and start looking from that point. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Boydell, Stuart Sent: Thursday, May 26, 2011 11:04 PM To: U2 Users List Subject: [U2] [UV] Emulate SQL MAX() function at TCL Just wondering if anyone has a neat trick for picking up the highest ID from a file. Where the file ID is an integer. With UVSQL I would SELECT MAX(@ID) FROM TABLE; - however, the program I need to do this within has the file (table) open and if I try to execute it returns the error 'Non-SQL re-entrant query calls are not allowed.' The best I have so far is: st = 'SELECT FILE @ID BY.DSND @ID' st-1 = 'LIST ONLY FILE SAMPLE 1' exec st capturing cap maxId = trim(cap4) Any other ideas? Cheers, Stuart ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Multi char delimiter in DICT item
Bob is right. Lets enhance the FIELD function to accept a string delimiter and not just a single character. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bob Woodward Sent: Thursday, May 19, 2011 11:11 AM To: U2 Users List Subject: [U2] Multi char delimiter in DICT item Hi folks, I'm in Unidata 6.1 and I'm trying to find a way to use a multi character value as a delimiter for a parsing function in an I-desc dict item. I'm working with Bartender label data records and I'm trying to parse the first line on the /PRN= value, without the quote marks. FIELD only lets me use a single character. What I have so far in the DICT item is: 001: I 002: F1;FIELD(@1,'PRN=',2);FIELD(@2,'',2) 003: 004: PRN 005: 15L 006: S This works great until a capital P is in the label name before the PRN. Field is taking the first character and ignoring the RN=. I do NOT want to make a subroutine if I can avoid it. I've tried using CHANGE to swap out PRN= with a single character but apparently that's not an allowed command in the DICT items. Thanks for any help you can offer. BobW ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Does anyone us Magento as a front end
Does anyone us Magento as a front end web development tools with UniData? What kind of path do you use? Client Web Server SQL Server UniData Or Client Web Server UniData David A. Green (480) 813-1725 DAG Consulting ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Very Weird Trigger Behavior
I would change the SELECT to an XLATE command. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of jonathanm Sent: Thursday, April 21, 2011 8:03 AM To: u2-users@listserver.u2ug.org Subject: [U2] Very Weird Trigger Behavior Hi, all. I'm new to this forum, but have been programming multivalue database apps for years. I ran across something here that really has me puzzled. I wonder if anyone has seen something like this and might be able to shed a bit of light as to what's happening. I'm running Unidata 6.0 on hpux. I have a trigger set up to run before deletions take place on a file called CODE_DEFS. The file just contains code numbers (ID) and their meaning/description. There's another file, TRADES, that contains a field, TRADE_CODE, that should have a many-to-one relationship with IDs in CODE_DEFS. That is, the content of TRADE_CODE should match a record ID in CODE_DEFS. Before a record is deleted from CODE_DEFS, I want to ensure its ID does not appear in any record in TRADES. That's where the trigger comes in. The trigger is passed the ID of the record to be deleted. This is done via parameter variable CODE_DEF_ID. The trigger program, CHECK_TRADES, has the following logic: --- . . . CMD='SELECT TRADES WITH TRADE_CODE = ':CODE_DEF_ID:'' EXECUTE CMD IF SYSTEM(11) THEN * there's a select list, so the code is still in use in TRADES. * Return 0 in EXECUTE_STATUS to disallow the deletion. EXECUTE_STATUS=0 END . . . --- The problem is when I try to delete a record from CODE_DEFS, using a TCL DELETE command, I get the following error message. '' is not a record in TRADES Of course, there are two problems with the error message. Not only has it lost the ID of the record to be deleted, it has also lost the name of the file. Notice that it is looking in the TRADES file instead of CODE_DEFS. I believe what's happening is when it EXECUTEs the CMD, the internal variables for ID and filename are being reset. To support this hunch, I changed the trigger routine so that CMD=DATE, causing it to execute the TCL DATE command. Here's the error message from that: '' is not a record in CODE_DEFS And if I make CMD=COUNT CUST, which makes the trigger deal with a completely unrelated file, I get this error message: '' is not a record in @7X% So, it appears that any EXECUTE is going to lose the ID, and if CMD deals with any file, the filename is reset also. I really need to have it perform the intended check before deletion. Any ideas? -- View this message in context: http://old.nabble.com/Very-Weird-Trigger-Behavior-tp31450305p31450305.html Sent from the U2 - Users mailing list archive at Nabble.com. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users