Re: [U2] Reposting help request for Unidata site

2012-01-26 Thread John Thompson
Ick. I sent him a message asking for more details. I have some experience with Hyper V, as cantankerous as it is :( Not one of my favorite VM environments. On Thu, Jan 26, 2012 at 12:46 AM, Tony Gravagno 3xk547...@sneakemail.comwrote: Reposted as a favor, by permission, from the Pick Users

[U2] Passing by Value

2012-01-26 Thread Kebbon Irwin
Unidata 7.1 I think this has come up before (side question: how do you search the archives?)... I think it is possible to pass a parameter by value instead of by reference. This, of course, means that any changes to the parameter in the called subroutine are localized and its original value

Re: [U2] Passing by Value

2012-01-26 Thread Rex Gozar
Put the variable in parentheses to pass by value, e.g. CALL MYSUB((VAR1)) rex On Thu, Jan 26, 2012 at 9:39 AM, Kebbon Irwin kebbon.ir...@sympatico.ca wrote: Unidata 7.1 I think this has come up before (side question: how do you search the archives?)...  I think it is possible to pass a

Re: [U2] Passing by Value

2012-01-26 Thread Dave Davis
Use parentheses when you call: CALL MY.SUBR((firstval), (secondval), etc) -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kebbon Irwin Sent: Thursday, January 26, 2012 9:40 AM To: u2-users@listserver.u2ug.org

Re: [U2] Passing by Value

2012-01-26 Thread Martin Phillips
Hi, It is possible from the calling side, simply by enclosing the argument variable in parentheses, effectively making it an expression. It is not possible from the subroutine except by copying the argument to a local variable. Martin Phillips Ladybridge Systems Ltd 17b Coldstream Lane,

Re: [U2] Passing by Value

2012-01-26 Thread Tony Gravagno
CALL SUBNAME( IVAR+0 , AVAR: ) From: Kebbon Irwin I think it is possible to pass a parameter by value instead of by reference. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
Very sly. -Original Message- From: Tony Gravagno 3xk547...@sneakemail.com To: u2-users u2-users@listserver.u2ug.org Sent: Thu, Jan 26, 2012 7:17 am Subject: Re: [U2] Passing by Value CALL SUBNAME( IVAR+0 , AVAR: ) From: Kebbon Irwin I think it is possible to pass a parameter by

Re: [U2] Passing by Value

2012-01-26 Thread John Hester
Well, that's a neat trick I've never known about. Once again, this list proves it's an invaluable resource. I've always done it on the subroutine side like so: CALL NON.MODIFYING.SUB (THIS.VAR) SUBROUTINE NON.MODIFYING.SUB (GLOBAL.THIS.VAR) THIS.VAR = GLOBAL.THIS.VAR THIS.VAR = THAT.VAR RETURN

Re: [U2] Passing by Value

2012-01-26 Thread John Hester
Hmm... Not sure why Outlook put the subroutine code all on one line. I'll try again: CALL NON.MODIFYING.SUB (THIS.VAR) SUBROUTINE NON.MODIFYING.SUB (GLOBAL.THIS.VAR) THIS.VAR = GLOBAL.THIS.VAR THIS.VAR = THAT.VAR RETURN -Original Message- From: u2-users-boun...@listserver.u2ug.org

Re: [U2] Passing by Value

2012-01-26 Thread Ed Clark
Essentially, adding the () or +0 or : creates an expression. CALL then passes the result of the expression instead of the address of the variable. You get the same result by passing a dynamic array reference like IVAR1, though not a dimensioned array reference like A(5), because each array

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
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

Re: [U2] Passing by Value

2012-01-26 Thread Dave Davis
By way of naming convention: FOR PROCESS_I = 1 TO 20 -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 1:09 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Passing by

Re: [U2] Passing by Value

2012-01-26 Thread David A. Green
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:

Re: [U2] Passing by Value

2012-01-26 Thread Israel, John R.
To avoid this very situation, I give my loop variables very generic name (like XX1) and then verify that XX1 is either not used or at least will not get caught in a conflicting condition. Using XX1 also suggests that it is not a meaningful name (CUST.NAME suggests it is the customer name) and

Re: [U2] Passing by Value

2012-01-26 Thread John Hester
I like to use increasing roman numerals: FOR I = 1 TO COUNTER GOSUB PROCESS NEXT I PROCESS: FOR II = 1 TO COUNTER2 FOR III = 1 TO COUNTER3 FOR IV = 1 TO COUNTER4 NEXT IV NEXT III NEXT II RETURN -Original Message- From: u2-users-boun...@listserver.u2ug.org

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
You've never worked on programs that are 8000 lines long I take it :) -Original Message- From: John Hester jhes...@momtex.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Jan 26, 2012 10:49 am Subject: Re: [U2] Passing by Value I like to use increasing roman numerals:

Re: [U2] Passing by Value - Found word(s) list error in the Text body

2012-01-26 Thread Garry Smith
Is Mr Davis previously graduated from ASM in 1974? Garry L. Smith Director Info. Systems Charles McMurray Company T# 559-292-5782 F# 559-346-6169 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Davis Sent:

Re: [U2] Passing by Value - Found word(s) list error in the Text body

2012-01-26 Thread Dave Davis
Before my time. I don't really do the PROCESS_I thing - but if necessary I do try to associate the name of the index variable with the thing being indexed. We use a lot of SB+ paragraph code so the subject of internal subroutines does not really present itself. -Original Message-

Re: [U2] Passing by Value

2012-01-26 Thread Horacio Pellegrino
I asked the Rocket Software guys to have LOCAL variables... but nothing... :-( On Thu, Jan 26, 2012 at 2:02 PM, Wjhonson wjhon...@aol.com wrote: You've never worked on programs that are 8000 lines long I take it :) -Original Message- From: John Hester jhes...@momtex.com To: U2

Re: [U2] Passing by Value

2012-01-26 Thread Daniel McGrath
Hi Horacio, Just to clarify, I sent an invite to you a few weeks ago where you can discuss this. If you cannot find it in your gmail account (maybe it went to spam?) I can resend it to you. Regards, Dan McGrath U2 Product Manager | Rocket Software -Original Message- From:

Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann
What has the length of the program to do with it? I always abide to the rule that a for next counter in any internal subroutine has to be unique. That way even if the sub is called from within a for next loop the counters never conflict. So it doesn't make any difference whatsoever if a program

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
Completely wrong :) You apparently have the luxury of only working on programs written by yourself. In my world, we are called upon to make rapid changes in programs written by twenty programmers over twenty years. You haven't specified *how* you ensure that your counters are unique, and by

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
Completely wrong :) You apparently have the luxury of only working on programs written by yourself. In my world, we are called upon to make rapid changes in programs written by twenty programmers over twenty years. You haven't specified *how* you ensure that your counters are unique, and by

[U2] A Thursday Quandry...

2012-01-26 Thread David Wolverton
UniData. I have an external subroutine we call thousands of times within a program (does G/L Account assembly from all the 'pieces' of data). Our logic was that making it an 'included' subroutine within the program would make it perform faster, and I think that was a good call. Now it sort

Re: [U2] A Thursday Quandry...

2012-01-26 Thread Daniel McGrath
The way I've seen this handled before was by using a preprocessor. So instead of calling BASIC to compile your code, you have your own command that wraps BASIC. In your case, the first step would be to read each line, find the include statements and insert the code (probably with * BEGIN

Re: [U2] Passing by Value

2012-01-26 Thread John Hester
I'm with Mecki on not seeing why the length of the program is relevant. If I want to check for uniqueness of one of the counting variables, I'd do this twice in the editor: L FOR IV If I get more than one hit, there's a problem. If I'm looking for the next available counter, I repeat from the

Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann
No, you are completely wrong if you think that is only your world. Who in our game has the luxury working only with their own code? I have been doing what you describe for over 25 years now and probably most of the contributors here do the same thing for a living too and not just since

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
Mecki you're not paying attention. You have an 8000 line program that uses a variable A You didn't write it. You need to find where that variable is assigned. You search for A ? That's not going to work. -Original Message- From: Mecki Foerthmann mec...@gmx.net To: u2-users

Re: [U2] Passing by Value

2012-01-26 Thread Charlie Noah
Hi Mecki, I remember those 32K limits. I found a way to cheat a bit, though. I would split a source program into pieces and INCLUDE the subsequent pieces into the first. As long as the object didn't exceed 32K, it worked. Ah, those were the days! :-) Regards, Charlie Noah On 01-26-2012

Re: [U2] Passing by Value

2012-01-26 Thread Charlie Noah
I've had to do it before and it a royal PITA! On 01-26-2012 2:58 PM, Wjhonson wrote: Mecki you're not paying attention. You have an 8000 line program that uses a variable A You didn't write it. You need to find where that variable is assigned. You search for A ? That's not going to work.

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
500 lines of code ENTER PROGRAMB It's magic. No one uses it anymore. -Original Message- From: Charlie Noah cwn...@comcast.net To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Jan 26, 2012 1:01 pm Subject: Re: [U2] Passing by Value Hi Mecki, I remember those 32K limits. I

Re: [U2] A Thursday Quandry...

2012-01-26 Thread Dave Laansma
With all due respect ... ew! Put the DEBUG command in the INCLUDED code or make it a subroutine for the purpose of debugging it, THEN put it back when you fixed the problem. Sincerely, David Laansma IT Manager Hubbard Supply Co. Direct: 810-342-7143 Office: 810-234-8681 Fax: 810-234-6142

[U2] UniVerse Import XML data [not-secure]

2012-01-26 Thread Hennessey, Mark F.
We have never received or processed data in XML before, but in the next 4-6 months we will start receiving data in XML from a partner on a daily basis. The documentation for the XML/DB tool and XML.TODB seems a little sparse. Does anyone have or know of a clearer discussion or walk through on

Re: [U2] Passing by Value

2012-01-26 Thread John Hester
One of these searches should eventually work: L A= L A = L A= L A = Unless the original author used some kind of ridiculous syntaxt like: A = 500 Granted, you're also going to get results for any IF/THEN equality tests in the mix, but you'd have the exact same issue if the variable

Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann
Are you trying to be funny? Who in his or her right mind would use 1 letter variables in a 8000 line program except maybe as loop counter or as throw away variables? And you have just explained why that is a stupid idea. And if you have a program like that? Tough luck, sounds like hard earned

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
I have another solution. Interesting no one has mentioned it yet. -Original Message- From: John Hester jhes...@momtex.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Jan 26, 2012 1:16 pm Subject: Re: [U2] Passing by Value One of these searches should eventually work:

Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann
We used CHAIN on ADDS Mentor to combine 2 or more programs. Like INCLUDE a real bastard to debug, though. On 26/01/2012 21:01, Charlie Noah wrote: Hi Mecki, I remember those 32K limits. I found a way to cheat a bit, though. I would split a source program into pieces and INCLUDE the subsequent

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
Unfortunately, we don't all get to choose the environment into which we're plopped by the gods. There are ways to address it, but I'm just not sure the way I use is the best one yet. Still collecting responses. -Original Message- From: Mecki Foerthmann mec...@gmx.net To: u2-users

Re: [U2] Passing by Value

2012-01-26 Thread u2ug
BASIC -X !!! -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Hester Sent: Thursday, January 26, 2012 4:16 PM To: U2 Users List Subject: Re: [U2] Passing by Value One of these searches should eventually work:

Re: [U2] A Thursday Quandry...

2012-01-26 Thread Daniel McGrath
Alternate opinions always welcome :) I personally dislike the 'making it a subroutine' method is it can fundamentally can change the program behaviour (changes variable scope) leaving you chasing wild geese in a house of mirrors. -Original Message- From:

Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann
What does -X do? I'd probably compile it with -Z2, run the program in debug and put a trace on A. On 26/01/2012 21:22, u2ug wrote: BASIC -X !!! -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Hester Sent:

Re: [U2] A Thursday Quandry...

2012-01-26 Thread Dan Goble
We have used the -D and -Z2 options when compiling and it lets us see the code from the included items when in the debugger. -Dan Dan Goble | IT Senior Software Engineer Interline Brands, Inc. 804 East Gate Drive Suite 100, Mount Laurel, NJ 08054 Office: 856.533.3110 | Mobile: 609.792.6855

Re: [U2] Passing by Value

2012-01-26 Thread Doug Averch
This is exactly the reason we created a outline in our Eclipse editor. When you click on the variable like A you would see: A -- Line 33 -- Line 34 -- Line 53 -- Line 571 -- Line 820 Regards, Doug www.u2logic.com Then you can click on each line to see what those lines are doing with that

Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann
Not to mention L ;A= and L ;A = On 26/01/2012 21:15, John Hester wrote: One of these searches should eventually work: L A= L A = L A= L A = Unless the original author used some kind of ridiculous syntaxt like: A = 500 Granted, you're also going to get results for any IF/THEN

Re: [U2] A Thursday Quandry...

2012-01-26 Thread Dan Goble
You will want the -D option also. This creates the cross reference table for the debugger. Need to use the -Z2 and -D in combination. -Dan Dan Goble | IT Senior Software Engineer Interline Brands, Inc. 804 East Gate Drive Suite 100, Mount Laurel, NJ 08054 Office: 856.533.3110 | Mobile:

Re: [U2] Passing by Value

2012-01-26 Thread Doug Averch
I posted a partial copy of a program written many 25 years ago that we still maintain with a wonderful variables named like BIT. Not sure what it does except you set it zero or one and it referenced all over the place. This program has other gems like ATT which are screen positions and plethora

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
Line 1154 will never be hit. -Original Message- From: Doug Averch dave...@gmail.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Jan 26, 2012 2:11 pm Subject: Re: [U2] Passing by Value I posted a partial copy of a program written many 25 years ago that we till

Re: [U2] UniVerse Import XML data [not-secure]

2012-01-26 Thread John Thompson
We gave up and wrote our own xml parsing. The documentation was so scattered on the U2 XML stuff that it was quicker to just parse it and work with it in BASIC. Probably not what you wanted to hear... But to each his/her own. On 1/26/12, Hennessey, Mark F. mark.hennes...@ct.gov wrote: We have

Re: [U2] A Thursday Quandry...

2012-01-26 Thread Tony Gravagno
Dan hit it on the head. I have such a pre-processor (somewhere?) written several times over in angst when working on various systems. David - I'll try to find it today and send it over, then will probably post to my website. T From: Daniel McGrath The way I've seen this handled before was by

Re: [U2] local variables

2012-01-26 Thread Ed Clark
I think it's already been mentioned, but I'll repeat. Both universe and unidata have the ability to create a cross-reference listing of a program. unidata's is particularly nice and shows every variable, including what lines the variable is defined and used on. but it would still be nicer to

Re: [U2] Passing by Value

2012-01-26 Thread u2ug
It generates a variable cross reference listing which gives you a list of all variables and labels in your program along with and the lines on which they are referenced in your program, I believe it even identifies lines where the variables are assigned to ( as opposed to just being referenced )

Re: [U2] Passing by Value

2012-01-26 Thread John Hester
We still maintain some AR code written in 1979 which I will put up against anything as one of the best examples of a poorly written maintenance minefield. Here's a snippet: 0150: 100: Z=1 0151: CALL INPUT.VERIFY(Q,PCD(1)) 0152: 110: IF Q='' THEN 0153: IF CUST='END' THEN RETURN

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
No RETURN TOs !!! So I think you'd get beat. -Original Message- From: John Hester jhes...@momtex.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thu, Jan 26, 2012 2:56 pm Subject: Re: [U2] Passing by Value We still maintain some AR code written in 1979 which I will put

Re: [U2] Passing by Value

2012-01-26 Thread Richard A. Wilson
I think that code started out in Either Bellevue or Denver right? any calls to the PCD (prompt control definition) yep, still supporting and actively enhancing for a couple of clients Rich John Hester wrote: We still maintain some AR code written in 1979 which I will put up against anything

Re: [U2] Passing by Value

2012-01-26 Thread John Hester
Wow, you're right. I'm guessing Bellevue. We used to be a division of big conglomerate and inherited a lot of their legacy code. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Richard A. Wilson Sent: Thursday,

Re: [U2] Passing by Value

2012-01-26 Thread Richard A. Wilson
Probably Escom MRP or one of the offshoots and yes back then 32k was an issue Q stands for Question :-) Ricy John Hester wrote: Wow, you're right. I'm guessing Bellevue. We used to be a division of big conglomerate and inherited a lot of their legacy code. -Original Message- From:

[U2] Unidata 7.2.8 Printer Anomaly

2012-01-26 Thread Kevin King
I have a client running an SB+ application who has been experiencing a very strange issue with Unidata 7.2.8. The situation is a little complex, but let me try to explain. We have this program that issues this SETPTR command and then captures the hold file number: SETPTR