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

2014-01-30 Thread Daniel McGrath
Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Wednesday, January 29, 2014 10:15 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine I was just

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

2014-01-30 Thread Bruce Decker
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Wednesday, January 29, 2014 10:15 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine I was just trying to think of a reason why I'd want specifically

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

2014-01-30 Thread Robert
] On Behalf Of Ross Ferris Sent: Wednesday, January 29, 2014 10:56 PM To: U2 Users List Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine Knowing how many arguments a subroutine is expecting is a good way to check/confirm that the call you are about to make isn't going

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

2014-01-30 Thread Bruce Decker
Good points. My view is that it is usually not a matter of whether the failure should be catastrophic. It's usually a matter of who should be in in control of the catastrophe. If you call a object that bombs, the caller will never know why because control never returns to the caller. With

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

2014-01-30 Thread Bruce Decker
I'd be interested to see how ON ERROR could catch a subroutine call failure. And I'd ball-up and toss my stuff in a heartbeat. No pride here... -BD On 1/30/2014 2:52 PM, Anthonys Lists wrote: On 30/01/2014 18:35, Bruce Decker wrote: Good points. My view is that it is usually not a matter of

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

2014-01-30 Thread Wols Lists
On 30/01/14 22:44, Bruce Decker wrote: I'd be interested to see how ON ERROR could catch a subroutine call failure. And I'd ball-up and toss my stuff in a heartbeat. No pride here... -BD No, on error doesn't catch a subroutine call failure. But it was added to prevent programs bombing if a

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

2014-01-29 Thread Ross Ferris
-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Wednesday, January 29, 2014 10:15 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine I was just trying to think of a reason why I'd want specifically to know how many

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

2014-01-28 Thread Wjhonson
: Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine There is the !EXIST subroutine. It's a legacy Prime INFO subroutine - created for legacy code that need it. The source code is in UV APP.PROGS and just reads GLOBAL.CATDIR and also sets STATUS() with a return code too

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

2014-01-28 Thread LeRoy Dreyfuss
- From: Hona, David david.h...@cba.com.au To: U2 Users List u2-users@listserver.u2ug.org Sent: Mon, Jan 27, 2014 7:50 pm Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine There is the !EXIST subroutine. It's a legacy Prime INFO subroutine - created for legacy code

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

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

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

2014-01-28 Thread Wjhonson
@listserver.u2ug.org' u2-users@listserver.u2ug.org Sent: Tue, Jan 28, 2014 3:10 pm Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine Hi, LeRoy Dreyfuss said that you would have to change 52 to 12 for EXIST to work. The globally cataloged programs have an extra 40

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

2014-01-28 Thread LeRoy Dreyfuss
] keith.john...@datacom.co.nz To: 'u2-users@listserver.u2ug.org' u2-users@listserver.u2ug.org Sent: Tue, Jan 28, 2014 3:10 pm Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine Hi, LeRoy Dreyfuss said that you would have to change 52 to 12 for EXIST to work

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

2014-01-28 Thread Gregor Scott
I was also surprised to find it possible to ASSIGN a value to STATUS(). A quick test program shows it only allows integer values. Decimals have the ABS() of the value assigned, and text produces a Nonnumeric runtime error and STATUS() is (as expected) set to 0. Gregor Scott System Group

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

2014-01-28 Thread LeRoy Dreyfuss
You are correct. 52 works for globally cataloged programs. 12 for locally cataloged programs. For clarity, @RECORD[5,8] is the account where it was last cataloged (@WHO). 11 years ago I tried to have the user ID added but the data typing of the header's structure didn't seem to allow it. That

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

2014-01-28 Thread LeRoy Dreyfuss
Makes sense. It only outputs integers (user IDs, msg.text numbers, SYS.MESSAGE IDs, etc.) On Tue, Jan 28, 2014 at 11:26 PM, Gregor Scott gregor.sc...@pentanasolutions.com wrote: I was also surprised to find it possible to ASSIGN a value to STATUS(). A quick test program shows it only allows

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

2014-01-27 Thread Allen Egerton
Perhaps VCATALOG (Allen - Sent from my paperweight) On Jan 27, 2014, at 12:06 PM, Perry Taylor perry.tay...@zirmed.com wrote: Does anyone know of a good method in UniVerse BASIC to be able to verify if a subroutine is globally cataloged? Thanks. Perry Taylor Senior MV Architect

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

2014-01-27 Thread Wjhonson
You read the GLOBAL.CATDIR file looking for that subroutine name, typically, at least at my site, they are prepended with an asterisk *GET.YEAR -Original Message- From: Perry Taylor perry.tay...@zirmed.com To: U2-Users List u2-users@listserver.u2ug.org Sent: Mon, Jan 27, 2014 9:06

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

2014-01-27 Thread Wjhonson
-Users List u2-users@listserver.u2ug.org Sent: Mon, Jan 27, 2014 9:29 am Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine Perhaps VCATALOG (Allen - Sent from my paperweight) On Jan 27, 2014, at 12:06 PM, Perry Taylor perry.tay...@zirmed.com wrote: Does anyone

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

2014-01-27 Thread Wols Lists
On 27/01/14 17:48, Wjhonson wrote: You read the GLOBAL.CATDIR file looking for that subroutine name, typically, at least at my site, they are prepended with an asterisk *GET.YEAR And, iirc, you can call a locally catalog'd routine globally by calling it as *ACCOUNT*SUBNAME. This is a

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

2014-01-27 Thread Hona, David
There is the !EXIST subroutine. It's a legacy Prime INFO subroutine - created for legacy code that need it. The source code is in UV APP.PROGS and just reads GLOBAL.CATDIR and also sets STATUS() with a return code too. CATALOGED.NAME = '*MYGLOBALSUB' call !EXIST(CATALOGED.NAME, RC) crt