We do this all of the time for our EDI mapping. Since our code is all in 1 file, it is easy.
PROG.NAME = "JLSH.EDI.OUT856" READV X FROM PROGFILE,"_":PROG.NAME:".":EDI.TPNAME, 1 THEN PROG.NAME = PROG.NAME:".":EDI.TPNAME END Obviously if your source code exists in multiple files, you would need logic to determine (and open if necessary) which file to look in. Notice all CAPS, 23 years (although I am open both conventions). UD 6 HP/UX Vance Alspach J & L Industrial Supply An MSC Company -----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/ This e-mail is intended for the use of the addressee(s) only and may contain privileged, confidential, or proprietary information that is exempt from disclosure under law. If you are not the intended recipient, please do not read, copy, use or disclose the contents of this communication to others. Please notify the sender that you have received this e-mail in error by replying to the e-mail. Please then delete the e-mail and destroy any copies of it. Thank you. ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/