EXECUTE creates a new environment, try PERFORM. From BASIC Help: EXECUTE creates a new environment for the executed command. This new environment is initialized with the values of the current prompt, current printer state, Break key counter, the values of in-line prompts, KEYEDITs, KEYTRAPs, and KEYEXITs. If any of these values change in the new environment, the changes are not passed back to the calling environment. In the new environment, stacked @variables are either initialized to 0 or set to reflect the new environment. Nonstacked @variables are shared between the EXECUTE and calling environments.
Tom -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of George Gallen Sent: Friday, September 04, 2009 4:22 PM To: U2 Users List Subject: [U2] Hmmmm...Learn something new every day! ok...took me a few hours to debug this one... UV10 on Unix. If you do this: PROGRAM1: @user0 = "" execute "someprogram" print @user0 stop PROGRAM2 (aka someprogram) @user0 = "passdata" stop Runs as expected. @user0 will retail the value "passdata" from PROGRAM2 back to PROGRAM1 HOWEVER...... @user0 = "" execute "someprogram" capturing junk print @user0 stop When you use the CAPTURING clause, @user0 doesn't hold the data after the stop Well, maybe it's in junk? NOPE! What's up with that!?! George Gallen Senior Programmer/Analyst Accounting/Data Division, EDI Administrator [email protected] ph:856.848.9005 Ext 220 The Wyanoke Group http://www.wyanokegroup.com _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
