Before you can use Publisher to publish applications, you need to:
If you want to create an application based on an existing UNIX application, you will need to import the application into Net Express; see the chapter Importing UNIX Applications into Net Express for details.
Once you have created a project and set up the UNIX system, you can use Publisher Setup to configure Publisher for your project.
Note: The Publisher Set-up dialogs described below contain several text-areas in which you need to enter directory or file information for the UNIX system; for example, the build directory, the copyfile directory, and so on. These filenames and directories can be either absolute (starting with a slash (/)) or relative. Relative paths are relative to the home directory of the specified user. For example, if user foo has the home directory /usr/foo, then that user could specify the build directory as /usr/foo/mybuildir or as mybuilddir; both are equivalent.
Also note that there is no environment variable or wildcard expansion performed on paths passed to the server.
The following description assumes a new set-up. Publisher Set-up can also be used to edit an existing configuration, in which case any values set previously are displayed as defaults.
Figure 3-1: The Project Tab of the UNIX Option Setup Dialog Box
Click a tab to create settings for:
When you click a tab, a form is displayed into which you enter the details for each configuration. If you have previously created set-up details for a configuration, then the values for that configuration are displayed.
For each project you can set up different servers to which a project can be published. For each server you can supply different configuration information.
To enter set-up information for the project, click the Project tab on the UNIX Option Setup dialog, if necessary (this tab is the default tab).
The first field displays the current active server configuration. If no server is currently selected, None selected is displayed in this field. If you want to publish a CGI application to the UNIX system check Enable CGI Support.
The buttons enable you to set further detail; they are described in the following sections.
Use the File Name Mapping button to specify the filename, location and type of each file when they are published to the UNIX system. You might need to do this to match filenames entered on statements such as CALL statements.
Figure 3-2: The File Mapping Configuration Dialog Box
The Mapped Name column specifies the actual case sensitive name of the file when copied to UNIX. The default value is the case of the filename as determined by the Windows file system.
The Logical Name column shows the filenames as displayed by Net Express. These are always in uppercase and you cannot edit them.
For example, suppose a program has the Call statement:
call "MYapp".
The filename mapping procedure enables you to explicitly state that the file known to Windows as Myapp.cbl should be created on the UNIX system as MYapp.cbl.
All files created from the mapped name, as part of the build process, have the same case mapping. For example, MYapp.cbl would result in MYapp.int, and MYAPP.cbl would result in MYAPP.int.
You cannot use the File Mapping Configuration dialog to change the filename; for example, to change Myapp.cbl to Myapp2.cbl.
See the section Case Sensitivity in the chapter Introduction for more information on filename mapping and case-sensitivity issues.
The Target Directory column specifies which logical directory the file will be copied to. The logical directories are defined on the Logical Directories dialog.
The File Type column specifies whether the file will be transfered to the UNIX server as a binary file or as a text file. The default for new files is text.
If a file is specified as text, then it :
Note: Ensure that you do not define any binary files in your project as text files. If you do, the files will be corrupted on the server.
The Select pulldown enables you to quickly select a series of files that match a predefined pattern, for example, all COBOL files (*.cbl), or to define your own selection pattern.
You can edit the file mapping information items in two ways:
You can specify, for a selected project, Compiler directives that are added to the cob command line when the project is built, by clicking the Additional Build Options button. The directives set here apply to all servers defined for the current project. A dialog is displayed, into which you can enter the required directives.
Figure 3-3: The Additional Build Options for All Servers Dialog Box
The Target column is the logical name that is being created; for example, CGIPRG1.INT.
The Dependents column lists the logical names that are used to create the target; for example, CGIPRG1.CBL.
The Directives column is a field that in which you can specify additional cob command line options. To edit the setting, select the row you want to edit, then click within the Directives column on the selected row. Alternatively, right click with the mouse on the row you wish to edit and select the Edit Options menu item.
Note: The directives you enter are not checked by the Publisher and are passed unchanged through to the cob command line.
You can add and remove logical directory names for the project. Click the Logical Directories button on the Project tab. A dialog is displayed that enables you to enter logical directories:
Figure 3-4: The Logical Directories Dialog Box
There are two special logical directories which are always present and cannot be removed:
By right clicking within the list control, you can create or delete logical directories. The logical directory names are free-format text and can contain any valid text characters.
The logical directories are a project-wide setting. They are used by the Filename Mapping dialog to specify where, logically, files should be copied, and they are assigned real values, on a server-by-server basis, in the Directory Specification tab of the Server Settings dialog.
Note: If you delete a logical directory, any filename mapping entries that used this value are updated to use [BuildDir] instead.
To edit and replace patterns for specific projects, click the Search/Replace button. A list of current search/replace patterns, and the files to which they apply, is displayed. For example:
Figure 3-5: The Search/Replace Settings for All Servers Dialog Box
The Search Pattern column specifies a regular expression as defined in the appendix Regular Expressions.
The Replace Pattern column specifies the replacement text when the search pattern is successful. Replacement metacharacters are defined in the appendix Regular Expressions.
Note: Even if a filename matches a file defined in the File Specification column, it will not be processed unless it is also defined as a text file in Filename Mapping Configuration.
The patterns are executed during the Publish operation in the order in which they are shown within the list box. To change the order of the patterns, select a row and, and drag and drop the pattern in the desired position.
To edit a pattern, select it with the cursor and then left-click. For example, to edit a search pattern:
You can also edit a pattern, or create a new pattern, by right-clicking. To create a new pattern and add it to the end of the list:
The new pattern is added at the end of the list of patterns in the Set Search/Replace list.
To create a new pattern and add it at a specific point in the list:
To edit a pattern using the right mouse button:
To enter set-up information for the server, click the Server tab. The following form is displayed:
Figure 3-7: The Server Tab of the UNIX Option Setup Dialog Box
The list box displays any servers that have currently been defined. If you select one of these, then any changes you make using the buttons in this tab are made to the selected server. The entry New Server enables you to define a new server. If you select this entry, a dialog is displayed that enables you to specify a new server name.
The buttons on this tab enable you to set further details. These are described in the following sections.
When you click the Settings button a tabbed dialog is displayed:
Figure 3-8: The Server Settings for servername Dialog Box
Click a tab to create settings for:
To set the server details, click the Server tab on the Server Settings dialog, if necessary (this is the default tab). The settings you supply here apply only to the specified server.
Enter the following details:
User Id | The login identifier to use when contacting the server specified above. By default, this is the user-id you used to log in to Windows |
UNIX COBOL Directory | The directory on the UNIX system that contains Micro Focus COBOL for UNIX. After you have entered details in this field, theServer 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. |
To set directory details, click the Directories tab on the Server Settings dialog. The following dialog is displayed:
Figure 3-9: The Server Settings for servername Dialog Box
A list box is displayed. This contains any logical directories you defined in Logical Directories dialog (from the Project tab), and the actual physical directories on the current server.
The [BuildDir] value always matches the value entered on the Server tab; changes to one are automatically reflected in the other.
If any of the logical directories do not have a value, they are automatically assigned the value of the current [BuildDir] at the time they are first used. Once this value has been assigned, any changes to [BuildDir] does not result in a change to the other logical directory values.
You can define a command or series of commands that will be executed before and after the project is built. To define prebuild commands, click the Prebuild tab on the Server Settings dialog; to define postbuild commands, click the Postbuild tab.
Note: Due to the way the UNIX make program operates, each command line is executed in a separate shell environment. This means you cannot set a value on one line and read this value later in the prebuild or postbuild command sequence. If you need to do something like this, including such things as a for loop, you need to either create a script on the server, or execute the commands in a subshell.
Use the Delete button to delete the currently selected server from the server list.
To delete a server name:
You can specify whether the build directory on the UNIX system is locked or unlocked by clicking the Server Lock Control button. A dialog is displayed that shows you the current lock status, and enables you to lock or unlock the build directory.
Click Verify Server Settings to:
You can specify, for a selected server, directives that are added to the cob command line when the project is built by clicking the Additional Build Options button. The directives set here apply to the current server. A dialog is displayed, into which you can enter the required directives.
Figure 3-10: The Additional Build Options for servername Dialog Box
The Target column is the logical name that is being created; for example, CGIPRG1.INT.
The Dependents column lists the logical names that are used to create the target; for example, CGIPRG1.CBL.
The Directives column is a field that in which you can specify additional cob command line options. To edit the setting, select the row you want to edit, then click within the Directives column on the selected row. Alternatively, right click with the mouse on the row you wish to edit and select the Edit Options menu item.
Note: The directives you enter are not checked by the Publisher and are passed unchanged through to the cob command line.
You can specify, for a selected server, filename patterns and regular expressions that are processed when text files are published to the server. The patterns are created as a list, and executed in the order in which they are added to the list.
To edit and replace patterns, click the Set Search/Replace button. A list of current search/replace patterns, and the files to which they apply, is displayed. For example:
Figure 3-11: The Search/Replace Settings for servername Dialog Box
The Search Pattern column specifies a regular expression as defined in the appendix Regular Expressions.
The Replace Pattern column specifies the replacement text when the search pattern is successful. Replacement metacharacters are defined in the appendix Regular Expressions.
Note: Even if a filename matches a file defined in the File Specification column, it will not be processed unless it is also defined as a text file in Filename Mapping Configuration.
The patterns are executed during the Publish operation in the order in which they are shown within the list box. To change the order of the patterns, select a row and, and drag and drop the pattern in the desired position.
To edit a pattern, select it with the cursor and then left-click. For example, to edit a search pattern:
You can also edit a pattern, or create a new pattern, by right-clicking. To create a new pattern and add it to the end of the list:
The new pattern is added at the end of the list of patterns in the Set Search/Replace list.
To create a new pattern and add it at a specific point in the list:
To edit a pattern using the right mouse button:
You can verify the status of the source code between the version on the PC and the version on the UNIX system. You do this by clicking the Verify Source Code button. A list box is displayed:
Figure 3-13: The Verify Source Dialog Box
The Status column shows the status of the file. The staus can be:
OK | The publishing history of the file on the PC and the file on the UNIX system match. |
Will be copied on next Publish | The file has never been Published, or you have specified that you want the file coped at the next publish. |
Server file out of date | A file on the PC has been modified since the last publish. |
Server file modified | A file on the UNIX system has been modified since the last publish. |
Server File not found | The source file could not be found on the server |
If you right-click on a line, a context menu enables you to force a copy of any files on the next publish.
You can set miscellaneous details, which are neither specific to the project nor to the server, using the General tab of the Setup dialog. This tab is used to specify the terminal emulater used for remote terminal access from your PC to the UNIX system.
When you click the General tab the following dialog is displayed:
Figure 3-14: The General Tab of the UNIX Option Setup Dialog Box
By default, the UNIX Option uses the PowerTerm terminal emulator. If you want to use a different terminal emulator:
Copyright © 2007 Micro Focus (IP) Ltd. All rights reserved.