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.com>wrote:
> Reposted as a favor, by permission, from the Pick Use
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 i
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 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 parameter by value instea
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
Subjec
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, Ha
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
Very sly.
-Original Message-
From: Tony Gravagno <3xk547...@sneakemail.com>
To: u2-users
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 value instead of by refere
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
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
[mailt
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 IVAR<1>, though not a
dimensioned array reference like A(5), because each array e
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.u
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 Va
And if your internal subroutine is called
RECONCILE.CUSTOMERS.BUDGET.BALANCE
??
-Original Message-
From: Dave Davis
To: U2 Users List
Sent: Thu, Jan 26, 2012 10:17 am
Subject: Re: [U2] Passing by Value
By way of naming convention:
FOR PROCESS_I = 1 TO 20
-Original Message-
Perhaps you should consider making that one an external subroutine - it sounds
like it could be used in more than one place. External subroutines would give
you the scope control you want.
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserve
I always try to use meaningful variable names.
CUSTOMER.CNT = DCOUNT(CUSTOMERS, @VM)
FOR CUSTOMER.PTR = 1 TO CUSTOMER.CNT
CUSTOMER = CUSTOMER<1, CUSTOMER.PTR>
.
.
.
NEXT CUSTOMER.PTR
David A. Green
(480) 813-1725
DAG Consulting
-Original Message-
From: u2-users-boun...@listserver
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
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
[mailto:u2-us
You've never worked on programs that are 8000 lines long I take it :)
-Original Message-
From: John Hester
To: U2 Users List
Sent: Thu, Jan 26, 2012 10:49 am
Subject: Re: [U2] Passing by Value
I like to use increasing roman numerals:
FOR I = 1 TO COUNTER
GOSUB PROCESS
EXT I
PROCES
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: Thursd
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-
F
I asked the Rocket Software guys to have LOCAL variables... but nothing...
:-(
On Thu, Jan 26, 2012 at 2:02 PM, Wjhonson wrote:
>
> You've never worked on programs that are 8000 lines long I take it :)
>
>
>
>
> -Original Message-
> From: John Hester
> To: U2 Users List
> Sent: Thu, J
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: u2-users-bou
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
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
the
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
the
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 o
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 INCLU
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 to
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 yesterday
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
To: u2-users
Sent: Thu, Jan 26, 201
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 2:
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.
500 lines of code
ENTER PROGRAMB
It's magic. No one uses it anymore.
-Original Message-
From: Charlie Noah
To: U2 Users List
Sent: Thu, Jan 26, 2012 1:01 pm
Subject: Re: [U2] Passing by Value
Hi Mecki,
I remember those 32K limits. I found a way to cheat a bit, though. I
ould split
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
www.hubb
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 th
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
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 mo
I have another solution. Interesting no one has mentioned it yet.
-Original Message-
From: John Hester
To: U2 Users List
Sent: Thu, Jan 26, 2012 1:16 pm
Subject: Re: [U2] Passing by Value
One of these searches should eventually work:
L A=
A =
A=
A =
Unless the original author
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
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
To: u2-users
Sent: Thu, Jan 2
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:
L
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: u2-users-boun...@listserver.u2ug
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: T
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
E-m
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
varia
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 equa
I've ALWAYS done the -Z ... never noticed the -Z2 option -- that would read
as if it's the answer! I'll give that a try.
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble
Sent: Thursday, January 26, 2012 3:49
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: 609
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 o
Line 1154 will never be hit.
-Original Message-
From: Doug Averch
To: U2 Users List
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 maintain with a wonderful variables named like BIT.
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. wrote:
> We have never received or pro
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 b
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 ha
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 )
-
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
01
No RETURN TOs !!!
So I think you'd get beat.
-Original Message-
From: John Hester
To: U2 Users List
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 up
gainst anything as one of the best examples
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 a
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, Janu
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:
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 0,132,66,0,0,3,NFMT,NHEA
60 matches
Mail list logo