Problem:
Quickstart tip for publishing Net Express applications to UNIX systems
Resolution:
Quick Start to Net Express ==>UNIX Publishing
The UNIX Publishing feature is a tool that facilitates deployment of applications which are developed an unit tested using Net Express to UNIX systems running Server Express.
The UNIX publish feature has been available in Net Express from V3.1 onward, this article uses Net Express 4.0 in testing and demonstrating the steps required in order to publish an application to a UNIX platform. Its important to note that the UNIX Option is not part of the default Net Express installation. If you neglected to install it, it can be found on your Net Express distribution media.
There are two main tasks required in order to successfully publish your application, the Setup and secondly the actual publishing of the application.
There are two different communications methods that can be used when you publish your application:
"
Rsh - Remote Shell execution
"
SCP Daemon
The Rsh method requires proper configuration of your UNIX servers network configuration. Remote shell execution requires that the UNIX server recognize your Net Express workstation and that your personel login be enabled for Refer to the documentation for your UNIX operating system for specifics on enabling remote shell execution. After configuring the server you can test the configuration by opening the Windows command prompt and executing the following command:
rsh [Unix Server Name] -l [your user login] ls -la
If this command succeeds you'll see a directory listing for your home directory on the UNIX server. If the command fails, then the configuration for Remote Shell execution is incorrect.
The SCP Daemon method requires that the SCP daemon be run on the UNIX server, before anything can be 'published', you'll need superuser permissions on the UNIX server.
The basic steps needed to start the daemon are:
"
ln /cobol_install_dir/bin/cobscp /usr/local/etc/scpd
NOTE: In older versions of Server Express the the proper command is:
ln /cobol_install_dir/bin/scp /usr/local/etc/scpd
"
Start the daemon using the command:
/usr/local/etc/scpd -p [port-number] Where port-number is the network communications port that you will specify setting up the Net Express publish option in your project
"
You may also setup the scp daemon to be started using the inetd capability of the UNIX server - inetd is a UNIX feature which will trigger execution of a daemon when it detects incoming communications on the port used by your scpd daemon. This is convenient in that once its configured no one ever has to manually start the daemon before publishing
In your Net Express project setup the UNIX publish option. On The Net Express Menu Select select UNIX -> Setup - After the Welcome popup the Setup screen looks like this:
Select the Server tab,
Click on the Settings button
Now enter the network name for your UNIX Server (or its the IP address)
Now complete the following entrys:
"
User Id - your UNIX Server login name
"
UNIX COBOL Directory - This is the fullpath name to the install location of the Server Express product, set it to the sane value used when setting up the COBDIR variable.
"
The target location on the UNIX Server for the published application
Here's an explanation for each of the items in the setup dialog
UNIX COBOL Directory
The directory on the UNIX system that contains Micro Focus COBOL for UNIX. After you have entered details in this field, the Server Capabilities button on the UNIX Option Setup dialog is enabled.
Build Directory
The directory on the UNIX system to which the project will be published. After you have entered details in this field, the Server Lock Control button on the UNIX Option Setup dialog is enabled.
Name of Java Compiler
The name of the Java compiler on the UNIX system to which the project will be published. This defaults to javac.
Port Number
The port number for the SCP deamon to listen on. Note that this field is only enabled if the Enable SCP daemon mode check box is checked.
Enable Target Directory Build
Check this if you want the application built in the subdirectory specified by the Net Express target type; for example, Debug. This directory will be created under the directory specified in Build Directory
Build On Server
Uncheck this if you want to copy the files to the UNIX system without rebuilding them.
EUC Support
Check this if you want to enable EUC support on the UNIX system.
Publish Int Code Only
Check this if you want your project built from intermediate code rather than source code.
Source Verify On Publish
Check this if you want the source to be verified on each publish operation. This scans for changed files on the UNIX system.
Enable SCP daemon mode
Check this if you want to enable the SCP daemon method. This method is described in the appendix Installing Samba and SCP. You can change the port number in the Port Number field if required.
If you're going to use the SCP Daemon method then select the checkbox to enable the SCP daemon mode - The Port number to be used defaults to 696, you should make sure that the port number shown here matches the port number being used by the SCP daemon.
When you finished making these settings click OK and return to UNIX Option Setup screen
Verify your setup using the Verify Server Setting button, If you're using the SCP daemon mode, you'll be prompted for your UNIX Server password. Your password will be checked against the standard UNIX passwd system.
If you're using the Remote Shell mode, then verification will take place with no user input required.
If the results of the Server Verification process will be displayed
Now to publish the application click OK until you are back in the Net Express project
Select UNIX-> Publish All
The application will be copied to the target directory on the UNIX server and recompiled using appropriate compiler directives on the UNIX Server. Errors encountered during the compilation process will be displayed as console output in the Net Express project.
The UNIX Publish option has several other features.
"
the ability to map file names used under Net Express to the file names you need on your UNIX server, this is really handy when you want to change from upper-case names to lower-case names on UNIX.
"
The ability to specify pre-build or post-build tasks (command) on the UNIX server.
"
The ability to specify directorys for copybooks
"
The ability to perform Search and Replace operations