The x_bldenv.dat file defines what actions are to be performed during Visual LANSA generation and compilation steps.

The "*" denotes a comment line.

The contents should only ever be changed if:

  • You are following instructions from this guide that describe changes that you should make to this file.
  • Your LANSA product vendor instructs you, in writing, to make an alteration to the contents of this file.

Some details about this example that may be useful to you should you ever have to alter this file are:

  • The entries define the build environment and activities using the compiler.
  • The value "*" means use the default value.
  • The definitions work with a set of "env" prefixed variables that define the generation and build environment. The full set of these is:

Variable

Comments / Warnings

Envtype

Environment Type / Identifier. Must be unique name. Names cannot be assigned by users.

Envname

Textual description of the environment.

Envdriv

Drive on which environment is located (e.g. E:, D:). * indicates the default value. Drives are specified as one letter followed by a colon (:). The default value is the drive from which the current build program is executing.

Envpath

Path to the environment. This is the path up to (but not including) the X_LANSA base directory. Do not use trailing "\" in path names specified here. In Windows, the default (if * is specified) is \X_WIN95. On LINUX the default is a null string. Note: for LINUX code generation on Windows, envpath is explicitly set to \X_WIN95.

Envdbnm

Name of database. The default is the name of the database associated with the current generation / compilation process.

Envdbtp

Type of database. The default is SQLANYWHERE. In other cases the type must be a valid database type as named in the x_dbmenv.dat file which is shipped with Visual LANSA.

Envenab

The environment is enabled for generation and compiles. Must be YES or NO. Use this option to "turn off" all generation and compilation in an environment, thus substantially reducing the time taken to generate and compile objects.

Envprim

The environment is the primary environment. Must be YES or NO. Only a Windows environment may be nominated as a primary environment.

Env16bc

The environment should segment compiles for a 16 bit environment. You should set this value to NO in all cases.

  • The definitions work with a set of "ooo" prefixed variables where "ooo" is one of:
  • pro = Process
  • fun = Function (without SQL_SELECT commands)
  • fsq = Function (with SQL_SELECT commands)
  • oam = Object Access Module

The complete set of "ooo" prefixed variables are:

Variable

Comments / Warnings

Oooenab

Enables or disables generation and compilation for the object. Must be YES or NO.

Oooskln

Defines a "skeleton" file that is to be read in, substituted and re-written as the file named by the ooofiln value. n must be a number in the range 1 to 9.

Ooofiln

Defines the fully qualified name of the file to be created by reading in the skeleton file nominated in the oooskln value and writing it out again with all %variables% substituted. n must be a number in the range 1 to 9.

Ooocmdn

Defines an operating system command to be executed.

n must be a number in the range 1 to 9.

  • The definitions also work with a set of substitution variables that are surrounded by "%" signs. The full set of these include:

Variable

Comments / Warnings

%part%

Current partition identifier

%lang%

Current language identifier

%driv%

Environments drive (from envdriv)

%path%

Environments path (from envpath)

%dirb%

Base directory (i.e. x_lansa)

%dirs%

Source directory (i.e. source)

%diro%

Object directory (i.e. object)

%dire%

Execute directory (i.e. execute)

%dirp%

Current Partitions Base Directory (e.g. x_dem)

%filn%

Current Environment File (current ooofiln value)

%objt%

Current object type

%objn%

Current object name

%obje%

Current object name extension (library)

%objc%

Current object name in O/S naming standard format

%obju%

Same as %objc% but in uppercase.

%objd%

Current object description

%ibug%

Causes line to be omitted unless compiling with debug

%nbug%

Causes line to be omitted if compiling with debug

%ikee%

Causes line to be omitted unless keeping source code

%nkee%

Causes line to be omitted if keeping source code

%dbnm%

Current Environments database name

%dbtp%

Current Environments database type

%robj%

Defines the start of an object module repeat loop

%rend%

Defines the end of an object module repeat loop

%modc%

The current module name within a repetition

%modd%

The current module component identifier within a repetition

   Additionally, any %variable% can be prefixed by "prim" meaning that the primary environments value is to be used.

  • As an example of how the definitions in this file are used, consider this small section that deals with Processes (object type "ooo" = "pro"):
     proenab=YES 
proskl1=%driv%%path%%dirb%%dirs%\PRO00003.S profil1=%driv%%path%%dirb%%dirp%%dirs%\%objc%.def
procmd1=
proskl2=%driv%%path%%dirb%%dirs%\PRO00002.S profil2=%driv%%path%%dirb%%dirp%%dirs%\%objc%.mak
procmd2=NMAKE /A %driv%%path%%dirb%%dirp%%dirs%\%objc%.mak
  • Process generation and compiles are currently enabled.
  • The proskl1= and profil1= operations request that a file called PRO00003.S (with a fully qualified path) be read in, substituted, and then rewritten as a file with the same name as the current object and suffix .DEF. This creates a .DEF file from skeleton file PRO00003.S.
  • The procmd1= operation indicates that there is no command to be executed as part of step 1.
  • The proskl2= and profil2= operations request that a file called PRO00002.S (with a fully qualified path) be read in, substituted, and then rewritten as a file with the same name as the current object and suffix .MAK. This creates a .MAK file from skeleton file PRO00002.S.
  • The procmd2= requests that a NMAKE command be executed (to compile and link the process) using the .MAK file created in step 1.
  • If you wanted to unconditionally erase the make file then you could add this command to the end (i.e. add 3rd step):
     procmd3=ERASE %driv%%path%%dirb%%dirp%%dirs%\%objc%.mak
  • No labels