Re: [U2] execute code/proc question HELP!!!!!!!!
Assume one has PROGRAM in USUAL.BP. Write NEW.PROGRAM in DOUGS.BP with this at the beginning. 001 SUBROUTINE PROGRAM(V1,V2,V3...) 002 * 003 IF @LOGNAME NE DOUG THEN 004CALL ORIG.PROGRAM(V1,V2,V3...) 005RETURN 006 END 007 * continue with the new program At TCL do these commands CATALOG USUAL.BP ORIG.PROGRAM PROGRAM CATALOG DOUGS.BP PROGRAM NEW.PROGRAM The calling program(s) need no changes and when testing is finished, copy the new version of PROGRAM to USUAL.BP, delete lines 3-6 above, then compile and catalog it. Regards, Keith --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] execute code/proc question HELP!!!!!!!!
An even easier technique along the same lines is to put code in the subroutine you want to test that calls your new version and then exits out. Eg: SUBROUTINE ORIGINAL(IN,OUT) * do your checks to set test.flag If TEST.FLAG then call NEW.ROUTINE(IN,OUT) return End * normal processing Return This allows you to call your new routine whenever the original is called and you don't have a lot of retrofitting to do. Hth Colin Alfke Calgary Canada -Original Message- From: doug chanco hmmm this is a very interesting idea .. thank you very much, its not as elegant as the path command but I think it will do what I need but if I understand it correctly there 2 things that have to be done 1. logic added to each program for this tester subroutine 2. the program would have to have a different name from the original program while step one would be a lot of work, I can see it working pretty well once the logic is in most of the programs thanks! dougc Israel, John R. wrote: Write a simple tester subroutine that passes the name of the original/standard program. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] execute code/proc question HELP!!!!!!!!
The best would be to have a development account to separate the code. Without that option, the easiest would be to rename the program in DOUG.BP to something a bit different (I.e. DOUG.DEV). compile and catalog the original DOUG in EURO.BP and DOUG.DEV in DOUG.BP. Users could run the original DOUG. When you are done fixing DOUG.DEV, copy it over DOUG in DOUG.BP and recompile. Steve -- From: doug chanco [EMAIL PROTECTED] Sent: Thursday, May 22, 2008 6:20 AM To: u2-users@listserver.u2ug.org Subject: [U2] execute code/proc question HELP is there any way in Universe 10.x (running on AIX) to path how universe finds code to execute? For example I have a program called DOUG in EURO.BP and copy it to DOUG.BP and compile/catalog it there, so that now the VOC entry points to DOUG.BP but I would like other users to be able to run the original version while I fix my version. For those familiar with jBASE this is easily solved by modifying each users path to that they search for the object code in a specific order. for example PATH=$PATH:/usr2/zircon/DOUG.O:/usr2/zirocn/EURO.BP.O this way it looks in DOUG.BP.O and if the object code is found executes it otherwise look in EURO.BP.O and if found there execute it. Now all I have to do is modify other users PATH to NOT search DOUG.BP.O or move EURO.BP.O in front of DOUG.BP.O and it will find EURO.BP.O first (and stop looking) I am hoping that there is something equivalent in universe or some way that I can duplicate this (I am even willing to look at doing it with basic code if possible) ANY and ALL suggestions are welcomed! thanks dougc --- 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/
RE: [U2] execute code/proc question HELP!!!!!!!!
Why not just catalog the original in EURO.BP for the end users, and do a RUN DOUG.BP DOUG when testing your changes. Dan Goble RATEX Business Solutions, Inc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of doug chanco Sent: Thursday, May 22, 2008 9:21 AM To: u2-users@listserver.u2ug.org Subject: [U2] execute code/proc question HELP is there any way in Universe 10.x (running on AIX) to path how universe finds code to execute? For example I have a program called DOUG in EURO.BP and copy it to DOUG.BP and compile/catalog it there, so that now the VOC entry points to DOUG.BP but I would like other users to be able to run the original version while I fix my version. For those familiar with jBASE this is easily solved by modifying each users path to that they search for the object code in a specific order. for example PATH=$PATH:/usr2/zircon/DOUG.O:/usr2/zirocn/EURO.BP.O this way it looks in DOUG.BP.O and if the object code is found executes it otherwise look in EURO.BP.O and if found there execute it. Now all I have to do is modify other users PATH to NOT search DOUG.BP.O or move EURO.BP.O in front of DOUG.BP.O and it will find EURO.BP.O first (and stop looking) I am hoping that there is something equivalent in universe or some way that I can duplicate this (I am even willing to look at doing it with basic code if possible) ANY and ALL suggestions are welcomed! thanks dougc --- 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/
RE: [U2] execute code/proc question HELP!!!!!!!!
That wouldn't work if DOUG was a subroutine. Sometimes, for debugging in-use code I put in a line like 'IF @PORT = (my current port) THEN DEBUG' - remembering to take it out afterwards! Often this is enough to help track down issues without affecting other users... Edward -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Goble Sent: 22 May 2008 15:31 To: u2-users@listserver.u2ug.org Subject: RE: [U2] execute code/proc question HELP Why not just catalog the original in EURO.BP for the end users, and do a RUN DOUG.BP DOUG when testing your changes. Dan Goble RATEX Business Solutions, Inc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of doug chanco Sent: Thursday, May 22, 2008 9:21 AM To: u2-users@listserver.u2ug.org Subject: [U2] execute code/proc question HELP is there any way in Universe 10.x (running on AIX) to path how universe finds code to execute? For example I have a program called DOUG in EURO.BP and copy it to DOUG.BP and compile/catalog it there, so that now the VOC entry points to DOUG.BP but I would like other users to be able to run the original version while I fix my version. For those familiar with jBASE this is easily solved by modifying each users path to that they search for the object code in a specific order. for example PATH=$PATH:/usr2/zircon/DOUG.O:/usr2/zirocn/EURO.BP.O this way it looks in DOUG.BP.O and if the object code is found executes it otherwise look in EURO.BP.O and if found there execute it. Now all I have to do is modify other users PATH to NOT search DOUG.BP.O or move EURO.BP.O in front of DOUG.BP.O and it will find EURO.BP.O first (and stop looking) I am hoping that there is something equivalent in universe or some way that I can duplicate this (I am even willing to look at doing it with basic code if possible) ANY and ALL suggestions are welcomed! thanks dougc --- 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/ --- Please remember to recycle wherever possible. Reduce, reuse, recycle, think do you need to print this e-mail? --- This e-mail and any attachment(s), is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the addressee, dissemination, copying or use of this e-mail or any of its content is prohibited and may be unlawful. If you are not the intended recipient please inform the sender immediately and destroy the e-mail, any attachment(s) and any copies. All liability for viruses is excluded to the fullest extent permitted by law. It is your responsibility to scan or otherwise check this email and any attachment(s). Unless otherwise stated (i) views expressed in this message are those of the individual sender (ii) no contract may be construed by this e-mail. Emails may be monitored and you are taken to consent to this monitoring. Civica Services Limited, Company No. 02374268; Civica UK Limited, Company No. 01628868 Both companies are registered in England and Wales and each has its registered office at 2 Burston Road, Putney, London, SW15 6AR. --- --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] execute code/proc question HELP!!!!!!!!
Yeah we discussed the separate account idea 9we did that at my last job) but here its more difficult and for ,whatever reason people are against it sigh Your other idea is not bad, but then we would have to change it in any calling programs BUT I suppose that may be the best I can get out of universe. Hopefully there is some super genius lurking around that might have some additional thoughts (I hope) Thanks for the response Dougc -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kritan Sent: Thursday, May 22, 2008 10:14 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] execute code/proc question HELP The best would be to have a development account to separate the code. Without that option, the easiest would be to rename the program in DOUG.BP to something a bit different (I.e. DOUG.DEV). compile and catalog the original DOUG in EURO.BP and DOUG.DEV in DOUG.BP. Users could run the original DOUG. When you are done fixing DOUG.DEV, copy it over DOUG in DOUG.BP and recompile. Steve -- From: doug chanco [EMAIL PROTECTED] Sent: Thursday, May 22, 2008 6:20 AM To: u2-users@listserver.u2ug.org Subject: [U2] execute code/proc question HELP is there any way in Universe 10.x (running on AIX) to path how universe finds code to execute? For example I have a program called DOUG in EURO.BP and copy it to DOUG.BP and compile/catalog it there, so that now the VOC entry points to DOUG.BP but I would like other users to be able to run the original version while I fix my version. For those familiar with jBASE this is easily solved by modifying each users path to that they search for the object code in a specific order. for example PATH=$PATH:/usr2/zircon/DOUG.O:/usr2/zirocn/EURO.BP.O this way it looks in DOUG.BP.O and if the object code is found executes it otherwise look in EURO.BP.O and if found there execute it. Now all I have to do is modify other users PATH to NOT search DOUG.BP.O or move EURO.BP.O in front of DOUG.BP.O and it will find EURO.BP.O first (and stop looking) I am hoping that there is something equivalent in universe or some way that I can duplicate this (I am even willing to look at doing it with basic code if possible) ANY and ALL suggestions are welcomed! thanks dougc --- 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/ -- This message has been scanned for viruses and dangerous content by SecureMail, and is believed to be clean. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] execute code/proc question HELP!!!!!!!!
Write a simple tester subroutine that passes the name of the original/standard program. This subroutine reads a control record that uses your user_id:*CODETESTING as the key (thus unique to each user). If not found (which would be the case for most users), return the original program name. If found, do a LOCATE in F1 for the original program name. If not found, return the original program name. If the original program name IS found in F1, return the optional program name from the associated position in F2 (if F2 is missing, return the original pgm just in case). F1 = multi-valued list of original pgms F2 = multi-valued list of test pgms Use the @ logic for doing a dynamic call to the returned pgm name. Granted, this is a bit of work up front, but once you have this tester subroutine written and the coded added to your program(s), you could leave this test in place anywhere you want. Add this logic as you need it. You just disable it by removing the program names from F1/F2. If this control record ever becomes empty, you could even delete it. Optionally, you could do this test at login time and save the info in some common named variable(s). You just need to log out/in to reset this stuff. I have used something like this in the past and it worked VERY well. By using these control records, you can even give selected other users access to this program for testing before rolling it out to the rest of the world. Just remember to delete the stuff from the control record(s) once you switch it over. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Chanco Sent: Thursday, May 22, 2008 11:36 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] execute code/proc question HELP Yeah we discussed the separate account idea 9we did that at my last job) but here its more difficult and for ,whatever reason people are against it sigh Your other idea is not bad, but then we would have to change it in any calling programs BUT I suppose that may be the best I can get out of universe. Hopefully there is some super genius lurking around that might have some additional thoughts (I hope) Thanks for the response Dougc -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kritan Sent: Thursday, May 22, 2008 10:14 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] execute code/proc question HELP The best would be to have a development account to separate the code. Without that option, the easiest would be to rename the program in DOUG.BP to something a bit different (I.e. DOUG.DEV). compile and catalog the original DOUG in EURO.BP and DOUG.DEV in DOUG.BP. Users could run the original DOUG. When you are done fixing DOUG.DEV, copy it over DOUG in DOUG.BP and recompile. Steve -- From: doug chanco [EMAIL PROTECTED] Sent: Thursday, May 22, 2008 6:20 AM To: u2-users@listserver.u2ug.org Subject: [U2] execute code/proc question HELP is there any way in Universe 10.x (running on AIX) to path how universe finds code to execute? For example I have a program called DOUG in EURO.BP and copy it to DOUG.BP and compile/catalog it there, so that now the VOC entry points to DOUG.BP but I would like other users to be able to run the original version while I fix my version. For those familiar with jBASE this is easily solved by modifying each users path to that they search for the object code in a specific order. for example PATH=$PATH:/usr2/zircon/DOUG.O:/usr2/zirocn/EURO.BP.O this way it looks in DOUG.BP.O and if the object code is found executes it otherwise look in EURO.BP.O and if found there execute it. Now all I have to do is modify other users PATH to NOT search DOUG.BP.O or move EURO.BP.O in front of DOUG.BP.O and it will find EURO.BP.O first (and stop looking) I am hoping that there is something equivalent in universe or some way that I can duplicate this (I am even willing to look at doing it with basic code if possible) ANY and ALL suggestions are welcomed! thanks dougc --- 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/ -- This message has been scanned for viruses and dangerous content by SecureMail, and is believed to be clean. --- 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/
Re: [U2] execute code/proc question HELP!!!!!!!!
hmmm this is a very interesting idea .. thank you very much, its not as elegant as the path command but I think it will do what I need but if I understand it correctly there 2 things that have to be done 1. logic added to each program for this tester subroutine 2. the program would have to have a different name from the original program while step one would be a lot of work, I can see it working pretty well once the logic is in most of the programs thanks! dougc Israel, John R. wrote: Write a simple tester subroutine that passes the name of the original/standard program. This subroutine reads a control record that uses your user_id:*CODETESTING as the key (thus unique to each user). If not found (which would be the case for most users), return the original program name. If found, do a LOCATE in F1 for the original program name. If not found, return the original program name. If the original program name IS found in F1, return the optional program name from the associated position in F2 (if F2 is missing, return the original pgm just in case). F1 = multi-valued list of original pgms F2 = multi-valued list of test pgms Use the @ logic for doing a dynamic call to the returned pgm name. Granted, this is a bit of work up front, but once you have this tester subroutine written and the coded added to your program(s), you could leave this test in place anywhere you want. Add this logic as you need it. You just disable it by removing the program names from F1/F2. If this control record ever becomes empty, you could even delete it. Optionally, you could do this test at login time and save the info in some common named variable(s). You just need to log out/in to reset this stuff. I have used something like this in the past and it worked VERY well. By using these control records, you can even give selected other users access to this program for testing before rolling it out to the rest of the world. Just remember to delete the stuff from the control record(s) once you switch it over. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] execute code/proc question HELP!!!!!!!!
Not really a lot of work. Once your tester program is written (should not be very big), your code would change FROM something like: CALL (ARG1, ARG2...) To CALL VERSION.TESTER() CALL @(ARG1, ARG2...) (or something like that) Off the top of my head, this should not be too bad. Just make sure you find ALL the programs that call and change them at the same time. The one place this does NOT work well is with I-Desc because they are hard-coded to use the name . However, I would not worry about these until they become an issue. As long as you keep the limitations of this in mind, it works amazingly well. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of doug chanco Sent: Thursday, May 22, 2008 4:42 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] execute code/proc question HELP hmmm this is a very interesting idea .. thank you very much, its not as elegant as the path command but I think it will do what I need but if I understand it correctly there 2 things that have to be done 1. logic added to each program for this tester subroutine 2. the program would have to have a different name from the original program while step one would be a lot of work, I can see it working pretty well once the logic is in most of the programs thanks! dougc Israel, John R. wrote: Write a simple tester subroutine that passes the name of the original/standard program. This subroutine reads a control record that uses your user_id:*CODETESTING as the key (thus unique to each user). If not found (which would be the case for most users), return the original program name. If found, do a LOCATE in F1 for the original program name. If not found, return the original program name. If the original program name IS found in F1, return the optional program name from the associated position in F2 (if F2 is missing, return the original pgm just in case). F1 = multi-valued list of original pgms F2 = multi-valued list of test pgms Use the @ logic for doing a dynamic call to the returned pgm name. Granted, this is a bit of work up front, but once you have this tester subroutine written and the coded added to your program(s), you could leave this test in place anywhere you want. Add this logic as you need it. You just disable it by removing the program names from F1/F2. If this control record ever becomes empty, you could even delete it. Optionally, you could do this test at login time and save the info in some common named variable(s). You just need to log out/in to reset this stuff. I have used something like this in the past and it worked VERY well. By using these control records, you can even give selected other users access to this program for testing before rolling it out to the rest of the world. Just remember to delete the stuff from the control record(s) once you switch it over. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 --- 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/
RE: [U2] execute code/proc question HELP!!!!!!!!
You could use an indirection in the I-Descriptor as well - use a SUBR which then constructs a subroutine name and uses CALL @ syntax.For preference I would resolve all these at the start of a user session in one fell swoop and store the names in a dimensioned named COMMON block, using EQUATES. On the real plus side, I've used the technique in the past to dry-run code without having to use real-world interactions - a test harness. The harness reads parameters in a file with a set sequential order and calls the named subroutine with set arguments and/or COMMON variables. The result from each call (argument or COMMON or this-record-in-this-file is then retrieved using a rule-based schema and compared with an anticipated result. The answer is either pass or fail (reason). It's a good way of bench-checking complex code and also regression testing. Rather than a parameter file to see if a program is running in test mode or not, I much prefer an Environment variable. This is also useful with UniData as you can include Environment variables in VOC file pointers - a different user running in the same account can be using totally different files to someone else. Both UniData and UniVerse allow you to query an Environment variable ..E.g. F D_CUSTOMER @FILE_LOCATION/CUSTOMER (You may want to look at UDT.OPTIONS 87 as well if you use this technique). Regards JayJay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Israel, John R. Sent: 22 May 2008 22:11 To: u2-users@listserver.u2ug.org Subject: RE: [U2] execute code/proc question HELP Not really a lot of work. Once your tester program is written (should not be very big), your code would change FROM something like: CALL (ARG1, ARG2...) To CALL VERSION.TESTER() CALL @(ARG1, ARG2...) (or something like that) Off the top of my head, this should not be too bad. Just make sure you find ALL the programs that call and change them at the same time. The one place this does NOT work well is with I-Desc because they are hard-coded to use the name . However, I would not worry about these until they become an issue. As long as you keep the limitations of this in mind, it works amazingly well. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of doug chanco Sent: Thursday, May 22, 2008 4:42 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] execute code/proc question HELP hmmm this is a very interesting idea .. thank you very much, its not as elegant as the path command but I think it will do what I need but if I understand it correctly there 2 things that have to be done 1. logic added to each program for this tester subroutine 2. the program would have to have a different name from the original program while step one would be a lot of work, I can see it working pretty well once the logic is in most of the programs thanks! dougc Israel, John R. wrote: Write a simple tester subroutine that passes the name of the original/standard program. This subroutine reads a control record that uses your user_id:*CODETESTING as the key (thus unique to each user). If not found (which would be the case for most users), return the original program name. If found, do a LOCATE in F1 for the original program name. If not found, return the original program name. If the original program name IS found in F1, return the optional program name from the associated position in F2 (if F2 is missing, return the original pgm just in case). F1 = multi-valued list of original pgms F2 = multi-valued list of test pgms Use the @ logic for doing a dynamic call to the returned pgm name. Granted, this is a bit of work up front, but once you have this tester subroutine written and the coded added to your program(s), you could leave this test in place anywhere you want. Add this logic as you need it. You just disable it by removing the program names from F1/F2. If this control record ever becomes empty, you could even delete it. Optionally, you could do this test at login time and save the info in some common named variable(s). You just need to log out/in to reset this stuff. I have used something like this in the past and it worked VERY well. By using these control records, you can even give selected other users access to this program for testing before rolling it out to the rest of the world. Just remember to delete the stuff from the control record(s) once you switch it over. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 --- 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