RE: [U2] Normal SELECT behavior? [UD]

2008-11-05 Thread Keith Johnson [DATACOM]
LIST POH F1 WITH F1 = 000700 will do a numeric comparison if it can. You can force a string comparison by using LIST POH F1 WITH F1 LIKE '000700' That is; double quote, single quote, zero, zero, zero, seven, zero, zero, single quote, double quote. Regards, Keith --- u2-users mailing list

Re: [U2] DO/WHILE vs IF THEN

2009-03-02 Thread Keith Johnson [DATACOM]
Mark Johnson suggested the following change Before GOOD.ANS=FALSE LOOP UNTIL GOOD.ANS DO PRINT ENTER 'Y' OR 'N' :;INPUT ANS IF ANS=Y OR ANS=N THEN GOOD.ANS=TRUE REPEAT after LOOP WHILE TRUE DO PRINT ENTER 'Y' OR 'N' :;INPUT ANS IF ANS=Y OR ANS=N THEN EXIT REPEAT These forms all work

RE: [U2] UV Timed INPUT

2009-03-15 Thread Keith Johnson [DATACOM]
David Norman asked for a timed input for Universe. There is a program to replicate the Unidata timed input at http://www.pickwiki.com/cgi-bin/wiki.pl?InputWait --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/

Re: [U2] [UV] UniVerse Uptime

2011-02-17 Thread Keith Johnson [DATACOM]
We stop and start the Universe database and do a UNIX backup, so either ps -e -o etime -o comm | grep uvdlockd Or ps -e -o etime -o comm | grep unirpcd Seem to be reasonable ways of seeing how long it's been up Regards, Keith

Re: [U2] Is this worth rewriting?

2011-03-02 Thread Keith Johnson [DATACOM]
Agreed that the dimensioned extract wouldn't make much difference, still the attributes numbers are quite high. The code below goes from 15 extracts maximum per for-next loop to 6. I can't help but think this might mean something if it takes 90 minutes to run. 001: MONTHLY.USAGE: 002: CM =

Re: [U2] Is this worth rewriting?

2011-03-03 Thread Keith Johnson [DATACOM]
I liked Brian's IF (TEA : EAT : ATE) # '' THEN CUM(M) = TEA + EAT + ATE It looks neater in VLIST - don't know if it's faster. multi_cat might be a beast 2: IF (TEA : EAT : ATE) # '' THEN X = TEA + EAT + ATE 2 00012 : 104 multi_cat TEA EAT ATE = $R0 2 0001E : 106 ne

Re: [U2] Is this worth rewriting?

2011-03-03 Thread Keith Johnson [DATACOM]
Lots of things I didn't think of... My last try 001: MONTHLY.USAGE: 002: CM = MONTH + LY.CNT 003: TEA = RAISE(PARMS(12)101) 004: EAT = RAISE(PARMS(12)133) 005: ATE = RAISE(PARMS(12)134) 006: YAM = RAISE(PARMS(7)100) 007: AMY = RAISE(PARMS(7)101) 008: MYA = RAISE(PARMS(7)102) 009: FOR M = 1 TO 12

[U2] LED editor for Universe

2011-05-05 Thread Keith Johnson [DATACOM]
The latest version I use has a copy at https://sites.google.com/site/nzpickie/home/programs It has a BLEACH command to turn colour on and off - named after Brian Leach who let me steal his method! The colour options are based on HostAccess - other terminals have different methods. Modifying

Re: [U2] UniBasic SELECT

2011-07-31 Thread Keith Johnson [DATACOM]
The problem may be in the use of program variables in the executed code. Using Universe, if I have code: VERB = 'SELECT VOC LIKE A...' EXECUTE VERB CRT @SELECTED CLEARSELECT I get the result 237 record(s) selected to SELECT list #0. 237 If I change the filename to something that doesn't exit,

Re: [U2] Simple Masking of Password Input (Universe Basic)

2011-08-16 Thread Keith Johnson [DATACOM]
It's not all that simple, but try http://www.pickwiki.com/cgi-bin/wiki.pl?FieldInput ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users

Re: [U2] Changing TCL prompt?

2011-10-05 Thread Keith Johnson [DATACOM]
This program works for Universe on a UNIX machine giving three commands PATH FULL would give aprompt like /usr/ibm/uv PATHwould give a prompt like uv PATH CLEAR would give a prompt like PROGRAM PATH

Re: [U2] End of Month date routine

2011-12-05 Thread Keith Johnson [DATACOM]
Dave Laansma took a more generic approach which does not require knowledge of the date format - hence I thought it preferable. My style would move the addition and subtraction around as below I assumed one would want the last day of the month for any called date otherwise uncomment line 2

Re: [U2] End of Month date routine

2011-12-06 Thread Keith Johnson [DATACOM]
Mr Castro's code wins. Pure elegance. Marco Antonio Rojas Castro - initials M.A.R.C. My uncle's name is Roy Owen Young - I tease him it's so he can remember it. Regards, Keith ___ U2-Users mailing list U2-Users@listserver.u2ug.org

Re: [U2] Building an Excel File

2012-02-08 Thread Keith Johnson [DATACOM]
I'm curious; was the university in Florida Barry University? Someone I worked with years ago went there as a Pick programmer. The following code might be helpful subroutine ucsv(result,source,status,is.oconv) * * Public Domain program for OpenQM by Keith Johnson 2012 * * OCONV Converts

Re: [U2] Code style ? or code silliness ?

2012-03-25 Thread Keith Johnson [DATACOM]
The examples as given were not equivalent. THE.READ = STR('0',DIALS-LEN(THE.READ)):THE.READ versus THE.JUST = R#:LEN(THE.READ); THE.READ = THE.READ THE.JUST Apart from the % to # change, the second example ignores DIALS and justifies within the length of THE.READ I assume the second one

Re: [U2] Detecting idle time in INPUT statement.

2012-03-27 Thread Keith Johnson [DATACOM]
If anyone DOES want the equivalent of Unidata's INPUT... WAITING for Universe... http://www.pickwiki.com/cgi-bin/wiki.pl?InputWait Regards, Keith ___ U2-Users mailing list U2-Users@listserver.u2ug.org

Re: [U2] EXIT ; EXIT inside a loop

2012-04-23 Thread Keith Johnson [DATACOM]
I think the UNTIL should be in behind NEXT A2, rather than on the FOR line. Hoping to lighten the day... BAIL = 0 FOR A1 = 1 TO XYZZY FOR A2 = 1 TO Y little twisted logic IF G # H THEN BAIL = 51 ;* error code UNTIL BAIL DO twisted little logic

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-23 Thread Keith Johnson [DATACOM]
I prefer the layout of IF A = TEST THEN GOSUB DO.SOMETHING ;* Say why ELSE GOSUB DO.SOMETHING.ELSE ;* The reason However, here is a form that's rarely used, but does work. IF A = TEST THEN ;* say why in a long-winded manner GOSUB DO.SOMETHING END

Re: [U2] Case Statement with only two cases... or for that matter... one case

2012-04-25 Thread Keith Johnson [DATACOM]
Hi Will, As I said, I don't use it myself, but a reason one might use it is that one can easily cut and paste (or include) logic. For example: --- LOCKED put some generic logic here END --- regards, Keith WJohnson wrote: Why the extra lines? Why not just

Re: [U2] The CONTINUE statement

2012-04-29 Thread Keith Johnson [DATACOM]
Just to be annoyingly pedantic - the second code snippet is missing an END FOR I = 1 TO X do something IF some condition THEN CONTINUE do something else NEXT I Versus FOR I = 1 TO X do something IF NOT(some condition) THEN do something else NEXT I

Re: [U2] The RETURN TO statement was the CONTINUE statement

2012-04-29 Thread Keith Johnson [DATACOM]
Hi Wil, They can't do that because then their line editor would break - It has 58 occurances of RETURN TO Message: 27 Date: Fri, 27 Apr 2012 08:38:05 -0400 (EDT) From: Wjhonson wjhon...@aol.com To: u2-users@listserver.u2ug.org Subject: Re: [U2] The RETURN TO statement was the CONTINUE

Re: [U2] RETURN TO (again)

2012-04-29 Thread Keith Johnson [DATACOM]
I never used it in anger, but I was rather drawn to the Presley-friendly form SENDER: RETURN TO SENDER I actually used the following progam a long time ago, but only to test that EQU...LIT... workedhow I thought it did. Try it - Press T a few times then X and watch it unwind the call stack.

Re: [U2] READU vs READ

2012-05-01 Thread Keith Johnson [DATACOM]
If the multivalues have many many values, and you are adding to the end, then a speed up may be possible. MATREAD in the data, RAISE those array elements you are changing. Before the MATWRITE, LOWER all array elements you raised. As I understand it, Universe keeps internal track on

Re: [U2] Proc question

2012-05-08 Thread Keith Johnson [DATACOM]
Hi Kebbon, I don't like Procs, but * Set the primary input buffer as active SP * Activate the primary output buffer STOFF * Alternatively, clear both output buffers and make the primary the active one RO * Set the input buffer pointer to the first (or whatever) parameter S1 * Move a

Re: [U2] Is there any way to tell if I am in an EXECUTE level and CAPTURING is turned on?

2012-06-27 Thread Keith Johnson [DATACOM]
Hi Doug, Another way to skin the cat- Check the @LEVEL in the error display program and if it's not 1 use a timed input. Unidata has INPUT WAITING, while for Universe, there is a program do do the same at http://www.pickwiki.com/cgi-bin/wiki.pl?InputWait Perhaps do the timed input anyway with

Re: [U2] Is there any way to tell if I am in an EXECUTE level and CAPTURING is turned on?

2012-07-03 Thread Keith Johnson [DATACOM]
I just noticed this in the help for QM's SYSTEM() 1000 Returns 1 if EXECUTE CAPTURING is in effect, 0 otherwise Checked if this was an undocumented feature that Martin had reproduced; but no, it doesn't work in Universe. Regards, Keith ___

[U2] Exiting UniData

2012-07-03 Thread Keith Johnson [DATACOM]
Hi John, I'm on an SB+ site on Universe which is completely unrelated to Epicor. Our QUIT is an exact copy of SH.OFF, which is a local catalogue pointer to the program code. I believe SH.OFF tidies up various SB+ stuff and then chains to OFF, and that this is the standard behaviour of SB+

Re: [U2] RESIZE - dynamic files

2012-07-03 Thread Keith Johnson [DATACOM]
Doug may have had a key bounce in his input Let's do the math: 258687736 (Record Size) 192283300 (Key Size) The key size is actually 19283300 in Chris' figures Regarding 68,063 being less than the current modulus of 82,850. I think the answer may lie in the splitting process.

Re: [U2] trimming a list (a test of your ability)

2012-07-16 Thread Keith Johnson [DATACOM]
Universe gives a slight lead to -1 too. Also, it compiles Y = Y:CHAR(254):I and Y := CHAR(254):I to exactly the same thing. I checked with VLIST and even edited the compiled code to be sure. ALSO (and this surprised me) it doesn't support ROUNDS *= 2 The documenation (Universe BASIC 2-25)

Re: [U2] CSV to Array

2012-08-20 Thread Keith Johnson [DATACOM]
No-one seems to have done it, but here's my version of the code. It's strange, I don't have a problem with CONTINUE and I don't even mind IF SOMETHING ELSE THIS = THAT which a lot of people really hate, but I just HAD to reverse the IF/CASE statement order. SUBROUTINE REXY(RECORD,TEXT)

Re: [U2] Dumping data to file from TCL

2013-02-24 Thread Keith Johnson [DATACOM]
Hi Phil, If it's just a matter of turning a two-step process into one step, would a Paragraph be reasonable? Just thinking of something along the lines of... PA IF I2,File = '' THEN GO ENDIT IF I3,IType = '' THEN GO ENDIT IF I4,ExportDirectory = '' THEN GO ENDIT IF I5,Datadump.dat = '' THEN GO

Re: [U2] 'DBTA 100: The Companies That Matter Most in Data'

2013-06-05 Thread Keith Johnson [DATACOM]
DBTA has always been sympathetic to the MV market. I note not only Rocket but also Entrinsik, Kore, Mpower1, Pickcloud, Revelation in the list Regards, Keith ___ U2-Users mailing list U2-Users@listserver.u2ug.org

Re: [U2] What is true

2013-07-31 Thread Keith Johnson [DATACOM]
Hi Wil, That indeed was my code - ten years old now! I think I read the same article as Kevin. I don't use it in my day to day programming (which is in Universe and QM, thus using @TRUE and @FALSE) but I think I still would use it for Pickwiki. Just a style thing - de gustibus non disputandum

Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine

2014-01-28 Thread Keith Johnson [DATACOM]
Hi, LeRoy Dreyfuss said that you would have to change 52 to 12 for EXIST to work. The globally cataloged programs have an extra 40 characters put on the front, so that would cause a problem. @RECORD[1,4] is a count of the number of times the program has been used. @RECORD[5,8] is who

Re: [U2] Left Outer Join Question

2014-03-05 Thread Keith Johnson [DATACOM]
I wrote a paragraph called ML to use MERGE.LIST on saved lists - much easier than assembling the lists manually. PA * ML type list1 list2 list3 * I2,TYPE IF TYPE = U THEN GO THERE IF TYPE = D THEN GO THERE IF TYPE = I THEN GO THERE DISPLAY DISPLAY Command Format is DISPLAY ML type list1 list2