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

2014-01-30 Thread Daniel McGrath
In particular, when using the CALL @ syntax to dynamically call something.

Dan

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 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 to blow up in 
your face!

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 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 arguments the subroutine has.
That is, why was this particular fact chosen as the returned status code ?



-Original Message-
From: Keith Johnson [DATACOM] 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.

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 cataloged it

@RECORD[13,4] are the date and time (I think)


Regards, Keith



___
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] [UV] Programmatic Verification of Globally Cataloged Subroutine

2014-01-30 Thread Bruce Decker
 to be returned to caller.
*---
*
INCLUDE bpi.xml.bp bpixmlize.common ; * to get common variables
BEGIN CASE
CASE UNASSIGNED(mode)
   mode = 1
CASE mode EQ 2
   GOSUB Validate
   GOTO Exit
CASE @TRUE
   * allow to drop through
END CASE
*
pgm.id= \MY.SUBROUTINE.NAME\
*
GOSUB DoSomethingUseful
GOTO  Exit
*---
DoSomethingUseful:
   * here is where we do the main task of this subroutine
RETURN
*
Validate:
   *do some sanity checks, make sure subroutine can function (i.e., 
open files, etc)

   *then if all looks good, simply output th %%validated%% string
   CRT \%%validated%%\
RETURN
*
Exit:
  RETURN


Bruce Decker
Blue Prairie, Inc.
http://www.bluepinc.com
720.733.0459


On 1/30/2014 8:13 AM, Daniel McGrath wrote:

In particular, when using the CALL @ syntax to dynamically call something.

Dan

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 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 to blow up in 
your face!

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 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 arguments the subroutine has.
That is, why was this particular fact chosen as the returned status code ?



-Original Message-
From: Keith Johnson [DATACOM] 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.

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 cataloged it

@RECORD[13,4] are the date and time (I think)


Regards, Keith



___
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] [UV] Programmatic Verification of Globally Cataloged Subroutine

2014-01-30 Thread Robert
( sentence, @AM)
   subroutine.name = \\
   FOR i = 1 to max.words
  BEGIN CASE
  CASE start
 BEGIN CASE
 CASE subroutine.name EQ \\
subroutine.name = sentence i 
 CASE @TRUE
* ignore
 END CASE
  CASE sentencei EQ pgm.id
 start = @TRUE
  CASE @TRUE
 * ignore
  END CASE
   NEXT i
RETURN
*
Exit:
   STOP

*
**A sample user subroutine:*
SUBROUTINE MY.SUBROUTINE.NAME(item.id, mode, error)
* Copyright (c) 2013 by Blue Prairie, Inc.
* All Rights Reserved
*
* item.idis the item ID of the main file to process
* mode   If caller sets mode=2, then subroutine will 
simply output
*string '%%validated%%\ and return. This is so 
that the
*caller can use the subroutine test program to 
validate that
*the subroutine name is valid and callable before 
actually
*calling it.  If the subroutine sets mode to zero, 
the calling
*program should consider this a signal that 
something is wrong
*and it should stop processing.  The caller should 
normally set

*mode to 1 for normal processing.
* error  is an error code to be returned to caller.
*--- 


*
INCLUDE bpi.xml.bp bpixmlize.common ; * to get common variables
BEGIN CASE
CASE UNASSIGNED(mode)
   mode = 1
CASE mode EQ 2
   GOSUB Validate
   GOTO Exit
CASE @TRUE
   * allow to drop through
END CASE
*
pgm.id= \MY.SUBROUTINE.NAME\
*
GOSUB DoSomethingUseful
GOTO  Exit
*--- 


DoSomethingUseful:
   * here is where we do the main task of this subroutine
RETURN
*
Validate:
   *do some sanity checks, make sure subroutine can function (i.e., 
open files, etc)

   *then if all looks good, simply output th %%validated%% string
   CRT \%%validated%%\
RETURN
*
Exit:
  RETURN


Bruce Decker
Blue Prairie, Inc.
http://www.bluepinc.com
720.733.0459


On 1/30/2014 8:13 AM, Daniel McGrath wrote:
In particular, when using the CALL @ syntax to dynamically call 
something.


Dan

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 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 to blow 
up in your face!


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 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 arguments the subroutine has.
That is, why was this particular fact chosen as the returned status 
code ?




-Original Message-
From: Keith Johnson [DATACOM] 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.


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 cataloged it

@RECORD[13,4] are the date and time (I think)


Regards, Keith



___
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] [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 this technique, if you don't get a validated response, you can 
certainly choose 'go on'  in the main program but you chould also choose 
to make it a catastrophe.   The point is that your main program regains 
control after it provokes failure and can choose what to do with the 
failure.  As you point out, it might just log the error but it could 
logoff, or throw some other hissy instead of moving forward.  Note that 
the capture variable 'result' will contain the failure message.  That 
could be parsed to to whatever...


*For example:
...
*   IF INDEX( result, \%%validated%%\, 1) THEN
 CALL userSubroutine(foo, bar...)
   END ELSE
 message = \Call to \:userSubroutine:\ failed with this error: \:result
 message:= \So, we aborted on port \:@USERNO:\.  Sorry it didn't 
work out and thanks for all the fish.\

 emailTo = \ad...@mydomain.com\
 emailSubject = \Houston we had a problem on port\: @USERNO
 CALL emailAdmin( emailTo, emailSubject, message, status)
 CRT message
 GOSUB makeACatastopheOutOfIt
   END
...

makeACatastopheOutOfIt:
   ABORT
RETURN

Bruce Decker
Blue Prairie, Inc.
720.733.0459
http://www.bluepinc.com

On 1/30/2014 11:03 AM, Robert wrote:
Nice technique. My first reaction was why would you want to not let a 
subroutine failure be catastrophic?!. I could see where it could 
allow data to get scrambled. Let's say an decryption routine unable to 
decrypt so the encrypted data gets sent back exactly the same.


But then I could see where this would create resiliency with some 
non-critical function that could be fixed after the fact, like a 
cross-referencing subroutine which sets up cross-references, just to 
add feature.


Your technique allows the failure and keeps moving forward, with 
hopefully an error log entry so someone could fix it.


Almost like an error message from the system when you don't initialize 
a variable to zero, so it does that for you and gives you a nastrygram 
in the process, but it doesn't effect operation (in many cases).


Thanks for the tip.

Robert Norman




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


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 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.
Which is the whole point of the object-oriented programming feature 
try/catch, or even the ON ERROR statement that has been added to 
databasic in recent years.


Cheers,
Wol
___
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] [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 write failed or similar - basically a
feature to trap something going wrong ...

Cheers,
Wol
 
 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 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.
 Which is the whole point of the object-oriented programming feature
 try/catch, or even the ON ERROR statement that has been added to
 databasic in recent years.

 Cheers,
 Wol
 ___
 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] [UV] Programmatic Verification of Globally Cataloged Subroutine

2014-01-29 Thread Ross Ferris
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 to blow up in 
your face!

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 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 arguments the subroutine has.
That is, why was this particular fact chosen as the returned status code ?



-Original Message-
From: Keith Johnson [DATACOM] 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.

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 cataloged it

@RECORD[13,4] are the date and time (I think)


Regards, Keith



___
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] [UV] Programmatic Verification of Globally Cataloged Subroutine

2014-01-28 Thread Wjhonson

The routine returns your below RC which it calls success as a zero if either 
it cannot open the GLOBAL.CATDIR file, or if it cannot read the catalog name 
passed in that file.

The STATUS() (which I didn't even know could be assigned) is assigned to the 
ASCII value (using SEQ) of the 52nd character of the first line of the record 
it does successfully read.

What is the significant of the 52nd character ?  What would one find there?



-Original Message-
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 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 CATALOGED.NAME: = :(if RC then exists else NOT found)
crt CATALOGED.NAME: STATUS() = :STATUS(): = :(if STATUS() then exists 
else 
NOT found)


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] 
On Behalf Of Perry Taylor
Sent: Tuesday, 28 January 2014 4:06 AM
To: U2-Users List
Subject: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine

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
Office (877) 494-7633 ext. 4392
Direct (502) 779-4392
ZirMed
888 West Market Street, Suite 400
Louisville, KY 40202
www.zirmed.comhttp://www.zirmed.com/

** IMPORTANT MESSAGE *   
This e-mail message is intended only for the addressee(s) and contains 
information which may be
confidential. 
If you are not the intended recipient please advise the sender by return email, 
do not use or
disclose the contents, and delete the message and any attachments from your 
system. Unless
specifically indicated, this email does not constitute formal advice or 
commitment by the sender
or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. 
We can be contacted through our web site: commbank.com.au. 
If you no longer wish to receive commercial electronic messages from us, please 
reply to this
e-mail by typing Unsubscribe in the subject line. 
**



___
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] [UV] Programmatic Verification of Globally Cataloged Subroutine

2014-01-28 Thread LeRoy Dreyfuss
To make APP.PROGS/EXIST work for UV, I believe you would change the number
52 to 12 and recompile/recatalog. That is decimal location where UV seems
to store the number of subroutine arguments within the object header.

The subroutine would place the number of arguments correctly in STATUS() to
be referenced by the calling routine.

Cheers,

LeRoy


On Tue, Jan 28, 2014 at 12:10 PM, Wjhonson wjhon...@aol.com wrote:


 The routine returns your below RC which it calls success as a zero if
 either it cannot open the GLOBAL.CATDIR file, or if it cannot read the
 catalog name passed in that file.

 The STATUS() (which I didn't even know could be assigned) is assigned to
 the ASCII value (using SEQ) of the 52nd character of the first line of the
 record it does successfully read.

 What is the significant of the 52nd character ?  What would one find there?



 -Original Message-
 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 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 CATALOGED.NAME: = :(if RC then exists else NOT found)
 crt CATALOGED.NAME: STATUS() = :STATUS(): = :(if STATUS() then
 exists else
 NOT found)


 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:
 u2-users-boun...@listserver.u2ug.org]
 On Behalf Of Perry Taylor
 Sent: Tuesday, 28 January 2014 4:06 AM
 To: U2-Users List
 Subject: [U2] [UV] Programmatic Verification of Globally Cataloged
 Subroutine

 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
 Office (877) 494-7633 ext. 4392
 Direct (502) 779-4392
 ZirMed
 888 West Market Street, Suite 400
 Louisville, KY 40202
 www.zirmed.comhttp://www.zirmed.com/

 ** IMPORTANT MESSAGE *
 This e-mail message is intended only for the addressee(s) and contains
 information which may be
 confidential.
 If you are not the intended recipient please advise the sender by return
 email,
 do not use or
 disclose the contents, and delete the message and any attachments from your
 system. Unless
 specifically indicated, this email does not constitute formal advice or
 commitment by the sender
 or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its
 subsidiaries.
 We can be contacted through our web site: commbank.com.au.
 If you no longer wish to receive commercial electronic messages from us,
 please
 reply to this
 e-mail by typing Unsubscribe in the subject line.
 **



 ___
 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] [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 cataloged it

@RECORD[13,4] are the date and time (I think)


Regards, Keith



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


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

2014-01-28 Thread Wjhonson

I was just trying to think of a reason why I'd want specifically to know how 
many arguments the subroutine has.
That is, why was this particular fact chosen as the returned status code ?



-Original Message-
From: Keith Johnson [DATACOM] 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.

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 cataloged it

@RECORD[13,4] are the date and time (I think)


Regards, Keith



___
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] [UV] Programmatic Verification of Globally Cataloged Subroutine

2014-01-28 Thread LeRoy Dreyfuss
Legacy applications I imagine. 

You also wondered about why the 52nd character. Again, legacy from Pr1me I 
suppose. That predates my involvement or usage of UV but most of those 
subroutines were to make migrating easier.

Regards,

LeRoy

Sent from my iPhone 5s

 On Jan 28, 2014, at 6:15 PM, Wjhonson wjhon...@aol.com wrote:
 
 
 I was just trying to think of a reason why I'd want specifically to know how 
 many arguments the subroutine has.
 That is, why was this particular fact chosen as the returned status code ?
 
 
 
 -Original Message-
 From: Keith Johnson [DATACOM] 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.
 
 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 cataloged it
 
 @RECORD[13,4] are the date and time (I think)
 
 
 Regards, Keith
 
 
 
 ___
 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] [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 Manager

549 Blackburn Rd  Mount Waverley
VIC 3149 Australia
P: +61 3 9535 
F: +61 3 9535 2274
E: gregor.sc...@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.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


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 was then. It doesn't look
to have changed much if at all.

I wasn't able to find the date in the header, but one could use the date of
the object on disk in a pinch.

The MAP command displays this info as a report.




On Tue, Jan 28, 2014 at 6:10 PM, Keith Johnson [DATACOM] 
keith.john...@datacom.co.nz wrote:

 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 cataloged it

 @RECORD[13,4] are the date and time (I think)


 Regards, Keith



 ___
 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] [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 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 Manager

 549 Blackburn Rd  Mount Waverley
 VIC 3149 Australia
 P: +61 3 9535 
 F: +61 3 9535 2274
 E: gregor.sc...@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.
 ___
 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] [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
 Office (877) 494-7633 ext. 4392
 Direct (502) 779-4392
 ZirMed
 888 West Market Street, Suite 400
 Louisville, KY 40202
 www.zirmed.comhttp://www.zirmed.com/
 
 
 
 CONFIDENTIALITY NOTICE: This e-mail message, including any 
 attachments, is for the sole use of the intended recipient(s) 
 and may contain confidential and privileged information.  Any
 unauthorized review, use, disclosure or distribution is 
 prohibited. ZirMed, Inc. has strict policies regarding the 
 content of e-mail communications, specifically Protected Health 
 Information, any communications containing such material will 
 be returned to the originating party with such advisement 
 noted. If you are not the intended recipient, please contact 
 the sender by reply e-mail and destroy all copies of the 
 original message.
 ___
 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] [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 am
Subject: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine


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
Office (877) 494-7633 ext. 4392
Direct (502) 779-4392
ZirMed
888 West Market Street, Suite 400
Louisville, KY 40202
www.zirmed.comhttp://www.zirmed.com/



CONFIDENTIALITY NOTICE: This e-mail message, including any 
attachments, is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information.  Any
unauthorized review, use, disclosure or distribution is 
prohibited. ZirMed, Inc. has strict policies regarding the 
content of e-mail communications, specifically Protected Health 
Information, any communications containing such material will 
be returned to the originating party with such advisement 
noted. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the 
original message.
___
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] [UV] Programmatic Verification of Globally Cataloged Subroutine

2014-01-27 Thread Wjhonson

Could you give an example of this usage?
Trying to use the HELP, I'm just getting strange errors when I try to follow 
HELP and use it on known globally catalogued routines



-Original Message-
From: Allen Egerton aeger...@pobox.com
To: U2 Users List u2-users@listserver.u2ug.org
Cc: U2-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 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
 Office (877) 494-7633 ext. 4392
 Direct (502) 779-4392
 ZirMed
 888 West Market Street, Suite 400
 Louisville, KY 40202
 www.zirmed.comhttp://www.zirmed.com/
 
 
 
 CONFIDENTIALITY NOTICE: This e-mail message, including any 
 attachments, is for the sole use of the intended recipient(s) 
 and may contain confidential and privileged information.  Any
 unauthorized review, use, disclosure or distribution is 
 prohibited. ZirMed, Inc. has strict policies regarding the 
 content of e-mail communications, specifically Protected Health 
 Information, any communications containing such material will 
 be returned to the originating party with such advisement 
 noted. If you are not the intended recipient, please contact 
 the sender by reply e-mail and destroy all copies of the 
 original message.
 ___
 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] [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 different sort of local cataloging than the form that creates
a VOC pointer to BP.O - I was never a one for local cataloging so I
can't really remember.

Cheers,
Wol
 
 
 -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 am
 Subject: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine
 
 
 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
 Office (877) 494-7633 ext. 4392
 Direct (502) 779-4392
 ZirMed
 888 West Market Street, Suite 400
 Louisville, KY 40202
 www.zirmed.comhttp://www.zirmed.com/
 
 
 
 CONFIDENTIALITY NOTICE: This e-mail message, including any 
 attachments, is for the sole use of the intended recipient(s) 
 and may contain confidential and privileged information.  Any
 unauthorized review, use, disclosure or distribution is 
 prohibited. ZirMed, Inc. has strict policies regarding the 
 content of e-mail communications, specifically Protected Health 
 Information, any communications containing such material will 
 be returned to the originating party with such advisement 
 noted. If you are not the intended recipient, please contact 
 the sender by reply e-mail and destroy all copies of the 
 original message.
 ___
 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] [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 CATALOGED.NAME: = :(if RC then exists else NOT found)
crt CATALOGED.NAME: STATUS() = :STATUS(): = :(if STATUS() then exists 
else NOT found)


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Perry Taylor
Sent: Tuesday, 28 January 2014 4:06 AM
To: U2-Users List
Subject: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine

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
Office (877) 494-7633 ext. 4392
Direct (502) 779-4392
ZirMed
888 West Market Street, Suite 400
Louisville, KY 40202
www.zirmed.comhttp://www.zirmed.com/

** IMPORTANT MESSAGE *   
This e-mail message is intended only for the addressee(s) and contains 
information which may be
confidential. 
If you are not the intended recipient please advise the sender by return email, 
do not use or
disclose the contents, and delete the message and any attachments from your 
system. Unless
specifically indicated, this email does not constitute formal advice or 
commitment by the sender
or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. 
We can be contacted through our web site: commbank.com.au. 
If you no longer wish to receive commercial electronic messages from us, please 
reply to this
e-mail by typing Unsubscribe in the subject line. 
**



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