By default, the tables are opened at the end of the method, after your code has run.
Put NODEFAULT at the top to prevent that default behaviour. Then your DODEFAULT() will cause the tables to open, followed by your code.
>I want to put some code in the open tables method. I want it to first open the tables, then run my code. So I put DODEFAULT(), and then my code.
>
>I get an error that the data environment is already loaded. Why would it be trying to do it twice? So, I though, maybe in this case the DODEFAULT() isn't necessary. I took it out. Then it doesn't open the tables at all!
>
>What am I missing? Is there some way to get it to load the tables, just once, and then do my code? Are we not allowed to put code in that method?
>
>Thanks,
>
>Michelle
Peter Franz