Re: [U2] Read yourself

2014-05-14 Thread Peter Cheney
Hi Bernard, I did not know about the library search feature having always 
believed (probably from my Reality days) that you had to catalog a subroutines 
in order to call it. Obviously cataloguing is required if the SR is in a 
different library but I never gave it a second thought. Curiosity got the 
better of me and so I tried it and yes it does work as you described.
Cheers and thanks
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 Bernard Lubin
Sent: Tuesday, 13 May 2014 11:44
To: U2 Users List
Subject: Re: [U2] Read yourself

You will need to do a system(9001) to get the program stack This will tell you 
the subroutine that is being called.

To get the library, first check the VOC for the external subroutine.  If there 
is no VOC pointer for that item, check the VOC pointer for the calling program.

As far as I remember, when calling a subroutine, UniVerse first checks the VOC 
for the program name to determine the program library where the program 
resides..  If the VOC entry is not present, it uses the library of the calling 
program.  I do not know how far back the stack it will go.. (Hopefully all the 
way to the first program)

Hope that helps.

Rgds


Bernard Lubin
System Group Developer

549 Blackburn Rd  Mount Waverley
VIC 3149 Australia
P: +61 3 9535 
F: +61 3 9535 2274
E: bernard.lu...@pentanasolutions.com
W: pentanasolutions.com

Pentana Solutions accepts no liability for the content of this email, or for 
the consequences of any actions taken on the basis of the information provided, 
unless that information is subsequently confirmed in  writing. If you are not 
the intended recipient, you are notified that disclosing, copying, distributing 
or taking any action in reliance on the contents of this information is 
strictly prohibited.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, 13 May 2014 11:29 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


I just ran a test where a main program called an external subroutine In the 
external subroutine I had it display system(9001)

The subroutine name was listed in that display as was the main routine which 
had called it




-Original Message-
From: David Wasylenko d...@pickpro.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, May 12, 2014 6:09 pm
Subject: Re: [U2] Read yourself


I think the point has been lost.
The person is requesting the name of the CURRENT ROUTINE
If that is A SUBROUTINE - there is no @ that I know of that returns the name of 
the currently executing routine.
The fact the CALLING routine knows the name is #1, is of no value to this 
request and #2, lends nothing to any routine being self-aware.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org]
On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:58 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

I totally agree with and endorse your programming standards David.
However if the program is calling another subroutine it should know the name of 
that subroutine or be able to derive it if it is called with an @.

Sent from my iPad

On 13 May 2014, at 10:45 am, David Wasylenko d...@pickpro.com wrote:

IT'S JUST NOT TRUE EVER.  @sentence cannot work.

The stub program that launched an initial program will be in the @sentence...
You could be 3 calls deep into external subroutines - there is nothing in 
@sentence re: the call-stack.
Our shop writes *very* few stub programs - most are subroutines called by other 
subroutines.

Instead:
Add
   PGID=programName
Or even
   PGID=filename  ProgramName
To the top of the program - quick and easy.
Use of system routines such as SYSTEM(9001) is usually overkill.

Your program should be aware of it's name - if no other reasons than:
*  display on the screen to help users identify where their problem came from
*  print on reports
*  add to log-file entries
+ and of course, to answer the original question:  how can I read the
+ current
program source

A well-designed system/program should hard-code as little as possible as well.
What better key to use for a configuration record than the program name itself.


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org]
On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:39 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

That's true - if the subroutines are catalogued with a noxref clause you're 
screwed.

Sent from my iPad

On 13 May 2014, at 10:19 am, David Wasylenko d...@pickpro.com wrote:

Wont work --- if you use any external subroutines.

-Original Message-
From: u2-users-boun

Re: [U2] Read yourself

2014-05-13 Thread Ross Ferris
We have something similar that is built into our Visage product that we call 
Snippet Technology. It is totally language neutral, and at a pure programming 
level provides a recursive, extensible pre-compiler that can produce platform 
specific and optimised code from a single code base, but we also harness the 
facility to power things like our multi-lingual capabilities and web page 
generation.

However, I still cannot see where Will has explained why/what he will do once 
he has program code in a variable ... what is the end game/objective?

Ross Ferris
Stamina Software
Visage  Better by Design!

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Robert
Sent: Tuesday, May 13, 2014 3:28 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

I saw on one PICK system, a precompiler language. It was the same as 
PICK/BASIC, but had a preprocessor to it.

So, for example to get the user number on a Universe system you would use 
USER.NO=@USER.NO

On a PICK system, it would be USER.NO=OCONV(0,'U50BB')

Rather than write it into the program to check what system it is on (since 
sometimes it could be different functions or statements used that never even 
compile), then would do something like:

USER.NO=%GET USERNO%

The precompiler would look at the control table and translate the '%GET 
USERNO%' to the appropriate statement, then compile.

I've seen software that was so generic it would run on any version of 
Multivalue system and sometimes even non-Multivalue systems.

Robert Norman

ROBERT NORMAN AND ASSOCIATES
23441 Golden Springs Dr., #289, Diamond Bar, CA 91765
(323) 285-7272, (951) 541-1668
i...@keyway.net
http://universe-basic-programming.webstarts.com/index.html
http://users.keyway.net/~ice/
http://www.affordablemultivalueprogramming.i8.com/
Computer programming  software development in Universe BASIC for Rocket 
Universe, in PICK/BASIC for Rocket D3, in UNIBASIC for Rocket Unidata, in 
R/BASIC (REVELATION BASIC) for REVELATION TECHOLOGIES REVELATION, in JBASIC 
(JBC or JBASE BASIC) for TEMENOS JBASE, in DATA/BASIC for Northgate REALITY, in 
MV BASIC (Multivalue Basic) for Intersystems Cache Multivalue, and QMBASIC for 
Ladybridge OPENQM (QM).

On 5/12/2014 4:33 PM, Adrian Overs wrote:
 What problem are you trying to solve by doing so?
 After all it's not rocket science (pardon the pun) to OPEN BP TO 
 BP.FV THEN READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

 Sent from my iPad

 On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


 Does anyone have a BASIC program, that will open it's own code in a variable ?
 So something like this

 GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

 READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

 the program reads itself.

 Does anyone have a program like that?


 ___
 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] Read yourself

2014-05-13 Thread Robert

Awesome feature Ross that you have in your Stamina product.

Is there a link to an article, example, or manual describing it in detail?

That way I can forward it to any Universe client inquiring about those 
features.



I have seen Brian Leach's source code and he has the program information 
embedded in a variable like this:


.
.
.
*
* Modification History
* ---
VERDATA=''
VERDATA := 'Version=001009003;'
VERDATA := 'VerModVer=00100;'
VERDATA := 'VerBeta=;'
VERDATA := 'VerDate=15134;'
VERDATA := 'VerProd=ENTER;'
VERDATA := 'VerModule=;'
VERDATA := 'VerTM=;'
VERDATA := 'VerCopy=2005 Brian Leach Consulting Limited;'
VERDATA := 'VerCo=Brian Leach Consulting Limited;'
VERDATA := 'VerDesc=ENTER Screen Entry Processor;'
VERDATA := 'CatName=ENTER;'
VERDATA := 'VerHist=07 JUN 09 1.9.3 auto;'
.
.
.

I am wondering if Wjhonson would be better off doing something like 
Brian's example above. This way the program has the program information 
during run-time (as a variable) and it also is available to any source 
code parsers (as long as he adheres to the standard).


Robert Norman

ROBERT NORMAN AND ASSOCIATES
23441 Golden Springs Dr., #289, Diamond Bar, CA 91765
(323) 285-7272, (951) 541-1668
i...@keyway.net
http://universe-basic-programming.webstarts.com/index.html
http://users.keyway.net/~ice/
http://www.affordablemultivalueprogramming.i8.com/
Computer programming  software development in Universe BASIC for Rocket 
Universe, in PICK/BASIC for Rocket D3, in UNIBASIC
for Rocket Unidata, in R/BASIC (REVELATION BASIC) for REVELATION 
TECHOLOGIES REVELATION, in JBASIC (JBC or JBASE BASIC) for
TEMENOS JBASE, in DATA/BASIC for Northgate REALITY, in MV BASIC 
(Multivalue Basic) for Intersystems Cache Multivalue, and

QMBASIC for Ladybridge OPENQM (QM).

On 5/13/2014 6:52 AM, Ross Ferris wrote:

We have something similar that is built into our Visage product that we call 
Snippet Technology. It is totally language neutral, and at a pure programming 
level provides a recursive, extensible pre-compiler that can produce platform specific 
and optimised code from a single code base, but we also harness the facility to power 
things like our multi-lingual capabilities and web page generation.

However, I still cannot see where Will has explained why/what he will do once 
he has program code in a variable ... what is the end game/objective?

Ross Ferris
Stamina Software
Visage  Better by Design!

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Robert
Sent: Tuesday, May 13, 2014 3:28 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

I saw on one PICK system, a precompiler language. It was the same as 
PICK/BASIC, but had a preprocessor to it.

So, for example to get the user number on a Universe system you would use 
USER.NO=@USER.NO

On a PICK system, it would be USER.NO=OCONV(0,'U50BB')

Rather than write it into the program to check what system it is on (since 
sometimes it could be different functions or statements used that never even 
compile), then would do something like:

USER.NO=%GET USERNO%

The precompiler would look at the control table and translate the '%GET 
USERNO%' to the appropriate statement, then compile.

I've seen software that was so generic it would run on any version of 
Multivalue system and sometimes even non-Multivalue systems.

Robert Norman

ROBERT NORMAN AND ASSOCIATES
23441 Golden Springs Dr., #289, Diamond Bar, CA 91765
(323) 285-7272, (951) 541-1668
i...@keyway.net
http://universe-basic-programming.webstarts.com/index.html
http://users.keyway.net/~ice/
http://www.affordablemultivalueprogramming.i8.com/
Computer programming  software development in Universe BASIC for Rocket 
Universe, in PICK/BASIC for Rocket D3, in UNIBASIC for Rocket Unidata, in R/BASIC 
(REVELATION BASIC) for REVELATION TECHOLOGIES REVELATION, in JBASIC (JBC or JBASE 
BASIC) for TEMENOS JBASE, in DATA/BASIC for Northgate REALITY, in MV BASIC 
(Multivalue Basic) for Intersystems Cache Multivalue, and QMBASIC for Ladybridge 
OPENQM (QM).

On 5/12/2014 4:33 PM, Adrian Overs wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to OPEN BP TO
BP.FV THEN READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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

Re: [U2] Read yourself

2014-05-13 Thread Wjhonson

This can be broken simply by copying the program to some other location, 
without changing the variables.
 
 
 
-Original Message-
From: Robert i...@keyway.net
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 9:58 am
Subject: Re: [U2] Read yourself


Awesome feature Ross that you have in your Stamina product.

Is there a link to an article, example, or manual describing it in detail?

That way I can forward it to any Universe client inquiring about those 
features.


I have seen Brian Leach's source code and he has the program information 
embedded in a variable like this:

.
.
.
*
* Modification History
* ---
VERDATA=''
VERDATA := 'Version=001009003;'
VERDATA := 'VerModVer=00100;'
VERDATA := 'VerBeta=;'
VERDATA := 'VerDate=15134;'
VERDATA := 'VerProd=ENTER;'
VERDATA := 'VerModule=;'
VERDATA := 'VerTM=;'
VERDATA := 'VerCopy=2005 Brian Leach Consulting Limited;'
VERDATA := 'VerCo=Brian Leach Consulting Limited;'
VERDATA := 'VerDesc=ENTER Screen Entry Processor;'
VERDATA := 'CatName=ENTER;'
VERDATA := 'VerHist=07 JUN 09 1.9.3 auto;'
.
.
.

I am wondering if Wjhonson would be better off doing something like 
Brian's example above. This way the program has the program information 
during run-time (as a variable) and it also is available to any source 
code parsers (as long as he adheres to the standard).

Robert Norman

ROBERT NORMAN AND ASSOCIATES
23441 Golden Springs Dr., #289, Diamond Bar, CA 91765
(323) 285-7272, (951) 541-1668
i...@keyway.net
http://universe-basic-programming.webstarts.com/index.html
http://users.keyway.net/~ice/
http://www.affordablemultivalueprogramming.i8.com/
Computer programming  software development in Universe BASIC for Rocket 
Universe, in PICK/BASIC for Rocket D3, in UNIBASIC
for Rocket Unidata, in R/BASIC (REVELATION BASIC) for REVELATION 
TECHOLOGIES REVELATION, in JBASIC (JBC or JBASE BASIC) for
TEMENOS JBASE, in DATA/BASIC for Northgate REALITY, in MV BASIC 
(Multivalue Basic) for Intersystems Cache Multivalue, and
QMBASIC for Ladybridge OPENQM (QM).

On 5/13/2014 6:52 AM, Ross Ferris wrote:
 We have something similar that is built into our Visage product that we call 
Snippet Technology. It is totally language neutral, and at a pure programming 
level provides a recursive, extensible pre-compiler that can produce platform 
specific and optimised code from a single code base, but we also harness the 
facility to power things like our multi-lingual capabilities and web page 
generation.

 However, I still cannot see where Will has explained why/what he will do once 
he has program code in a variable ... what is the end game/objective?

 Ross Ferris
 Stamina Software
 Visage  Better by Design!

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org 
 [mailto:u2-users-boun...@listserver.u2ug.org] 
On Behalf Of Robert
 Sent: Tuesday, May 13, 2014 3:28 PM
 To: U2 Users List
 Subject: Re: [U2] Read yourself

 I saw on one PICK system, a precompiler language. It was the same as 
PICK/BASIC, but had a preprocessor to it.

 So, for example to get the user number on a Universe system you would use 
USER.NO=@USER.NO

 On a PICK system, it would be USER.NO=OCONV(0,'U50BB')

 Rather than write it into the program to check what system it is on (since 
sometimes it could be different functions or statements used that never even 
compile), then would do something like:

 USER.NO=%GET USERNO%

 The precompiler would look at the control table and translate the '%GET 
USERNO%' to the appropriate statement, then compile.

 I've seen software that was so generic it would run on any version of 
Multivalue system and sometimes even non-Multivalue systems.

 Robert Norman

 ROBERT NORMAN AND ASSOCIATES
 23441 Golden Springs Dr., #289, Diamond Bar, CA 91765
 (323) 285-7272, (951) 541-1668
 i...@keyway.net
 http://universe-basic-programming.webstarts.com/index.html
 http://users.keyway.net/~ice/
 http://www.affordablemultivalueprogramming.i8.com/
 Computer programming  software development in Universe BASIC for Rocket 
Universe, in PICK/BASIC for Rocket D3, in UNIBASIC for Rocket Unidata, in 
R/BASIC (REVELATION BASIC) for REVELATION TECHOLOGIES REVELATION, in JBASIC 
(JBC 
or JBASE BASIC) for TEMENOS JBASE, in DATA/BASIC for Northgate REALITY, in MV 
BASIC (Multivalue Basic) for Intersystems Cache Multivalue, and QMBASIC for 
Ladybridge OPENQM (QM).

 On 5/12/2014 4:33 PM, Adrian Overs wrote:
 What problem are you trying to solve by doing so?
 After all it's not rocket science (pardon the pun) to OPEN BP TO
 BP.FV THEN READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

 Sent from my iPad

 On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


 Does anyone have a BASIC program, that will open it's own code in a variable 
?
 So something like this

 GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

 READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY

Re: [U2] Read yourself

2014-05-13 Thread George Gallen
Then you would need to write another program that scans the programs and checks 
if the VERDATA element
For the program name matches the @ID in the program file - if not email someone 
to fix it.

Then have it run nightly - so if it did get cloned without changing, it 
wouldn't be that way 
For long.

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:13 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


This can be broken simply by copying the program to some other location, 
without changing the variables.
 
 
 
-Original Message-
From: Robert i...@keyway.net
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 9:58 am
Subject: Re: [U2] Read yourself


Awesome feature Ross that you have in your Stamina product.

Is there a link to an article, example, or manual describing it in detail?

That way I can forward it to any Universe client inquiring about those 
features.


I have seen Brian Leach's source code and he has the program information 
embedded in a variable like this:

.
.
.
*
* Modification History
* ---
VERDATA=''
VERDATA := 'Version=001009003;'
VERDATA := 'VerModVer=00100;'
VERDATA := 'VerBeta=;'
VERDATA := 'VerDate=15134;'
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Read yourself

2014-05-13 Thread Wjhonson

Well do you see any problem in just using the SYSTEM(9001) and ignoring 
embedding this information ?
 
 
 
 
-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 10:27 am
Subject: Re: [U2] Read yourself


Then you would need to write another program that scans the programs and checks 
if the VERDATA element
For the program name matches the @ID in the program file - if not email someone 
to fix it.

Then have it run nightly - so if it did get cloned without changing, it 
wouldn't 
be that way 
For long.

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:13 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


This can be broken simply by copying the program to some other location, 
without 
changing the variables.
 
 
 
-Original Message-
From: Robert i...@keyway.net
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 9:58 am
Subject: Re: [U2] Read yourself


Awesome feature Ross that you have in your Stamina product.

Is there a link to an article, example, or manual describing it in detail?

That way I can forward it to any Universe client inquiring about those 
features.


I have seen Brian Leach's source code and he has the program information 
embedded in a variable like this:

.
.
.
*
* Modification History
* ---
VERDATA=''
VERDATA := 'Version=001009003;'
VERDATA := 'VerModVer=00100;'
VERDATA := 'VerBeta=;'
VERDATA := 'VerDate=15134;'
___
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] Read yourself

2014-05-13 Thread George Gallen
Does the 9001 call work for subroutines, or just the main program?

Also, it's platform specific

It all depends on what your trying to do, if the 9001 call works, great, if not 
figure something else out.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:31 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


Well do you see any problem in just using the SYSTEM(9001) and ignoring 
embedding this information ?
 
 
 
 
-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 10:27 am
Subject: Re: [U2] Read yourself


Then you would need to write another program that scans the programs and checks 
if the VERDATA element
For the program name matches the @ID in the program file - if not email someone 
to fix it.

Then have it run nightly - so if it did get cloned without changing, it 
wouldn't 
be that way 
For long.

George


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Read yourself

2014-05-13 Thread Wjhonson

I had posted an update, that I had tried it (it returns the program stack)
Its System(9001), and it will return the subroutine names in the stack as well 
as the main program (on Universe 11 anyway)
 
Someone has to try this on Unidata, and on D3 to make sure it also returns the 
subroutine name.
 
What it returns is the absolute path, so you would still need a program to 
translate this into a LOCAL file name and program id, which is, to what, I'm 
trying to get.
 
Like I mentioned, I'm sure there is a way to do it, it's just a question of 
whether someone has a routine which *does* this already, and the answer is 
apparently not, so if I have to roll my own.
 
 
-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 10:40 am
Subject: Re: [U2] Read yourself


Does the 9001 call work for subroutines, or just the main program?

Also, it's platform specific

It all depends on what your trying to do, if the 9001 call works, great, if not 
figure something else out.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:31 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


Well do you see any problem in just using the SYSTEM(9001) and ignoring 
embedding this information ?
 
 
 
 
-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 10:27 am
Subject: Re: [U2] Read yourself


Then you would need to write another program that scans the programs and checks 
if the VERDATA element
For the program name matches the @ID in the program file - if not email someone 
to fix it.

Then have it run nightly - so if it did get cloned without changing, it 
wouldn't 

be that way 
For long.

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] Read yourself

2014-05-13 Thread George Gallen
Unless I'm doing it wrongdidn't look it up.

For me - on UV 10.0.2

PRINT SYSTEM(9001)
STOP
END

Outputs

RUN LIB TEST
0

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:55 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


I had posted an update, that I had tried it (it returns the program stack)
Its System(9001), and it will return the subroutine names in the stack as well 
as the main program (on Universe 11 anyway)
 
Someone has to try this on Unidata, and on D3 to make sure it also returns the 
subroutine name.
 
What it returns is the absolute path, so you would still need a program to 
translate this into a LOCAL file name and program id, which is, to what, I'm 
trying to get.
 
Like I mentioned, I'm sure there is a way to do it, it's just a question of 
whether someone has a routine which *does* this already, and the answer is 
apparently not, so if I have to roll my own.
 
 
-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 10:40 am
Subject: Re: [U2] Read yourself


Does the 9001 call work for subroutines, or just the main program?

Also, it's platform specific

It all depends on what your trying to do, if the 9001 call works, great, if not 
figure something else out.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:31 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


Well do you see any problem in just using the SYSTEM(9001) and ignoring 
embedding this information ?
 
 
 
 
-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 10:27 am
Subject: Re: [U2] Read yourself


Then you would need to write another program that scans the programs and checks 
if the VERDATA element
For the program name matches the @ID in the program file - if not email someone 
to fix it.

Then have it run nightly - so if it did get cloned without changing, it 
wouldn't 

be that way 
For long.

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] Read yourself

2014-05-13 Thread John Hester
You could definitely do that.  I wrote a utility nearly 20 years ago that still 
does something similar to all our BPs on a weekly basis.  We were about to 
convert from Ulitimate to UV in '96 and needed to avoid wasting time modifying 
programs that weren't being used.  I needed something to log every program's 
recent execution times by program name.  The utility goes through all the BPs 
and makes sure there's a call to a subroutine named TRACKER at the beginning 
that passes the program's name as an argument.  It also makes sure that if the 
call is already there, it is referencing the correct program name, insuring a 
copied program will log itself correctly.  Here's the section of code that 
installs the call:

0058: IF ADD OR RPLC THEN
0059:   LINE = CALL TRACKER(':PROG.NO:')
0060:   IF ADD THEN
0061: INS LINE BEFORE ITEM.BPLINE.NO
0062:   END ELSE
0063: ITEM.BPLINE.NO = LINE
0064:   END
0065:   WRITE ITEM.BP ON FILE.BP, PROG.NO
0066:   RECOMPILE.LIST-1 = PROG.NO
0067: END

The TRACKER subroutine logs the 40 most recent executions both by program and 
by user.

-John

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Tuesday, May 13, 2014 10:29 AM
To: U2 Users List
Subject: Re: [U2] Read yourself

Actually, expounding on that. You could have a program insert the program and 
file name into a program

Not recompile - just the source

Then as you get a chance to modify each program to become self aware (the first 
step to Activating the MATRIX) then you would compile/catalog.

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Tuesday, May 13, 2014 1:27 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

Then you would need to write another program that scans the programs and checks 
if the VERDATA element For the program name matches the @ID in the program file 
- if not email someone to fix it.

Then have it run nightly - so if it did get cloned without changing, it 
wouldn't be that way For long.

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:13 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


This can be broken simply by copying the program to some other location, 
without changing the variables.
 
 
 
-Original Message-
From: Robert i...@keyway.net
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 9:58 am
Subject: Re: [U2] Read yourself


Awesome feature Ross that you have in your Stamina product.

Is there a link to an article, example, or manual describing it in detail?

That way I can forward it to any Universe client inquiring about those features.


I have seen Brian Leach's source code and he has the program information 
embedded in a variable like this:

.
.
.
*
* Modification History
* ---
VERDATA=''
VERDATA := 'Version=001009003;'
VERDATA := 'VerModVer=00100;'
VERDATA := 'VerBeta=;'
VERDATA := 'VerDate=15134;'
___
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] Read yourself

2014-05-13 Thread Will Johnson

I'm not trying to active the Matrix George.
Just writing a worm which can survive inside the Matrix and keep my 
consciousness intact long enough until Neo shows up.
 
 
 
 
-Original Message-
From: George Gallen-2 [via U2 (UniVerse  UniData)] 
ml-node+s1073795n43076...@n5.nabble.com
To: Will Johnson wjhon...@aol.com
Sent: Tue, May 13, 2014 1:41 pm
Subject: Re: Read yourself


Actually, expounding on that. You could have a program insert the 
program and file name into a program

Not recompile - just the source

Then as you get a chance to modify each program to become self aware (the first 
step to 
Activating the MATRIX) then you would compile/catalog.

George

-Original Message-
From: [hidden email] [mailto:[hidden email]] On Behalf Of George Gallen
Sent: Tuesday, May 13, 2014 1:27 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

Then you would need to write another program that scans the programs and checks 
if the VERDATA element
For the program name matches the @ID in the program file - if not email someone 
to fix it.

Then have it run nightly - so if it did get cloned without changing, it 
wouldn't be that way 
For long.

George

-Original Message-
From: [hidden email] [mailto:[hidden email]] On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:13 PM
To: [hidden email]
Subject: Re: [U2] Read yourself


This can be broken simply by copying the program to some other location, 
without changing the variables.
 
 
 
-Original Message-
From: Robert [hidden email]
To: U2 Users List [hidden email]
Sent: Tue, May 13, 2014 9:58 am
Subject: Re: [U2] Read yourself


Awesome feature Ross that you have in your Stamina product.

Is there a link to an article, example, or manual describing it in detail?

That way I can forward it to any Universe client inquiring about those 
features.


I have seen Brian Leach's source code and he has the program information 
embedded in a variable like this:

.
.
.
*
* Modification History
* ---
VERDATA=''
VERDATA := 'Version=001009003;'
VERDATA := 'VerModVer=00100;'
VERDATA := 'VerBeta=;'
VERDATA := 'VerDate=15134;'
___
U2-Users mailing list
[hidden email]
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
[hidden email]
http://listserver.u2ug.org/mailman/listinfo/u2-users





If you reply to this email, your message will be added to the discussion below:

http://u2-universe-unidata.1073795.n5.nabble.com/Read-yourself-tp43052p43076.html
   

To start a new topic under U2 - Users, email 
ml-node+s1073795n3...@n5.nabble.com 
To unsubscribe from U2 (UniVerse  UniData), click here.
NAML





--
View this message in context: 
http://u2-universe-unidata.1073795.n5.nabble.com/Read-yourself-tp43052p43090.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


Re: [U2] Read yourself

2014-05-13 Thread Richard Lewis
George,

It's better illustrated by multiple call levels.  A colleague here wrote
these specifically to test this:

 STACK.1
SUBROUTINE STACK.1
CRT ||
CRT CHANGE(SYSTEM(9001), @AM, CHAR(13):CHAR(10))
CRT ||
RETURN

 STACK.2
SUBROUTINE STACK.2
  CALL STACK.1
RETURN

 STACK.WRAP
CRT @(-1)
CALL STACK.2

And here's the results:


||
3ý/(absolute path)/BP.O/STACK.1ý0x6
2ý/(absolute path)/BP.O/STACK.2ý0x0
1ý/(absolute path)/BP.O/STACK.WRAPý0xe

||

Best Regards,
Richard Lewis


On Tue, May 13, 2014 at 11:59 AM, George Gallen ggal...@wyanokegroup.comwrote:

 Unless I'm doing it wrongdidn't look it up.

 For me - on UV 10.0.2

 PRINT SYSTEM(9001)
 STOP
 END

 Outputs

 RUN LIB TEST
 0

 George

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:
 u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 Sent: Tuesday, May 13, 2014 1:55 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] Read yourself


 I had posted an update, that I had tried it (it returns the program stack)
 Its System(9001), and it will return the subroutine names in the stack as
 well as the main program (on Universe 11 anyway)

 Someone has to try this on Unidata, and on D3 to make sure it also returns
 the subroutine name.

 What it returns is the absolute path, so you would still need a program to
 translate this into a LOCAL file name and program id, which is, to what,
 I'm trying to get.

 Like I mentioned, I'm sure there is a way to do it, it's just a question
 of whether someone has a routine which *does* this already, and the answer
 is apparently not, so if I have to roll my own.


 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Tue, May 13, 2014 10:40 am
 Subject: Re: [U2] Read yourself


 Does the 9001 call work for subroutines, or just the main program?

 Also, it's platform specific

 It all depends on what your trying to do, if the 9001 call works, great,
 if not
 figure something else out.

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:
 u2-users-boun...@listserver.u2ug.org]
 On Behalf Of Wjhonson
 Sent: Tuesday, May 13, 2014 1:31 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] Read yourself


 Well do you see any problem in just using the SYSTEM(9001) and ignoring
 embedding this information ?




 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Tue, May 13, 2014 10:27 am
 Subject: Re: [U2] Read yourself


 Then you would need to write another program that scans the programs and
 checks
 if the VERDATA element
 For the program name matches the @ID in the program file - if not email
 someone
 to fix it.

 Then have it run nightly - so if it did get cloned without changing, it
 wouldn't

 be that way
 For long.

 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

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Read yourself

2014-05-13 Thread Wjhonson

Its entirely possible this feature did not exist on UV 10.0 
 
 
 
-Original Message-
From: Richard Lewis rbl...@gmail.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 1:46 pm
Subject: Re: [U2] Read yourself


George,

It's better illustrated by multiple call levels.  A colleague here wrote
these specifically to test this:

 STACK.1
SUBROUTINE STACK.1
CRT ||
CRT CHANGE(SYSTEM(9001), @AM, CHAR(13):CHAR(10))
CRT ||
RETURN

 STACK.2
SUBROUTINE STACK.2
  CALL STACK.1
RETURN

 STACK.WRAP
CRT @(-1)
CALL STACK.2

And here's the results:


||
3ý/(absolute path)/BP.O/STACK.1ý0x6
2ý/(absolute path)/BP.O/STACK.2ý0x0
1ý/(absolute path)/BP.O/STACK.WRAPý0xe

||

Best Regards,
Richard Lewis


On Tue, May 13, 2014 at 11:59 AM, George Gallen ggal...@wyanokegroup.comwrote:

 Unless I'm doing it wrongdidn't look it up.

 For me - on UV 10.0.2

 PRINT SYSTEM(9001)
 STOP
 END

 Outputs

 RUN LIB TEST
 0

 George

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:
 u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 Sent: Tuesday, May 13, 2014 1:55 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] Read yourself


 I had posted an update, that I had tried it (it returns the program stack)
 Its System(9001), and it will return the subroutine names in the stack as
 well as the main program (on Universe 11 anyway)

 Someone has to try this on Unidata, and on D3 to make sure it also returns
 the subroutine name.

 What it returns is the absolute path, so you would still need a program to
 translate this into a LOCAL file name and program id, which is, to what,
 I'm trying to get.

 Like I mentioned, I'm sure there is a way to do it, it's just a question
 of whether someone has a routine which *does* this already, and the answer
 is apparently not, so if I have to roll my own.


 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Tue, May 13, 2014 10:40 am
 Subject: Re: [U2] Read yourself


 Does the 9001 call work for subroutines, or just the main program?

 Also, it's platform specific

 It all depends on what your trying to do, if the 9001 call works, great,
 if not
 figure something else out.

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:
 u2-users-boun...@listserver.u2ug.org]
 On Behalf Of Wjhonson
 Sent: Tuesday, May 13, 2014 1:31 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] Read yourself


 Well do you see any problem in just using the SYSTEM(9001) and ignoring
 embedding this information ?




 -Original Message-
 From: George Gallen ggal...@wyanokegroup.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Tue, May 13, 2014 10:27 am
 Subject: Re: [U2] Read yourself


 Then you would need to write another program that scans the programs and
 checks
 if the VERDATA element
 For the program name matches the @ID in the program file - if not email
 someone
 to fix it.

 Then have it run nightly - so if it did get cloned without changing, it
 wouldn't

 be that way
 For long.

 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

___
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] Read yourself

2014-05-13 Thread Bill Haskett

Richard:

This is exactly what appears in UniData's SYSTEM(49) function call, 
although in reverse order.


5 Dev (0)- BPTEST CRT SYSTEM(49) ; END

Compiling Unibasic: SAVEDLISTS\BpTest_332397981 in mode 'p'.
compilation finished

1²E:\AboEnterprise\Abo\BP\BP\_START.STACK²32■2²E:\AboEnterprise\Abo\BP\BP\_TCL.SHELL²1161■3²E:\AboEnterprise\Abo\BP\BP\_BPTEST²104■4²SAVEDLISTS\_BpTest_332397981²1■

Bill
Untitled Page


- Original Message -
*From:* rbl...@gmail.com
*To:* U2 Users List u2-users@listserver.u2ug.org
*Date:* 5/13/2014 1:46 PM
*Subject:* Re: [U2] Read yourself

George,

It's better illustrated by multiple call levels.  A colleague here wrote
these specifically to test this:

  STACK.1
SUBROUTINE STACK.1
CRT ||
CRT CHANGE(SYSTEM(9001), @AM, CHAR(13):CHAR(10))
CRT ||
RETURN

  STACK.2
SUBROUTINE STACK.2
   CALL STACK.1
RETURN

  STACK.WRAP
CRT @(-1)
CALL STACK.2

And here's the results:


||
3ý/(absolute path)/BP.O/STACK.1ý0x6
2ý/(absolute path)/BP.O/STACK.2ý0x0
1ý/(absolute path)/BP.O/STACK.WRAPý0xe

||

Best Regards,
Richard Lewis


On Tue, May 13, 2014 at 11:59 AM, George Gallen ggal...@wyanokegroup.comwrote:


Unless I'm doing it wrongdidn't look it up.

For me - on UV 10.0.2

PRINT SYSTEM(9001)
STOP
END

Outputs


RUN LIB TEST

0

George

-Original Message-
From: u2-users-boun...@listserver.u2ug.org [mailto:
u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:55 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


I had posted an update, that I had tried it (it returns the program stack)
Its System(9001), and it will return the subroutine names in the stack as
well as the main program (on Universe 11 anyway)

Someone has to try this on Unidata, and on D3 to make sure it also returns
the subroutine name.

What it returns is the absolute path, so you would still need a program to
translate this into a LOCAL file name and program id, which is, to what,
I'm trying to get.

Like I mentioned, I'm sure there is a way to do it, it's just a question
of whether someone has a routine which *does* this already, and the answer
is apparently not, so if I have to roll my own.


-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 10:40 am
Subject: Re: [U2] Read yourself


Does the 9001 call work for subroutines, or just the main program?

Also, it's platform specific

It all depends on what your trying to do, if the 9001 call works, great,
if not
figure something else out.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org [mailto:
u2-users-boun...@listserver.u2ug.org]
On Behalf Of Wjhonson
Sent: Tuesday, May 13, 2014 1:31 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


Well do you see any problem in just using the SYSTEM(9001) and ignoring
embedding this information ?




-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 13, 2014 10:27 am
Subject: Re: [U2] Read yourself


Then you would need to write another program that scans the programs and
checks
if the VERDATA element
For the program name matches the @ID in the program file - if not email
someone
to fix it.

Then have it run nightly - so if it did get cloned without changing, it
wouldn't

be that way
For long.

George


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[U2] Read yourself

2014-05-12 Thread Wjhonson

Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Read yourself

2014-05-12 Thread Adrian Overs
What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to
OPEN BP TO BP.FV THEN
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever
END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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] Read yourself

2014-05-12 Thread Wjhonson

The program does not inherently know that it's in a file called BP.
And it does not know it's own (value of) PROG.ID unless it can find it out 
somehow.
 
 
 
 
-Original Message-
From: Adrian Overs ove...@citysoft.com.au
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, May 12, 2014 4:33 pm
Subject: Re: [U2] Read yourself


What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to
OPEN BP TO BP.FV THEN
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever
END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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] Read yourself

2014-05-12 Thread Israel, John R.
There are @ commands that can get this stuff.  Or read the cat pointer.

John Israel

Sent from my iPhone

 On May 12, 2014, at 7:39 PM, Wjhonson wjhon...@aol.com wrote:
 
 
 The program does not inherently know that it's in a file called BP.
 And it does not know it's own (value of) PROG.ID unless it can find it out 
 somehow.
 
 
 
 
 -Original Message-
 From: Adrian Overs ove...@citysoft.com.au
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, May 12, 2014 4:33 pm
 Subject: Re: [U2] Read yourself
 
 
 What problem are you trying to solve by doing so?
 After all it's not rocket science (pardon the pun) to
 OPEN BP TO BP.FV THEN
 READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever
 END
 
 Sent from my iPad
 
 On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:
 
 
 Does anyone have a BASIC program, that will open it's own code in a variable ?
 So something like this
 
 GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME
 
 READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 
 
 the program reads itself.
 
 Does anyone have a program like that?
 
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/5fHCMUSyOqejhOqemhNEV7e6XCQrEFLThKCqejqdQkTXEFECzASzt5d-WdSrCQrEFCzBZBxwQsCN6Fe4GhTPMkxFqtokrm-cGNVsSxFqtokrm-cGNVsSe847QhPb_nV5BZZAQsZuVtd5ZPATTD67KmKDp55mVEVvVkffGhBrwqrhdICXCXCM0pYGjFYjfNVJdIzM071dnoovaAVgtHzqptKDNErrjbJQ-d2V2Hsbvg57OFeDNc_7CQSOf00jr3P3xI5-Aq83iS4QPiWq80n-E6y0JlKdfftdFFCW--6tgnb718Y
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/k-Kr6jqb9EVd79EVp76zAsUrKrhKyC_t6WpEVdEThjvKyCyqejqdQkTXETpKrhKyCqenSm63hOr4qAUiF7vf1i6BFRxhJrUOH7BPq6BFRxhJrUOH7BPoUwgvh7cLZvAmnTSjhPRXBQQnTejvusouVqWtAklrCzB_BgY-F6lK1FJcSOrKrKr01DOFeDNc_7CQSOf00s4RtxxYGjB1SKdFBSWv6xJJcKTjUQbAaJMJZ0kvaAWv4PYurjr8Y01dIfce6MnWhEwdbojjdbFEw1vWwq82RmUQYZQSCCrHzJY
 
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/2DRPoQ93hJ5AQsCzAQsIzzhOesdTdEThjvKztcQsCQrEFLThjhd79J6WarZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzOVIsg8fEzCn-LObbXX9EVWZOWqbXD9LLecfsJteOaaJPhO_OEuvkzaT0QSOrpdTdTdw0PVkDjUCvzPqrp7w0e2qKMM-l9OwXn6QOXtfzgSSCnrFYq5O5mUm-wafBitfyp-fdFJAu00CS7C73obZ8Qg6BI9FCBQQg0LZgd41qHsquuWrjjdPC62kJ0KQBUS
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Read yourself

2014-05-12 Thread Wjhonson

I understand how one could potentially do it.
I was more interested to see if anyone had already done it.
Cat pointers only work for catalogued entries by the way
 
 
 
-Original Message-
From: Israel, John R. johnisr...@daytonsuperior.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, May 12, 2014 4:41 pm
Subject: Re: [U2] Read yourself


There are @ commands that can get this stuff.  Or read the cat pointer.

John Israel

Sent from my iPhone

 On May 12, 2014, at 7:39 PM, Wjhonson wjhon...@aol.com wrote:
 
 
 The program does not inherently know that it's in a file called BP.
 And it does not know it's own (value of) PROG.ID unless it can find it out 
somehow.
 
 
 
 
 -Original Message-
 From: Adrian Overs ove...@citysoft.com.au
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, May 12, 2014 4:33 pm
 Subject: Re: [U2] Read yourself
 
 
 What problem are you trying to solve by doing so?
 After all it's not rocket science (pardon the pun) to
 OPEN BP TO BP.FV THEN
 READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever
 END
 
 Sent from my iPad
 
 On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:
 
 
 Does anyone have a BASIC program, that will open it's own code in a variable ?
 So something like this
 
 GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME
 
 READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 
 
 the program reads itself.
 
 Does anyone have a program like that?
 
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/5fHCMUSyOqejhOqemhNEV7e6XCQrEFLThKCqejqdQkTXEFECzASzt5d-WdSrCQrEFCzBZBxwQsCN6Fe4GhTPMkxFqtokrm-cGNVsSxFqtokrm-cGNVsSe847QhPb_nV5BZZAQsZuVtd5ZPATTD67KmKDp55mVEVvVkffGhBrwqrhdICXCXCM0pYGjFYjfNVJdIzM071dnoovaAVgtHzqptKDNErrjbJQ-d2V2Hsbvg57OFeDNc_7CQSOf00jr3P3xI5-Aq83iS4QPiWq80n-E6y0JlKdfftdFFCW--6tgnb718Y
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/k-Kr6jqb9EVd79EVp76zAsUrKrhKyC_t6WpEVdEThjvKyCyqejqdQkTXETpKrhKyCqenSm63hOr4qAUiF7vf1i6BFRxhJrUOH7BPq6BFRxhJrUOH7BPoUwgvh7cLZvAmnTSjhPRXBQQnTejvusouVqWtAklrCzB_BgY-F6lK1FJcSOrKrKr01DOFeDNc_7CQSOf00s4RtxxYGjB1SKdFBSWv6xJJcKTjUQbAaJMJZ0kvaAWv4PYurjr8Y01dIfce6MnWhEwdbojjdbFEw1vWwq82RmUQYZQSCCrHzJY
 
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/2DRPoQ93hJ5AQsCzAQsIzzhOesdTdEThjvKztcQsCQrEFLThjhd79J6WarZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzOVIsg8fEzCn-LObbXX9EVWZOWqbXD9LLecfsJteOaaJPhO_OEuvkzaT0QSOrpdTdTdw0PVkDjUCvzPqrp7w0e2qKMM-l9OwXn6QOXtfzgSSCnrFYq5O5mUm-wafBitfyp-fdFJAu00CS7C73obZ8Qg6BI9FCBQQg0LZgd41qHsquuWrjjdPC62kJ0KQBUS
___
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] Read yourself

2014-05-12 Thread David Wasylenko
We always have a variable PGID defined at the top of the program.
This at least HELPS identify the source code.

Most of our programs have the ability to edit the code while you are in the 
program via some common hot-keys
built into our core system. (controlled by security)
There is also a hot-key to view source in a custom program, outside the editor.

We use 'PGID' to identify the name of the current program.

In universe, you may also look at the results of SYSTEM(9001) to get the 
current execution stack.
If your object file is type-19, and long-names are ON - it's easy to parse. 

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Monday, May 12, 2014 6:48 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


I understand how one could potentially do it.
I was more interested to see if anyone had already done it.
Cat pointers only work for catalogued entries by the way
 
 
 
-Original Message-
From: Israel, John R. johnisr...@daytonsuperior.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, May 12, 2014 4:41 pm
Subject: Re: [U2] Read yourself


There are @ commands that can get this stuff.  Or read the cat pointer.

John Israel

Sent from my iPhone

 On May 12, 2014, at 7:39 PM, Wjhonson wjhon...@aol.com wrote:
 
 
 The program does not inherently know that it's in a file called BP.
 And it does not know it's own (value of) PROG.ID unless it can find it 
 out
somehow.
 
 
 
 
 -Original Message-
 From: Adrian Overs ove...@citysoft.com.au
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, May 12, 2014 4:33 pm
 Subject: Re: [U2] Read yourself
 
 
 What problem are you trying to solve by doing so?
 After all it's not rocket science (pardon the pun) to OPEN BP TO 
 BP.FV THEN READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END
 
 Sent from my iPad
 
 On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:
 
 
 Does anyone have a BASIC program, that will open it's own code in a variable ?
 So something like this
 
 GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME
 
 READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 
 
 the program reads itself.
 
 Does anyone have a program like that?
 
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/5fHCMUSyOqejhOqemhNEV7e6XCQrEFLThKCqejqdQkTXEFE
 CzASzt5d-WdSrCQrEFCzBZBxwQsCN6Fe4GhTPMkxFqtokrm-cGNVsSxFqtokrm-cGNVsSe
 847QhPb_nV5BZZAQsZuVtd5ZPATTD67KmKDp55mVEVvVkffGhBrwqrhdICXCXCM0pYGjFY
 jfNVJdIzM071dnoovaAVgtHzqptKDNErrjbJQ-d2V2Hsbvg57OFeDNc_7CQSOf00jr3P3x
 I5-Aq83iS4QPiWq80n-E6y0JlKdfftdFFCW--6tgnb718Y
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/k-Kr6jqb9EVd79EVp76zAsUrKrhKyC_t6WpEVdEThjvKyCy
 qejqdQkTXETpKrhKyCqenSm63hOr4qAUiF7vf1i6BFRxhJrUOH7BPq6BFRxhJrUOH7BPoU
 wgvh7cLZvAmnTSjhPRXBQQnTejvusouVqWtAklrCzB_BgY-F6lK1FJcSOrKrKr01DOFeDN
 c_7CQSOf00s4RtxxYGjB1SKdFBSWv6xJJcKTjUQbAaJMJZ0kvaAWv4PYurjr8Y01dIfce6
 MnWhEwdbojjdbFEw1vWwq82RmUQYZQSCCrHzJY
 
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/2DRPoQ93hJ5AQsCzAQsIzzhOesdTdEThjvKztcQsCQrEFLT
 hjhd79J6WarZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzO
 VIsg8fEzCn-LObbXX9EVWZOWqbXD9LLecfsJteOaaJPhO_OEuvkzaT0QSOrpdTdTdw0PVk
 DjUCvzPqrp7w0e2qKMM-l9OwXn6QOXtfzgSSCnrFYq5O5mUm-wafBitfyp-fdFJAu00CS7
 C73obZ8Qg6BI9FCBQQg0LZgd41qHsquuWrjjdPC62kJ0KQBUS
___
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] Read yourself

2014-05-12 Thread Adrian Overs
You can get the Program name by parsing @SENTANCE
You can then read the Verb from the VOC and act on that or if the item is 
globally catalogued then read the last line from your catdir item 
From unix level use strings $catpath/$item | tail -1 and then process that.
HTH

Sent from my iPad

On 13 May 2014, at 9:33 am, Adrian Overs ove...@citysoft.com.au wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to
OPEN BP TO BP.FV THEN
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever
END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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] Read yourself

2014-05-12 Thread Bill Haskett
You can also use the program stack (UD - SYSTEM(49), UV - SYSTEM(9001), 
D3 - SYSTEM(33)).  This gives not only the program running but the 
path.  That ought to give needed information to both open the file and 
read the program source code.


HTH,

Bill


- Original Message -
*From:* d...@pickpro.com
*To:* U2 Users List u2-users@listserver.u2ug.org
*Date:* 5/12/2014 4:55 PM
*Subject:* Re: [U2] Read yourself

We always have a variable PGID defined at the top of the program.
This at least HELPS identify the source code.

Most of our programs have the ability to edit the code while you are in the program via 
some common hot-keys
built into our core system. (controlled by security)
There is also a hot-key to view source in a custom program, outside the editor.

We use 'PGID' to identify the name of the current program.

In universe, you may also look at the results of SYSTEM(9001) to get the 
current execution stack.
If your object file is type-19, and long-names are ON - it's easy to parse.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Monday, May 12, 2014 6:48 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


I understand how one could potentially do it.
I was more interested to see if anyone had already done it.
Cat pointers only work for catalogued entries by the way
  
  
  
-Original Message-

From: Israel, John R. johnisr...@daytonsuperior.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, May 12, 2014 4:41 pm
Subject: Re: [U2] Read yourself


There are @ commands that can get this stuff.  Or read the cat pointer.

John Israel

Sent from my iPhone


On May 12, 2014, at 7:39 PM, Wjhonson wjhon...@aol.com wrote:


The program does not inherently know that it's in a file called BP.
And it does not know it's own (value of) PROG.ID unless it can find it
out

somehow.



-Original Message-
From: Adrian Overs ove...@citysoft.com.au
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, May 12, 2014 4:33 pm
Subject: Re: [U2] Read yourself


What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to OPEN BP TO
BP.FV THEN READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://cp.mcafee.com/d/5fHCMUSyOqejhOqemhNEV7e6XCQrEFLThKCqejqdQkTXEFE
CzASzt5d-WdSrCQrEFCzBZBxwQsCN6Fe4GhTPMkxFqtokrm-cGNVsSxFqtokrm-cGNVsSe
847QhPb_nV5BZZAQsZuVtd5ZPATTD67KmKDp55mVEVvVkffGhBrwqrhdICXCXCM0pYGjFY
jfNVJdIzM071dnoovaAVgtHzqptKDNErrjbJQ-d2V2Hsbvg57OFeDNc_7CQSOf00jr3P3x
I5-Aq83iS4QPiWq80n-E6y0JlKdfftdFFCW--6tgnb718Y
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://cp.mcafee.com/d/k-Kr6jqb9EVd79EVp76zAsUrKrhKyC_t6WpEVdEThjvKyCy
qejqdQkTXETpKrhKyCqenSm63hOr4qAUiF7vf1i6BFRxhJrUOH7BPq6BFRxhJrUOH7BPoU
wgvh7cLZvAmnTSjhPRXBQQnTejvusouVqWtAklrCzB_BgY-F6lK1FJcSOrKrKr01DOFeDN
c_7CQSOf00s4RtxxYGjB1SKdFBSWv6xJJcKTjUQbAaJMJZ0kvaAWv4PYurjr8Y01dIfce6
MnWhEwdbojjdbFEw1vWwq82RmUQYZQSCCrHzJY


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://cp.mcafee.com/d/2DRPoQ93hJ5AQsCzAQsIzzhOesdTdEThjvKztcQsCQrEFLT
hjhd79J6WarZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzO
VIsg8fEzCn-LObbXX9EVWZOWqbXD9LLecfsJteOaaJPhO_OEuvkzaT0QSOrpdTdTdw0PVk
DjUCvzPqrp7w0e2qKMM-l9OwXn6QOXtfzgSSCnrFYq5O5mUm-wafBitfyp-fdFJAu00CS7
C73obZ8Qg6BI9FCBQQg0LZgd41qHsquuWrjjdPC62kJ0KQBUS

___
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] Read yourself

2014-05-12 Thread David Wasylenko
OR you can use SYSTEM(9001) on universe
OR you can use SYSTEM(9001) on universe
   OR you can use SYSTEM(9001) on universe
  OR you can use SYSTEM(9001) on universe
  OR you can use SYSTEM(9001) on universe
Hmmm, thought someone said that already :-)

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett
Sent: Monday, May 12, 2014 7:19 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

You can also use the program stack (UD - SYSTEM(49), UV - SYSTEM(9001),
D3 - SYSTEM(33)).  This gives not only the program running but the path.  That 
ought to give needed information to both open the file and read the program 
source code.

HTH,

Bill


- Original Message -
*From:* d...@pickpro.com
*To:* U2 Users List u2-users@listserver.u2ug.org
*Date:* 5/12/2014 4:55 PM
*Subject:* Re: [U2] Read yourself
 We always have a variable PGID defined at the top of the program.
 This at least HELPS identify the source code.

 Most of our programs have the ability to edit the code while you are in the 
 program via some common hot-keys
 built into our core system. (controlled by security) There is also a 
 hot-key to view source in a custom program, outside the editor.

 We use 'PGID' to identify the name of the current program.

 In universe, you may also look at the results of SYSTEM(9001) to get the 
 current execution stack.
 If your object file is type-19, and long-names are ON - it's easy to parse.

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org 
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 Sent: Monday, May 12, 2014 6:48 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] Read yourself


 I understand how one could potentially do it.
 I was more interested to see if anyone had already done it.
 Cat pointers only work for catalogued entries by the way
   
   
   
 -Original Message-
 From: Israel, John R. johnisr...@daytonsuperior.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, May 12, 2014 4:41 pm
 Subject: Re: [U2] Read yourself


 There are @ commands that can get this stuff.  Or read the cat pointer.

 John Israel

 Sent from my iPhone

 On May 12, 2014, at 7:39 PM, Wjhonson wjhon...@aol.com wrote:


 The program does not inherently know that it's in a file called BP.
 And it does not know it's own (value of) PROG.ID unless it can find 
 it out
 somehow.


 -Original Message-
 From: Adrian Overs ove...@citysoft.com.au
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, May 12, 2014 4:33 pm
 Subject: Re: [U2] Read yourself


 What problem are you trying to solve by doing so?
 After all it's not rocket science (pardon the pun) to OPEN BP TO 
 BP.FV THEN READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

 Sent from my iPad

 On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


 Does anyone have a BASIC program, that will open it's own code in a variable 
 ?
 So something like this

 GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

 READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

 the program reads itself.

 Does anyone have a program like that?


 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/5fHCMUSyOqejhOqemhNEV7e6XCQrEFLThKCqejqdQkTXEF
 E 
 CzASzt5d-WdSrCQrEFCzBZBxwQsCN6Fe4GhTPMkxFqtokrm-cGNVsSxFqtokrm-cGNVsS
 e 
 847QhPb_nV5BZZAQsZuVtd5ZPATTD67KmKDp55mVEVvVkffGhBrwqrhdICXCXCM0pYGjF
 Y 
 jfNVJdIzM071dnoovaAVgtHzqptKDNErrjbJQ-d2V2Hsbvg57OFeDNc_7CQSOf00jr3P3
 x I5-Aq83iS4QPiWq80n-E6y0JlKdfftdFFCW--6tgnb718Y
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/k-Kr6jqb9EVd79EVp76zAsUrKrhKyC_t6WpEVdEThjvKyC
 y 
 qejqdQkTXETpKrhKyCqenSm63hOr4qAUiF7vf1i6BFRxhJrUOH7BPq6BFRxhJrUOH7BPo
 U 
 wgvh7cLZvAmnTSjhPRXBQQnTejvusouVqWtAklrCzB_BgY-F6lK1FJcSOrKrKr01DOFeD
 N
 c_7CQSOf00s4RtxxYGjB1SKdFBSWv6xJJcKTjUQbAaJMJZ0kvaAWv4PYurjr8Y01dIfce
 6 MnWhEwdbojjdbFEw1vWwq82RmUQYZQSCCrHzJY


 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/2DRPoQ93hJ5AQsCzAQsIzzhOesdTdEThjvKztcQsCQrEFL
 T 
 hjhd79J6WarZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplz
 O 
 VIsg8fEzCn-LObbXX9EVWZOWqbXD9LLecfsJteOaaJPhO_OEuvkzaT0QSOrpdTdTdw0PV
 k
 DjUCvzPqrp7w0e2qKMM-l9OwXn6QOXtfzgSSCnrFYq5O5mUm-wafBitfyp-fdFJAu00CS
 7 C73obZ8Qg6BI9FCBQQg0LZgd41qHsquuWrjjdPC62kJ0KQBUS
 ___
 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] Read yourself

2014-05-12 Thread David Wasylenko
Wont work --- if you use any external subroutines.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:18 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

You can get the Program name by parsing @SENTANCE You can then read the Verb 
from the VOC and act on that or if the item is globally catalogued then read 
the last line from your catdir item 
From unix level use strings $catpath/$item | tail -1 and then process that.
HTH

Sent from my iPad

On 13 May 2014, at 9:33 am, Adrian Overs ove...@citysoft.com.au wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to OPEN BP TO BP.FV THEN 
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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] Read yourself

2014-05-12 Thread Adrian Overs
That's true - if the subroutines are catalogued with a noxref clause you're 
screwed. 

Sent from my iPad

On 13 May 2014, at 10:19 am, David Wasylenko d...@pickpro.com wrote:

Wont work --- if you use any external subroutines.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:18 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

You can get the Program name by parsing @SENTANCE You can then read the Verb 
from the VOC and act on that or if the item is globally catalogued then read 
the last line from your catdir item 
 From unix level use strings $catpath/$item | tail -1 and then process that.
HTH

Sent from my iPad

On 13 May 2014, at 9:33 am, Adrian Overs ove...@citysoft.com.au wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to OPEN BP TO BP.FV THEN 
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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] Read yourself

2014-05-12 Thread Wjhonson

system(9001) is doing something odd
One of the chars in the catdir name is an asterisk and the system(9001) returns 
that as %A instead of *
 
 
 
 
-Original Message-
From: Bill Haskett wphask...@advantos.net
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, May 12, 2014 5:19 pm
Subject: Re: [U2] Read yourself


You can also use the program stack (UD - SYSTEM(49), UV - SYSTEM(9001), 
D3 - SYSTEM(33)).  This gives not only the program running but the 
path.  That ought to give needed information to both open the file and 
read the program source code.

HTH,

Bill


- Original Message -
*From:* d...@pickpro.com
*To:* U2 Users List u2-users@listserver.u2ug.org
*Date:* 5/12/2014 4:55 PM
*Subject:* Re: [U2] Read yourself
 We always have a variable PGID defined at the top of the program.
 This at least HELPS identify the source code.

 Most of our programs have the ability to edit the code while you are in the 
program via some common hot-keys
 built into our core system. (controlled by security)
 There is also a hot-key to view source in a custom program, outside the 
editor.

 We use 'PGID' to identify the name of the current program.

 In universe, you may also look at the results of SYSTEM(9001) to get the 
current execution stack.
 If your object file is type-19, and long-names are ON - it's easy to parse.

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org 
 [mailto:u2-users-boun...@listserver.u2ug.org] 
On Behalf Of Wjhonson
 Sent: Monday, May 12, 2014 6:48 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] Read yourself


 I understand how one could potentially do it.
 I was more interested to see if anyone had already done it.
 Cat pointers only work for catalogued entries by the way
   
   
   
 -Original Message-
 From: Israel, John R. johnisr...@daytonsuperior.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, May 12, 2014 4:41 pm
 Subject: Re: [U2] Read yourself


 There are @ commands that can get this stuff.  Or read the cat pointer.

 John Israel

 Sent from my iPhone

 On May 12, 2014, at 7:39 PM, Wjhonson wjhon...@aol.com wrote:


 The program does not inherently know that it's in a file called BP.
 And it does not know it's own (value of) PROG.ID unless it can find it
 out
 somehow.


 -Original Message-
 From: Adrian Overs ove...@citysoft.com.au
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Mon, May 12, 2014 4:33 pm
 Subject: Re: [U2] Read yourself


 What problem are you trying to solve by doing so?
 After all it's not rocket science (pardon the pun) to OPEN BP TO
 BP.FV THEN READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

 Sent from my iPad

 On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


 Does anyone have a BASIC program, that will open it's own code in a variable 
?
 So something like this

 GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

 READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

 the program reads itself.

 Does anyone have a program like that?


 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/5fHCMUSyOqejhOqemhNEV7e6XCQrEFLThKCqejqdQkTXEFE
 CzASzt5d-WdSrCQrEFCzBZBxwQsCN6Fe4GhTPMkxFqtokrm-cGNVsSxFqtokrm-cGNVsSe
 847QhPb_nV5BZZAQsZuVtd5ZPATTD67KmKDp55mVEVvVkffGhBrwqrhdICXCXCM0pYGjFY
 jfNVJdIzM071dnoovaAVgtHzqptKDNErrjbJQ-d2V2Hsbvg57OFeDNc_7CQSOf00jr3P3x
 I5-Aq83iS4QPiWq80n-E6y0JlKdfftdFFCW--6tgnb718Y
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/k-Kr6jqb9EVd79EVp76zAsUrKrhKyC_t6WpEVdEThjvKyCy
 qejqdQkTXETpKrhKyCqenSm63hOr4qAUiF7vf1i6BFRxhJrUOH7BPq6BFRxhJrUOH7BPoU
 wgvh7cLZvAmnTSjhPRXBQQnTejvusouVqWtAklrCzB_BgY-F6lK1FJcSOrKrKr01DOFeDN
 c_7CQSOf00s4RtxxYGjB1SKdFBSWv6xJJcKTjUQbAaJMJZ0kvaAWv4PYurjr8Y01dIfce6
 MnWhEwdbojjdbFEw1vWwq82RmUQYZQSCCrHzJY


 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://cp.mcafee.com/d/2DRPoQ93hJ5AQsCzAQsIzzhOesdTdEThjvKztcQsCQrEFLT
 hjhd79J6WarZQrITdEThjd7bXb31EVdydis9kzLDwF3iQWMESJYplzOVJ3iQWMESJYplzO
 VIsg8fEzCn-LObbXX9EVWZOWqbXD9LLecfsJteOaaJPhO_OEuvkzaT0QSOrpdTdTdw0PVk
 DjUCvzPqrp7w0e2qKMM-l9OwXn6QOXtfzgSSCnrFYq5O5mUm-wafBitfyp-fdFJAu00CS7
 C73obZ8Qg6BI9FCBQQg0LZgd41qHsquuWrjjdPC62kJ0KQBUS
 ___
 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

Re: [U2] Read yourself

2014-05-12 Thread David Wasylenko
IT'S JUST NOT TRUE EVER.  @sentence cannot work.

The stub program that launched an initial program will be in the @sentence...
You could be 3 calls deep into external subroutines - there is nothing in 
@sentence re: the call-stack.
Our shop writes *very* few stub programs - most are subroutines called by other 
subroutines.

Instead:
Add 
PGID=programName
Or even
PGID=filename  ProgramName
To the top of the program - quick and easy.
Use of system routines such as SYSTEM(9001) is usually overkill.

Your program should be aware of it's name - if no other reasons than:
*  display on the screen to help users identify where their problem came from
*  print on reports
*  add to log-file entries
+ and of course, to answer the original question:  how can I read the current 
program source

A well-designed system/program should hard-code as little as possible as well.
What better key to use for a configuration record than the program name itself.


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:39 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

That's true - if the subroutines are catalogued with a noxref clause you're 
screwed. 

Sent from my iPad

On 13 May 2014, at 10:19 am, David Wasylenko d...@pickpro.com wrote:

Wont work --- if you use any external subroutines.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:18 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

You can get the Program name by parsing @SENTANCE You can then read the Verb 
from the VOC and act on that or if the item is globally catalogued then read 
the last line from your catdir item 
 From unix level use strings $catpath/$item | tail -1 and then process that.
HTH

Sent from my iPad

On 13 May 2014, at 9:33 am, Adrian Overs ove...@citysoft.com.au wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to OPEN BP TO BP.FV THEN 
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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] Read yourself

2014-05-12 Thread Adrian Overs
I totally agree with and endorse your programming standards David.
However if the program is calling another subroutine it should know the name of 
that subroutine or be able to derive it if it is called with an @.

Sent from my iPad

On 13 May 2014, at 10:45 am, David Wasylenko d...@pickpro.com wrote:

IT'S JUST NOT TRUE EVER.  @sentence cannot work.

The stub program that launched an initial program will be in the @sentence...
You could be 3 calls deep into external subroutines - there is nothing in 
@sentence re: the call-stack.
Our shop writes *very* few stub programs - most are subroutines called by other 
subroutines.

Instead:
Add 
   PGID=programName
Or even
   PGID=filename  ProgramName
To the top of the program - quick and easy.
Use of system routines such as SYSTEM(9001) is usually overkill.

Your program should be aware of it's name - if no other reasons than:
*  display on the screen to help users identify where their problem came from
*  print on reports
*  add to log-file entries
+ and of course, to answer the original question:  how can I read the current 
program source

A well-designed system/program should hard-code as little as possible as well.
What better key to use for a configuration record than the program name itself.


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:39 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

That's true - if the subroutines are catalogued with a noxref clause you're 
screwed. 

Sent from my iPad

On 13 May 2014, at 10:19 am, David Wasylenko d...@pickpro.com wrote:

Wont work --- if you use any external subroutines.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:18 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

You can get the Program name by parsing @SENTANCE You can then read the Verb 
from the VOC and act on that or if the item is globally catalogued then read 
the last line from your catdir item 
 From unix level use strings $catpath/$item | tail -1 and then process that.
HTH

Sent from my iPad

On 13 May 2014, at 9:33 am, Adrian Overs ove...@citysoft.com.au wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to OPEN BP TO BP.FV THEN 
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Read yourself

2014-05-12 Thread David Wasylenko
I think the point has been lost.
The person is requesting the name of the CURRENT ROUTINE
If that is A SUBROUTINE - there is no @ that I know of that returns the name of 
the currently executing routine.
The fact the CALLING routine knows the name is #1, is of no value to this 
request and #2, lends nothing to any routine being self-aware.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:58 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

I totally agree with and endorse your programming standards David.
However if the program is calling another subroutine it should know the name of 
that subroutine or be able to derive it if it is called with an @.

Sent from my iPad

On 13 May 2014, at 10:45 am, David Wasylenko d...@pickpro.com wrote:

IT'S JUST NOT TRUE EVER.  @sentence cannot work.

The stub program that launched an initial program will be in the @sentence...
You could be 3 calls deep into external subroutines - there is nothing in 
@sentence re: the call-stack.
Our shop writes *very* few stub programs - most are subroutines called by other 
subroutines.

Instead:
Add 
   PGID=programName
Or even
   PGID=filename  ProgramName
To the top of the program - quick and easy.
Use of system routines such as SYSTEM(9001) is usually overkill.

Your program should be aware of it's name - if no other reasons than:
*  display on the screen to help users identify where their problem came from
*  print on reports
*  add to log-file entries
+ and of course, to answer the original question:  how can I read the current 
program source

A well-designed system/program should hard-code as little as possible as well.
What better key to use for a configuration record than the program name itself.


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:39 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

That's true - if the subroutines are catalogued with a noxref clause you're 
screwed. 

Sent from my iPad

On 13 May 2014, at 10:19 am, David Wasylenko d...@pickpro.com wrote:

Wont work --- if you use any external subroutines.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:18 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

You can get the Program name by parsing @SENTANCE You can then read the Verb 
from the VOC and act on that or if the item is globally catalogued then read 
the last line from your catdir item 
 From unix level use strings $catpath/$item | tail -1 and then process that.
HTH

Sent from my iPad

On 13 May 2014, at 9:33 am, Adrian Overs ove...@citysoft.com.au wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to OPEN BP TO BP.FV THEN 
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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
___
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] Read yourself

2014-05-12 Thread Wjhonson

I just ran a test where a main program called an external subroutine
In the external subroutine I had it display system(9001)
 
The subroutine name was listed in that display as was the main routine which 
had called it
 
 
 
 
-Original Message-
From: David Wasylenko d...@pickpro.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, May 12, 2014 6:09 pm
Subject: Re: [U2] Read yourself


I think the point has been lost.
The person is requesting the name of the CURRENT ROUTINE
If that is A SUBROUTINE - there is no @ that I know of that returns the name of 
the currently executing routine.
The fact the CALLING routine knows the name is #1, is of no value to this 
request and #2, lends nothing to any routine being self-aware.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:58 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

I totally agree with and endorse your programming standards David.
However if the program is calling another subroutine it should know the name of 
that subroutine or be able to derive it if it is called with an @.

Sent from my iPad

On 13 May 2014, at 10:45 am, David Wasylenko d...@pickpro.com wrote:

IT'S JUST NOT TRUE EVER.  @sentence cannot work.

The stub program that launched an initial program will be in the @sentence...
You could be 3 calls deep into external subroutines - there is nothing in 
@sentence re: the call-stack.
Our shop writes *very* few stub programs - most are subroutines called by other 
subroutines.

Instead:
Add 
   PGID=programName
Or even
   PGID=filename  ProgramName
To the top of the program - quick and easy.
Use of system routines such as SYSTEM(9001) is usually overkill.

Your program should be aware of it's name - if no other reasons than:
*  display on the screen to help users identify where their problem came from
*  print on reports
*  add to log-file entries
+ and of course, to answer the original question:  how can I read the current 
program source

A well-designed system/program should hard-code as little as possible as well.
What better key to use for a configuration record than the program name itself.


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:39 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

That's true - if the subroutines are catalogued with a noxref clause you're 
screwed. 

Sent from my iPad

On 13 May 2014, at 10:19 am, David Wasylenko d...@pickpro.com wrote:

Wont work --- if you use any external subroutines.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:18 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

You can get the Program name by parsing @SENTANCE You can then read the Verb 
from the VOC and act on that or if the item is globally catalogued then read 
the 
last line from your catdir item 
 From unix level use strings $catpath/$item | tail -1 and then process that.
HTH

Sent from my iPad

On 13 May 2014, at 9:33 am, Adrian Overs ove...@citysoft.com.au wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to OPEN BP TO BP.FV THEN 
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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
___
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] Read yourself

2014-05-12 Thread Bernard Lubin
You will need to do a system(9001) to get the program stack
This will tell you the subroutine that is being called.

To get the library, first check the VOC for the external subroutine.  If there 
is no VOC pointer for that item, check the VOC pointer for the calling program.

As far as I remember, when calling a subroutine, UniVerse first checks the VOC 
for the program name to determine the program library where the program 
resides..  If the VOC entry is not present, it uses the library of the calling 
program.  I do not know how far back the stack it will go.. (Hopefully all the 
way to the first program)

Hope that helps.

Rgds


Bernard Lubin
System Group Developer

549 Blackburn Rd  Mount Waverley
VIC 3149 Australia
P: +61 3 9535 
F: +61 3 9535 2274
E: bernard.lu...@pentanasolutions.com
W: pentanasolutions.com

Pentana Solutions accepts no liability for the content of this email, or for 
the consequences of any actions taken on the basis of the information provided, 
unless that information is subsequently confirmed in  writing. If you are not 
the intended recipient, you are notified that disclosing, copying, distributing 
or taking any action in reliance on the contents of this information is 
strictly prohibited.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, 13 May 2014 11:29 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Read yourself


I just ran a test where a main program called an external subroutine In the 
external subroutine I had it display system(9001)

The subroutine name was listed in that display as was the main routine which 
had called it




-Original Message-
From: David Wasylenko d...@pickpro.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, May 12, 2014 6:09 pm
Subject: Re: [U2] Read yourself


I think the point has been lost.
The person is requesting the name of the CURRENT ROUTINE
If that is A SUBROUTINE - there is no @ that I know of that returns the name of 
the currently executing routine.
The fact the CALLING routine knows the name is #1, is of no value to this 
request and #2, lends nothing to any routine being self-aware.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org]
On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:58 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

I totally agree with and endorse your programming standards David.
However if the program is calling another subroutine it should know the name of 
that subroutine or be able to derive it if it is called with an @.

Sent from my iPad

On 13 May 2014, at 10:45 am, David Wasylenko d...@pickpro.com wrote:

IT'S JUST NOT TRUE EVER.  @sentence cannot work.

The stub program that launched an initial program will be in the @sentence...
You could be 3 calls deep into external subroutines - there is nothing in 
@sentence re: the call-stack.
Our shop writes *very* few stub programs - most are subroutines called by other 
subroutines.

Instead:
Add
   PGID=programName
Or even
   PGID=filename  ProgramName
To the top of the program - quick and easy.
Use of system routines such as SYSTEM(9001) is usually overkill.

Your program should be aware of it's name - if no other reasons than:
*  display on the screen to help users identify where their problem came from
*  print on reports
*  add to log-file entries
+ and of course, to answer the original question:  how can I read the
+ current
program source

A well-designed system/program should hard-code as little as possible as well.
What better key to use for a configuration record than the program name itself.


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org]
On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:39 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

That's true - if the subroutines are catalogued with a noxref clause you're 
screwed.

Sent from my iPad

On 13 May 2014, at 10:19 am, David Wasylenko d...@pickpro.com wrote:

Wont work --- if you use any external subroutines.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org]
On Behalf Of Adrian Overs
Sent: Monday, May 12, 2014 7:18 PM
To: U2 Users List
Subject: Re: [U2] Read yourself

You can get the Program name by parsing @SENTANCE You can then read the Verb 
from the VOC and act on that or if the item is globally catalogued then read 
the last line from your catdir item
 From unix level use strings $catpath/$item | tail -1 and then process that.
HTH

Sent from my iPad

On 13 May 2014, at 9:33 am, Adrian Overs ove...@citysoft.com.au wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to OPEN BP TO BP.FV THEN 
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever END

Sent from my iPad

On 13 May

Re: [U2] Read yourself

2014-05-12 Thread Robert
I saw on one PICK system, a precompiler language. It was the same as 
PICK/BASIC, but had a preprocessor to it.


So, for example to get the user number on a Universe system you would 
use USER.NO=@USER.NO


On a PICK system, it would be USER.NO=OCONV(0,'U50BB')

Rather than write it into the program to check what system it is on 
(since sometimes it could be different functions or statements used that 
never even compile), then would do something like:


USER.NO=%GET USERNO%

The precompiler would look at the control table and translate the '%GET 
USERNO%' to the appropriate statement, then compile.


I've seen software that was so generic it would run on any version of 
Multivalue system and sometimes even non-Multivalue systems.


Robert Norman

ROBERT NORMAN AND ASSOCIATES
23441 Golden Springs Dr., #289, Diamond Bar, CA 91765
(323) 285-7272, (951) 541-1668
i...@keyway.net
http://universe-basic-programming.webstarts.com/index.html
http://users.keyway.net/~ice/
http://www.affordablemultivalueprogramming.i8.com/
Computer programming  software development in Universe BASIC for Rocket 
Universe, in PICK/BASIC for Rocket D3, in UNIBASIC
for Rocket Unidata, in R/BASIC (REVELATION BASIC) for REVELATION 
TECHOLOGIES REVELATION, in JBASIC (JBC or JBASE BASIC) for
TEMENOS JBASE, in DATA/BASIC for Northgate REALITY, in MV BASIC 
(Multivalue Basic) for Intersystems Cache Multivalue, and

QMBASIC for Ladybridge OPENQM (QM).

On 5/12/2014 4:33 PM, Adrian Overs wrote:

What problem are you trying to solve by doing so?
After all it's not rocket science (pardon the pun) to
OPEN BP TO BP.FV THEN
READ R.PROG FROM BP.FV, PROG.ID ELSE ... Whatever
END

Sent from my iPad

On 13 May 2014, at 6:54 am, Wjhonson wjhon...@aol.com wrote:


Does anyone have a BASIC program, that will open it's own code in a variable ?
So something like this

GOSUB RETURN.A.LOCAL.FILE.AND.KEY.FOR.ME

READ THIS.PROGRAM FROM F.LOCALFILENAME, K.PROGRAMKEY 

the program reads itself.

Does anyone have a program like that?


___
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