Re: [U2] INPUTIF statement in Universe {Unclassified}
UniData 7.1.9 --- Using list filename field-a field-b TO DELIM | c:\Test.txt Works and generates a Pipe Delimited text file... (I have to use 'lowercase LIST' so that it does work due to ECLTYPE, but that's OK) BUT -- I need the resulting file to be tab-delimited - the 'consumer' for the file is a stupid old program and cannot accept XML. It can only eat tab, or comma delimited files. And since some of the data CONTAINS commas, the TAB seems to be the better choice. Using TO DELIM ^009 will not work that I can see. And I think in this day and age, having to write a program to generate this simple of a file seems a bit over the top!! The other choice - building a dictionary called tab -- but I need to extract about 40 fields for this issue, so I was hoping to NOT have to build a 'hard coded' dictionary that was itself just a CHAR(9) so that my command line does not have 'tab' as every other word and get near the 'max length' along the way! That is, I didn't think I should have to do this: list CLIENT.MASTER field-a tab field-b tab field-c TO c:\test.txt I mean, tab delimited file. How routine is that?? Why would I have to build a 'fake dictionary' to handle that? Am I missing something? How do others deal with this issue? Or is the 'fake dictionary' the 'state of the art' methodology today?? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF statement in Universe {Unclassified}
Cedarville Download David Wolverton wrote: UniData 7.1.9 --- Using list filename field-a field-b TO DELIM | c:\Test.txt Works and generates a Pipe Delimited text file... (I have to use 'lowercase LIST' so that it does work due to ECLTYPE, but that's OK) BUT -- I need the resulting file to be tab-delimited - the 'consumer' for the file is a stupid old program and cannot accept XML. It can only eat tab, or comma delimited files. And since some of the data CONTAINS commas, the TAB seems to be the better choice. Using TO DELIM ^009 will not work that I can see. And I think in this day and age, having to write a program to generate this simple of a file seems a bit over the top!! The other choice - building a dictionary called tab -- but I need to extract about 40 fields for this issue, so I was hoping to NOT have to build a 'hard coded' dictionary that was itself just a CHAR(9) so that my command line does not have 'tab' as every other word and get near the 'max length' along the way! That is, I didn't think I should have to do this: list CLIENT.MASTER field-a tab field-b tab field-c TO c:\test.txt I mean, tab delimited file. How routine is that?? Why would I have to build a 'fake dictionary' to handle that? Am I missing something? How do others deal with this issue? Or is the 'fake dictionary' the 'state of the art' methodology today?? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF statement in Universe {Unclassified}
BUT -- I need the resulting file to be tab-delimited - the 'consumer' for the file is a stupid old program and cannot accept XML. It can only eat tab, or comma delimited files. And since some of the data CONTAINS commas, the TAB seems to be the better choice. How about list filename field-a field-b TO DELIM CHAR(9) c:\Test.txt Charles Shaffer Senior Analyst NTN-Bower Corporation ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF statement in Universe {Unclassified}
WELL -- I guess I could go the 3rd Party Product route -- but come on! EVERY database product can do what I'm asking. It's not rocket science or anything! (pun unintended!) I could just write BASIC code if I wanted - I'm trying to find what I'm thinking should already be 'inside' of UniData. If the answer is 'it is not there' then I will be forced to ask if someone from Rocket can address 'why not'?? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Tuesday, November 02, 2010 1:25 PM To: U2 Users List Subject: Re: [U2] INPUTIF statement in Universe {Unclassified} Cedarville Download David Wolverton wrote: UniData 7.1.9 --- Using list filename field-a field-b TO DELIM | c:\Test.txt Works and generates a Pipe Delimited text file... (I have to use 'lowercase LIST' so that it does work due to ECLTYPE, but that's OK) BUT -- I need the resulting file to be tab-delimited - the 'consumer' for the file is a stupid old program and cannot accept XML. It can only eat tab, or comma delimited files. And since some of the data CONTAINS commas, the TAB seems to be the better choice. Using TO DELIM ^009 will not work that I can see. And I think in this day and age, having to write a program to generate this simple of a file seems a bit over the top!! The other choice - building a dictionary called tab -- but I need to extract about 40 fields for this issue, so I was hoping to NOT have to build a 'hard coded' dictionary that was itself just a CHAR(9) so that my command line does not have 'tab' as every other word and get near the 'max length' along the way! That is, I didn't think I should have to do this: list CLIENT.MASTER field-a tab field-b tab field-c TO c:\test.txt I mean, tab delimited file. How routine is that?? Why would I have to build a 'fake dictionary' to handle that? Am I missing something? How do others deal with this issue? Or is the 'fake dictionary' the 'state of the art' methodology today?? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF statement in Universe {Unclassified}
Here in the U.S.A it is election day Nov 2nd. And as such it puts me in a 'political' frame of mind. So: ASK NOT WHAT YOUR DATABASE CAN DO FOR YOU, BUT WHAT CAN YOU DO FOR YOUR DATABASE. besides dropping indexes and adding null keys. Garry L. Smith -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David Wolverton Sent: Tuesday, November 02, 2010 2:24 PM To: 'U2 Users List' Subject: Re: [U2] INPUTIF statement in Universe {Unclassified} WELL -- I guess I could go the 3rd Party Product route -- but come on! EVERY database product can do what I'm asking. It's not rocket science or anything! (pun unintended!) I could just write BASIC code if I wanted - I'm trying to find what I'm thinking should already be 'inside' of UniData. If the answer is 'it is not there' then I will be forced to ask if someone from Rocket can address 'why not'?? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Tuesday, November 02, 2010 1:25 PM To: U2 Users List Subject: Re: [U2] INPUTIF statement in Universe {Unclassified} Cedarville Download David Wolverton wrote: UniData 7.1.9 --- Using list filename field-a field-b TO DELIM | c:\Test.txt Works and generates a Pipe Delimited text file... (I have to use 'lowercase LIST' so that it does work due to ECLTYPE, but that's OK) BUT -- I need the resulting file to be tab-delimited - the 'consumer' for the file is a stupid old program and cannot accept XML. It can only eat tab, or comma delimited files. And since some of the data CONTAINS commas, the TAB seems to be the better choice. Using TO DELIM ^009 will not work that I can see. And I think in this day and age, having to write a program to generate this simple of a file seems a bit over the top!! The other choice - building a dictionary called tab -- but I need to extract about 40 fields for this issue, so I was hoping to NOT have to build a 'hard coded' dictionary that was itself just a CHAR(9) so that my command line does not have 'tab' as every other word and get near the 'max length' along the way! That is, I didn't think I should have to do this: list CLIENT.MASTER field-a tab field-b tab field-c TO c:\test.txt I mean, tab delimited file. How routine is that?? Why would I have to build a 'fake dictionary' to handle that? Am I missing something? How do others deal with this issue? Or is the 'fake dictionary' the 'state of the art' methodology today?? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ 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] INPUTIF statement in Universe {Unclassified}
2 line program works: STMT = 'LIST CUSTOMER NAME TO DELIM ' :CHAR(9): ' wwtestjunk' EXECUTE STMT Also - if you are using dictionary items with conversion codes and want the data in the output file to have the conversion code applied, don't forget to first run the ECL command: UDT.OPTIONS 91 ON Wally Terhune U2 Support Architect Rocket Software 4600 South Ulster Street, Suite 1100 **Denver, CO 80237 **USA Tel: +1.720.475.8055 Email: wterh...@rs.com Web: www.rocketsoftware.com/u2 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David Wolverton Sent: Tuesday, November 02, 2010 3:24 PM To: 'U2 Users List' Subject: Re: [U2] INPUTIF statement in Universe {Unclassified} WELL -- I guess I could go the 3rd Party Product route -- but come on! EVERY database product can do what I'm asking. It's not rocket science or anything! (pun unintended!) I could just write BASIC code if I wanted - I'm trying to find what I'm thinking should already be 'inside' of UniData. If the answer is 'it is not there' then I will be forced to ask if someone from Rocket can address 'why not'?? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF statement in Universe {Unclassified}
Well I'm running Universe as as far as I know TO DELIM does not exist here. DOWNLOAD is free, it works well, and you can be using it in under 30 minutes. David Wolverton wrote: WELL -- I guess I could go the 3rd Party Product route -- but come on! EVERY database product can do what I'm asking. It's not rocket science or anything! (pun unintended!) I could just write BASIC code if I wanted - I'm trying to find what I'm thinking should already be 'inside' of UniData. If the answer is 'it is not there' then I will be forced to ask if someone from Rocket can address 'why not'?? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Schasny Sent: Tuesday, November 02, 2010 1:25 PM To: U2 Users List Subject: Re: [U2] INPUTIF statement in Universe {Unclassified} Cedarville Download David Wolverton wrote: UniData 7.1.9 --- Using list filename field-a field-b TO DELIM | c:\Test.txt Works and generates a Pipe Delimited text file... (I have to use 'lowercase LIST' so that it does work due to ECLTYPE, but that's OK) BUT -- I need the resulting file to be tab-delimited - the 'consumer' for the file is a stupid old program and cannot accept XML. It can only eat tab, or comma delimited files. And since some of the data CONTAINS commas, the TAB seems to be the better choice. Using TO DELIM ^009 will not work that I can see. And I think in this day and age, having to write a program to generate this simple of a file seems a bit over the top!! The other choice - building a dictionary called tab -- but I need to extract about 40 fields for this issue, so I was hoping to NOT have to build a 'hard coded' dictionary that was itself just a CHAR(9) so that my command line does not have 'tab' as every other word and get near the 'max length' along the way! That is, I didn't think I should have to do this: list CLIENT.MASTER field-a tab field-b tab field-c TO c:\test.txt I mean, tab delimited file. How routine is that?? Why would I have to build a 'fake dictionary' to handle that? Am I missing something? How do others deal with this issue? Or is the 'fake dictionary' the 'state of the art' methodology today?? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF statement in Universe {Unclassified}
This worked great. Our CPU utilization went to 0 down from 25%. Thanks to all! -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Leverett, Brendon Sent: Tuesday, October 26, 2010 3:03 PM To: U2 Users List Subject: Re: [U2] INPUTIF statement in Universe {Unclassified} Experienced a similar thing a while back and decided to use NAP as well. Even went as far as changing the NAP depending on how long the period of inactivity has been. Sample code: LASTTIME = TIME() FOUND.CMD = @FALSE LOOP UNTIL FOUND.CMD DO ELAPSED = TIME() - LASTTIME GOSUB SET.NAP.TIME IF TIME() - LASTTIME GT QUIT.TIME THEN STOP (or exit or whatever is best for you) INPUTIF TCL.CMD THEN FOUND.CMD = @TRUE ELSE NAP NAPTIME REPEAT * SET.NAP.TIME: * * Minimise looping by NAPing before doing the next INPUTIF check. * Set NAP time as an increasing amount depending on the period of * inactivity BEGIN CASE CASE ELAPSED LT 60 NAPTIME = 100 ; * Up to 1 min, pause for 0.1 seconds CASE ELAPSED LT 300 NAPTIME = 200 ; * Up to 5 mins, pause for 0.2 seconds CASE ELAPSED LT 600 NAPTIME = 500 ; * Up to 10 mins, pause for 0.5 seconds CASE ELAPSED LT 900 NAPTIME = 1000 ; * Up to 15 mins, pause for 1 second CASE 1 NAPTIME = 2000 ; * More than 15 mins, pause for 2 seconds END CASE RETURN Brendon -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of HENDERSON MIKE, MR Sent: Wednesday, 27 October 2010 8:31 AM To: U2 Users List Subject: Re: [U2] INPUTIF statement in Universe {Unclassified} I.E., add the line with NAP in it. You may want to try different NAP intervals to work out the best balance between snappy user response and CPU usage. OK = 0 ; START.DT = DATE() ; START.TM = TIME(); TIME.OUT = 900 LOOP INPUTIF PSN THEN OK = @TRUE ELSE NAP 100 ; Doze 100 milliseconds = 1/10 sec OK = ((DATE()-START.DT)*86400)+TIME()-START.TM TIME.OUT IF OK THEN IF EDIT.FLG THEN PSN = '' ELSE PSN = 'Q' END END UNTIL OK DO REPEAT __ -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com Sent: Wednesday, 27 October 2010 10:14 a.m. To: u2-users@listserver.u2ug.org Subject: Re: [U2] INPUTIF statement in Universe In a message dated 10/26/2010 11:58:58 AM Pacific Daylight Time, eric.rosenzw...@petco.com writes: In testing, it's the INPUTIF statement that's utilizing the CPU, not the timer calculation. Is there a better, less CPU intensive way to do this? Thanks in advance. INPUTIF checks the type-ahead buffer every time slice. You're getting so many slices that your CPU is consumed with this one task of checking the type-ahead buffer. It's frenetic, a CPU on crystal meth. In the old days, we would say Release Timeslices RQM. Today you can solve that issue as well, by adding a Sleep for a 1 second. On systems that allow sleeping for periods less than a second, you only really need to add a sleep for a tenth of a second, to see your CPU suddenly quiesce. Will Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users The information contained in this Internet Email message is intended for the addressee only and may contain privileged information, but not necessarily the official views or opinions of the New Zealand Defence Force. If you are not the intended recipient you must not use, disclose, copy or distribute this message or the information in it. If you have received this message in error, please Email or telephone the sender immediately. ___ 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] INPUTIF statement in Universe
In a message dated 10/26/2010 11:58:58 AM Pacific Daylight Time, eric.rosenzw...@petco.com writes: In testing, it's the INPUTIF statement that's utilizing the CPU, not the timer calculation. Is there a better, less CPU intensive way to do this? Thanks in advance. INPUTIF checks the type-ahead buffer every time slice. You're getting so many slices that your CPU is consumed with this one task of checking the type-ahead buffer. It's frenetic, a CPU on crystal meth. In the old days, we would say Release Timeslices RQM. Today you can solve that issue as well, by adding a Sleep for a 1 second. On systems that allow sleeping for periods less than a second, you only really need to add a sleep for a tenth of a second, to see your CPU suddenly quiesce. Will Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF statement in Universe
Hi Eric, We get around this by using an optimistic locking strategy if and only if there must be user input between the original record read and final record write. Depending on the usage of your system, this might prove to be a better solution? Regards, Dan -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Eric Rosenzweig Sent: Wednesday, 27 October 2010 5:58 AM To: U2 Users List Subject: [U2] INPUTIF statement in Universe We are on an IBM AIX 5.3 box with 32 CPU and 32GB of memory running Universe 10.2.4 As we've increased our user count I'm noticing several applications that use the INPUTIF statement coming to the top of CPU usage. We have users that go into a product record, lock it, and then leave their desk or go onto something else leaving the lock and therefore keeping other people out of updating that record. We use the INPUTIF with a timer loop to gracefully exit the program and release the record if there hasn't been activity in 10 minutes. In testing, it's the INPUTIF statement that's utilizing the CPU, not the timer calculation. Is there a better, less CPU intensive way to do this? Thanks in advance. Here's the code we currently employ: OK = 0 ; START.DT = DATE() ; START.TM = TIME(); TIME.OUT = 900 LOOP INPUTIF PSN THEN OK = @TRUE ELSE OK = ((DATE()-START.DT)*86400)+TIME()-START.TM TIME.OUT IF OK THEN IF EDIT.FLG THEN PSN = '' ELSE PSN = 'Q' END END UNTIL OK DO REPEAT Eric Rosenzweig eri...@petco.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ### The information transmitted in this message and attachments (if any) is intended only for the person or entity to which it is addressed. The message may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. The intended recipient of this e-mail may only use, reproduce, disclose or distribute the information contained in this e-mail and any attached files with the permission of IMB. ### ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF statement in Universe {Unclassified}
I.E., add the line with NAP in it. You may want to try different NAP intervals to work out the best balance between snappy user response and CPU usage. OK = 0 ; START.DT = DATE() ; START.TM = TIME(); TIME.OUT = 900 LOOP INPUTIF PSN THEN OK = @TRUE ELSE NAP 100 ; Doze 100 milliseconds = 1/10 sec OK = ((DATE()-START.DT)*86400)+TIME()-START.TM TIME.OUT IF OK THEN IF EDIT.FLG THEN PSN = '' ELSE PSN = 'Q' END END UNTIL OK DO REPEAT __ -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com Sent: Wednesday, 27 October 2010 10:14 a.m. To: u2-users@listserver.u2ug.org Subject: Re: [U2] INPUTIF statement in Universe In a message dated 10/26/2010 11:58:58 AM Pacific Daylight Time, eric.rosenzw...@petco.com writes: In testing, it's the INPUTIF statement that's utilizing the CPU, not the timer calculation. Is there a better, less CPU intensive way to do this? Thanks in advance. INPUTIF checks the type-ahead buffer every time slice. You're getting so many slices that your CPU is consumed with this one task of checking the type-ahead buffer. It's frenetic, a CPU on crystal meth. In the old days, we would say Release Timeslices RQM. Today you can solve that issue as well, by adding a Sleep for a 1 second. On systems that allow sleeping for periods less than a second, you only really need to add a sleep for a tenth of a second, to see your CPU suddenly quiesce. Will Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users The information contained in this Internet Email message is intended for the addressee only and may contain privileged information, but not necessarily the official views or opinions of the New Zealand Defence Force. If you are not the intended recipient you must not use, disclose, copy or distribute this message or the information in it. If you have received this message in error, please Email or telephone the sender immediately. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF statement in Universe {Unclassified}
Experienced a similar thing a while back and decided to use NAP as well. Even went as far as changing the NAP depending on how long the period of inactivity has been. Sample code: LASTTIME = TIME() FOUND.CMD = @FALSE LOOP UNTIL FOUND.CMD DO ELAPSED = TIME() - LASTTIME GOSUB SET.NAP.TIME IF TIME() - LASTTIME GT QUIT.TIME THEN STOP (or exit or whatever is best for you) INPUTIF TCL.CMD THEN FOUND.CMD = @TRUE ELSE NAP NAPTIME REPEAT * SET.NAP.TIME: * * Minimise looping by NAPing before doing the next INPUTIF check. * Set NAP time as an increasing amount depending on the period of * inactivity BEGIN CASE CASE ELAPSED LT 60 NAPTIME = 100 ; * Up to 1 min, pause for 0.1 seconds CASE ELAPSED LT 300 NAPTIME = 200 ; * Up to 5 mins, pause for 0.2 seconds CASE ELAPSED LT 600 NAPTIME = 500 ; * Up to 10 mins, pause for 0.5 seconds CASE ELAPSED LT 900 NAPTIME = 1000 ; * Up to 15 mins, pause for 1 second CASE 1 NAPTIME = 2000 ; * More than 15 mins, pause for 2 seconds END CASE RETURN Brendon -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of HENDERSON MIKE, MR Sent: Wednesday, 27 October 2010 8:31 AM To: U2 Users List Subject: Re: [U2] INPUTIF statement in Universe {Unclassified} I.E., add the line with NAP in it. You may want to try different NAP intervals to work out the best balance between snappy user response and CPU usage. OK = 0 ; START.DT = DATE() ; START.TM = TIME(); TIME.OUT = 900 LOOP INPUTIF PSN THEN OK = @TRUE ELSE NAP 100 ; Doze 100 milliseconds = 1/10 sec OK = ((DATE()-START.DT)*86400)+TIME()-START.TM TIME.OUT IF OK THEN IF EDIT.FLG THEN PSN = '' ELSE PSN = 'Q' END END UNTIL OK DO REPEAT __ -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com Sent: Wednesday, 27 October 2010 10:14 a.m. To: u2-users@listserver.u2ug.org Subject: Re: [U2] INPUTIF statement in Universe In a message dated 10/26/2010 11:58:58 AM Pacific Daylight Time, eric.rosenzw...@petco.com writes: In testing, it's the INPUTIF statement that's utilizing the CPU, not the timer calculation. Is there a better, less CPU intensive way to do this? Thanks in advance. INPUTIF checks the type-ahead buffer every time slice. You're getting so many slices that your CPU is consumed with this one task of checking the type-ahead buffer. It's frenetic, a CPU on crystal meth. In the old days, we would say Release Timeslices RQM. Today you can solve that issue as well, by adding a Sleep for a 1 second. On systems that allow sleeping for periods less than a second, you only really need to add a sleep for a tenth of a second, to see your CPU suddenly quiesce. Will Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users The information contained in this Internet Email message is intended for the addressee only and may contain privileged information, but not necessarily the official views or opinions of the New Zealand Defence Force. If you are not the intended recipient you must not use, disclose, copy or distribute this message or the information in it. If you have received this message in error, please Email or telephone the sender immediately. ___ 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] INPUTIF
IN THE FOLLOWING BIT OF CODE, MOST NOTABLE THE INPUTIF, WHEN THIS IS RUN USING A TELNET SESSION, EVERYTHING WORKS JUST FINE, WHEN THE CONNECTION IS SSH1 EVERYTHING IS FINE, HOWEVER, RUNNING IT USING SSH2 IT TAKE ABOUT 20 SECONDS BEFORE YOU GET ANYTHING TO RESPOND AFTER YOU INPUT. WE ARE USING UV 10.3 AND AIX 5.3 SUBROUTINE TIMER2(ANS,HUSH,SECONDS,POS1,POS2) *TLK DIFFERS FROM LBP TIMER, WAITS FOR CR AFTER INPUT STOP=0 ; Y=SECONDS IF Y='' THEN Y=5 PROMPT'' 10: TIME.SAV=TIME() TIME.SAV=FIELD(TIME.SAV,.,1) IF STOP=0 THEN TIME.STOP=TIME.SAV+Y END DONE=0 LOOP UNTIL DONE DO TIME = TIME() TIME =FIELD(TIME,.,1) IF TIME TIME.SAV THEN DONE=1 IF TIME TIME.STOP THEN ANS='' ; RETURN PRINT @(POS1,POS2) : ; INPUTIF ANS ELSE ANS='' IF ANS#'' THEN RETURN REPEAT IF NOT(HUSH) THEN PRINT @(10,23): COUNTDOWN :Y: END PRINT @(POS1,POS2) : ; INPUTIF ANS ELSE ANS='' IF ANS#'' THEN RETURN Y=Y-1 STOP=1 GOTO 10 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF
First, check if your 'Caps Lock' key is broken. :) Next, check your SSH2 and SSH1 settings are the same on your AIX server. Finally what version of SSH server are you using? SSH Tectia or OpenSSH server? I've read about bugs in SSH2 and seen poor SSH2 implementations on terminal emulators before. Yours could be your terminal emulator, not necessarily your server. Are you or have used PuTTY with SSH2 to eliminate that as the root cause? :) -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Lloyd Cottrell Sent: Wednesday, 23 December 2009 9:20 AM To: u2-users@listserver.u2ug.org Subject: [U2] INPUTIF IN THE FOLLOWING BIT OF CODE, MOST NOTABLE THE INPUTIF, WHEN THIS IS RUN USING A TELNET SESSION, EVERYTHING WORKS JUST FINE, WHEN THE CONNECTION IS SSH1 EVERYTHING IS FINE, HOWEVER, RUNNING IT USING SSH2 IT TAKE ABOUT 20 SECONDS BEFORE YOU GET ANYTHING TO RESPOND AFTER YOU INPUT. WE ARE USING UV 10.3 AND AIX 5.3 SUBROUTINE TIMER2(ANS,HUSH,SECONDS,POS1,POS2) *TLK DIFFERS FROM LBP TIMER, WAITS FOR CR AFTER INPUT STOP=0 ; Y=SECONDS IF Y='' THEN Y=5 PROMPT'' 10: TIME.SAV=TIME() TIME.SAV=FIELD(TIME.SAV,.,1) IF STOP=0 THEN TIME.STOP=TIME.SAV+Y END DONE=0 LOOP UNTIL DONE DO TIME = TIME() TIME =FIELD(TIME,.,1) IF TIME TIME.SAV THEN DONE=1 IF TIME TIME.STOP THEN ANS='' ; RETURN PRINT @(POS1,POS2) : ; INPUTIF ANS ELSE ANS='' IF ANS#'' THEN RETURN REPEAT IF NOT(HUSH) THEN PRINT @(10,23): COUNTDOWN :Y: END PRINT @(POS1,POS2) : ; INPUTIF ANS ELSE ANS='' IF ANS#'' THEN RETURN Y=Y-1 STOP=1 GOTO 10 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ** IMPORTANT MESSAGE * This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: commbank.com.au. If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. ** ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] INPUTIF
the version running ssh2 is OpenSSH_4.7p1, OpenSSL 0.9.8f 11 Oct 2007 the only different between a very old version of ssh1 and this newer one is the compression is yes on ssh1 and delayed on ssh2 and amazingly putty works fine. i do use accuterm for the emulator. and i hope that the lower case is more to everyones liking. On Tue, Dec 22, 2009 at 4:02 PM, Hona, David david.h...@cba.com.au wrote: First, check if your 'Caps Lock' key is broken. :) Next, check your SSH2 and SSH1 settings are the same on your AIX server. Finally what version of SSH server are you using? SSH Tectia or OpenSSH server? I've read about bugs in SSH2 and seen poor SSH2 implementations on terminal emulators before. Yours could be your terminal emulator, not necessarily your server. Are you or have used PuTTY with SSH2 to eliminate that as the root cause? :) -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Lloyd Cottrell Sent: Wednesday, 23 December 2009 9:20 AM To: u2-users@listserver.u2ug.org Subject: [U2] INPUTIF IN THE FOLLOWING BIT OF CODE, MOST NOTABLE THE INPUTIF, WHEN THIS IS RUN USING A TELNET SESSION, EVERYTHING WORKS JUST FINE, WHEN THE CONNECTION IS SSH1 EVERYTHING IS FINE, HOWEVER, RUNNING IT USING SSH2 IT TAKE ABOUT 20 SECONDS BEFORE YOU GET ANYTHING TO RESPOND AFTER YOU INPUT. WE ARE USING UV 10.3 AND AIX 5.3 SUBROUTINE TIMER2(ANS,HUSH,SECONDS,POS1,POS2) *TLK DIFFERS FROM LBP TIMER, WAITS FOR CR AFTER INPUT STOP=0 ; Y=SECONDS IF Y='' THEN Y=5 PROMPT'' 10: TIME.SAV=TIME() TIME.SAV=FIELD(TIME.SAV,.,1) IF STOP=0 THEN TIME.STOP=TIME.SAV+Y END DONE=0 LOOP UNTIL DONE DO TIME = TIME() TIME =FIELD(TIME,.,1) IF TIME TIME.SAV THEN DONE=1 IF TIME TIME.STOP THEN ANS='' ; RETURN PRINT @(POS1,POS2) : ; INPUTIF ANS ELSE ANS='' IF ANS#'' THEN RETURN REPEAT IF NOT(HUSH) THEN PRINT @(10,23): COUNTDOWN :Y: END PRINT @(POS1,POS2) : ; INPUTIF ANS ELSE ANS='' IF ANS#'' THEN RETURN Y=Y-1 STOP=1 GOTO 10 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ** IMPORTANT MESSAGE * This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: commbank.com.au. If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. ** ___ 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] INPUTIF
So you only have a SSH2 problem when using Accuterm? I guess you've asked them for a new release of their SSH2 module/DLL or package? Or at least they're investigating this themselves. PuTTY offers lots of SSH/SSH2 options for debugging / optimisation / customisation... does Accuterm? Just curious... -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Lloyd Cottrell Sent: Wednesday, 23 December 2009 10:43 AM To: U2 Users List Subject: Re: [U2] INPUTIF the version running ssh2 is OpenSSH_4.7p1, OpenSSL 0.9.8f 11 Oct 2007 the only different between a very old version of ssh1 and this newer one is the compression is yes on ssh1 and delayed on ssh2 and amazingly putty works fine. i do use accuterm for the emulator. and i hope that the lower case is more to everyones liking. On Tue, Dec 22, 2009 at 4:02 PM, Hona, David david.h...@cba.com.au wrote: First, check if your 'Caps Lock' key is broken. :) Next, check your SSH2 and SSH1 settings are the same on your AIX server. Finally what version of SSH server are you using? SSH Tectia or OpenSSH server? I've read about bugs in SSH2 and seen poor SSH2 implementations on terminal emulators before. Yours could be your terminal emulator, not necessarily your server. Are you or have used PuTTY with SSH2 to eliminate that as the root cause? :) ** IMPORTANT MESSAGE * This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: commbank.com.au. If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. ** ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users