But if the program is not globally catalog then you will find it there. It
make sure that you can exit the program catalog it before calling it. If you
want to make sure that you can catalog it the basic the program before the
catalog. 

EXECUTE "BASIC ":filename:" ":program CAPTURING OUTPUT (stops display to
screen)
EXECUTE "CATALOG ":filename:" ":program CAPTURING OUTPUT

Note that if all your code is in one file that you can hard code the
filename.

-----Original Message-----
From: Cordes, Tom (contractor) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2008 6:32 AM
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] [UD] CALL @progname

Dave,

If the _MAP_ file is current, all globally catalogued programs have an
entry.  'MAKE.MAP.FILE' updates the file.

Tom

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Wolverton
Sent: Thursday, March 15, 2007 11:20 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] [UD] CALL @progname

I am writing some code that will execute a variable passed in "progname"
using CALL @progname.

Question - what is the 'best' way to know that "progname" exists before I
attempt the CALL.

I thought about reading the VOC, but if it's globally cataloged, that won't
work.

I could read the VOC and then the CTLGTB -- but that was two reads just to
'know' the routine wasn't going to blow up.  Is there a more efficient or
systemic way to do this?

**Typically** "progname" will reference a real program, so this testing is
'overhead' for 99.9% of the time - but if someone were to pass in a bad
'progname', I want to be more graceful (and secure!) just falling over.
Since some of the calls will come from 'web connected' clients, and some of
the clients may not know for sure that the host cannot handle the request -
if the client has a different function list than the host at that point and
time... I'm just trying to plan for 'worst case'.

How do others handle CALL @
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to