[Info-vax] Porting logical name applications to Unix

Paul Raulerson paul at raulersons.com
Sun Sep 27 21:32:50 EDT 2009


This is where environment variables come in handy; you can set them in  
a procedure
that calls your program, and yes - environment variables are an  
excellent way to do this.

How you accomplish this within the compiler depends upon the compiler,  
but it is not
difficult. IBM COBOL, for instance, links names in ASSIGN clauses to  
the exact same environment
variable name. The name of the environment variable follows COBOL name  
rules.

C compilers on the other hand, tend to use environment variables to  
assign libraries and
concatenation paths. However, it is trivial to use an environment  
variable in a UNIX open(),
fopen() or similar calls.

Hope that helps a bit.

-Paul



On Sep 27, 2009, at 8:13 PM, JF Mezei wrote:

> Paul Raulerson wrote:
>> The
>> idea of course is to use generic file names in the programs, and
>> attach them at runtime.
>
> Ok, what is the best way to achieve this ? VMS has logical names, and
> MVS has DD statements in JCL and their equivalent in TSO.  With  
> Unix, do
> you open "input.dat" and then create a link in the directory called
> "input.dat" which points to the actual file ?
> _______________________________________________
> Info-vax mailing list
> Info-vax at rbnsn.com
> http://rbnsn.com/mailman/listinfo/info-vax_rbnsn.com
>





More information about the Info-vax mailing list