For code conversion
When the code conversion is done with Interstage Charset Manager on the server side in the sending and receiving of the resource, the following environment variables are set.
LD_LIBRARY_PATH
This must be set to use Interstage Charset Manager on the server for the code conversion required for transmitting and receiving program resources.
${CHARSET_BASED}/lib
{CHARSET_BASED}: Interstage Charset Manager installation folder.
By setting the following environment variable on a Linux(64) server where NetCOBOL version is V11.0.0 or later, the code conversion is done with Interstage Charset Manager on the server side in the sending and receiving of the resource code conversion.
COBOL_REMOTE_CONVERT_CHARACTER
For details about environment variables, refer to the "NetCOBOL User's Guide" of Linux 64bit NetCOBOL.
For build
PATH
Add the following to the PATH environment variable to specify the storage path of the COBOL compile command:
${COB_BASED}/bin
LD_LIBRARY_PATH
Add the following to the LD_LIBRARY_PATH environment variable to specify the storage path of the COBOL runtime shared library:
${COB_BASED}/lib
NLS_PATH
Add the following to the NLS_PATH environment variable to specify the storage locations of the messages output at compile time or execution time of COBOL programs:
${COB_BASED}/lib/nls/%L/%N.cat:{COB_BASED}/lib/nls/C/%N.cat
LANG
Specify each character code set that is used by a COBOL program. This specification is used to determine whether COBOL sources contain national characters, and which character sets are used in COBOL sources at compile time.
For the Solaris and Linux (Itanium) operating systems, C is specified for the LANG environment variable, which identifies the Unicode (UTF8) character code set en_US.UTF-8 used by COBOL programs.
Dedicated shell scripts provided in the NetCOBOL product on each UNIX system is used to set individual environment variables except LANG. The following table outlines shell scripts for setting the required environment variables for compilation and linkage.
NetCOBOL product | Storage location | File name | Remarks |
---|---|---|---|
Solaris 32bit NetCOBOL | /opt/FJSVcbl/config | cobol.csh | For csh |
Linux(Itanium) 64bit NetCOBOL | /opt/FJSVcbl/config | cobol.sh | For sh/bash |
cobol.csh | For csh/tcsh | ||
Linux 64bit NetCOBOL | /opt/FJSVcbl64/config | cobol.sh | For sh/bash |
cobol.csh | For csh/tcsh |
Specify the following other environment settings as necessary:
COBOLOPTS
Use this environment variable to commonly and independently specify some compile options from individual programs under development. This is useful for specifying the following:
Options for COBOL debugging functions
Options for compilation lists
COBCOPY/FORMLIB/FILELIB
Specify the storage directories of COBOL libraries, screen form descriptors, and file descriptors to be shared by multiple developers.
Library names
Set the library file storage directories in the environment variables whose names are library names specified with IN/OF.
Note
If the LC_ALL environment variable is required, use the same value as that used in the LANG environment variable.
Examples of shell scripts for setting environment variables
In the examples shown below, the environment variables are assumed to be set as follows:
Environment variable related to transfer of resources
A setting for using Interstage Charset Manager on the server side is added to the LD_LIBRARY_PATH environment variable.
Environment variables related to build
Environment variables required for compilation and linkage of a COBOL program are set using shell scripts provided by NetCOBOL.
UTF-8 is the character code set used by programs under development. It is specified in the LANG environment variable.
The compilation list of COBOL source programs is stored in a common directory.
The common storage directory of libraries referenced by developers is specified.
For remote development using a Solaris server, csh must be used as the login shell. Edit .cshrc that is found in the home directory used by each developer, and add the text shown below.
In the following example, .cshrc is modified for a Solaris server.
## COBOL environment setting source /opt/FJSVcbl/config/cobol.csh ## Environment setting for Interstage Charset Manager if(${?LD_LIBRARY_PATH}) then setenv LD_LIBRARY_PATH /opt/FSUNiconv/lib:${LD_LIBRARY_PATH} else setenv LD_LIBRARY_PATH /opt/FSUNiconv/lib endif ## Setting for compilation and link that is common to developers setenv COBOLOPTS "-dp ../list" setenv COBCOPY ../COPYLIB:${COBCOPY} ## Character code set used by the program to be developed setenv LANG en_US.UTF-8
For remote development using a Linux server, csh or bash can be used as the login shell.
To use csh as the login shell, edit .cshrc that is found in the home directory used by each developer, and add the text shown below.
## COBOL environment setting source /opt/FJSVcbl/config/cobol.csh ## Environment setting for Interstage Charset Manager if(${?LD_LIBRARY_PATH}) then setenv LD_LIBRARY_PATH /opt/FSUNiconv/lib:${LD_LIBRARY_PATH} else setenv LD_LIBRARY_PATH /opt/FSUNiconv/lib endif ## Setting for compilation and link that is common to developers setenv COBOLOPTS "-dp ../list" setenv COBCOPY ../COPYLIB:${COBCOPY} ## Character code set used by the program to be developed setenv LANG en_US.UTF-8
To use bash as the login shell, edit .bashrc that is found in the home directory used by each developer, and add the text shown below.
## COBOL environment setting source /opt/FJSVcbl/config/cobol.sh ## Environment setting for Interstage Charset Manager if ${LD_LIBRARY_PATH:-""} = "" ; then LD_LIBRARY_PATH=/opt/FSUNiconv/lib; export LD_LIBRARY_PATH else LD_LIBRARY_PATH=/opt/FSUNiconv/lib:${LD_LIBRARY_PATH};export LD_LIBRARY_PATH fi ## Setting for compilation and link that is common to developers COBOLOPTS="-dp ../list";export COBOLOPTS COBCOPY=../COPYLIB:${COBCOPY}; export COBCOPY ## Character code set used by the program to be developed LANG=en_US.UTF-8; export LANG
For remote development using a Windows server, a user account for the server environment is used to perform development work. Unless remote development work is performed with an existing user account, a new user account for remote development work must be created in the server environment. When creating a user account, consult the server administrator.
Generally, to add a local user account to the server machine, log on to the server with an administrator account. Then, select "Apps" > "Control Panel" > "System and Security" > "Administrative Tools" > " Computer Management" from the Start menu to display "Computer Management" window, and use"Local Users and Groups" .If an additional environment setting must be made for remote development work, add the setting to the environment of the relevant user account.
Note
When registering a user account, register it as a member of a user group. Its password cannot be changed while the associated local personal computer is connected to the server. Therefore, when making settings for the user account, do not set a password change while the local personal computer is connected to the server.
Note
There are two types of environment variables: user environment variables and system environment variables. The user environment variables are generally used . However, for PATH environment variables, the system environment variables are used.
When giving priority to an original path, the COB_RDENV_X64 environment variable is used.
When a file is specified for the COB_RDENV_X64 environment variable, the file is considered to be a batch file.
A NetCOBOL remote build executes the file first by the CALL batch command.
COB_RDENV_X64=C:\MyTools\myenv.bat
Content of"C:\MyTools\myenv.bat"
path C:\MyCommand;%PATH%
As a result, "C:\MyCommand" is given a higher priority than the path of the system environment variable in a remote build.
Windows(Itanium)
SDK information must be set in the environment variables of each user account. SDK information varies according to which SDK is used.
Microsoft Platform SDK
The names and setting values of the environment variables are listed in the following table.
"%NetCOBOL%" is the name of the NetCOBOL install destination folder.
%MSSdk% denotes the name of the Microsoft Platform SDK installation folder.
Environment variable name | Setting values |
---|---|
Path | %NetCOBOL% %MSSdk%\Bin\Win64\IA64 %MSSdk%\Bin\Win64 %MSSdk%\Bin %MSSdk%\Bin\WinNT |
Lib | %NetCOBOL% %MSSdk%\Lib\IA64 %MSSdk%\Lib\IA64\mfc |
Include | %MSSdk%\Include\crt %MSSdk%\Include\crt\sys %MSSdk%\Include\mfc %MSSdk%\Include\atl %MSSdk%\Include |
Windows SDK for Windows Server 2008 and .NET Framework 3.5 (V6.1)
The names and setting values of the environment variables are listed in the following table.
"%MSSdk%" and "%VCRoot%" are the names of the Windows SDK for Windows Server 2008 and .NET Framework 3.5 (V6.1) install destination folders. "%MSSdk%" and "%VCRoot%" have the following default install destinations:
%MSSdk%: C:\Program Files\Microsoft SDKs\Windows\v6.1 %VCRoot%: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
Environment variable name | Setting values |
---|---|
Path | %NetCOBOL% %MSSdk%\Bin %MSSdk%\Bin\IA64 %VCRoot%\Bin\IA64 %VCRoot%\vcpackages |
Lib | %NetCOBOL% %MSSdk%\Lib\IA64 %VCRoot%\Lib\IA64 |
Include | %MSSdk%\Include %MSSdk%\Include\gl %VCRoot%\Include |
Note
CPU architecture according to bit rate of the server, IA64 of the folder name becomes x64 or amd64. Set it after confirming the software development installation folder.
Windows(64)
The environment variable "PATH" will be set to the folder name of the user account at the installation destination of NetCOBOL. Remote Build is executed in the same environment as the "NetCOBOL command prompt" on the NetCOBOL server side.