This is good stuff.  However, two things to keep in mind.  The name of
the common block must be unique so that it doesn't inadvertently
collide with other programs.  Named common stays alive your entire
login session so if you use the same name with different
configurations you could break something else in the system by having
two routines with the same common block name and different
configurations.  Second, and I don't know if this applies to UV but
I'm pretty sure it applies to UD, the name of the named common can
only be up to 7 characters in length.

The performance gains by this technique can be immense, especially on
UV (that seems to have a little more overhead than UD in opening
files).  Regardless of the platform, the less code executed in each
iteration, the more efficient the program.

On Jan 24, 2008 7:56 AM, john reid <[EMAIL PROTECTED]> wrote:
> For itypes that call subroutines, where the subroutines open lots of
> files, put a named common in the subroutine that contains what amounts
> to dimensioned arrays that hold the file vars. Put a switch in so that
> the files are opened only once.
> COMMON /SETUP.STUFF/MY.FILES(15),FIRST.IN.SWITCH
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to