On the bright side, anything is more "efficent" than the program "blowing up". I hear what you're saying about efficency, however, sometimes it's better to be safe than sorry (ie less effiecent).
I had to do this in a time import program in which each type of time clock had it's custom-definable parsing program. In this day and age, 2 extra reads are going to cost less than the possible hit to the reputation/reliability of the program. Yes, programs have reputations...heh. My 2 cents. Don Verhagen ----- Original Message ----- From: "Kathleeni M Hunter" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Saturday, June 07, 2008 11:02 AM Subject: RE: [U2] [UD] CALL @progname | 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: '[email protected]' | 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: [email protected] | 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 | [email protected] | To unsubscribe please visit http://listserver.u2ug.org/ | ------- | u2-users mailing list | [email protected] | To unsubscribe please visit http://listserver.u2ug.org/ | ------- | u2-users mailing list | [email protected] | To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
