nonstop development environment for eclipse 7.0 user guideh20628.€¦ · nonstop development...

218
NonStop Development Environment for Eclipse 7.0 User Guide Part Number: 831775-002 Published: August 2017 Edition: L15.02 and all subsequent L-series RVUs, J06.18 and all subsequent J-series RVUs

Upload: others

Post on 19-Apr-2020

30 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NonStop Development Environment forEclipse 7.0 User Guide

Part Number: 831775-002Published: August 2017Edition: L15.02 and all subsequent L-series RVUs, J06.18 and all subsequent J-series RVUs

Page 2: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

© Copyright 2012, 2017 Hewlett Packard Enterprise Development LP

NoticesThe information contained herein is subject to change without notice. The only warranties for HewlettPackard Enterprise products and services are set forth in the express warranty statements accompanyingsuch products and services. Nothing herein should be construed as constituting an additional warranty.Hewlett Packard Enterprise shall not be liable for technical or editorial errors or omissions containedherein.

Confidential computer software. Valid license from Hewlett Packard Enterprise required for possession,use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, ComputerSoftware Documentation, and Technical Data for Commercial Items are licensed to the U.S. Governmentunder vendor's standard commercial license.

Links to third-party websites take you outside the Hewlett Packard Enterprise website. Hewlett PackardEnterprise has no control over and is not responsible for information outside the Hewlett PackardEnterprise website.

AcknowledgmentsMicrosoft® and Windows® are either registered trademarks or trademarks of Microsoft Corporation in theUnited States and/or other countries.

Intel®, Itanium®, Pentium®, Intel Inside®, and the Intel Inside logo are trademarks of Intel Corporation inthe United States and other countries.

Adobe® and Acrobat® are trademarks of Adobe Systems Incorporated.

UNIX® is a registered trademark of The Open Group.

Java™ and Oracle™ are registered trademarks of Oracle and/or its affiliates.

Open Software Foundation, OSF, the OSF logo, OSF/1, OSF/Motif, and Motif are trademarks of the OpenSoftware Foundation, Inc.

WarrantyOSF MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THE OSF MATERIAL PROVIDEDHEREIN, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITYAND FITNESS FOR A PARTICULAR PURPOSE.

OSF shall not be liable for errors contained herein or for incidental consequential damages in connectionwith the furnishing, performance, or use of this material.© 1990, 1991, 1992, 1993 Open Software Foundation, Inc. This documentation and the software to whichit relates are derived in part from materials supplied by the following:© 1987, 1988, 1989 Carnegie-Mellon University. © 1989, 1990, 1991 Digital Equipment Corporation. ©1985, 1988, 1989, 1990 Encore Computer Corporation. © 1988 Free Software Foundation, Inc. © 1987,1988, 1989, 1990, 1991 Hewlett-Packard Company. © 1985, 1987, 1988, 1989, 1990, 1991, 1992International Business Machines Corporation. © 1988, 1989 Massachusetts Institute of Technology. ©1988, 1989, 1990 Mentat Inc. © 1988 Microsoft Corporation. © 1987, 1988, 1989, 1990, 1991, 1992SecureWare, Inc. © 1990, 1991 Siemens Nixdorf Informationssysteme AG. © 1986, 1989, 1996, 1997Sun Microsystems, Inc. © 1989, 1990, 1991 Transarc Corporation.

This software and documentation are based in part on the Fourth Berkeley Software Distribution underlicense from The Regents of the University of California. OSF acknowledges the following individuals andinstitutions for their role in its development: Kenneth C.R.C. Arnold, Gregory S. Couch, Conrad C. Huang,

Page 3: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Ed James, Symmetric Computer Systems, Robert Elz. © 1980, 1981, 1982, 1983, 1985, 1986, 1987,1988, 1989 Regents of the University of California.

Export of the information contained in this publication may require authorization from the U.S. Departmentof Commerce.

Page 4: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Contents

About this document.............................................................................. 9Supported release version updates (RVUs)..................................................................................9Intended audience........................................................................................................................ 9New and changed information in this manual............................................................................... 9Related documentation............................................................................................................... 10Publishing history........................................................................................................................10

Introduction........................................................................................... 11

Before you begin...................................................................................12

Getting started.......................................................................................13Preparing the Workbench........................................................................................................... 13Specifying your preferences....................................................................................................... 13Specifying tool locations............................................................................................................. 13Configuring connections to NonStop systems............................................................................ 14Creating projects.........................................................................................................................15

Creating a managed project from scratch........................................................................ 16Creating a managed project from existing sources .........................................................24Creating multiple projects to build a single application.................................................... 31Creating a local makefile project from scratch................................................................. 34Creating a local makefile project from existing sources................................................... 35Creating a remote makefile project.................................................................................. 36

Ensuring the C/C++ indexer runs................................................................................................38Adding folders and files to projects............................................................................................. 39Viewing and changing properties of managed projects.............................................................. 39

Changing tools options using the Settings property page................................................41Specifying build variables and environment variables..................................................... 41Viewing project files..........................................................................................................42

Building, deploying, and launching a project...............................................................................43Building a project..............................................................................................................43Deploying a project.......................................................................................................... 43Launching a project..........................................................................................................44Code coverage basics......................................................................................................45

Concepts................................................................................................48NSDEE overview.........................................................................................................................48

Managed and unmanaged builds.....................................................................................48Local projects................................................................................................................... 48Remote projects............................................................................................................... 49Remote projects support on Linux................................................................................... 49C/C++ indexer database.................................................................................................. 50NSDEE built in language settings.................................................................................... 50

The NonStop Development perspective..................................................................................... 53Views................................................................................................................................54

4 Contents

Page 5: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Preferences......................................................................................................................55Wizards, tools, and actions.............................................................................................. 55Toolbar icons.................................................................................................................... 55

Building NonStop projects...........................................................................................................57Build configurations (local projects only)..........................................................................57Building with make on Windows ......................................................................................58SQL managed builds .......................................................................................................58SQL/MX preprocessor, managed build, and header files.................................................58

Environment variables and build variables................................................................................. 58COMP_ROOT.................................................................................................................. 61MXSQLC and MXSQLCO................................................................................................ 62NSDEE_SYS_INCLUDE_PATH.......................................................................................62NSDEE_SYS_INCLUDE_PATH_ESC............................................................................. 63PATH................................................................................................................................ 63Deploy.jar and NSDEE_POSIX_BIN................................................................................63NSDEE_CONN_PORT, nsdee-auth, and Deploy.jar........................................................63DependencyHandling.......................................................................................................64TARGET_SYSTYPE........................................................................................................ 64NSDEE_DEPLOY_SYSTEM, NSDEE_DEPLOY_USER, NSDEE_DEPLOY_DEST,NSDEE_DEPLOY_FILENAME........................................................................................ 65SQL/MX_COBOL_PREPROCESSOR_LOC................................................................... 66Multi-user environments...................................................................................................66

Managed build makefiles............................................................................................................ 67Handling dependencies in managed builds................................................................................ 68

How managed makefiles create dependency files...........................................................68How NSDEE adds rules to handle deleted headers........................................................ 69How SQL/MX preprocessor file header dependencies are handled................................ 70How to change or disable dependency file creation.........................................................71

Tool chains.................................................................................................................................. 72Tools for a simple C project..............................................................................................72Tools for a simple C project with SQL/MP........................................................................74Tools for a simple C project with SQL/MX........................................................................76

Customizing managed builds .....................................................................................................79Creating custom make targets......................................................................................... 79Running commands before and after builds.................................................................... 80Running commands before and after deployment........................................................... 81

Using NonStop projects with an SCM tool.................................................................................. 82Using Samba with NSDEE..........................................................................................................83

Tasks...................................................................................................... 84Configuring Tool Locations..........................................................................................................84

Adding cross compiler locations.......................................................................................84Adding SQL/MX preprocessor locations.......................................................................... 85Adding Cygwin/Msys locations.........................................................................................85

Configuring connections to NonStop.......................................................................................... 85Adding network connection preferences.......................................................................... 87Changing SSH and SFTP settings...................................................................................89Changing Telnet and FTP settings................................................................................... 91Enabling 256-bit encryption for SSH................................................................................ 94Exporting connection configurations................................................................................ 94Importing connection configurations................................................................................ 95

Updating cross compiler versions............................................................................................... 95Creating TNS/X configurations for existing TNS/E configurations.............................................. 97Importing Projects....................................................................................................................... 99

Preparing to import projects............................................................................................. 99

Contents 5

Page 6: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Importing ETK projects...................................................................................................100Importing NSDEE 2.x projects....................................................................................... 101Importing external NSDEE projects............................................................................... 103Importing TNS/R projects...............................................................................................103

Creating projects.......................................................................................................................104Creating Windows-hosted projects with managed builds...............................................104Creating Windows-hosted makefile projects.................................................................. 110Creating Windows-hosted projects from existing source................................................112Creating remote projects................................................................................................ 113

Launching a NonStop application from NSDEE .......................................................................115Creating a run configuration........................................................................................... 116Running an application as a TS/MP server.................................................................... 119Launching an application using a saved run configuration............................................ 126

Setting build variables...............................................................................................................126Changing build options (project properties) ............................................................................. 127Specifying DEFINES for SQL/MP tables.................................................................................. 129Building for both OSS and Guardian ........................................................................................130Removing errors and warnings in C/C++ editors...................................................................... 131

Errors and warnings after creating a project.................................................................. 131Errors for SQL statements..............................................................................................132Disabling specific code analysis errors and warnings....................................................133

Specifying locations for C/C++ headers, COBOL COPY libraries, and pTAL source files........135Instructing NSDEE not to build source files.............................................................................. 136

Excluding a single COPY library.................................................................................... 136Excluding all sources in a folder.....................................................................................138

Turning off SQL/MP builds for source files and folders.............................................................139Turning off SQL/MP builds for specific source files........................................................139Turning off SQL/MP builds for all sources in a folder..................................................... 140

Configuring indexing for C and C++ sources............................................................................ 141Indexing headers for makefile projects.......................................................................... 141Changing the system headers indexed when changing build configurations ................142Forcing a rebuild of the C/C++ index............................................................................. 143

Adding externally-built objects and linkfiles to managed builds................................................ 143Linking libraries in managed builds...........................................................................................144Adding and customizing build targets....................................................................................... 146

Creating a makefile.targets file for managed builds....................................................... 146Adding build targets ...................................................................................................... 148Creating custom build targets for managed projects......................................................149Creating custom deploy targets .................................................................................... 151

Filtering NonStop Project Explorer view content.......................................................................154Creating a remote folder in a local project via Samba.............................................................. 154

Creating a linked folder.................................................................................................. 154Performance considerations for using Samba with Eclipse........................................... 155

Using NSDEE with SCM tools: examples and procedures....................................................... 156Using NSDEE with an external SCM tool ......................................................................156Using NSDEE with an SCM plug-in............................................................................... 157

Generating Code coverage.......................................................................................................158Enabling Code coverage................................................................................................159Generating Code coverage for managed projects......................................................... 159Generating Code coverage for makefile projects...........................................................160

Enabling or disabling tracing.....................................................................................................161

Reference ............................................................................................163Views and editors......................................................................................................................163

NonStop Project Explorer view...................................................................................... 165

6 Contents

Page 7: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

pTAL editors................................................................................................................... 166COBOL editors...............................................................................................................166C/C++ editor...................................................................................................................169Outline view....................................................................................................................169Make Target view........................................................................................................... 169Problems view................................................................................................................169Tasks view......................................................................................................................169Console view..................................................................................................................169Properties view...............................................................................................................170Target Management terminal ........................................................................................ 170

New project wizards..................................................................................................................172Local new project wizards.............................................................................................. 172Import Existing Code wizard.......................................................................................... 178Remote Makefile Project wizard.....................................................................................179

New file, folder, and class wizards............................................................................................ 180New File......................................................................................................................... 180New File from Template..................................................................................................181New Folder.....................................................................................................................181New C/C++ Class Wizard...............................................................................................181New Header File.............................................................................................................181New Source File.............................................................................................................182New Source Folder.........................................................................................................182

Tools..........................................................................................................................................182Open Remote File dialog box.........................................................................................182Transfer Files Wizard..................................................................................................... 183Import ETK Projects wizard............................................................................................185Import NSDEE 2.x Project wizard.................................................................................. 186Launch Visual Inspect dialog box...................................................................................186Remote file browser....................................................................................................... 187Generate Code coverage...............................................................................................187

Preferences...............................................................................................................................188NonStop Development................................................................................................... 188Code Templates............................................................................................................. 190Network Connections..................................................................................................... 190Tool Locations................................................................................................................ 194Transfer Files Wizard..................................................................................................... 197

Tracing...................................................................................................................................... 197Properties..................................................................................................................................198

Resources...................................................................................................................... 198Builders.......................................................................................................................... 198C/C++ Build....................................................................................................................198Make Settings.................................................................................................................198Build Variables................................................................................................................198Discovery Options.......................................................................................................... 198Environment................................................................................................................... 198Logging.......................................................................................................................... 199Settings.......................................................................................................................... 199Settings (Remote).......................................................................................................... 201Tool Chain Editor............................................................................................................201Guardian File Transfer................................................................................................... 202C/C++ General............................................................................................................... 202Project References.........................................................................................................202Refactoring History.........................................................................................................202Remote Settings.............................................................................................................202Run/Debug Settings....................................................................................................... 202

Menus....................................................................................................................................... 202NonStop Tools menu......................................................................................................203

Contents 7

Page 8: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Context menu for NonStop Project Explorer.................................................................. 203Content types............................................................................................................................203Icons..........................................................................................................................................204New CDT features.....................................................................................................................206

Troubleshooting.................................................................................. 207Static profile not found while generating code coverage.......................................................... 207Make target is not specified while generating code coverage.................................................. 207Remote system not specified while generating code coverage................................................ 207Connection failure while generating code coverage................................................................. 208Raw data files are not selected for transfer.............................................................................. 208Raw data files are not found in the remote target location........................................................208Generating code coverage report fails......................................................................................209Project does not contain any TNS/X tools................................................................................ 209Project does not contain any TNS/E configurations..................................................................209The configuration file name exists............................................................................................ 210Project imported with warnings................................................................................................. 210

Websites...............................................................................................211

Support and other resources.............................................................212Accessing Hewlett Packard Enterprise Support....................................................................... 212Accessing updates....................................................................................................................212Customer self repair..................................................................................................................213Remote support........................................................................................................................ 213Warranty information.................................................................................................................213Regulatory information..............................................................................................................214Documentation feedback.......................................................................................................... 214

Sample programs and projects......................................................... 215

Tips on setting up password free logins with Open SSH............... 216

8 Contents

Page 9: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

About this documentThis manual describes how to use NSDEE 7.0 for developing NonStop applications on Windows.

Supported release version updates (RVUs)This publication supports L15.02 and all subsequent L-series RVUs, J06.18 and all subsequent J-seriesRVUs.

Intended audienceThis document is intended for developers who want to develop NonStop applications on Windows.

New and changed information in this manualAdded the following sections:

• Code coverage basics on page 45• Viewing project files on page 42• Generating Code coverage on page 158

◦ Enabling Code coverage on page 159◦ Generating Code coverage for managed projects on page 159◦ Generating Code coverage for makefile projects on page 160

• Enabling or disabling tracing on page 161• Generate Code coverage on page 187• COBOL Outline view on page 168• Tracing on page 197• Troubleshooting on page 207

Updated the following sections:

• Before you begin on page 12.• Added code coverage settings and .remote file information in Creating a managed project from

scratch on page 16 and Creating a managed project using existing sources outside yourworkspace on page 24.

• Creating a managed project by pulling existing sources into your workspace on page 28.• Added variables LANG and NSDEE_TOOLS_LOC in Environment variables and build variables on

page 58.• Added SFTP-Default directories section in Changing SSH and SFTP settings on page 89.• Added Profmrg and Code coverage Tool in Tools for a simple C project on page 72.• Added code coverage settings information in Creating Windows-hosted projects with managed

builds on page 104.• Updated step 10 in Linking libraries in managed builds on page 144.• Updated the entry for COBOL Editor in Views and editors on page 163.• Added COBOL editor features in pTAL editors on page 166.• Added Editor description in Open Remote File dialog box on page 182.• Added Store deploy and other remote NonStop system information in separate project file

option in NonStop Development on page 188.• Added SFTP-Default directories section in Secure Shell Settings dialog box on page 192.• Updated COBOL editor information in Icons on page 204.• Updated section New CDT features on page 206.• Added information about .remote file in the following sections:

About this document 9

Page 10: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

◦ Creating a managed project from existing sources on page 24◦ Using NonStop projects with an SCM tool on page 82◦ Using NSDEE with SCM tools: examples and procedures on page 156◦ Checking in project files on page 158◦ Preparing to import projects on page 99

Related documentationThe following manuals provide useful information about NonStop application development:

• Guardian Programmer's Guide• Open System Services User's Guide• Guardian User's Guide• SQL/MP Programming Manual for C• SQL/MP Programming Manual for COBOL85• SQL/MX Programming Manual for C and COBOL• TACL Reference Manual

for information on NonStop variables, commands, and built-in functions• ODBC/MX Client Driver manuals for information on ODBC driver error messages

All these manuals are available in the NonStop Technical Library (NTL) at:

http://www.hpe.com/info/nonstop-docs

For more information on compilers, see

• The COBOL Manual for TNS/E and TNS/X Programs available on the NTL.• The man pages for cross compilers in the NSDEE product at Help > Help Contents.• The product documentation delivered with the cross compiler.

Publishing historyPart Number Product Version Publication Date

732674-001 NSDEE 4.0 October 2013

732674-002 NSDEE 5.0 February 2015

732674–002R NSDEE 5.0 November 2015

831775-001 NSDEE 6.0 June 2016

831775-002 NSDEE 7.0 August 2017

10 Related documentation

Page 11: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

IntroductionThe NonStop Development Environment for Eclipse (NSDEE) is a set of Eclipse plug-ins that extendEclipse's C/C++ Development Tooling (CDT) to provide an integrated development environment (IDE) fordeveloping NonStop applications on Windows. NSDEE supports building applications and editing sourcefiles both locally (on Windows) and remotely (on NonStop). NSDEE also provides facilities for transferringlocally built executables to NonStop systems and the ability to launch NonStop applications from the IDE.

Additionally, NSDEE provides integrated debugging of NonStop TNS/E and TNS/X applications, runningprocesses, and snapshot files.

NOTE:

TNS/E and TNS/X debugging features and documentation are purchased separately.

NSDEE supports application development in C, C++, COBOL, and pTal for both OSS and Guardianplatforms, and for both TNS/E and TNS/X architectures. NSDEE additionally supports embedded SQL.

Because NSDEE extends CDT, NSDEE offers a rich development environment for Windows-hosted Cand C++ application development. Using CDT's indexed database of C and C++ source code, C and C++users can enjoy the benefit of a large range of indexing-based features such as static call hierarchies,type hierarchies, opening method definitions from call sites in source code, and more.

This manual supplements Eclipse and CDT documentation, providing documentation specific to NonStopdevelopment.

NOTE:

For installation instructions for NSDEE 7.0, refer to the NSDEE 7.0 Quick Start on the NSDEEinstallation media.

Introduction 11

Page 12: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Before you beginNSDEE provides capabilities for building applications on both local Windows and remote NonStopsystems. Local Windows-hosted builds require a make program (as provided by Cygwin or Msys) andcross compilers for building NonStop applications on Windows. Remote NonStop-hosted builds typicallyrequire make (OSS) or gmake (Guardian) and native compilers for NonStop systems.

To use NSDEE for either local or remote builds, you must install both Eclipse Neon SR2 and C/C++Development Tooling (CDT) 9.2. You must also install XText plugin. A single installation package isavailable as part of the installation media containing Eclipse, CDT, NSDEE, and CDT patches. If youalready have an Eclipse and CDT installation, or prefer to download from their online site, refer to theNSDEE 7.0 Quick Start for instructions on installing NSDEE 7.0.

Additionally, local Windows-hosted builds also require Cygwin or Msys for make-driven builds. Both areavailable on the NSDEE installation media. NonStop cross compilers and, for SQL/MX applications, anSQL/MX preprocessor is also required. Cross compilers and the SQL/MX preprocessor are soldseparately from NSDEE.

This manual supplements the Eclipse Workbench Guide and the C/C++ Development User Guide, whichare included online with Eclipse and CDT. For basic information on using Eclipse, see the EclipseWorkbench Guide. For more information about using CDT, see the C/C++ Development User Guide. TheNonStop Development Environment for Eclipse 7.0 User Guide manual is available in the NonStopTechnical Library (NTL) at:

http://www.hpe.com/info/nonstop-docs

12 Before you begin

Page 13: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Getting startedThis chapter provides an introduction to how to use NSDEE, from creating and building projects toenabling C/C++ features based on indexing.

Preparing the WorkbenchThe scenarios described in this chapter assume that you:

• Are familiar with basic Workbench features, such as views and perspectives.• Are familiar with Workbench terminology, such as context menu, which refers to the pop-up menu

that appears when you right-click in a view.• Have opened the NonStop Development perspective (by selecting Window > Open Perspective >

Other and then choosing the NonStop Development perspective from the dialog box).• Are using the default layout of the NonStop Development perspective.

NOTE:

You can return all views and editors to their default locations by selecting Window > ResetPerspective and then selecting Yes in the resulting Reset Perspective dialog box.

Specifying your preferencesPreferences are an important mechanism to ensure Eclipse works the way you want and are accustomedto. For example, key preferences available from Window > Preferences > General > Keys allow youto customize key definitions for typing, such as the key definitions associated with Emacs or MicrosoftVisual Studio. Preferences provided by CDT available from Window > Preferences > C/C++ includecode style and smart typing preferences.

NonStop-specific preferences are described in NonStop Development on page 188. Use thispreference page to specify the default values for the following:

• Platform you are using.• Tools location to be set for your projects.

For other preferences, refer to the Eclipse and CDT documentation.

NOTE:

If you use Windows OS in a language other than English, add the following line in theeclipse.ini file:

-Duser.language=enOtherwise, you might receive an Unexpected Parse Exception error when opening a remotemakefile project.

Specifying tool locationsBefore you can build on Windows, NSDEE must have access to the locations for three types of tools:

• NonStop cross compilers and linkers• SQL/MX preprocessors (only needed when building SQL/MX applications)• The location of a bin directory containing make and other tools (provided by Cygwin or Msys)

If these tools are installed at standard locations, then NSDEE automatically finds them. To verify thatNSDEE has detected tool locations:

Getting started 13

Page 14: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

1. Open the preferences for tool locations:

a. Select Window > Preferences to open the Preferences dialog box.b. Expand NonStop Development in the left side menu.c. Select Tool Locations.

TIP:

For a shortcut, select NonStop Tools > Configure Tool Locations

2. Select the Cross Compilers tab if it is not already selected. This tab lists all the cross compilerlocations (and associated RVUs) detected. In some instances, such as when cross compilers areinstalled after installing and opening NSDEE, cross compilers are not detected. If the cross compilersare not detected:

a. Select Add to open the Add Cross Compiler Location dialog box.b. Verify the Location: where the cross compilers are installed.c. Ensure that the Auto-detect root folders radio button is selected.d. Select OK.

If the cross compilers are installed at non-standard locations, see Configuring Tool Locations forinformation on how to add those locations to your Tool Location preferences.

3. Select the SQL/MX Preprocessors tab to show all SQL/MX preprocessors on your system, if any. Ifexisting preprocessors are not shown:

a. Select Add to open the Add SQL/MX Preprocessor Location dialog box.b. Verify the Location: where the SQL/MX preprocessor is installed.c. Ensure that the Auto-detect root folders radio button is selected.d. Select OK.

If the preprocessors are installed at non-standard locations, see Configuring Tool Locations forinformation on how to add those locations to your Tool Location preferences.

4. Select the Cygwin/Msys tab. Either Cygwin or Msys must be installed to run make. Both are availableon the NSDEE installation media.

NSDEE automatically detects the Cygwin bin directory if it is installed at C:\cygwin\bin andautomatically detects the Msys bin directory if it is installed at C:\msys\1.0\bin. Otherwise, youmust specify the installation locations.

NOTE:

If the bin directory is in your Windows PATH environment variable or if you launch Eclipse froma Cygwin shell (assuming the Cygwin shell's PATH variable includes an entry for Cygwin's bindirectory), setting a Cygwin or Msys bin directory is not necessary.

Configuring connections to NonStop systemsThe Network Connections preferences page is where you define how to connect to NonStop systemswhen launching applications, transferring files, or deploying build results.

Connection configurations are saved in the form system_name_or_IP(user_ID_or_alias). For each namedconfiguration you can specify preferred connection protocols (SSH/SFTP or Telnet/FTP) and can alsoconfigure protocol-specific options. These connection configurations are used when, for example, youcreate a project and specify where the build results are deployed or where SQL compiles occur.

To create a connection configuration:

1. Open the preferences for connectivity:

14 Configuring connections to NonStop systems

Page 15: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

a. Select Window > Preferences to open the Preferences dialog box.b. Expand NonStop Development in the left side menu.c. Select Network Connections.

TIP:

For a shortcut, select NonStop Tools > Configure Connections

2. Enter a system name or IP address in the System: field.3. Enter a NonStop user ID or alias in the User name: field.4. Select either the SSH/SFTP or Telnet/FTP radio button.5. If changes to default settings are necessary, select the Settings button to the right of the radio button

for your preferred protocol. A Settings dialog box specific to your preferred protocol opens. For detailson Settings dialog box, see Settings on page 199.

6. Select the Connect button to verify the connection.

NOTE:

A password prompt appears before the connection completes.

7. Select OK to save the connection configuration and close the Preferences dialog box.

NOTE:

NSDEE provides the Connect button to test new connection configurations. However, theConfigure Connections dialog box and the Connect button are not necessary to establishconnections because NSDEE automatically establishes connections as needed.

8. To specify multiple connection configurations, open the Network Connections preferences and selectAdd/Remove. For details, see Configuring connections to NonStop on page 85.

Creating projectsProjects provide a way for you to organize and build applications in NSDEE. Before creating a project,know which type of project best suits your needs: a makefile (unmanaged) project or a managed project.

The makefile project is the simplest type of project provided by NSDEE. Makefile projects build yourapplication using a makefile provided by you. Makefile projects are ideal for use with an existing codebase that builds using existing makefiles. NSDEE supports makefile projects for both local Windows-hosted builds and for remote builds on a NonStop server.

If you are creating an application or have an application for which you do not have a makefile, use aproject for which NSDEE creates makefiles and manages your builds. Managed projects are availableonly for local Windows-hosted builds.

This section provides examples of how to create makefile and managed projects from scratch or using anexisting code base. This section also provides an example of how to create multiple managed projects tobuild a single application.

IMPORTANT:

NSDEE does not support Windows-hosted projects (managed or makefile projects) when it isconnected to the NonStop server over an IPv6 network. Only remote (NonStop-hosted) makefileprojects are supported on IPv6.

Creating projects 15

Page 16: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

For the most detailed descriptions of project wizards, read the sections about creating projects fromscratch. Other sections regarding project creation focus on short descriptions of how to createprojects.

Creating a managed project from scratchBefore creating a managed project, determine the primary language for the project. The primary languagedetermines the linker used to create the final build object. Also determine whether the final build objectwill be an executable or some type of library.

Project creation is similar for all managed projects regardless of language. This section provides anexample of creating a C executable project.

NOTE:

Any NonStop selections in CDT wizards (for example New > File > Project > C/C++ > C++ Project,the C++ Project wizard, NonStop Executable > Hello World C++ Project) do not create NonStopprojects. Only CDT projects containing all the NonStop tools are created.

To create a C project:

1. Open the NonStop C Project wizard using one of the following methods:

• Select File > New > C Project.• Select C Project from the drop-down of the New NonStop Project icon in the main toolbar.• Select New > C Project from the context menu of the NonStop Project Explorer view.

2. In the NonStop C Project wizard:

16 Creating a managed project from scratch

Page 17: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

a. Enter a name for your project in the Project name: field.b. Optionally, clear Use default location check box and enter a location to store your project. By

default, if a location is not specified NSDEE stores your project in a top-level directory in yourworkspace directory.

c. Select Hello World ANSI C Project in the NonStop Executable folder.

An initial source file is created that declares main() and prints a text string.d. Under Toolchains, select C-C++ TNS-E Tools and C-C++ TNS-X Tools. Tool chains define the

cross compilers, linkers, and other tools associated with building for a particular NonStoparchitecture. By default, NSDEE creates two build configurations for each tool chain you select; onefor debug builds and one for release builds.

The Finish option is enabled if Project Type and Toolchains contain all the tools required for theproject.

3. Click Finish or Next.

Getting started 17

Page 18: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

• If you click Finish, the project is created and the project details are displayed.• If you click Next , the Basic Settings dialog box appears.

NOTE:

The following steps are optional.

If you select Hello World ANSI C Project, the Basic Settings dialog box appears. If you selectEmpty Project, it is not displayed.

In the Basic Settings dialog box:

• Configure author and copyright information to be placed in the comment header of the source file.• Configure the text string used in the print statement of the source file.• Set the name of the initial source directory.

These fields can also remain unchanged.4. Click Next.

The Initial Build Settings dialog box appears.5. On the Initial Build Settings dialog box, configure initial build settings for your project:

18 Getting started

Page 19: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

• The platform to build (OSS or Guardian).• The location of the cross compilers to use.• Any additional languages to use.

The default setting you configure for NonStop Development is displayed in the Initial Build Settingsdialog box. You can change these settings. For more information on NonStop Developmentpreference settings, see NonStop Development on page 188.

Leave the default settings unchanged except for the Cygwin/Msys bin: combo box. Set it to the bindirectory for either Cygwin or Msys. If the combo box drop-down contains no entries, refer to Specifying tool locations on page 13. If you select the Configure Locations link to the right of thecombo box, the Cygwin/Msys tab of the Tool Location preferences dialog box opens.

Getting started 19

Page 20: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

The Cygwin/Msys bin combo box is provided for your convenience. If you set it to either aCygwin or Msys bin, that bin directory is prepended to your PATH environment variable byNSDEE prior to builds. If you leave it blank, you must either add a Cygwin or Msys bin to yourWindows PATH or launch Eclipse from Cygwin. If Eclipse is launched from Cygwin, Eclipseinherits the PATH settings from Cygwin, which typically include the Cygwin bin directory.

The TNS/E tools root and TNS/X tools root combo boxes are automatically set to the location of thelatest cross compilers and tools. If it is empty, refer to Specifying tool locations on page 13. If youselect the Configure Locations link to the right of the combo box, the Cross Compilers tab of the ToolLocations preferences dialog box opens.

6. Click Next.

The Remote Settings dialog box appears. Specify a transfer location on a NonStop server for finalbuild objects. If you chose SQL/MP or SQL/MX on the previous page, specify NonStop serverlocations for SQL compiles.

20 Getting started

Page 21: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

If you added a connection configuration (see Configuring connections to NonStop systems onpage 14), you can choose that system from the Target system/user (-h/-u) combo box and provide atarget destination and file name. Or leave the settings blank and add them to the project at a latertime. You can also open the Network Connections preference page from the Remote Settings page byselecting the Edit button.

7. Click Next.

The Code Coverage Settings dialog box appears.

Getting started 21

Page 22: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

To enable code coverage:

• Select Enable code coverage for below configurations* check box and select the requiredconfigurations.

• Optional: Specify the Profmrg options.• Optional: Specify the Code coverage options.

For more information, see Code coverage basics.8. Click Next.

The Select Configurations dialog box shows the build configurations that NSDEE will create for thisproject. Build configurations are a group of settings to use for a build. By default, NSDEE creates buildconfigurations specific to debug and release builds of the project. You can add build configurationsafter project creation.

22 Getting started

Page 23: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

The Advanced settings button opens project properties for the project you are about to create.Change tool options, environment variables, and other project settings in Project properties. Thesesettings are available after you create a project by selecting your project in the NonStop ProjectExplorer view and then selecting Properties from the context menu.

Leave this page unchanged.9. Click Finish.

NSDEE creates your project. A project folder icon representing your project is displayed in theNonStop Project Explorer view. Expand the folder to see the contents of your project. For informationabout how to build, deploy, and launch your project, see Building, deploying, and launching aproject on page 43.

Your project contains a folder named Includes. This folder is a link to the system include directoryof the cross compilers and tools you chose during project creation. CDT uses this link to help build a

Getting started 23

Page 24: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

database of C and C++ symbols. For more information, see Ensuring the C/C++ indexer runs onpage 38.

Creating a managed project from existing sourcesManaged projects are used to build and manage existing application sources. Managed projects arecreated differently, depending on where you want your sources to reside (inside or outside of yourworkspace) and how the existing sources were built previously.

If the existing source base consists of ETK projects, consider using the Import ETK Projects wizard. TheImport ETK Projects wizard imports not only your sources, but also many tool settings such as compilerand linker options. For details, see Importing ETK projects on page 100.

This section provides examples of how to create managed projects from existing sources for twoscenarios:

• Creating a project and using the sources outside your workspace using a sample program Car.• Copying the sources into your workspace using a sample program GeneralCpp.

The sources for both programs are in:

eclipse install directory\plugins\com.hp.nsdee_7.0.n\Examples.zipThe following examples assume Examples.zip is unzipped to C:\Examples.

NOTE:

This section focuses on examples of creating projects from existing sources. For more detaileddescriptions of project creation wizards, see Creating a managed project from scratch on page16.

Creating a managed project using existing sources outside your workspaceThis section provides an example of creating a managed project named Car using existing sourceswithout copying so the Car project resides outside your Eclipse workspace. To create the Car project,from the NonStop Development perspective:

1. Open the NonStop C++ Project wizard using one of the following methods:

• Select File > New > C++ Project• Select C++ Project from the drop-down of the New NonStop Project icon in the main toolbar.• Select New > C++ Project from the context menu of the NonStop Project Explorer view.

2. In the NonStop C++ Project wizard:

a. Enter for your project in the Project name field.b. Clear the Use default location check box and enter C:\Examples\CarSources.c. Under Project type, select Empty Project in the NonStop Executable folder.d. Under Toolchains, select C-C++ TNS-E Tools.

24 Creating a managed project from existing sources

Page 25: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

3. Click Next.4. In the Initial Build Settings dialog box, do not change the defaults. Specify either a Cygwin or Msys

bin using the Cygwin/Msys bin combo box if you want NSDEE to prepend the corresponding bin toPATH before builds.

The following dialog box shows the Cygwin bin specified.

Getting started 25

Page 26: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

5. Click Next.

The Remote Settings dialog box appears. To deploy Car to a NonStop system, enter a remotesystem and user, and specify a remote location.

6. Click Next.

The Code Coverage Settings dialog box appears.

26 Getting started

Page 27: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

To enable code coverage:

• Select Enable code coverage for below configurations* check box and select the requiredconfigurations.

• Optional: Specify the Profmrg options.• Optional: Specify the Code coverage options.

For more information, see Code coverage basics.7. Click Finish.

The Car project is now listed in the NonStop Project Explorer view. The project folder contains thefollowing:

• An Includes directory (a link to the system headers available from the cross compilers and tools).• A headers directory (containing header files for the project).• A src directory (containing the rest of the sources for the project).• The .project, .cproject, and .remote files. The .remote file appears if you have enabled the

option for the workspace. For more information, see NonStop Development.

By default, the .project, .cproject, and .remote files are not visible. To view these files, see Viewing project files.

The .project and .cproject files define attributes of the Car project, including any customizations. Ifyou save your projects in a Source Configuration Management system, you must save these files inaddition to your source code.

The .remote file contains the deployment information of the project. To avoid sharing the remoteNonStop information among application developers, maintain a private copy of the .remote file.

Getting started 27

Page 28: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

For information about how to build, deploy, and launch Car, first see Viewing and changing propertiesof managed projects on page 39 because the build will fail unless you specify the location of theheaders directory to the cross compiler. Then see Building, deploying, and launching a project onpage 43.

Creating a managed project by pulling existing sources into your workspaceThis section provides an example of creating a managed project named GeneralCpp using existingsources copied into your workspace. It is a two-step process. First, you create an empty project. Then,you import the sources for GeneralCpp.

To create the GeneralCpp project, from the NonStop Development perspective:

1. Open the NonStop C++ Project wizard using one of the following methods:

• Select File > New > C++ Project• Select C++ Project from the drop-down of the New NonStop Project icon in the main toolbar.• Select New > C++ Project from the context menu of the NonStop Project Explorer view.

2. In the NonStop C++ Project wizard:

a. Enter GeneralCpp in the Project name field.b. Under Project type, select Empty Project in the NonStop Executable folder.c. Under Toolchains, select C-C++ TNS-X Tools.

28 Creating a managed project by pulling existing sources into your workspace

Page 29: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

3. Click Next.4. In the Initial Build Settings dialog box, do not change the defaults. Specify either a Cygwin or Msys

bin using the Cygwin/Msys bin combo box if you want NSDEE to prepend the corresponding bin toPATH before builds.

The following dialog box shows the Cygwin bin specified.

Getting started 29

Page 30: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

5. Click Next. The Remote Settings dialog box opens. To deploy GeneralCpp to a NonStop system,enter a remote system and user, and specify a remote location.

6. Click Finish.

The GeneralCpp project is created.

You can view the project in the NonStop Project Explorer view. To see the contents of your project,expand the GeneralCpp folder. For more information, see Viewing project files.

Importing sources into a projectThis section provides an example of importing the sources for GeneralCpp project.

Procedure

1. In the NonStop Project Explorer view, select the GeneralCpp project folder.2. Select Import from the context menu for the NonStop Project Explorer view .3. In the Import wizard, expand the general folder and select File System.

30 Getting started

Page 31: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

4. To continue to the File system wizard, click Next.5. In From directory field, enter C:\Examples\GeneralCppSources.

A folder for GeneralCppSources appears in the left-hand list box.6. Expand the folder but do not select its check box.7. Under GeneralCppSources, select the check boxes for the include and source directories.8. Click Finish.

The include and source directories now appear under the GeneralCpp project folder.

For information about how to build, deploy, and launch GeneralCpp, see Viewing and changingproperties of managed projects on page 39. The build will fail if the location of the headersdirectory is not specified to the cross compiler. Then see Building, deploying, and launching aproject on page 43.

Creating multiple projects to build a single applicationUsing multiple projects to build an application can provide more flexibility in building applications. Forexample, multi-language applications can group differing language files in different projects.

This section provides an example of creating a multi-project application, where one project namedCarParts creates a linkfile and the other project, named Car, links the linkfile into the main application.

To create the CarParts project from the NonStop Development perspective:

1. Open the NonStop C++ Project wizard using one of the following methods:

• Select File > New > C++ Project• Select C++ Project from the drop-down of the New NonStop Project icon in the main toolbar.• Select New > C++ Project from the context menu of the NonStop Project Explorer view.

2. In the resulting NonStop C++ Project wizard:

a. Enter CarParts in the Project name field.b. Clear the Use default location check box. Enter: C:\Examples\MultiProjectCarApp

\CarPartsc. Select Empty Project in the NonStop Linkfile folder.d. Under Toolchains select C-C++ TNS-E Tools.

3. Click Next to open the Initial Build Settings dialog box.4. In the Initial Build Settings dialog box, do not change the defaults. To prepend the corresponding

bin to PATH before builds, specify either a Cygwin or Msys bin using the Cygwin/Msys bin combobox.

5. Selecting Next opens the Remote Settings dialog box. Because deploying a linkfile is not necessary,opening this dialog box is not necessary. However, for shared library projects remote systeminformation is entered on this page.

6. Click Finish.

To create the Car project from the NonStop Development perspective:

1. Open the NonStop C++ Project wizard using one of the following methods:

• Select File > New > C++ Project• Select C++ Project from the drop-down of the New NonStop Project icon in the main toolbar.

• Select New > C++ Project from the context menu of the NonStop Project Explorer view.2. In the resulting NonStop C++ Project wizard:

a. Enter Car in the Project name field.b. Clear the Use default location check box and enter: C:\Examples\MultiProjectCarApp

\Car

Creating multiple projects to build a single application 31

Page 32: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

c. Select Empty Project in the NonStop Executable folder.d. Under Toolchains, select C-C++ TNS-E Tools.

3. Click Next to open the Initial Build Settings dialog box.4. In the Initial Build Settings dialog box, do not change the defaults. To prepend the corresponding

bin to PATH before builds, specify either a Cygwin or Msys bin using the Cygwin/Msys bin combobox.

5. Click Next. To deploy Car to a NonStop system, select a remote system and user and specify aremote location.

6. Click Finish.

Change the properties of the Car project to reference the CarParts project so CarParts builds beforethe Car project. To set a reference to CarProjects in the Car projects properties:

1. Select the Car project in the NonStop Project Explorer view.2. Select Properties from the NonStop Project Explorer view context menu.3. In the Properties for Car dialog box, select Project References in the list of property pages on the left.

4. In the Project References page on the right (and shown above), select CarParts.5. Select OK.

Point the Car project to include files in the CarParts project. Link Car in the build artifact (linkfile)created by CarParts. From the NonStop Development perspective:

1. Select the Car project in the NonStop Project Explorer view.2. Select Properties from the NonStop Project Explorer view context menu.3. In the Properties for Car dialog box, expand C/C++ Build and select the sub-item Settings.

4. In the Tool Settings tab of the Settings page, under C++ Compiler (TNS/E), select the Includescategory to open the Includes page.

32 Getting started

Page 33: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

5. In the Includes page, select the Add button (-I).6. In the Add directory path dialog box, enter in the Directory field:

../../CarParts/src7. Select OK to dismiss the Add directory path dialog box and apply the change.8. Select the Miscellaneous category under C++ Linker (TNS/E).9. To the right of Other objects, select the Add button .10. In the Add file path dialog box, enter in the File field:

../../CarParts/Debug/CarParts.tlo

11. Select OK to dismiss the Add file path dialog box and apply the change.12. Make a similar change to the Release build configuration.

In the Configuration combo box at the top of the page, change the configuration to Release.

13. In the Miscellaneous page for the C++ Linker (TNS/E), select the Add button to the right ofOther objects.

Getting started 33

Page 34: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

14. In the Add file path dialog box, enter in the File field:

../. ./CarParts/Release/CarParts.tlo15. Select OK to dismiss the Add file path dialog box and apply the change.16. Select OK to dismiss the Properties for Car dialog box and apply the change.

Now your projects are ready to build. From the NonStop development perspective:

1. Select Car in the NonStop Project Explorer view.

2. Select the build icon in the toolbar.

When the build completes, text similar to the following appears in the Console view (whereCarParts.tlo is linked into Car.txe):

Building target: Car.txeInvoking: C++ Linker (TNS/E)c89 -Wcplusplus -Wsystype=guardian -Wcall_shared -o "Car.txe" ./src/Car.o ./src/CarTest.o ../. ./CarParts/Debug/CarParts.tloFinished building target: Car.txe

**** Build Finished ****

TIP:

The Console view separates build output for each project. Because the Car project built last, itsbuild output is shown in the Console view. If you select CarParts in the NonStop Project Explorerview, the Console shows build output for CarParts.

TIP:

Building Car and CarParts produces more output than the default Console view can display. Bydefault, the Console view limits output shown to 500 lines. Increase this from the preference pageavailable from Window > Preferences > C/C++ > Build > Console.

For information on how to deploy and run Car.txe from NSDEE, see Building, deploying, andlaunching a project on page 43.

Creating a local makefile project from scratchCreate a makefile project using one of the following methods:

• Create a makefile project• Create a managed project as described in Creating a managed project from scratch on page 16 so

that the initial makefiles are created for you. To manage the generated makefiles, clear GenerateMakefiles automatically in the C/C++ Build page of the project properties.

This section focuses on creating a makefile project. To create a local makefile project from scratch, selectone of the new project actions from the context menu of the NonStop Project Explorer view for either theC, C++, COBOL, or pTAL. For makefile projects, the resulting project is the same regardless of thelanguage associated with the new project wizard. The following example uses the NonStop C Projectwizard.

To create a local makefile project from scratch:

1. From the context menu of the NonStop Project Explorer view, select File > New > C Project.

The NonStop C Project wizard appears.2. In the NonStop C Project wizard:

34 Creating a local makefile project from scratch

Page 35: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

a. Enter Makecar in the Project name field.b. Optionally, clear the Use default location check box and enter a location to store your project. By

default, if a location is not specified NSDEE stores your project in a top-level directory in yourworkspace directory.

c. Select Empty Project under the NonStop Makefile Project folder.d. Under Toolchains, select C-C++ TNS-E Tools. For Makefile projects, tool chains define where the

C/C++ indexer looks for system headers. Optionally, NSDEE sets up COMP_ROOT (which crosscompilers use to find headers) based on your tool chain selections.

By default, one build configuration named Default is created for each tool chain you select.

The Finish option is enabled if Project Type and Toolchains contain all the tools required for theproject.

3. Click Finish or Next.

• If you click Finish, the project is created and the project details are displayed.• If you click Next, the Initial Build Settings dialog box appears.

The following steps are optional.4. In the Initial Build Settings dialog box, select the tools root the C/C++ indexer uses to find symbols in

system headers. To have NSDEE to set the COMP_ROOT environment variable (and you do not plan toset it in your makefile), select the check box labeled Set COMP_ROOT and update PATH based ontools root above.

5. Click Finish.

NSDEE creates your project. The NonStop Explorer view shows the root of your project using a projectfolder icon Includes folder. The Includes folder is a link to the system include directory of thecross compilers and tools indicated during project creation. CDT uses this link to help build a database ofC and C++ symbols. For more information, see Ensuring the C/C++ indexer runs on page 38.

You must create your own directory, sources, and makefile.

Creating a local makefile project from existing sourcesThis section provides an example of creating a makefile project from existing sample sources for a simpleapplication named Car. To get the sources for Car, unzip the file:

eclipse install directory\plugins\com.hp.nsdee_7.0.n\Examples.zipThe following example assumes Examples.zip is unzipped to C:\Examples.

To create a local makefile project from sources for Car from the NonStop Development perspective:

1. From the context menu of the NonStop Project Explorer view, select New > Makefile Project withExisting Code. This Import Existing Code wizard opens.

2. In the Import Existing Code wizard:

a. Enter MakeCar in the Project name fieldb. Enter in the Existing Code Location field

C:\Examples\CarWithMakefilec. The Tools root combo box contains the location of cross compilers and tools for a particular RVU.

If not, see Adding cross compiler locations on page 84.d. If you want NSDEE to prepend the corresponding bin to PATH before builds, specify either a

Cygwin or Msys bin using the Cygwin/Msys bin combo box.e. Leave the Set COMP_ROOT and update PATH based on tools root above selected so the

COMP_ROOT environment variable is set to the Tools root selection.3. Click Finish.

Creating a local makefile project from existing sources 35

Page 36: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

The MakeCar project is now in the NonStop Project Explorer view. Open the MakeCar project folder tosee the Includes directory (a link to the system headers available from the cross compilers and tools), aheaders directory (containing header files for the project), and a src directory (containing the rest of thesources for the project).

The .project and .cproject files are in the MakeCar folder, but these are not visible by default.

To view these files:

1. Select Filters from the local drop-down for the NonStop Project Explorer view to open the C ElementFilters dialog box.

2. In the C Element Filters dialog box, clear .*resources.3. Select OK.

To hide .project and .cproject, use the C Element Filters dialog box. The .projectand .cproject files define attributes of the MakeCar project, including any customizations. If you saveyour projects in a Source Configuration Management system, you must save these files in addition toyour source code. For information about how to build, deploy, and launch MakeCar, see Building,deploying, and launching a project on page 43.

Creating a remote makefile projectRemote makefile projects are hosted on a NonStop system where the source files and makefiles reside.Creating a remote makefile project allows you to edit remote source files and launch builds from NSDEE.Remote makefile projects are created either from scratch or with the project to build existing source usingexisting makefiles.

To create a remote project, from the NonStop Development perspective:

1. Select New > Remote Makefile Project from the context menu of the NonStop Project Explorerview.

2. In the Remote Makefile Project wizard (Figure 1: Remote Makefile Project wizard on page 37),enter a name in the Project name field.

36 Creating a remote makefile project

Page 37: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 1: Remote Makefile Project wizard3. From the Build system combo, select a NonStop system for the project location. If a NonStop

system connection is not yet configured, select Edit.4. Enter the remote OSS or Guardian path where your project will reside in the Project location field,

or choose Browse to browse for a location.

NOTE:

• To enter Guardian project locations, use the following format:

[\<systemname>.]$<volume>.<subvol>• To enter OSS project locations, use the following format:

/E/system name/remote project5. In the Platform row, choose either the OSS or Guardian button depending on which platform you

project will reside.6. Click Connect to Build System to establish a connection to the NonStop system specified in step 3.

The button is disabled if a connection is already established.7. The Referenced remote makefile projects list is empty unless previously created remote projects

are in your current workspace. The list allows you to specify other remote projects that must be builtbefore your current project is built.

8. Click Next to continue to the Build Settings wizard (Figure 2: Build Settings wizard on page 38).

Getting started 37

Page 38: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 2: Build Settings wizard9. The Build Settings dialog box enables the setting of an alternative command to gmake (Guardian)

or make (OSS) to drive builds and alternative names for the build targets all and clean. Changethese settings only if needed.

10. Select the Create makefile check box if you want NSDEE to create an initial makefile.11. The Default editor combo box is shown only for Guardian projects. Use it to select the default editor

to use for source files in your project. In the NonStop Project Explorer view, Guardian source filesappear with a suffix that matches the default editor. The suffix aids Eclipse in opening the correcteditor, however, the actual Guardian source file names do not have the suffix.

12. Click Finish to create the remote project and dismiss the wizard.

Ensuring the C/C++ indexer runsThe C/C++ indexer creates a database of your project's symbols for C and C++ sources. This databaseenables many useful features such as opening a method definition from a call site and C/C++ codeanalysis.

The CDT indexer is not always started automatically, especially just after project creation. This is the caseif the C/C++ editor shows errors for symbols from header files after project creation. To ensure the indexeris run, select the project and select Index > Rebuild from the context menu of the NonStop ProjectExplorer view. When the indexer completes, any invalid errors are gone.

For more information on the C/C++ indexer, see C/C++ indexer database on page 50 and NSDEEbuilt in language settings on page 50 .

38 Ensuring the C/C++ indexer runs

Page 39: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Adding folders and files to projectsNSDEE provides a number of wizards for adding folders and files to a project. All of these wizards areavailable from the New sub-menu of the NonStop Project Explorer view context menu. The following tablesummarizes the wizards available and their capabilities.

Table 1: Wizards for creating new files and folders

Wizard Description

File fromTemplate

Creates a new file and optionally populates the new file with contents of a namedtemplate associated with the file extension entered. For local projects, also use thiswizard to create a link to a file outside of your project.

Source File Creates a source file. Similar to File from Template, this wizard optionally populatesthe new file with the contents of a template. It also provides a Configure buttonwhich opens the Preferences dialog box to the Code Templates page. Use the CodeTemplates page to customize templates for new files.

Header File Creates a C or C++ header file and optionally populates the new file with thecontents of a header file template.

Folder Creates a new folder. For local projects, also use this wizard to create a link to afolder outside your project. For remote projects, also use this wizard to add existingremote directories or subvolumes as top-level folders in a project.

Source Folder Creates a new folder. Use this wizard to create new source folders for managedprojects.

Viewing and changing properties of managed projectsThough managed projects create makefiles, if you do not want to use default tool options, you mustconfigure how your projects are built by cross compilers and other tools. The project properties allow youto change how your application is built. You can change build variables and environment variable values,cross compiler and linker options, and the tools used to build your application. This section provides abrief overview of the types of properties available for managed projects that change how your applicationis built.

To view the properties for a project, select the project in the NonStop Project Explorer, then selectProperties from the context menu. Figure 3: Properties for MakeCar project on page 40 shows theproperties for the MakeCar project (see Creating a local makefile project from existing sources onpage 35) with the C/C++ Build node expanded.

Adding folders and files to projects 39

Page 40: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 3: Properties for MakeCar project

Not all project properties are specific to building your project. Properties specific to builds typically havethe Configuration combo box shown in Figure 3: Properties for MakeCar project on page 40, whichallows you to choose the configuration to view or modify. The entries under C/C++ Build allow you toconfigure different aspects of your builds.

The following table lists a brief summary of what you can configure using each entry under the C/C++build node.

Table 2: Property pages for builds

Property Page Description

Build Variables To define or change Eclipse build variables. These variables are resolved beforecreating makefiles.

Discovery Options Only for projects with SQL tools. Provides an alternate path for SQL statement files.For details, see Removing errors and warnings in C/C++ editors on page 131.

Environment To set environment variables prior to a build. These settings are read by externaltools, such as make.

Logging To write build output to a log.

Settings To specify options passed to cross compilers and other tools.

Table Continued

40 Getting started

Page 41: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Property Page Description

Settings (Remote) To specify options specific to remote systems to cross compilers and other tools.

Tool Chain Editor To change which types of tools are used to build a project.

Tool Locations To change the locations for tools used during builds.

The following sections describe the Settings, Build Variables, and Environment pages.

Changing tools options using the Settings property pageUse the Settings page to change options passed to compilers and tools. For example, if you createdeither the Car or GeneralCpp project in a previous section, add the missing include directive from theNonStop Development perspective:

1. Select the Car or GeneralCpp project in the NonStop Project Explorer.2. Select Properties from the NonStop Project Explorer context menu.3. In the Properties dialog box, expand C/C++ Build and select Settings.4. In the Settings page, select the Tool Settings tab (if the Tool Settings page is not already displayed).5. In the Tool Settings page, select the Includes category under C++ Compiler (TNS/E) to display

Include path (-I) settings (which should be empty).

6. At the top of the Include path (-I) settings, select the Add icon to open the Add directory pathdialog box.

7. In the Add directory path dialog box, enter one of the following:

../headers (for Car project)

../include (for GeneralCpp project)

Because builds occur in a subdirectory of the project (typically in a Debug or Release directory), theinclude directories are one level up from the build directory.

8. Select OK to add the include path and dismiss the dialog box.9. Select OK to apply the change and close the Properties dialog box.

Car and/or GeneralCpp can now be built. To build now, see Building, deploying, and launching aproject on page 43.

Specifying build variables and environment variablesBoth build variables and environment variables provide ways to alter builds. Build variables are internal toEclipse and are evaluated prior to creating makefiles and launching a build. Environment variables arepassed to the shell where the build is launched.

CDT automatically creates build variables for each environment variable set when Eclipse is launched.Build variables are referenced using braces and environment variables are referenced using parentheses.For example:

${PWD}— build variable$(PWD)— environment variable

NSDEE passes the build platform macro TARGET_SYSTYPE to compilers and linkers. For example, in theTool Settings tab on the Settings property page select the Miscellaneous item for the C++ Linker or theC++ Compiler, you see this setting:

Changing tools options using the Settings property page 41

Page 42: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

If you select the main page for C++ Linker on the Tool Settings page, you see that ${TARGET_SYSTYPE} is evaluated immediately in the All options box because it displays:

-Wsystype=oss -Wcall_sharedChange the -Wsystype= argument to the following environment variable syntax instead of build variablesyntax:

Return to the main page for C++ Linker, the All options box now contains:

-Wsystype=$(TARGET_SYSTYPE) -Wcall_sharedIn this case, $(TARGET_SYSTYPE) is evaluated by the build shell and the build fails unless anenvironment variable is set to oss or guardian.

Viewing project filesOnce a project is created, it is listed in the NonStop Project Explorer view. The Project foldercontains .project, .cproject, and .remote files. These files are not visible by default.

The .remote file is created only if you have enabled the option for the workspace. For more information,see NonStop Development.

This section provides an example of viewing the files in a managed project named Car.

Procedure

1. Select Filters from the local drop-down for the NonStop Project Explorer view.The C Element Filters dialog box appears.

2. Clear .*resources check box.

3. Click OK.

To hide the .project, .cproject, and .remote files, return to the C Element Filters dialog box andselect .*resources check box.

42 Viewing project files

Page 43: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Building, deploying, and launching a projectThe steps for building, deploying, and launching a project are similar for all types of NSDEE projects.However, remote projects can be launched before deploying to a NonStop system.

Building a projectTo build a project, perform the following steps from the NonStop Development perspective:

1. In the NonStop Project Explorer, select the project you want to build.2. Check which build configuration (typically Release or Debug) is active. From the context menu of the

NonStop Project Explorer, select Build Configurations > Set Active. The Set Active sub-menudisplays a list of build configurations, with a check mark next to the active build configuration. Eitherdismiss the context menu (click elsewhere) or select a different build configuration to make it active.

3. Initiate the build using one of the following methods:

• Select Build Project from the context menu of the NonStop Project Explorer.• Select Build Project from the Project menu of the main menu bar.

• Select the Build icon in the main toolbar.

This build uses your active build configuration.

TIP:

• Hover your mouse over the build icon in the toolbar to see what will build. For example, if youselected a project named Hello World and the active build configuration for that project isDebug, then the tool tip reads: "Build 'Debug' for project 'Hello World'".

• The drop-down next to the build icon changes the current build configuration and initiates a buildin a single step.

• If the build icon is disabled, NSDEE cannot determine which project to build. NSDEE determineswhich project to build by querying the currently active view. For example, if the currently activeview is an editor, NSDEE builds the project associated with the source file in that editor. If theNonStop Project Explorer view is active, NSDEE builds the selected project.

All build output is displayed in the Console view. Use the Problems view to see errors and warnings. Inthe Problems, double click on any error or warning to open a source editor to the code locationresponsible for the error or warning.

Deploying a projectTo transfer the final build object of a project to a NonStop system, from the NonStop Developmentperspective:

1. In the NonStop Project Explorer, select the project containing the final build object to transfer to aNonStop system.

2. To change build configurations (deploy transfers the final build object of the active build configuration),select Build Configurations > Set Active from the context menu and select the active buildconfiguration from the Set Active sub-menu.

3. To initiate the transfer, use one of the following methods:

• Select Deploy Project from the context menu of the NonStop Project Explorer.• Select Deploy Project from the Project menu of the main menu bar.

• Click the Deploy icon on the main toolbar.

NSDEE transfers the final build object of the active build configuration to the NonStop system.

Building, deploying, and launching a project 43

Page 44: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

TIP:

• Hover your mouse over the deploy icon on the toolbar to see which project will deploy. Forexample, if you selected project Hello World and the active build configuration for that project isDebug, then the tool tip reads: “Deploy 'Debug' for project 'Hello World'”.

• The drop-down next to the deploy icon changes the current build configuration and initiate adeploy in a single step. This action also initiates a build, if needed, before attempting to transfera project final build object.

• If the deploy icon is disabled, NSDEE cannot determine which project to deploy. NSDEEdetermines which project to deploy by querying the currently active view. For example, if thecurrently active view is an editor, NSDEE deploys the project associated with the source file inthat editor. If the NonStop Project Explorer view is active, NSDEE deploys the selected project.

All deploy output is shown in the Console view.

Firewall issuesIssue: NSDEE build might fail with error messages below. This could be a firewall issue.

• Failed to establish secure connection to NonStop host Unable to send remote procedure call to SQL/MP server: TSQL_Sqlinfo_RPC_V1 RPC: call timed out c89.exe: error: Can't exec C:\Program_Files_GCSC\HP NonStop\L14.09\usr\cmplr

• Transfer Failed: com.hp.rservices.RequestException: File transfer failed. Cannot open data connection.

Workaround

Allow eclipse.exe, c89.exe, portmap.exe, and ccomfe.exe to go through. Or disable the firewall.

Issue: FTP transfer issues when firewall is enabled on Windows7 with Java7 combination.

NSDEE deploy might fail with this error:

Transfer Failed: com.hp.rservices. RequestException: Unable to retrieve file. Workaround

Open the command prompt as Run as administrator and run the following command:

netsh advfirewall set global StatefulFTP disable

NOTE:

For any workaround to take effect, restart Eclipse after the change.

Launching a projectTo run a final build object for a project on NonStop from NSDEE, from the NonStop Project Explorer:

1. To open the Run Configurations dialog box, select Run > Run Configurations.

2. Select the NonStop Application entry from the list of launchers on the left of the RunConfigurations dialog box, then select New from the context menu. (Alternatively, you can double-clickthe NonStop Application entry.) This creates a new configuration named New_configuration.

3. Enter a meaningful name, such as the name of the project the configuration will launch in the Namefield.

44 Firewall issues

Page 45: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

4. In the Main tab of the configuration:

a. Select the platform you want to launch (Guardian or OSS).b. Enter the name of your project in the NonStop project field.c. Select a system/user name pair from the NonStop system combo box. This is the connection

configuration that NSDEE uses to log on and launch your project. If no systems are configured,select Edit and refer to Configuring connections to NonStop systems on page 14.

d. Enter the location where your application deployed in the NonStop executable's path onNonStop system field.

NOTE:

If you have not deployed your project to a NonStop system, you can select the check box forLocal executable to be transferred to NonStop path specified above to transfer yourexecutable prior to launch. Do not select this option for SQL/MP or SQL/MX projects. Totransfer SQL/MP and SQL/MX project files to the NonStop system, use Deploy Project in theNonStop Project Explorer view.

5. Specify arguments to your program (if any) in the Arguments tab.6. Select the Run button to launch your program.

NSDEE initiates a login if it has not already established a connection to the launch system. All I/O for yourprogram is directed to the Console view.

TIP:

After you create a Run launch configuration and launch it, you can relaunch it in the future byselecting it from the drop-down of the Run icon in the toolbar.

Code coverage basicsCode coverage report is generated based on the execution of the instrumented code on remote NonStopusing the Generate Code coverage tool. It simplifies the process of report generation for all localprojects. For more information about this tool, see Generate Code coverage.

While creating a new project, you can enable code coverage and provide options for Profmrg andCodecov commands. You can also enable code coverage for existing projects using the Miscellaneousoption in the compiler and linker tools.

After a TNS/E project is built, raw data files are generated. However, raw data files are not generated forTNS/X projects.

Code coverage basics 45

Page 46: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 4: Sample of raw data files generated for a project

The Progmrg and Codecov targets are added to makefile. Progmrg and Codecov targets contain thecorresponding command and options as set in the project properties (see, step 7 in Creating a managedproject from scratch).

Figure 5: Sample of Progmrg and Codecov targets

Raw data files are generated after the final executable is deployed and run on the remote machine. OnOSS platform, raw data files are saved with *.dyn extension. On Guardian platform, raw data files arestored with ZZPF* extension.

The code coverage report is generated using the .spi file in the local project (for TNS/E projects) and theraw data files on remote NonStop.

More InformationCreating a managed project from scratch on page 16Enabling Code coverage on page 159Generating Code coverage for managed projects on page 159Generating Code coverage for makefile projects on page 160

46 Getting started

Page 47: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Generate Code coverage on page 187

Getting started 47

Page 48: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

ConceptsThis chapter supplements the “Concepts” chapter of the C/C++ Development User Guide, providingdetails specific to NonStop development.

NSDEE overviewNSDEE extends Eclipse's C/C++ Development Tooling (CDT) to enable its use for developing NonStopapplications, including applications built with C, C++, COBOL, pTAL, SQL/MP, and SQL/MX. NSDEEprovides the full range CDT development capabilities for Windows-hosted C and C++ projects, and asubset of CDT capabilities for COBOL and pTAL projects and for remote projects using any programminglanguage.

In NSDEE, your application's sources must be grouped into named projects which can then be compiledinto a final build object such as an executable or library. A typical use scenario is to create one project forthe final build target (such as an executable file) and separate projects for building supporting librariesthat are linked into the final executable.

NonStop projects can be either local or remote. For local projects, source files reside on Windows andbuilds are performed on Windows using cross compilers. For remote projects, sources reside on a remoteNonStop system and builds are performed on remote NonStop systems using native compilers, however,edits and builds are initiated from NSDEE running on Windows.

Managed and unmanaged buildsNSDEE provides two approaches to building applications—managed builds and unmanaged builds.Managed builds are available only for local Windows-hosted builds. Managed builds create makefiles andmanage builds on your behalf (though you can still customize managed builds via makefile includedeclarations in auto-generated makefiles). Unmanaged builds require that you supply your own makefile.Unmanaged builds are supported for both local and remote projects.

For managed builds, you must specify one or more tool chains for use in builds when you create aproject. A tool chain is a group of tools (such as NonStop cross compilers) used to build an application fora particular target architecture. NSDEE supports both TNS/E and TNS/X tool chains, and automaticallydetects the locations of tools installed in standard locations.

Local projectsMost resources for local projects (such as source files and cross compilers) reside on your Windowssystem. Local project builds occur on Windows and are typically driven by the make program as providedby either Cygwin or Msys on Windows. NSDEE invokes make, for example, when you choose BuildProject from the Project menu.

To create a local project from scratch, select one of the following local project types from File > New:

• C Project• C++ Project• COBOL Project• pTAL Project

The type of project you choose corresponds to the compiler you want to drive the final link for the project.For executable projects, this is the compiler associated with the language of the main entry point for theexecutable. For library projects, the compiler that drives linking is less important, but Hewlett PackardEnterprise recommends selecting a project type that reflects the language most commonly used in thelibrary to be built.

Selecting a local project type from File > New menu opens a new project wizard. The following types ofprojects are available:

48 Concepts

Page 49: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

• NonStop Executable — A project that manages builds of an executable file.• NonStop Dynamic Link Library — A project that manages builds of a library that can be dynamically

loaded at run time.• NonStop Linkfile — A project that manages builds of a linkfile, which is a collection of object files that

can be linked into another project build. Linkfile projects allow you to break up your application intomultiple projects.

• NonStop Archive Library — A project that manages builds of an archive file using the ar tool.• NonStop Makefile Project — A project that does not manage builds. You must supply your own

makefile for this type of project.

To create a NonStop Makefile Project using an existing code base on Windows, select File > New >Makefile Project with Existing Code. Though you do not get the advantage of managed builds withMakefile projects, you still get other advantages the IDE provides, including use of the C/C++ indexer forC and C++ sources. For more information, see C/C++ indexer database on page 50.

Remote projectsThe resources for remote projects reside almost entirely on NonStop systems. Sources residing onNonStop systems can be edited using NSDEE on Windows in much the same way as local files areedited. NSDEE typically initiates builds on NonStop systems by invoking make (OSS) or gmake(Guardian) on a NonStop system when you choose Build Project from the Project menu.

NSDEE can locate sources for remote Guardian projects when the source locations are specified asExpand paths. Also, Guardian object files can be compiled from source files that reside on a differentsystem by using Expand paths.

To create a remote project, select File > New > Remote Makefile Project.

Remote projects support on LinuxStarting from NSDEE 6.0, you can create, build, and run remote projects from Linux. The following tasksare supported on Linux:

• Creating and modifying remote makefile projects• Opening remote files• Building and launching remote projects• Supporting remote error parser• Creating remote header and source files• Renaming files or folders• Creating files using New File option in the template wizard

Remote projects 49

Page 50: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

For more information on creating remote projects, see Creating remote projects on page 113.

C/C++ indexer databaseIn addition to basic file editing and build support, NSDEE supports using CDT's C/C++ indexer on yourlocal NonStop projects. The C/C++ indexer runs in a background thread and parses C/C++ sources tocreate a database for C/C++ searches, navigation features, and parts of the content assist feature. Theindexer is run only on C/C++ source files in local NonStop projects.

For a detailed overview of how CDT's source file parsing and indexing works, see the following Eclipsedocument on the web: Overview of Parsing.

NSDEE supports NonStop keywords in the C/C++ editor.

NSDEE built in language settingsThe C/C++ cross compiler sets some macros based on user compilation inputs. The header files usethese macros to resolve the correct function calls. The NSDEE editor which inherits from CDT does nothave the values for these macros to understand the header files.

50 C/C++ indexer database

Page 51: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Managed projectsFor each of the managed projects created or imported into NSDEE, a language setting provider iscreated:

• NonStop Builtin TNS/E Compiler Settings—For TNS/E projects• NonStop Builtin TNS/X Compiler Settings—For TNS/X projects

The provider sets the command as:

${COMMAND} ${FLAGS} -Wccombe="--list_macros" "${INPUTS}"

The information for the language settings provider can also be updated at the workspace level. All theproviders are available under the Discovery tab in Windows > Preferences > C/C++ > Build >Settings.

Managed projects 51

Page 52: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

• The –Wccombe=--list_macros option is only supported for NonStop built in compilersettings. This option is not supported elsewhere by NSDEE and the cross compilers.

• The C/C++ indexer gets symbols for system headers using the location of the NonStop toolsused by the first active build configuration. By default, the C/C++ indexer continues to use thatinitial location even if you change from a TNS/X tool chain to TNS/E or vice versa. However, thisbehavior is configurable. For more information, see NSDEE_SYS_INCLUDE_PATH on page62.

By default, this option is only run once at the workspace level. If errors are received, run the scanner forthe specific project options. To run the scanner, clear Use global provider shared between projects.

NOTE:

• Scanning and indexing the correct function calls in the editor is slower when the scanner is runfor the first time.

• To detect macros for SQL-based projects, make sure a connection to the NonStop machine isestablished.

If the Use global provider shared between projects option is unchecked, then every time a project isupdated the command runs based on the set project properties. The output of this command generatesthe macros set by the compiler. These macros are then added under Project properties > C/C++ >General > Preprocessor Include Paths, Macros etc. on the Entries tab for the editor to resolve theNonStop Macros. The command is run for both C and C++ languages for each of the projects, based onthe project language tools.

52 Concepts

Page 53: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Makefile projectsMakefile projects have no associated tool and options set. Options must be manually set by replacing ${COMMAND} and ${FLAGS} with the respective values. The default value for ${COMMAND} is c89, so thishas to be updated only if it is c99. All compiler options except for the input file and the output file must beset in the place of ${FLAGS}. For example, modify the macro resolution command as:

${COMMAND} -Wsystype=oss -Wcall_shared -Wtarget=tns/e "-I header" -Woptimize=1 -WIEEE_float -g -Wrefalign=8 -Wenv=common -Wfieldalign=auto -Wintdir=Debug/ -c -Wccombe="--list_macros" "${INPUTS}"

IMPORTANT:

For changes to take effect in both the project properties and preferences windows, click eitherApply or OK.

If allocate console in the Console view is enabled, then the command running to detect the macros isshown in the Console view as NonStop Builtin TNS/E Compiler Settings NonStop C++[<project name>] for TNS/E configurations and NonStop Builtin TNS/X Compiler SettingsNonStop C++ [<project name>] for TNS/X configurations.

The NonStop Development perspectiveThe NonStop Development perspective (Figure 6: NonStop Development perspective on page 54) isan Eclipse perspective dedicated to developing NonStop applications. The perspective default views and

Makefile projects 53

Page 54: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

layouts are similar to CDT's C/C++ perspective. In addition, most menus and toolbar actions are the sameas those in the C/C++ perspective.

Figure 6: NonStop Development perspective

ViewsThe views shown in NonStop Development perspective are:

• The NonStop Project Explorer view, which provides access to your NonStop projects and theirassociated properties and files. Also use the NonStop Project Explorer view to select projects to buildand to select build configurations to use in builds. For details, see NonStop Project Explorer view onpage 165.

• The Outline view (on the right), which shows a list of functions and fields declared in the most recentlyactive source editor. The Outline view can be used to quickly navigate to method declarations in thesource editor. For details, see Outline view on page 169.

• The Make Target view (on the right, behind the Outline view). Specify custom build targets in yourmakefiles to initiate builds of these targets from the Make Target view. These targets can be specifiedfor both managed and unmanaged builds. For details, see Make Target view on page 169.

• At the bottom, the Problems view lists build errors and warnings across all open projects. Double-clickon an error or warning to open up the file responsible for the error or warning. Temporarily removeerrors and warnings for a particular project by closing that project in the NonStop Project Explorerview.

• Also at the bottom, the Console view displays both build output and handles I/O for your applicationwhen it is launched or debugged from Eclipse. The Console view shows I/O for only one application ata time. You can switch which I/O is shown using Display Selected Console. For details, see Consoleview on page 169.

In addition to the above views, the center of the NonStop Development perspective typically contains anynumber of editors open on source files. At a minimum, source editors provide syntax highlighting. C andC++ editors also have extensive formatting options. For local projects whose C and C++ sources areindexed by CDT, source editors also provide content assist, opening function declarations, and otherfeatures available from CDT.

54 Views

Page 55: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

PreferencesPreferences allow you to change the default behavior of Eclipse. Change preference settings using thePreferences dialog box Window > Preferences.

Many preference settings in Eclipse apply to NSDEE, particularly those under the General and C/C++categories in the Preferences dialog box. Preferences specific to the NonStop Development perspectiveare available under the NonStop Development category. For more information about NonStopDevelopment preferences, see NonStop Development on page 188.

Wizards, tools, and actionsIn addition to the many wizards and tools provided by Eclipse and CDT, NSDEE provides wizards andtools created specifically for NonStop development. These are available from the NonStop Tools menu ofthe NonStop Development perspective. A number of actions available in menus and the main toolbar areenhanced to support NonStop remote development and development of programs using COBOL, pTAL,and SQL.

NonStop Tools Menu

From the NonStop Tools menu, select any of the following:

• Transfer Files — Transfer one or more files from a local project to a NonStop system.• Configure Tool Locations — Set preferences for tool locations on Windows (cross compilers, linkers,

SQL/MX preprocessors, and the location of make).• Configure Connections — Set login information and preferred communication protocols for one or

more NonStop systems.• Open Remote File — Open a remote file in the NonStop Development perspective (and optionally

edit the file).• Launch Visual Inspect — Launch Visual Inspect externally.• Import ETK Project — Import an ETK project and convert it to an NSDEE project.• Import NSDEE 2.x Project — Import an NSDEE 2.x managed make or standard make project and

convert it to an NSDEE 6.0 project.• Create TNS/X Configurations — Creates respective TNS/X configurations based on the TNS/E

configurations in the selected projects.

Toolbar iconsThe main toolbar provides these NonStop-specific actions:

Preferences 55

Page 56: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Icon Description

Opens new project or new file.

Cleans the selected project based on the active configuration of the project.

TIP:

Hover your mouse on the clean icon to view the projects on which theclean action will be implemented.

For example, consider that 'Test Project' is selected in NonStop Explorerand the active configuration for the project is Debug.

• If you hover your mouse on the clean icon, the following tool tip isdisplayed:

Clean 'Debug' for project 'Test Project'.• If you select multiple projects, the tool tip is displayed with all the

selected projects.• If there are no projects in NonStop Explorer or none of the projects in

the NonStop Explorer are selected, the Clean toolbar button isdisabled.

This feature is not available for remote makefile projects and multipleprojects with different types of projects.

Builds active configurations of selected project.

Opens Network Connections preferences.

Opens the new C++ Project wizard by default, or any of the new NonStopproject wizards you choose from the drop-down.

Opens the New Source Folder wizard by default or the New Source Folder orNew Folder wizard if you choose from the drop-down. The New SourceFolder wizards can be used for local projects only, whereas the New Folderwizard can be used for local and remote projects.

Opens the New Source File wizard by default or either the New Source Filewizard or the New File from Template wizard if you choose from the drop-down. The New Source File wizard can be used for local projects only,whereas the New File from Template wizard can be used for both local andremote projects.

Opens the New C++ Class wizard. It can be used for local projects only.

Invokes make deploy for a local project where the deploy makefile targettransfers a built executable to a NonStop server. You can choose theconfiguration to deploy in the drop-down.

Debugs configurations.

Runs configurations.

Table Continued

56 Concepts

Page 57: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Icon Description

Runs the last configuration.

Opens the File Search dialog box.

Building NonStop projectsEclipse defines two build actions that you can invoke from several places in the IDE — Build Project andClean actions. By default, these actions invoke make all and make clean respectively. In addition,Eclipse defines the actions Build All (to build all projects in your workspace) and Build Working Set (tobuild a predefined group of projects).

NSDEE adds another build action, Deploy Project, which invokes make deploy by default and is usedto transfer the result of a build to a NonStop system.

TIP:

By default, Eclipse initiates builds automatically whenever you save a source file. This works well forJava builds, but can be cumbersome for C, C++, COBOL, and pTAL builds. To turn this feature off,clear Build Automatically on the Project menu. All of these build actions are available from theProject menu, and many are also available from the main toolbar and from the context menu for theNonStop Project Explorer view.

Build configurations (local projects only)Local Windows-hosted projects allow you to define any number of build configurations, where each buildconfiguration you define targets differing build characteristics such as target architecture, debuggability,and optimization.

By default, NSDEE creates release and debug build configurations for each tool chain (TNS/E, TNS/X, orboth) you select at project creation time. You can modify these initial build configurations or add to them.For example, you could add a build configuration to build for a different platform. For details, see Buildingfor both OSS and Guardian on page 130.

Build configuration settings are actually a subset of a project's properties. To open the Properties dialogbox for a given project, select the project in the NonStop Project Explorer view and then selectProperties from the context menu. In the Properties dialog box, all build configuration settings areavailable by selecting the C/C++ Build topic on the left or one of its subtopics. (Even for COBOL andpTAL projects, build configuration settings are available via the C/C++ Build topic or one of its subtopics.)The build settings are shown on the right.

TIP:

Property pages specific to build configurations settings are easy to spot because their pages alwaysshow the build configuration selection combo box near the top and as shown in Figure 7: Buildconfiguration selection combo box on page 57. The combo box allows you to apply changes tothe chosen build configuration.

Figure 7: Build configuration selection combo box

Building NonStop projects 57

Page 58: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Building with make on WindowsTo build with make on Windows, either Cygwin or Msys must be installed. Both are available on theNSDEE installation media. The path to the bin directory containing the make program must be part ofyour PATH environment variable. A Cygwin or Msys bin directory can be added to PATH either outside ofNSDEE (for example, by adding bin to your Windows PATH) or by NSDEE prepending a bin path toPATH when builds are launched. For more information on NSDEE prepending a bin path to PATH, see NSDEE_CONN_PORT, nsdee-auth, and Deploy.jar on page 63.

SQL managed buildsNSDEE's managed builds support both SQL/MX and SQL/MP. To create a project with managed buildsthat support SQL/MX or SQL/MP, you must select the SQL/MX or SQL/MP radio button on the Initial BuildSettings dialog box of the new project wizard. When you create a project that supports SQL/MX orSQL/MP, NSDEE adds SQL tools to the tool chain for your project. For more information, see Toolchains on page 72.

SQL builds require access to a NonStop system to process SQL statements during object builds and forfinal SQL compilation. This access requires that compilers and linkers authenticate your credentialsduring builds. NSDEE provides the program nsdee-auth that obtains your password from NSDEE andpasses it to compilers and linkers during builds. For details, see NSDEE_CONN_PORT, nsdee-auth, andDeploy.jar on page 63.

IMPORTANT:

If you build an SQL/MP project behind a Windows firewall, the firewall will block Portmapper.exe.To prevent this block, create a new firewall rule to allow Portmapper.exe for both TCP and UDP.

SQL/MX preprocessor, managed build, and header filesManaged builds run the SQL/MX preprocessor on SQL/MX preprocessor files as a separate step fromsource file compilation, which results in each preprocessor run creating a source file. Because the sourcefile is derived, it is written to the output directory for the build and not the source directory where thepreprocessor file resides. For C and C++ sources, this means relative paths to header files are differentfor preprocessor files and the source files derived from them.

Environment variables and build variablesFor local projects, NSDEE sets a number of environment variables and build variables on your behalf.Build variables are internal to Eclipse and are evaluated prior to creating makefiles and launching a build.Environment variables, on the other hand, are passed to the shell in which a build is launched and areevaluated when discovered by make in makefiles.

Build variables and environment variables look similar. Build variables are enclosed in curly braces: forexample, ${VARNAME}; whereas environment variables are enclosed in parentheses: for example, $(VARNAME). The following sections describe each of the build variables and environment variablesdefined by NSDEE. The following table provides an overview of build variables and environment variablesand for which types of projects NSDEE sets these variables.

When an environment variable is added, the variable is set along with its origin type, BUILD SYSTEM, orUSER: CONFIG.BUILD SYSTEM

If an environment variable, COMP_ROOT for example, is added as part of Project creation or projectproperty modification where the variable is defined, the origin is set to BUILD SYSTEM. The variableis set to BUILD SYSTEM when NSDEE sets the variable.

58 Building with make on Windows

Page 59: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

USER: CONFIGWhen a user adds or overrides an environment variable, then the variable is added with its originmarked as USER: CONFIG. When the user updates the value of a variable, such as COMP_ROOT(which was set during project creation and hence marked as a BUILD SYSTEM), then the origin is setto USER: CONFIG. If the user deletes a USER: CONFIG variable which was updated over a BUILDSYSTEM variable such as COMP_ROOT, then that variable is reset as a BUILD SYSTEM variable withthe original definition. If the user deletes a variable which was not a BUILD SYSTEM variable (but onecreated by the user) such as, PROJECT_LIB, then the variable is deleted from the list of environmentvariables.

The origin of the environment variable has no dependency on the way the environment variable is used inthe project build.

Table 3: Build variables and environment variables

Variable Name Type Local ProjectsType

Purpose

COMP_ROOT Environment Managed,makefile

(optional formakefile)

Specifies location ofsystem headers forcross compilers.

DependencyHandling Build Managed Specifies how NSDEEhandles dependencygeneration for C/C++makefiles.

LANG Environment This variable providesinternationalizationsupport to file names.Default isLANG=C.ISO-8859-1.

MXSQLC Environment Managed,makefile

(optional formakefile)

Location of the SQL/MXpreprocessor DLL forC/C++ SQL/MX projects.

MXSQLC Environment Managed,makefile

(optional formakefile)

Location of the SQL/MXpreprocessor DLL forCOBOL SQL/MXprojects.

Table Continued

Concepts 59

Page 60: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NONSTOPOSVERSION Environment Managed,makefile

Specifies the RVUassociated with thecurrent compilers/linkerssetting in the ToolLocations projectproperty pageassociated with thecross compiler.

NSDEE_SYS_INCLUDE_PATH Environment Managed,makefile

Specifies where C/C++indexer can find systemheaders.

NSDEE_SYS_INCLUDE_PATH_ESC Environment Managed Used in C/C++ headerdependency generationto (optionally) removesystem headers fromdependency lists.

NSDEE_POSIX_BIN Environment Managed,makefile Specifies location of bin

directory for eitherCygwin or Msys. Usedto work around limitationof using Msys withDeploy.jar.

NSDEE_DEPLOY_SYSTEMNSDEE_DEPLOY_USERNSDEE_DEPLOY_DESTNSDEE_DEPLOY_FILENAME

Environment Managed,makefile

These specifyinformation about thesystem, user,destination, and filespecified in the Settings(Remote) property page.You can use thesevariables to createcustom deploy targets.

NSDEE_TOOLS_LOC Environment Managed,makefile

This variable providesnsdee-auth.exe andDepoy.jar paths in themakefiles. Hence thereis no change to thecustom makefiles evenwhen the path toNSDEE is updated.

NSDEE_CONN_PORT Environment Managed Specifies a port NSDEElistens on for remoterequests during buildsfor passwords and filetransfers.

Table Continued

60 Concepts

Page 61: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

PATH Environment Managed,makefile

(optional formakefile)

Specifies where crosscompilers and makeprogram are located.Prepending the crosscompiler bin location isoptional for unmanagedprojects. Prepending themake program binlocation is optional forboth managed andunmanaged projects.

SQLMX_COBOL_PREPROCESSOR Environment Managed Used as argument to -Wcobol="CONSULT..."for projects usingSQL/MX.

TARGET_SYSTYPE Build Managed Specifies the oss orguardian option to the-Wsystype option forcompilers and linkersand to the -q option tothe Deploy tool.

NOTE:

Many more build variables are set up by Eclipse and CDT available to use in makefiles and in theTool Settings tab of the Settings property page. These include ${ProjName} (name of yourproject), ${ProjDirPath} (full path to your project), ${ConfigName} (name of your active buildconfiguration), and many more. For details, see the Eclipse Workbench Guide or the C/C++Development User Guide.

COMP_ROOTCOMP_ROOT is an environment variable that tells cross compilers where to look for system header files.For TNS/E systems, $COMP_ROOT/usr/include is the equivalent of $SYSTEM.SYSTEM on Guardianand /usr/include on OSS. (For more information, see NonStop language programmer's guides suchas the C/C++ Programmer's Guide for NonStop Systems).

You can install multiple versions of compilers, typically under:

C:\Program Files\HP NonStop\RVU_ID

on your Windows system, where RVU_ID is the ID of the RVU a particular set of tools was released on.(For older installations, the location is C:\Program Files\Compaq ETK-NSE\Examples of actual COMP_ROOT locations:

C:\Program Files(x86)\HPE NonStop\L14.09 (RVU L14.09 for TNS/X)

C:\Program Files(x86)\HPE NonStop\J06.19 (RVU J06.19 for TNS/E)

NSDEE sets COMP_ROOT based on your choices using the following combo boxes when you create aproject:

COMP_ROOT 61

Page 62: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

The same combo boxes are available on the Tool Locations property page if you change cross compilersafter project creation.

If you choose two tool chains for a project, COMP_ROOT is defined differently for TNS/E and TNS/X buildconfigurations.

Managed builds always define COMP_ROOT. Having NSDEE define COMP_ROOT for unmanaged builds isoptional. Do not have NSDEE set COMP_ROOT if your makefile already sets it.

MXSQLC and MXSQLCOMXQLC and MXSQLCO are set to the locations of the C and COBOL versions of the DLL for SQL/MXpreprocessing named mxsqlcnt.dll based on settings in the Tool Locations property page.

NSDEE_SYS_INCLUDE_PATHNSDEE uses the NSDEE_SYS_INCLUDE_PATH environment variable to define where the C/C++ indexerlooks for system headers. NSDEE_SYS_INCLUDE_PATH is derived from the tools roots used to setCOMP_ROOT. For TNS/E and TNS/X NSDEE_SYS_INCLUDE_PATH is set to COMP_ROOT\user\include.

The value of NSDEE_SYS_INCLUDE_PATH shows up under an Includes list which looks similar to a top-level folder under a project as shown in the following example.

Project Includes folder

NOTE:

The indexer uses the NSDEE_SYS_INCLUDE_PATH associated with the first build configuration setfor a project. The indexer does not change where it looks for system headers when you change theactivate build configuration to one with a different tool chain (even though the system headers willbe different). The reason for this is that, depending on the size of your project, it can be timeconsuming for the indexer to recreate its database every time you change your active buildconfiguration.

You can change where the indexer looks using the indexer property page for a project. At the bottom ofthat page is the group box as shown previously in Project Includes folder on page 62.

By default, a fixed build configuration is used, but you can choose Use active build configuration if youwant the indexer to rebuild its database each time you change target architectures. Or, you can selectUse fixed build configuration to continue using a fixed build configuration. However, you can changewhich build configuration is used by changing the value in the combo box as shown in the followingexample.

Indexer options

62 MXSQLC and MXSQLCO

Page 63: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NSDEE_SYS_INCLUDE_PATH_ESCNSDEE_SYS_INCLUDE_PATH_ESC is passed as an argument to the grep command when generatingheader dependency files to remove system headers as dependencies. For details, see Handlingdependencies in managed builds on page 68.

PATHFor managed builds, NSDEE always prepends $COMP_ROOT/usr/bin to your PATH environmentvariable prior to starting a build. This behavior is optional for non-managed builds. (For non-managedbuilds, you can toggle this behavior in the new project wizard or in the Tool Locations property page.)

Both managed and non-managed builds optionally prepend the location of a Cygwin or Msys bindirectory (the location of make and other tools) to PATH prior to a build. You can configure this behavior inthe new project wizard or in the Tool Locations property page by either leaving the Cygwin/Msys locationcombo empty (to disable this behavior) or by setting it to either a Cygwin or Msys bin directory.

Deploy.jar and NSDEE_POSIX_BINDeploy.jar is a program that transfers files from Windows to NonStop. It is typically invoked by adeploy makefile target. Deploy.jar uses NSDEE_POSIX_BIN to workaround a limitation of launchinga Java application with the Msys bin directory first in PATH. The limitation is that Msys prepends the rootof the Msys location to UNIX-style pathnames in Deploy.jar arguments. Deploy.jar checksNSDEE_POSIX_BIN to see if it has been prepended to remote OSS paths and, if so, Deploy.jarremoves it from the path.

NOTE:

If you add Msys bin to the beginning of PATH outside of NSDEE (instead of having NSDEE dothis), you must define NSDEE_POSIX_BIN yourself in order for Deploy.jar to remove it from OSSpaths.

NSDEE_CONN_PORT, nsdee-auth, and Deploy.jarNSDEE_CONN_PORT is an environment variable that is set to a port number that NSDEE listens to for filetransfer and password requests.

Deploy.jar checks if NSDEE_CONN_PORT is set. If it is, Deploy.jar forwards the file transfer requestto NSDEE.

Deploy.jar is a program that transfers files from Windows to NonStop. It is typically invoked by adeploy makefile target. Deploy.jar checks if NSDEE_CONN_PORT is set. If it is, Deploy.jarforwards the file transfer request to NSDEE.

If NSDEE_CONN_PORT is not set (as when you invoke make outside of NSDEE), Deploy.jar checks if$HOST_PASS pass is set. If it is, Deploy.jar uses its own copy of FTP or SFTP to transfer a file anduses $HOST_PASS as the password.

nsdee-auth is a small program that also checks if NSDEE_CONN_PORT is set. If it is, it requestspasswords from NSDEE via that port. If NSDEE already has the password, it is returned on the port.Otherwise, NSDEE prompts for a password.

If NSDEE_CONN_PORT is not set, nsdee-auth checks $HOST_PASS and returns its value if set (just asDeploy.jar does when make is invoked outside of NSDEE is not set), nsdee-auth checks$HOST_PASS and returns the value if set (just as Deploy.jar does when make is invoked outside ofNSDEE).

NSDEE_SYS_INCLUDE_PATH_ESC 63

Page 64: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

nsdee-auth is invoked on compiler command lines via back-ticks to provide a password to the -Wsqluser option. For example:

c89 -Wsqlhost=pelican -Wsqluser=swdev.chloe,`nsdee-auth invoke pelican swdev.chloe` ...To view the usage message, invoke nsdee-auth with the -h option.

$ ./nsdee-auth -hUsage: C:\e3.7\eclipse\plugins\com.hp.nsdee_1.0.0\Tools\nsdee-auth.exe deploy|invoke|mpcomp host userHowever, you are not required to use nsdee-auth directly. NSDEE writes it to makefiles so the makeprogram can invoke it.

The deploy, invoke, and mpcomp arguments to nsdee-auth are only meaningful when you invokemake outside of NSDEE. When you invoke make outside of NSDEE, you must set your password as thevalue of one of the following environment variables (which make nsdee-auth pass your password totools):

SQLMX_PASS — checked by nsdee-auth for SQL/MX compiles which occur when you invoke makedeploy (nsdee-auth is passed deploy option in this case).SQLMX_INVOKE_PASS — used when SQL/MX preprocessor is invoked (nsdee-auth is passed theinvoke argument).HOST_PASS — used if none of the above are set. HOST_PASS is the environment variable you set if alltools use the same host and user settings (for simplicity).

If you fail to set one of the above environment variables when invoking make outside of NSDEE, thecommand using nsdee-auth as an argument to, -Wsqluser (for example) fails and the output includesa message such as the following from nsdee-auth:

C:\e3.7\eclipse\plugins\com.hp.nsdee_1.0.0\Tools\nsdee-auth.exe \ ERROR: Neither SQLMX_PASS nor HOST_PASS are set.

DependencyHandlingThe DependencyHandling build variable allows you to modify how NSDEE generates header filedependencies for source files in managed builds. You can set it to:

• none to turn off generation of dependencies• makeonly to limit generation of dependencies to those that can be generated without using NSDEE

(as when invoking make outside of NSDEE)• full to generate a full list of dependencies (but not system header dependencies)

System header dependencies are not generated by default. NSDEE generates them if you specifymakeonly+systemHeaders or full+systemHeaders. For details on how NSDEE generatesdependencies, see Handling dependencies in managed builds on page 68.

TARGET_SYSTYPETARGET_SYSTYPE is a build variable set by NSDEE based on your choice of OSS or Guardian radiobuttons at project creation time. ${TARGET_SYSTYPE} is the default argument for all tool options thattake oss or guardian as an argument (-Wsystype= for compiler and linker tools, -q for Deploy.jar).

This is useful when changing the target platform for a build configuration. You need only change thevariable value and not each and every instance of -Wsystype= and -q options across tools.

64 DependencyHandling

Page 65: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NSDEE_DEPLOY_SYSTEM, NSDEE_DEPLOY_USER,NSDEE_DEPLOY_DEST, NSDEE_DEPLOY_FILENAME

NSDEE defines the above four environment variables for local projects to create custom deploy targets.(For an example of this, see Creating custom deploy targets on page 151). These variables are set tothe remote settings that you specify at project creation time or via the Settings (Remote) property page.

The values set depend on whether your project builds do SQL/MX or SQL/MP compilation. The followingfigures show which fields NSDEE uses to set environment variables for projects that perform SQL/MPcompilation, SQL/MX compilation, and projects that do not perform SQL compilation.

Figure 8: Settings for projects with SQL/MP compilation

Figure 9: Settings for projects with SQL/MX compilation

NSDEE_DEPLOY_SYSTEM, NSDEE_DEPLOY_USER, NSDEE_DEPLOY_DEST,NSDEE_DEPLOY_FILENAME 65

Page 66: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 10: Settings for projects without SQL compilation

SQL/MX_COBOL_PREPROCESSOR_LOCFor COBOL projects with SQL/MX, NSDEE sets the environment variableSQLMX_COBOL_PREPROCESSOR_LOC to the location of the SQL/MX preprocessor for COBOL asspecified in the Tool Locations project property page. SQLMX_COBOL_PREPROCESSOR_LOC is used in the-Wcobol="CONSULT..." argument in the Miscellaneous page of the COBOL Compiler tool to pass thelocation of esqlcli.o as shown in Figure 11: Setting the location of SQL/MX Preprocessor forCOBOL on page 66.

Figure 11: Setting the location of SQL/MX Preprocessor for COBOL

Multi-user environmentsWhen a project is developed in a shared environment where the project sources reside on each user’sprivate Windows system, each user must customize the project settings to their individual systemenvironment. Some project properties that might need validation to customize the project buildenvironment are:

• Build Variables Project properties > C/C++ Build > Build Variables for any variables set by the user,especially variables pertaining to Paths.

• Environment Variables Project properties > C/C++ Build > Environment for any variables set by theuser, especially variables pertaining to Paths.

• Tools Location Project properties > C/C++ Build > Tool Locations for paths pointing to compilers,preprocessors and Cygwin/Msys locations.

• For Managed builds, check for path settings in:

66 SQL/MX_COBOL_PREPROCESSOR_LOC

Page 67: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

◦ Includes and Miscellaneous in Compiler or Preprocessor Settings Project properties > C/C++Build > Settings > <language> Compiler (<TNS Type>)

◦ Libraries, Miscellaneous and Other objects in Linker Settings Project properties > C/C++ Build >Settings > <language> Linker (<TNS Type>)

• If the NonStop system remote deploy is also not in a shared location, then check for customization inRemote Settings Project properties > C/C++ Build > Settings (Remote).

NOTE:

Hewlett Packard Enterprise recommends using relative paths when developing projects in a multi-developer environment.

For more details on multi-developer environments, see the Eclipse documentation Platform Plug-inDeveloper Guide > Reference > Other reference information > Multi-user installs.

Managed build makefilesWhen you initiate a build for a managed project, NSDEE generates makefiles before invoking make.Three of these makefiles are written to the top-level build directory. Typically two build configurations arecreated per architecture. If, for example, your application is built only for TNS/E, then the two top-levelbuild directories are named Debug and Release. These directories are created when you first buildusing a debug or release build configuration.

This table lists the three automatically-generated makefiles that are written to the top-level build directory:

Makefile Purpose

makefile The primary makefile for a build configuration. It contains the build rules for“all”, “clean”, and “deploy”.

objects.mk Contains definitions of USER_OBJS and LIBS, two build macros that are setto out-of-project object files and libraries, respectively, that are passed to thelinker for the final link step.

sources.mk Defines a list of source macros, such as C_SRCS, and all of thesubdirectories that contribute source code to the build.

NSDEE also creates a makefile for each source directory containing sources to be built. The sourcedirectory names and hierarchy are mirrored under a Debug or Release folder (depending on the buildconfiguration). For each such mirrored directory, NSDEE creates a subdir.mk file which contains therules for building the sources in the containing directory. Mirrored directories also contain the build outputof source built from the original source directory. Figure 12: Layout of simple project on page 68shows the layout of a simple project with one source directory named src and one top-level builddirectory named Debug.

Managed build makefiles 67

Page 68: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 12: Layout of simple project

Handling dependencies in managed buildsTo ensure C and C++ objects are rebuilt when dependent header files are changed, NSDEE adds build-rules commands to generate dependency files.

How managed makefiles create dependency filesFor C and C++, NSDEE-generated makefiles generate header file dependencies for objects by re-runningthe compiler invocation with the addition of the -WM option (so the compiler lists dependencies). Thesecond compiler invocation is part of the same build rule that builds the object file. This ensures thatevery time a particular object file is built, the header file dependencies for that file are regenerated.

The following example “Sample build rule for Door.o in subdir.mk”shows a build rule for an object filenamed Door.o in a subdir.mk file for a project named CarParts.

Sample build rule for Door.o in subdir.mksrc/Door.o: ../src/Door.cpp @echo 'Building file: $<' @echo 'Invoking: C++ Compiler (TNS/E)' c89 -Wcplusplus -g -Woptimize=1 -Ww -Wsystype=oss -c -Wversion3 -o"$@" "$<" && c89 -Wcplusplus -g -Woptimize=1 -Ww -Wsystype=oss -c \-Wversion3 -WM "$<" | grep -v -e '$(NSDEE_SYS_INCLUDE_PATH_ESC)' -e \'Door.cpp' | sed -e 's/[ ].*CarParts\\Debug\\\.\.\// ..\//g' >src/Door.d @echo 'Finished building: $<' @echo ' 'The second invocation of c89 in the above example generates a list of all headers Door.o depends on,including all system headers. By default, NSDEE does not include system headers in the final result.Including system headers as dependencies adds significant overhead to builds. If system headers (orRVUs) change, Hewlett Packard Enterprise recommends a full rebuild. However, you can turn on systemheader dependency generation. For details, see How to change or disable dependency file creation.

NSDEE writes build rules so that the compiler generates a dependency list that is piped to grep toremove system headers.

-v -e '$(NSDEE_SYS_INCLUDE_PATH_ESC)'

68 Handling dependencies in managed builds

Page 69: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

The source file -v -e Door.cpp as the dependency is specified for the .o file at the top of the buildrule.

"src/Door.o: ../src/Door.cpp"Or another example:

-e $(NSDEE_RVU) The source file -e Door.cpp as the dependency is specified for the .o file at the top of the build rule.

src/Door.o: ../src/Door.cppFollowing the grep command, the dependency list is then piped to a sed command that converts fullpaths generated by the compiler to relative paths, but only if those paths were passed to the compiler asrelative paths. (This is only important if your make program does not support Windows paths asdependencies.) Relative paths that the compiler has changed to absolute paths contain "../" or "../.." in thepath.

For example, if you added this include path to your project settings for a project named Car:

-I../../CarParts/srcThe compiler would emit a rule similar to the following for an object file (CarTest.o) that depends onDoor.h in CarParts/src:

CarTest.o: C:\Examples\MultiProjectCarApp\Car\Debug\src\../../CarParts/src/Door.hThe sed command would convert the path to:

CarTest.o: ../../CarParts/src/Door.hWhereas if you specified the full path, as in:

-IC:\Examples\MultiProjectCarApp\CarParts\srcthe compiler would emit this rule:

CarTest.o: C:\Examples\MultiProjectCarApp\Car\Debug\src\Door.hand the sed command would not change it.

NOTE:

The make program provided by Msys already provides a make program that handles Windowspaths. Cygwin does not. However, the NSDEE installation media contains a version of make youcan use with Cygwin that also works with Windows paths.

In the example “Sample build rule for Door.o in subdir.mk”, the remaining output from sed is written toDebug/src/Door.d, the same directory Door.o is written to, and the dependency file path is written toDebug/src/subdir.mk in the form:

CPP_DEPS += \ ./src/Door.dThe top-level makefile includes such dependency files using this statement:

-include $(CPP_DEPS)

How NSDEE adds rules to handle deleted headersBy default, NSDEE makes a final adjustment to dependency files after they are generated by the compilerand piped through grep and sed. These adjustments ensure that removing header files does not result inbuild failures.

How NSDEE adds rules to handle deleted headers 69

Page 70: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

For example, if CarTest.o has these dependencies:

CarTest.o: ../src/Car.hCarTest.o: ../../CarParts/src/Wheel.hCarTest.o: ../../CarParts/src/Door.hCarTest.o: ../../CarParts/src/Window.hCarTest.o: ../../CarParts/src/Engine.hand you remove the file Wheel.h, the next build of CarTest.o will fail because make will be unable tolocate Wheel.h. This is because dependency files are generated after object files are built.

So NSDEE does a final pass over dependency files to address this issue by adding dummy rules forheader files that resolve to nothing. At the same time, NSDEE cleans up the list of object files. The resulton the above example would look like:

CarTest.o: ../src/Car.h ../../CarParts/src/Wheel.h ../../CarParts/src/Door.h \ ../../CarParts/src/Window.h ../../CarParts/src/Engine.h../src/Car.h:../../CarParts/src/Wheel.h:../../CarParts/src/Door.h:../../CarParts/src/Window.h: ../../CarParts/src/Engine.h:

NOTE:

If you invoke make outside of NSDEE, the updates NSDEE makes to dependency files will notoccur. This is not a problem unless you remove a header file. You can work around this issue whendoing builds outside of NSDEE by invoking make clean and then rebuilding, or by editing out thedependencies on non-existent headers.

How SQL/MX preprocessor file header dependencies are handledFor SQL/MX preprocessor files (files ending with .ec, .eC, and so on), the SQL/MX preprocessorgenerates an initial dependency file that replaces the source file extension with .dep This extensiondifferentiates SQL/MX header dependencies from C/C++ header dependencies, which are written to fileswith the extension .d. By default, the SQL/MX preprocessor processes only SQL/MX-specific header filesusing the .mxh extension, which is the model that NSDEE supports.

NSDEE directs the SQL/MX preprocessor to write the dependency file to the output directory byspecifying the -V option to the SQL/MX preprocessor invocation. However, the dependency file generatedby the SQL/MX preprocessor is not in a form the make program can parse. To format the dependency filethat make can parse, the build rule pipes the content of the file through a series of sed commands tochange original output. Where testmx.ec is a source file and testmx.mxh and testmx2.mxh are filesincluded by testmx.ec:

C:\Users\doon\workspace\mxprog\src\testmx.ec testmx.mxh testmx2.mxhThe series of sed commands then transforms the SQL/MX dependency output to the following form:

testmx.ec: "testmx.mxh" "testmx2.mxh"Because the SQL/MX preprocessor does not specify the locations of header files, NSDEE performs afinal pass over the dependency file, adding paths to the dependencies through -I directives specified inthe invocation of the compiler.

70 How SQL/MX preprocessor file header dependencies are handled

Page 71: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

The following example “Sample build rule for testmx.c” shows the contents of a subdir.mk file with arule for building testmx.c using the source testmx.ec which has dependencies on SQL/MX headerfiles in mxprog/mxheaders.

Sample build rule for testmx.cEC_DEPS += \./src/mxprog.dep

src/testmx.c: ../src/testmx.ec @echo 'Building file: $<' @echo 'Invoking: C/C++ SQL/MX Preprocessor (TNS/E)' c89 -I"C:\Users\doon\workspace\testmx\mxheaders" -Wsystype=oss \-Wsqlmx=preprocess_only -Wsqlmx_port=18650 -Wcall_shared \-Wsqlhost=nonstopsystem.corp.net -Wsqluser=sdev.doon,\`"C:/e3.7/eclipse/plugins/com.hp.nsdee_7.0/Tools/nsdee-auth.exe"\invoke nonstopsystem.corp.net sdev.doon` -Wsqlmxadd='-c "$@" -V "$*.dep"' "$<" && \sed '2~1s/\(.*\)/"\1"/'< "$*.dep" | tr -s '\r\n' ' ' | sed 's/ /: /; s/^.*\\//' \>"$*.dep2"; mv "$*.dep2" "$*.dep" @echo 'Finished building: $<' @echo ' '

How to change or disable dependency file creationNSDEE checks the build variable DependencyHandling to determine how to write commands tomakefiles for generating dependency files. Using the Build Variables property page for your project, youcan set DependencyHandling to one of the following values:

• none to turn off generation of dependencies• makeonly to limit generation of dependencies to those that can be generated without using NSDEE

(as when invoking make outside of NSDEE)• full (the default) to generate a full list of dependencies (but not system header dependencies)

For information on setting build variables, see Setting build variables on page 126.

Setting DependencyHandling to none can be useful if you are not concerned about automaticallybuilding sources when header files change. Setting DependencyHandling to none results in fasterbuilds. However, after an initial build generates dependency files for all object files, subsequent buildsonly generate dependency files for objects that need to be rebuilt. So after an initial build, theperformance cost of generating dependency files is greatly lessened.

Setting DependencyHandling to makeonly can also result in faster builds since NSDEE does notperform a final pass over dependency files to create dummy header file dependencies.

NOTE:

Because the SQL/MX preprocessor does not include paths to .mxh header files in its dependencyoutput, using makeonly for SQL/MX builds might not result in make detecting .mxh headerchanges. Setting DependencyHandling to full causes NSDEE to post-process the output toadd paths to the header files.

To include system headers in dependency files, specify makeonly+systemHeaders or full+systemHeaders, depending whether you want NSDEE to perform final pass over the dependency filesto add dummy rules for headers.

How to change or disable dependency file creation 71

Page 72: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

If you misspell none or makeonly when setting DependencyHandling, dependency generationdefaults to full. Additionally, if you misspell +systemHeaders, no system headers are added todependency files.

Tool chainsA tool chain is a group of tools used to build an application for a particular target architecture. The term“tool chain” more specifically refers to a list of tools defined for a managed project and the options that arepassed to those tools when they are invoked during builds. To view the tool chains associated with aproject, open the Settings property page. A project can have two tool chains at most, one for TNS/E andone for TNS/X.

Tools for a simple C projectIf you create a simple C project, the tool chain consists of the following:

• C Linker• C Compiler• Deploy Tool• Profmrg Tool• Code coverage Tool

The Deploy Tool transfers the final build object of a project to a NonStop system using the programDeploy.jar, which is part of NSDEE.

The Profmrg Tool is run on the raw data files to generate a .dpi file. The output of Profmrg is a .dpifile that combines the information from all the input files. Profmrg tool requires the following inputs:

• Raw data files generated during execution of instrumented code.• (Optional) The .dpi file generated during the prior execution of the Profmrg tool.

The Code coverage Tool generates a code coverage report based on the instrumented code execution.The report comprises HTML files that you can view with any standard browser. Source files, .spi file,and .dpi file are the inputs to this tool. It simplifies the process of generating reports for all local projects.

The following example shows a TNS/E tool chain for a simple C project as it appears in the Tool Settingstab of the Settings property page.

A simple C tool chain for TNS/E

Figure 13: A simple C tool chain for TNS/E

72 Tool chains

Page 73: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Use the Tool Settings tab to customize how tools are invoked through makefiles. When you select a toolon the left-hand side of the Tool Settings page, the right-hand side shows the main page for the tool onthe right. The main page shows:

• The command invoked by the tool in the Command text box. You can change the command invokedby the tool. For example, you can invoke the linker directly instead of using c89 to invoke the linker.

• Options passed to the tool when it is invoked in the All options text box. This does not include objectsor libraries that are part of the command line. Options cannot be edited from the main page of a tool,but can be edited using the tool option categories (see Figure 14: Miscellaneous option categoryfor the C Linker on page 73.

• Build variables used to group parts of the tool command-line invocation. To reorder how the commandis invoked, rearrange these build variables. However, the command-line pattern generally does notneed to change.

To change options for a tool, select one of the option categories on the left under the main entry for thetool. That opens the corresponding page on the right. The following figure “Miscellaneous option categoryfor the C Linker” shows the Miscellaneous option category for C Linker.

Figure 14: Miscellaneous option category for the C Linker

All tools include a Miscellaneous options page to specify most tool options. Explicitly defined tooloptions, such as the Verbose check box in the "Miscellaneous option category for the C Linker" figure,are for common options and are provided for your convenience. Alternately, enter -Weld=-verbosedirectly in the additional options box.

Option categories are required for the following entities:

• Object files from other projects. Specify these objects in the Other objects list on theMiscellaneous page of linkers. See Figure 14: Miscellaneous option category for the C Linker onpage 73. Object files listed in Other objects are written to the objects.mk file, where they becomepart of the USER_OBJS definition, as in:

USER_OBJS := ../../linkfileproj/Debug/linkfile.o$(USER_OBJS) is passed to the linker in the final build step in the main makefile.

• Libraries from other projects. Specify these libraries, as well as library search paths, in theLibraries option category for linkers. Libraries listed in the Libraries option category are written to theobjects.mk file, where they become part of the LIBS definition, as in:

LIBS := -lfoo -lbar

Concepts 73

Page 74: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NSDEE prepends -l to each library added to the list of libraries. $(LIBS) is passed to the linker inthe final build step in the main makefile.

• Include paths. Specify these paths in the Includes options category for compilers. Adding includepaths this way results in the include paths being added to the top level Includes folder of your project.This causes CDT's C/C++ indexer to search your include paths for symbols in your source files.

Tools for a simple C project with SQL/MPFor projects that use SQL/MP, NSDEE provides a deploy tool and compiler tool definitions which includeSQL/MP settings. To create a project with tool definitions that include SQL/MP, select the SQL/MP buttonon the Initial Build Settings dialog box of the C Project wizard when you create a C project (see Figure15: Creating a project with SQL/MP support on page 75).

NOTE:

SQL/MP is supported only for C and Cobol projects. Additional languages can be selected in thebuild settings page for project languages other than C or Cobol.

74 Tools for a simple C project with SQL/MP

Page 75: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 15: Creating a project with SQL/MP support

Figure 16: Tools with SQL/MP settings on page 76 shows the tool chain for a simple C project withSQL/MP. The C Linker definition is the same as for the C project in the previous section. The C Compilerwith SQL/MP is similar to the C Compiler definition in the previous section. The only difference is theaddition of the SQL/MP Preprocessor option category. Selecting that option category opens the optionspage shown below.

Concepts 75

Page 76: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 16: Tools with SQL/MP settings

TIP:

Turn off SQL preprocessing options for any source file or any source directory by selecting thesource file or directory and opening the Settings page. To turn off SQL preprocessing options, clearthe Build with SQL/MP preprocessor check box.

The C SQL/MP Compile and Deploy tool is the C compiler with options for an SQL/MP compile. Becausethe procedure for an SQL/MP compile includes transferring the final build object to a NonStop system,projects built with SQL/MP do not need the NSDEE Deploy.jar program for the file transfer.

Tools for a simple C project with SQL/MXFor projects that use SQL/MX, NSDEE provides the same tool definitions as projects that do not useSQL, but also provides two additional tools; a C/C++ SQL/MX Compile tool and a C/C++ SQL/MXPreprocessor tool. To create a project with tool definitions that include SQL/MX, select the SQL/MXbutton on the Initial Build Settings dialog box of the C Project wizard when you create a C project. See Figure 17: Creating a project with SQL/MX support on page 77.

76 Tools for a simple C project with SQL/MX

Page 77: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 17: Creating a project with SQL/MX support

Figure 18: Tool chain for simple C project with SQL/MX on page 78 shows the tool chain for asimple C project with SQL/MX.

Concepts 77

Page 78: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 18: Tool chain for simple C project with SQL/MX

NOTE:

All option settings related to remote NonStop systems and locations are disabled on options pagesdue to a CDT limitation. To change values for such settings, go to the Settings (Remote) propertypages.

The C/C++ SQL/MX Preprocessor tool invokes the C compiler with options for preprocessing SQL/MXstatements in .ec or .sql files. Because the resulting .c files are products of a build, they are written tothe mirror source directory under the build directory associated with the active build configuration. Figure19: Location of SQL/MX preprocessor output on page 78 shows where the sqlmx.c file is writtenfor a Debug build of sqlmx.ec.

Figure 19: Location of SQL/MX preprocessor output

The C/C++ SQL/MX Compile tool invokes the C compiler with options for performing an SQL/MX compile.The deploy target for the main makefile or SQL/MX builds results in both an SQL/MX compile and aninvocation of Deploy.jar. Primary build targets for a C program with SQL/MX on page 78 showsan example of the primary build targets for SQL/MX projects.

Primary build targets for a C program with SQL/MX# All Targetall: sqlmx.txe

78 Concepts

Page 79: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

# Tool invocationssqlmx.txe: $(OBJS) $(USER_OBJS) @echo 'Building target: $@' @echo 'Invoking: C Linker (TNS/E)' c89 -Wsystype=oss -Wcall_shared -o "sqlmx.txe" $(OBJS) $(USER_OBJS) $(LIBS) @echo 'Finished building target: $@' @echo ' ' sqlmx_compile: sqlmx.txe @echo 'Invoking: C/C++ SQL/MX Compile (TNS/E)' c89 -Wsqlloc="/home/chloe/testdir" -Wmxcmp=replace \ -Wsqlhost=nonstopsystem.corp.net -Wsqluser=sdev.chloe, \ `"C:/e3.7/eclipse/plugins/com.hp.nsdee_1.0.0/Tools/nsdee-auth.exe" \ deploy nonstopsystem.corp.net sdev.chloe` -Wmxcmp_files="sqlmx.txe" @echo 'Finished building: $@' @echo ' ' deploy: sqlmx_compile @echo 'Invoking: Deploy Tool' java -jar "C:/e3.7/eclipse/plugins/com.hp.nsdee_1.0.0/Tools/Deploy.jar" \ -dir="/home/chloe/testdir" -r="test.txe" -q=oss -code=800 -mode=bin \ -p=22 -t=sftp -h=nonstopsystem.corp.net -u=sdev.chloe -f="sqlmx.txe" @echo 'Finished building: $@' @echo ' 'As in Primary build targets for a C program with SQL/MX on page 78, make all (Project >Build Project) builds the executable, sqlmx.txe and all dependent object files, whereas makedeploy (Project > Deploy Project) initiates an SQL/MX compile (dependent targetsqlmx_compile) followed by a file transfer using Deploy.jar.

Customizing managed buildsAlthough managed builds generate makefiles, you can still customize managed builds. NSDEE providestwo separate mechanisms for customizing managed builds. The first mechanism involves writing yourown version of top-level makefile targets. The second mechanism involves using project properties to addcommands to be invoked before and after Build Project and Deploy Project actions.

Creating custom make targetsManaged builds support customization with the following three include statements written to every top-level auto-generated makefile, one per build configuration:

-include ../makefile.init-include ../makefile.defs-include ../makefile.targets

The above include statements pull in text from the files makefile.init, makefile.defs, andmakefile.targets. NSDEE does not create any of the three files, but you can create any or all ofthem. No errors are generated if any of the three files are not present when the makefile is used.

The makefile.init file is included at the top of the top-level makefile. Use it to add your own makefileinitialization.

The makefile.defs file is included in the top-level makefile just before build targets. Use it to defineyour own makefile macros or to alter predefined macros such as those declared in the auto-generatedmake include files, objects.mk and source.mk. For example, you can add objects built by another

Customizing managed builds 79

Page 80: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

project by specifying the path to the objects using the USER_OBJS macro defined in objects.mk (asmakefile.defs is included "after" objects.mk in the top-level makefile). USER_OBJS is included onthe command-line of the final build target for a project. For details, see Adding externally-built objectsand linkfiles to managed builds on page 143.

The makefile.targets file is included at the bottom of the top-level makefile. Use it to add your ownbuild targets, which you can then build with the Make Target view by also adding your own build targetsin that view.

You can also use makefile.targets to override predefined build targets. For details, see Creating amakefile.targets file for managed builds on page 146.

Running commands before and after buildsSet up commands to run before and after builds, and before and after deploying the final build object. Figure 20: Adding pre-build and post-build steps on page 80 shows an example of using projectproperties to set simple commands to issue before and after a build.

Figure 20: Adding pre-build and post-build steps

Build Output with pre-build and post-build steps on page 80 shows the pre-build and post-buildtargets added to the main makefile on the next build as a result of setting the project properties. Thisexample also shows how the “all” target depends on “pre-build”, and the rule for the final executable(Car.txe in this case) invokes the post-build step with $(MAKE) --no-print-directory post-build.

Build Output with pre-build and post-build steps# All Targetall: pre-build main-build

# Main-build Target

80 Running commands before and after builds

Page 81: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

main-build: Car.txe

# Tool invocationsCar.txe: $(OBJS) $(USER_OBJS) @echo 'Building target: $@' @echo 'Invoking: C++ Linker (TNS/E)' c89 -Wcplusplus -Wsystype=guardian -Wcall_shared -o "Car.txe" $(OBJS) $(USER_OBJS) $(LIBS) @echo 'Finished building target: $@' @echo ' ' $(MAKE) --no-print-directory post-build . . .pre-build: -@echo 'Pre-build action' -echo "Build is starting..." -@echo ' '

post-build: -@echo 'Post-build action' -echo "Build has completed" -@echo ' '

Running commands before and after deploymentCommands can be set to run before and after deploying the final build object. Unlike pre-build and post-build steps, you must define your own pre-deploy and post-deploy targets, and can use names other than“pre-deploy” and “post-deploy” as target names.

Adding custom pre-deploy and post-deploy targets on page 81 shows adding targets using theSettings (Remote) project property page.

Adding custom pre-deploy and post-deploy targets

Running commands before and after deployment 81

Page 82: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Adding my-pre-deploy and my-post-deploy targets writes a deploy target similar to the following tothe main makefile on your next build:

deploy: Car.txe my-pre-deploy @echo 'Invoking: Deploy Tool' java -jar "C:/e3.7/eclipse/plugins/com.hp.nsdee_1.0.0/Tools/Deploy.jar"... @echo 'Finished building: $@' @echo ' ' $(MAKE) --no-print-directory my-post-deployNSDEE does not create these targets. You must create these targets in a makefile.targets file as atop-level file in the project. The main makefile includes the deploy targets defined with this method.

Sample definitions of my-pre-deploy and my-post-deploy on page 82 shows sample definitions thatprint some text, but can be defined in more useful ways.

Sample definitions of my-pre-deploy and my-post-deploymy-pre-deploy: @echo "Pre-deploying . . ." @echo "Pre-deploy complete!" @echo ' '

my-post-deploy: @echo "Post-deploying . . ." @echo "Post-deploy complete!" @echo ' '

Using NonStop projects with an SCM toolNSDEE local projects can be used with a software configuration management (SCM) tool in one of twoways. The first is to use an Eclipse plug-in provided for use with an SCM tool to check-in and check-outfiles directly in Eclipse. Examples of such plug-ins include the Subclipse plug-in for Subversion and theEclipse CVS Client for CVS. The second is to use an SCM outside of Eclipse to check-in and check-outfiles, and to import projects from the SCM file repository into the NSDEE NonStop Project Explorer forediting and building.

NSDEE saves all project information in the following files under the project directory:

• .project• .cproject• .remote

The .remote file is created, if the required option is enabled in the NonStop Developmentpreference dialog box.

These files must be checked in to your SCM repository in addition to your source files. The content ofthese files is saved whenever you change project settings or add build targets. To avoid sharing yourdeploy settings with the other developers, do not check in the .remote file to the SCM repository.

To enable viewing these files in the NonStop Project Explorer view, see Viewing project files. For anexample of using NSDEE with SCM tools, see Using NSDEE with SCM tools: examples andprocedures on page 156.

82 Using NonStop projects with an SCM tool

Page 83: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

TIP:

To ensure full repeatability of builds, in addition to saving project files in an SCM repository, add thefollowing files to SCM repository (typically after a final product build):

• System headers provided in the cross compiler installation area.• Any files you copy to your PC to use in builds such as, SPI headers and link libraries.• All makefiles (if you use makefile projects) or all makefile fragments you contribute to managed

builds such as makefile.targets.

Using Samba with NSDEENSDEE supports creating links in local projects to mapped Samba drives on NonStop systems. Theselinks appear as folders in your local projects. Creating a linked folder enables dragging and dropping filesto and from the mapped location on NonStop. For more information on creating linked folders, see Creating a linked folder.

Using Samba with NSDEE 83

Page 84: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

TasksThis chapter provides step-by-step procedures for many common tasks in NSDEE.

Configuring Tool LocationsNSDEE project properties and new project wizards present a list of available tools. Figure 21: Anexample of Tool Locations properties on page 84 shows an example of these settings as seen in theTool Locations property page for a managed project that builds an SQL/MX application. Configure thevalues available on property pages and in new project wizards using the Tool Locations preference page.

Figure 21: An example of Tool Locations properties

NSDEE automatically detects the locations of tools when the Tool Locations preference page is openedor the first local project is created. Typically, the Tool Locations preferences is only revisited when newtools are installed after creating a workspace.

Adding cross compiler locationsTo add locations of newly installed cross compilers to the NSDEE list of cross compiler locations, from theNonStop Development perspective:

1. Select Configure Tool Locations from the NonStop Tools menu.

The Tool Locations window appears and the Cross Compilers tab is selected by default.2. In the Cross Compilers tab, click Add.

The Add Cross Compiler Location dialog box appears.

Figure 22: Add Cross Compiler Location dialog box

The Location field contains the location where all NonStop cross compilers are typically installed andthe Auto-detect button is selected.

84 Tasks

Page 85: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

3. Click OK.4. Back on the Tool Locations preference page, select OK. The locations of any newly installed compilers

are added to the list.

Adding SQL/MX preprocessor locationsTo add the location of a newly installed SQL/MX preprocessor to the NSDEE list of preprocessorlocations, from the NonStop Development perspective:

1. Select Configure Tool Locations from the NonStop Tools menu.2. On the Tool Locations preference page, select the SQL/MX Preprocessors tab.3. On the SQL/MX Preprocessors page, select the Add button to open the Add SQL/MX Preprocessors

Location dialog box:

Figure 23: Add SQL/MX Preprocessors Location dialog box4. The Location field contains the location where SQL/MX preprocessors are typically installed and the

Auto-detect button is selected.

Select OK.5. Back on the Tool Locations preference page, select OK. The location of the newly installed SQL/MX

preprocessor is added to the list.

Adding Cygwin/Msys locationsTo add the bin directory location for the newly-installed Cygwin or Msys, from the NonStop Developmentperspective:

1. Select Configure Tool Locations from the NonStop Tools menu.2. On the Tool Locations preference page, select the Cygwin/Msys tab.3. On the Cygwin/Msys page, enter the Cygwin bin directory path in the Cygwin bin field or the Msys

bin directory path in the Msys bin field. Alternatively, select Browse to open a directory browser tofind the location.

4. Select OK.

Configuring connections to NonStopThe Network Connections preferences page provides a central location to add and configure networkconnections to NonStop systems. NSDEE manages NonStop system connection information usingnamed connection configurations, where the names take the form:

system_name_or_IP (user_ID_or_alias)

You can create any number of these configurations. Each configuration specifies the connection protocol(SSH/SFTP or Telnet/FTP) and any optional protocol-specific settings. Share these configurationsbetween workspaces using export and import wizards. From NSDEE 5.0 , IPv6 support is enabled.

Adding SQL/MX preprocessor locations 85

Page 86: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 24: IPv6 enablement for SSH connection or Telnet connection

Add or remove the IPv6 address using the Add or Remove Connection Configurations dialog box.

Figure 25: Add or remove IPv6 connections

86 Tasks

Page 87: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

IMPORTANT:

NSDEE does not support Windows-hosted projects (managed or makefile projects) when it isconnected to the NonStop server over an IPv6 network. Only remote (NonStop-hosted) makefileprojects are supported on IPv6.

These connection configurations are available through combo boxes in project creation wizards, projectproperties, and various tools. Figure 26: New project wizard for connection configurations on page87 shows an example of a new project wizard with a combo box containing three separate connectionconfigurations.

Figure 26: New project wizard for connection configurations

Adding network connection preferencesTo add network connections to NonStop systems, perform the following steps from the NonStopDevelopment perspective:

1. To open the Network Connections preference page, select NonStop Tools > ConfigureConnections

Adding network connection preferences 87

Page 88: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 27: Network Connections preferences page2. On the preference page, select Add/Remove3. In the Add or Remove Connection Configurations dialog box, enter an IP address or a system name in

the System field and click the Add button.

88 Tasks

Page 89: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

TIP:

If one or more remote connections are already configured and you want to reuse the settingsfrom an existing configuration, select it in the list of connection configurations, then select Copy,and then OK. As a result, the System combo contains a copy of the system name selected, theUser name field is empty, and your preferred protocol and settings are identical to the copiedconfiguration. Optionally, alter the system name and add a user name.

Figure 28: Add or Remove Connection Configurations dialog box4. To dismiss the Add or Remove Connection Configurations dialog box, select OK. The system or IP

address you entered appears in the System combo box.

TIP:

If this is the first configured connection, enter the system name in the System combo. However,you must select Add/Remove to add additional systems.

5. Enter a user name or alias in the User name field.6. Select the preferred protocol. To always use secure, encrypted authentication and for encrypted file

transfers and remote program launches, select SSH/SFTP. For information on changing protocolsettings, see one of the sections below.

7. To apply changes and dismiss the Preferences dialog box, select OK.

Changing SSH and SFTP settingsTo change SSH and SFTP settings, from the NonStop Development perspective:

1. To open the Network Connections preference page, select NonStop Tools > ConfigureConnections.

For more information, see figure Network Connections preferences page in Adding networkconnection preferences.

2. Use the System combo box to select the connection configuration to change.3. Open the Secure Shell Settings dialog box by selecting the Settings button to the right of the SSH/

SFTP button.

Changing SSH and SFTP settings 89

Page 90: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 29: Secure Shell Settings dialog box4. Actions available in the Secure Shell Settings dialog box:

• Enter the SSH/SFTP port number.

The default SSH port is 22.• Select the Use public key authentication check box for public key authentication and specify the

location of your private key file in the Private key file field.

90 Tasks

Page 91: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

Using public key authentication requires creating public/private key pairs and registering thepublic key on the connecting NonStop system. For details on how to use the SSHCOMalter command to add and register a public key, see the NonStop SSH Reference Manual.

NSDEE does not provide a facility for generating a public/private key pairs. However, thiscapability is available from the SSH2 preference page for Eclipse by selecting Window >Preferences > General > Network Connections. These SSH settings in NetworkConnections preference page are not applicable for SSH connections to the NonStopsystems.

• Change the location of the known_hosts file or disable checking the known hosts file for trustedhosts.

NOTE:

If you clear Check for known hosts, you are prompted to verify the trusted status of the hostduring every login.

5. In the SFTP-Default directories section, specify the GUARDIAN_HOME and OSS_HOME paths.

Specify these paths based on the SFTP-INITIAL-DIRECTORY set for the user in the SSH2 databaseand INITIAL-DIRECTORY set for the user in the Safeguard database. The GURDIAN_HOME pathmust start with \ or $. The OSS_HOME path must start with /. For example, you can specify:

• SSH/SFTP port as 150• GUARDIAN_HOME as =$SYSTEM.SYSTEM• OSS_HOME as =/G/SYSTEM/STARTUP

These settings are exported in the makefile.6. Select the required option in SHELL-PROGRAM list.7. After making changes, select OK to return to the Preference dialog box.8. Select OK to apply your changes and dismiss the Preferences dialog box.

For more information on SSH and SFTP, see the NonStop SSH Reference Manual.

Changing Telnet and FTP settingsTo change Telnet and FTP settings, from the NonStop Development perspective:

1. To open the Network Connections preference page, select NonStop Tools > ConfigureConnections.

For more information, see figure Network Connections preferences page in Adding networkconnection preferences.

2. Use the System combo box to select the connection configuration to change.3. Open the Telnet/FTP Settings dialog box by selecting the Settings button to the right of the

Telnet/FTP button.

Changing Telnet and FTP settings 91

Page 92: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 30: Telnet/FTP Settings dialog box4. The following table describes the settings you can change in the Telnet/FTP Settings dialog box.

92 Tasks

Page 93: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Table 4: Telnet/FTP settings

Setting Description

Telnet port field Enter port NSDEE uses to connect to the Telnet serveron the NonStop system. (Default is 23.)

FTP port field Enter port NSDEE uses to connect to FTP server on theNonStop system. (Default is 21.)

Active FTP button Select to use active protocol when opening FTP ports.

Passive FTP button Select to use passive protocol when opening FTP ports.

Save password (encrypted) button Select to save password in encrypted form after firstsuccessful login. NSDEE uses saved password forsubsequent logins.

Default (no service or window choice)button

Select when directly connecting to a STATIC windowbased on the IPv4 or IPv6 address of the client.

Service or window name button Enter the service name (such as TACL or OSH) or astatic window (such as #WIN05) to choose when loggingin.

Enter Choice> prompt combo box Choose On if Telserv is configured to show the EnterChoice> prompt during login.

Authentication combo box Choose On if Telserv is configured to prompt for username and password during login.

Login shell* combo Choose TACL or OSH, whichever is started by the loginservice. NSDEE cannot connect using a service thatdoes not start a TACL or OSH process.

5. After making changes, select OK to return to the Preferences dialog box.6. Select OK to save your changes and dismiss the Preferences dialog box.

For more information on Telserv settings, see the Telserv Manual.

NOTE:

FTP transfer issues may occur when the firewall is enabled on Windows 7 with Java 7. NSDEEdeployment may fail with the following error:

Transfer Failed: com.hp.rservices.RequestException: Unable to retrievefile.To correct this issue, open the command prompt as Run as administrator and run:

netsh advfirewall set global StatefulFTP disableOr install Java 1.6.

You must restart NSDEE for any changes to take effect.

Tasks 93

Page 94: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Enabling 256-bit encryption for SSHDue to import control restrictions, Java Cryptography Extension policy files for the Java RuntimeEnvironment do not enable 256-bit encryption by default. This means that, by default, if you connectNSDEE to a NonStop SSH server that is configured for 256-bit encryption, NSDEE displays an errordialog box with the message:

Cannot log on: Algorithm negotiation with server failed.See "Enabling 256-bit encryption for SSH" in user guide for possible fix.To verify if the SSH server is configured for 256-bit encryption, login to the NonStop system with an SSHprogram. If, for example, the server is configured to use the aes256-cbc cipher suite, a line similar to thefollowing appears after a successful login:

STN46 Secure SSH session: xterm keyboard-interactive aes256-cbc hmac-md5To enable Java (and NSDEE) to use 256-bit encryption, download "Unlimited Strength Java CryptographyExtension (JCE) Policy Files" from the following site:

Java Platform Technology Downloads

From that site, select the link that matches your version of Java:

• Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6 Java CryptographyExtension (JCE) Unlimited Strength Jurisdiction Policy Files 6

• Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6 Java CryptographyExtension (JCE) Unlimited Strength Jurisdiction Policy Files 6.0

Selecting the link downloads a zip file to your PC. The zip file contains a README.txt file that explainshow to install the policy files.

Exporting connection configurationsConnection configurations can be exported from one workspace for use in another workspace. To exportconnection configurations, from the NonStop Development perspective:

1. To open the Network Connections preference page, select NonStop Tools > ConfigureConnections.

For more information, see figure Network Connections preferences page in Adding networkconnection preferences.

2. Select Export to open the Export Connection Configurations wizard.

Figure 31: Export Connection Configurations dialog box3. In the Export to field, enter the file path to write exported configurations. Or leave the default setting,

the connections file in your home directory.

94 Enabling 256-bit encryption for SSH

Page 95: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

4. Optional: Select Overwrite existing file without asking if you are not concerned about overwriting anexisting file.

5. Click Finish.

Importing connection configurationsTo import connection configurations exported from another workspace, from the NonStop Developmentperspective:

1. To open the Network Connections preference page, select NonStop Tools > ConfigureConnections.

For more information, see figure Network Connections preferences page in Adding networkconnection preferences.

2. Select Import to open the Import Connection Configurations wizard:

Figure 32: Import Connection Configurations wizard3. In the Import from field, enter the file path containing exported connection configurations. Or leave

the default path, which is the same as the default path in the Export Connection Configurations wizard.4. Click Finish.

Updating cross compiler versionsYou can update the cross compilers, for both TNS/E and TNS/X tool chains, in all the configurations inselected projects.

NOTE: Update cross-compiler versions tool updates cross compilers for local managed andmakefile projects. The Update cross-compiler versions window displays only those projects forwhich the tool is updated.

Procedure

1. Right-click a local project and select Update cross-compiler versions.

Importing connection configurations 95

Page 96: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Or, click Project > Update Cross-compiler versions.

The Update Cross-compiler versions window is displayed with a list of projects in the presentworkspace. The projects included in the update are selected.

Figure 33: Update cross-compiler versions window2. In the Update Cross-compiler versions window:

a. Select or clear the desired projects, or click Select All to select all the listed projects.

Click Deselect All to clear all the listed projects.

96 Tasks

Page 97: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

You must select at least one project, otherwise an error message is displayed.

b. Select TNS/X tools root check box and select the required cross compiler from the drop-down.c. Select TNS/E tools root check box and select the required cross compiler from the drop-down.

If Tools Root option is enabled and the respective TNS/E, TNS/X, or both cross compilers are notconfigured, an error message is displayed. Click Configure locations to set the cross compilers.

3. Click Ok.

If the cross compilers are updated, a success message is displayed.

If you update the TNS/X cross compiler version for TNS/E projects or the TNS/E cross compilerversion for TNS/X projects, then the following warning message is displayed:Cross-compilerversion has not been updated for any projects as the criteria does notmatch.If you update the TNS/X cross compiler version for a set of projects, some of which could be onlyTNS/E project or vice versa, then the following warning message is displayed:Cross-compilerversion have been updated for selected projects except Project names ofprojects whose cross compiler version has not been updated.

Creating TNS/X configurations for existing TNS/Econfigurations

You can create TNS/X configurations based on existing TNS/E configurations in a project.

IMPORTANT:

This tool is only supported on managed projects. It is disabled for all makefile and remote projects inthe workspace.

To invoke this tool, right-click a project and select Create TNS/X Configurations.

Figure 34: Create TNS/X configurations

Alternatively, this tool can be selected from the Project menu item.

Creating TNS/X configurations for existing TNS/E configurations 97

Page 98: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

When the TNS/X configuration is successfully created, a confirmation message appears.

New configurations are created with the _Tnsx suffix.

The property pages contain all the TNS/X tools and options.

98 Tasks

Page 99: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 35: TNS/X properties pages

Importing Projects

Preparing to import projectsBefore you use the import projects wizard, plan the process for importing projects.

• Before importing ETK or NSDEE 2.x projects, decide where the NSDEE projects will reside.

Copying ETK or NSDEE 2.x projects into your workspace only works well for ETK or NSDEE 2.xprojects that are self-contained, with all project files under a top-level project directory. If you want yourNSDEE projects to point to files already under source control, do not use the Copy projects intoworkspace option in the import wizard. Point your project to the location of the files under sourcecontrol. NSDEE does not change your project structure, however it adds .project, .cproject,and .remote as top-level project files.

NOTE:

The .remote file is created, if the required option is enabled in the NonStop Developmentpreference dialog box. For more information, see NonStop Development.

• HPE recommends a trial run of importing projects to NSDEE to identify outstanding issues after theimport process. After importing the projects, the import wizard points to a log file containing errors orwarnings. After resolving these errors and warnings, try building each imported project one at a timeand review issues, if any.

• Verify that ETK or NSDEE 2.x macros are successfully mapped to NSDEE equivalents, build variablesin Eclipse. For information on viewing project build variables, see Setting build variables on page126.

If the cross compiler set in the ETK or NSDEE 2.x project being imported is not configured in the currentNSDEE workspace, the cross compiler value is changed to the default workspace level configuration anda warning message displays the default cross compiler value set for the project. The selected make toolconfiguration (Cygwin or Msys) is applied for all imported projects.

If the respective connection configuration to the remote NonStop system is not configured beforeimporting, then the connection protocol will default to SSH/SFTP.

NOTE:

Import tools support only TNS/E based projects.

Importing Projects 99

Page 100: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

For insolvable problems with imported ETK and NSDEE 2.x projects, Hewlett Packard Enterpriseencourages you to contact your Hewlett Packard Enterprise Support representative.

Importing ETK projectsNSDEE provides an import wizard (Figure 36: Import ETK Projects wizard on page 100) to automatemigration of ETK projects to managed build NSDEE projects. The import process examines ETK projectproperties, such as tool option settings and build macros, and applies them to newly created NSDEEprojects. You can migrate ETK projects to TNS/X directly. This option, when selected, enables importedprojects to add TNS/X configurations based on TNS/E configurations in the project.

IMPORTANT:

This tool only supports importing projects from ETK R3.2 or later. All ETK R3.1 or earlier projectsmust be migrated to R3.2 before using this tool.

The ETK macros SolutionExt, ETKInstallDir, and macro names that begin with CORBA arenot supported and are not set in imported ETK projects.

Figure 36: Import ETK Projects wizard

Eclipse and NSDEE projects have more constrained structures than ETK projects. NSDEE projects aretypically confined to the directory structure under the top-level directory of the project. Build output istypically written to a subdirectory of the project and external project files are referenced in compiler andlinker options and are not directly part of the project.

ETK project structures are less constrained and can vary greatly among solutions. Build output is oftenwritten outside of projects, and the files shown as part of the project often do not actually exist under theproject directory.

100 Importing ETK projects

Page 101: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

IMPORTANT:

Migration of Visual Studio, CORBA, and TNS/R-specific projects is not supported.

Importing one or more ETK projectsTo import one or more ETK projects associated with a solution, from the NonStop Developmentperspective:

1. Select Import ETK Projects from the NonStop Tools menu.2. In the Import ETK Projects wizard, enter the path of the solution file associated with the ETK

projects. Or select Browse to browse for the solution file.

The Projects list automatically lists and selects all projects associated with the solution file.3. Clear any projects in the Projects list that you do not want to import.4. Optional: Select the Copy projects into workspace check box only if you want NSDEE to copy the

contents of ETK projects into your workspace. Otherwise, clear the check box.5. Optional: Select Hide projects that already exist in the workspace check box.6. Select Create TNS/X Configs for selected projects check box to create TNS/X configurations for all

projects selected for migration based on the TNS/E configurations in the respective projects.

NOTE:

Macros resolved for TNS/E are also resolved for TNS/X and set in the Build Variables.

7. Optional: Select Add project to working sets. For information on working sets, see the EclipseWorkbench Guide.

8. Click Finish to import all selected ETK projects.

If the import completes without errors or warnings, NSDEE displays a confirmation message, which youcan dismiss by selecting OK.

Migration of TNS/R-specific ETK projects is not supported. The following error message appears if youattempt to import a TNS/R-specific ETK project to NSDEE 7.0.

Importing NSDEE 2.x projectsTo convert NSDEE 2.1 or 2.0 local projects to NSDEE 7.0 projects, use the Import NSDEE 2.x Projectswizard. For details, see Figure 37: Import NSDEE 2.x Projects wizard on page 102. The import wizardconverts NSDEE 2.x local projects to NSDEE 7.0 projects.

You can add TNS/X configurations based on TNS/E configurations for imported projects during migration.

Importing one or more ETK projects 101

Page 102: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

• NSDEE 2.x local projects cannot share the same workspace with an NSDEE 7.0 project with thesame name. To import an NSDEE 2.x project as an NSDEE 7.0 project, you must import theNSDEE 2.x project into another workspace.

• NSDEE 2.0 remote projects cannot be directly imported into NSDEE 7.0. They must be importedinto NSDEE 2.1 first, then imported into NSDEE 7.0.

• You can import NSDEE 2.1 remote projects into an NSDEE 7.0 workspace using the normalimport mechanism. For details, see Importing external NSDEE projects on page 103.

• NSDEE 3.0 and later versions projects share a common project format and are compatible witheach other.

Figure 37: Import NSDEE 2.x Projects wizard

To import one or more NSDEE 2.x local projects and convert them to NSDEE 7.0 projects, from theNonStop Development perspective:

1. Select Import NSDEE 2.x Projects from the NonStop Tools menu.2. In the Import NSDEE 2.x Projects wizard, enter the root directory to search for NSDEE 2.x projects or

select Browse to browse for the root directory.

The Projects field automatically lists and selects all NSDEE 2.x local projects under the root directory.3. Clear any projects in the Projects list that you do not want to import.4. The Search for nested projects option searches for nested projects inside the path passed and

shown in the list of projects to be imported.5. If you want the import process to also copy project files into your current workspace, select the Copy

projects into workspace check box. Otherwise, verify the check box is not selected if you want yourworkspace to use the project files at their current location.

6. Optional: Select Hide projects that already exist in the workspace check box.

102 Tasks

Page 103: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

7. Select Create TNS/X Configs for selected Projects to create TNS/X configurations for all projectsselected for migration based on the TNS/E configurations in the respective projects.

NOTE:

Macros resolved for TNS/E are also resolved for TNS/X and set in the Build Variables.

8. Select Add project to working sets if desired. For information on working sets, see the EclipseWorkbench Guide.

9. Click Finish to import all selected NSDEE 2.x projects as NSDEE 7.0 projects.

If the import completes without errors or warnings, a confirmation message appears. Dismiss the dialogbox by selecting OK.

Migration of TNS/R-specific NSDEE 2.x projects is not supported. An error message appears if youattempt to import a TNS/R-specific NSDEE 2.x project to NSDEE 7.0.

Importing external NSDEE projectsWhen importing a project or opening a new workspace, NSDEE first runs a check to confirm if a crosscompiler path is already configured in the present workspace. If the path is configured, then that path isset as COMP_ROOT. If the path is not configured, a corresponding path with the same RVU is determinedand set as the new COMP_ROOT. The COMP_ROOT configuration is used to update the followingenvironment variables:

• PATH• NSDEE_SYS_INCLUDE_PATH• NSDEE_SYS_INCLUDE_PATH_ESCOnce the environment variables are updated, the Tool Locations tab of the Project properties isautomatically updated to the configured cross compiler and the project is ready to be built. The samecheck is run for preprocessor path while importing a project. The environment variables updated are:

• MXSQLCO• MXSQLC• SQLMX_COBOL_PREPROCESSOR_LOCTo import existing NSDEE 7.0 projects into your current workspace:

1. Select Import from the File menu.2. In the Import wizard, select General > Existing Projects into Workspace, then click Next.3. In the field next to the Select root directory button (which is selected by default), enter the root

directory to search for NSDEE 7.0 projects, or select Browse to browse for the root directory. TheProjects list automatically lists and selects all NSDEE 7.0 projects under the root directory.

4. Clear any projects in the Projects list that you do not want to import.5. If you want the import process to also copy project files into your current workspace, select the Copy

projects into workspace check box. Otherwise, verify the check box is not selected if you want yourworkspace to use the project files at their current location.

6. Select Add project to working sets if desired. For information on working sets, see the WorkbenchUser Guide.

7. Click Finish to import all selected NSDEE 7.0 projects into your current workspace.

Importing TNS/R projectsAlthough NSDEE 7.0 does not support TNS/R projects, they can be imported using the Eclipse importwizard (General > Existing Projects into Workspace) or by using the workspace prior to NSDEE 7.0.The TNS/R projects will be in a closed state. The user will not be able to build these projects.

Importing external NSDEE projects 103

Page 104: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Creating projectsThis section provides general steps for creating NSDEE local and remote projects. For specific examplesof creating different project types, see Getting started on page 13.

Creating Windows-hosted projects with managed buildsTo create a Windows-hosted project with managed builds using cross compilers and tools, from theNonStop Development perspective:

1. Select one of the following menu items from the New submenu of the File menu:

• C Project• C++ Project• COBOL Project• pTAL Project

A new project wizard opens, such as the NonStop COBOL Project wizard, that is specific to thechosen menu item.

104 Creating projects

Page 105: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

2. Enter a project name in the Project name field.3. To create the project in a non-default location, clear the Use default location check box and enter a

path in the Location field. Or, select Browse to browse for a path.4. Expand any of the following folders in the Project type list and select Empty Project.

You can optionally create a Hello World program in the NonStop Executable folder.

The folders represent the following types of managed projects:

• NonStop Executable — A project that builds an executable file.• NonStop Dynamic Link Library — A project that builds a library that a program can load at run

time.• NonStop Linkfile — A project that combines object files into a single linkfile that can link with a

final executable built in another project.• NonStop Archive Library — A project that builds an archive library.• NonStop Makefile Project — An application using a makefile provided by you.

Tasks 105

Page 106: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

5. Select either one or both tool chains in the Toolchains list, depending on whether you want to buildfor TNS/E, TNS/X, or both.

6. To continue to the Initial Build Settings page of the wizard, click Next.

The Initial Build Settings page (COBOL executable project) is displayed.

7. In the Initial Build Settings page, specify the following.

a. In the Target platform row, choose the project platform by selecting either the OSS or Guardianbutton.

This selection determines the initial value of the TARGET_SYSTYPE macro, which is the defaultargument passed to -Wsystype= (for compiler and linker invocations) and -q (for Deploy toolinvocations).

b. If you chose the TNS/E tool chain and your project will use C or C++, then choose the c89 or c99button in the TNS/E or TNS/X compiler row to indicate the C/C++ cross compiler for builds. Thisoption is disabled if you are creating a COBOL or pTAL project without C or C++ as additionallanguages.

106 Tasks

Page 107: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

c. Depending on your tool chain selections, a TNS/E tools root row, a TNS/X tools root row, orboth are displayed. Select the root directories of the RVUs to build your project for TNS/E andTNS/X. If the tools root combo box is empty, select the Configure locations link to establish thecross compilers and tools locations on your system.

d. In the Cygwin/Msys bin row, select a bin directory for Cygwin or Msys if you want NSDEE toprepend the bin path to PATH prior to builds. Leave the setting blank if you added Cygwin orMsys bin to PATH yourself and NSDEE inherits the PATH setting. If no Cygwin or Msys bin isavailable in the Cygwin/Msys bin combo box, select the Configure locations link to establishthe location of Cygwin or Msys.

e. In the Additional languages row, choose any additional languages you intend to use in theproject. This results in the addition of cross compilers to the project tool chain. You can add toolsafter project creation using the Tool Chain Editor property page.

f. In the SQL tools row, select SQL/MX or SQL/MP if the project source contains SQL statements.This results in the addition of SQL-specific tools being to the project tool chain.

g. If you chose the SQL/MX button in step 13, the SQL/MX Preprocessor Locations group box isenabled. The fields in the group box specify the location of the SQL/MX preprocessors for C/C++and COBOL. If the fields are empty, select Configure locations to establish their location.

8. To continue to the Remote Settings page, click Next.

The settings on this page (shown here for a NonStop COBOL project) are optional and can also beset after project creation using the Settings (Remote) project property page.

Tasks 107

Page 108: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

The Remote Settings page contains tabs if you selected both TNS/E and TNS/X tool chains (one foreach platform). On this page, enter the NonStop system to deploy the project-built object, as well asthe location on the system. This page also contains additional settings for SQL compilation andpreprocessing if you selected SQL/MX or SQL/MP on the previous page.

9. Click Next.

The Code Coverage Settings dialog box appears.

108 Tasks

Page 109: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

To enable code coverage:

• Select Enable code coverage for below configurations* check box and select the requiredconfigurations.

• Optional: Specify the Profmrg options.• Optional: Specify the Code coverage options.

For more information, see Code coverage basics.10. To continue to the Select Configurations page, click Next.

For details, see Figure 38: Select Configurations page (managed build project) on page 110.This page shows the default build configurations created. Clear any build configurations you do notwant included in your project. This page is provided by CDT. For more information, see the C/C++Development User Guide.

Tasks 109

Page 110: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 38: Select Configurations page (managed build project)11. Click Finish to dismiss the wizard and create your project.

Creating Windows-hosted makefile projectsTo create a Windows-hosted project for which you will supply the makefile, perform the following stepsfrom the NonStop Development perspective:

1. Select one of the following menu items from the New submenu of the File menu:

• C Project• C++ Project• COBOL Project• pTAL Project

A new project wizard is opened, such as the NonStop COBOL Project wizard, that is specific to thechosen menu item.

110 Creating Windows-hosted makefile projects

Page 111: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

For projects containing a main entry point, choose a menu item that matches the main entry pointlanguage. For projects not containing a main entry point, choose a menu item that matches thepredominant project language.

2. Enter a project name in the Project name field.3. To create the project in a non-default location, clear the Use default location check box and enter a

path in the Location field, or select Browse to browse for a path.4. Expand the NonStop Makefile Project folder in the Project type list and select Empty Project.5. Select either one or both tool chains in the Toolchains list, depending on whether you want to build

for TNS/E, TNS/X, or both.6. Click Next to continue to the Initial Build Settings page of the wizard.

The Initial Build Settings page (makefile project) is displayed.

7. Depending on your tool chain selections, a TNS/E tools root row, a TNS/X tools root row, or bothare displayed. Select the root directories of the RVUs to build your project for TNS/E and TNS/X. If atools root combo box is empty, select the Configure locations link to establish cross compiler andtools system locations. These settings are used to determine where the C/C++ indexer looks forsystem headers and, optionally, to set COMP_ROOT.

8. In the Cygwin/Msys bin row, select a bin directory for Cygwin or Msys if you want NSDEE toprepend the bin path to PATH prior to builds. Leave the setting blank if you added Cygwin or Msysbin to PATH yourself and NSDEE inherits the PATH setting. If no Cygwin or Msys bin is available in

Tasks 111

Page 112: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

the Cygwin/Msys bin combo box, select the Configure locations link to establish the location ofCygwin or Msys.

9. Clear the Set COMP_ROOT environment variable to tools root above check box if you do notwant NSDEE to set COMP_ROOT. This setting is useful if your makefile already sets COMP_ROOT.

10. To continue to the Select Configurations page, click Next. The Select Configurations page(makefile project) is displayed. This page shows the default build configurations created (one pertool chain for makefile projects). Clear any build configurations you do not want included in yourproject. This page is provided by CDT. See the C/C++ Development User Guide for moreinformation.

11. Click Finish to dismiss the wizard and create your project.

Creating Windows-hosted projects from existing sourceTo create a project using an existing source base, perform the steps in one of the following procedures:

• Creating Windows-hosted projects with managed builds on page 104• Creating Windows-hosted makefile projects on page 110

with a slight change to change to step 3. Clear the Use default location check box and enter the path tothe existing code base in the Location field, or select Browse to browse for the location. All other stepsare the same.

For an existing code base with a makefile, you can also create a project using the Import Existing Codewizard, which creates a project with a single build configuration. From the NonStop Developmentperspective:

112 Creating Windows-hosted projects from existing source

Page 113: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

1. Select Makefile Project with Existing Code from the New submenu of the File menu to open theImport Existing Code wizard (Import Existing Code wizard settings).

Figure 39: Import Existing Code wizard2. Enter a project name in the Project Name group box.3. Enter the location of your source base in the Existing Code Location group box, or select Browse to

browse for the location.4. In the Tools root row, select the root directory of the RVU to build your project. If the tools root combo

box is empty, select the Configure locations link to establish the cross compiler and tools systemlocation. This setting determines where the C/C++ indexer looks for system headers and, optionally,sets COMP_ROOT.

5. In the Cygwin/Msys bin row, select a bin directory for Cygwin or Msys if you want NSDEE toprepend the bin path to PATH prior to builds. Leave the setting blank if you added Cygwin or Msysbin to PATH yourself and NSDEE inherits the PATH setting. If no Cygwin or Msys bin is available inthe Cygwin/Msys bin combo box, select the Configure locations link to establish the location ofCygwin or Msys.

6. Clear the Set COMP_ROOT environment variable to tools root above check box if you do not wantNSDEE to set COMP_ROOT This setting is useful if your makefile already sets COMP_ROOT.

7. Click Finish to dismiss the wizard and create your project.

Creating remote projectsTo create a remote makefile project with new or existing sources, from the NonStop Developmentperspective:

Creating remote projects 113

Page 114: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

1. To open the Remote Makefile Project wizard, select Remote Makefile Project from the Newsubmenu of the File menu.

Figure 40: Remote Makefile Project wizard2. Enter a project name in the Project name field.3. Select the remote NonStop project host system using the Build system combo box. To add systems

to the combo box, select Edit to open Network Connection preferences.4. In the Platform row, select OSS to use OSS tools, or Guardian to use Guardian tools.5. Enter the project file system location in the Project location field, or select Browse to browse for the

location.

NOTE:

Enter the Guardian project location in the format [\<systemname>.]$<volume>.<subvol>. You can browse and add a folder to the Remote Project fromExpand NonStop systems.

6. If the Connect to Build System button is enabled, select it now to establish a connection to theremote NonStop system you specified in step 3.

7. Under Referenced remote makefile projects, select any remote projects that must build before thisproject. To continue to the Select Configurations page, click Next. For details, see Figure 38: SelectConfigurations page (managed build project) on page 110. This page shows the default buildconfigurations created. Clear any build configurations you do not want included in your project. Thispage is provided by CDT. For more information, see the C/C++ Development User Guide.

8. Click Next to continue to the Build Settings page. Figure 41: Build Settings page on page 115shows the Build Settings page as it appears if you selected the Guardian platform in step 4.

114 Tasks

Page 115: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 41: Build Settings page9. Optional: Set a non-default build command and non-default Build and Clean makefile target names.10. If a makefile does not exist under the remote project location, select the Create makefile check box

to have NSDEE create an empty makefile for you.11. If you selected the Guardian platform in step 4, select the default editor to open Guardian source files

in the Default editor combo box. This generates extensions for source files in remote projects. Forexample, if you choose the C editor, all sources in a Guardian project are shown with a .c extension.CDT uses file extensions to determine which default editor opens a file.

12. Click Finish to dismiss the wizard and create your project.

NOTE:

For multiple language Guardian remote projects, you might find some errors in NSDEE for non-project language. For example, consider a C++ source file in a C Guardian project on NonStop.When the C++ source file is opened in NSDEE, some syntax errors might be marked even when thesyntax is correct. This is because NSDEE does not support multiple language Guardian remoteprojects.

Launching a NonStop application from NSDEETo launch a NonStop application from NSDEE, create a run configuration using the Run Configurationsdialog box:

Launching a NonStop application from NSDEE 115

Page 116: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 42: Run Configurations dialog box

After a run configuration is created and saved, it can be used to run applications without changinginformation in the run configuration.

The following sections describe:

• Creating a run configuration on page 116• Launching an application using a saved run configuration on page 126

Creating a run configurationTo create a run configuration, perform the following steps from the NonStop Development perspective:

1. Select Run Configurations from the Run menu of the main menu bar to open the Run Configurationsdialog box.

2. Double-click NonStop Application in the list of run configuration types on the left side of the dialogbox (or select NonStop Application and then select New from the context menu). This will create anew run configuration on the right that has tabbed pages named Main, Arguments, Environment,and Common (see Figure 42: Run Configurations dialog box on page 116).

3. In the Name field above the tabbed pages, enter a name for your new run configuration (or leave thedefault, New_configuration).

4. In the Main tabbed page:

a. Select the launch type (Guardian or OSS).b. Enter the name of an NSDEE project in the NonStop project field (or select Browse to select from

a list of NSDEE projects).c. Select a system from the NonStop system combo box. (Select Edit.. to open Network

Configurations preferences to add a connection configuration.)

116 Creating a run configuration

Page 117: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

d. Enter a path to the executable you want to run in the NonStop executable's path on NonStopsystem field (or select Browse to browse for executables on the remote system).

e. Optional: If the program you want to run is on your local Windows system and you want to transferit to the NonStop system prior to launching it, select the check box for Local executable to betransferred to NonStop path specified above, then enter the local path of the executable (orselect Browse to browse for the executable).

NOTE:

This option is disabled for remote projects. Do not select this option for SQL/MP or SQL/MXprojects. To transfer SQL/MP and SQL/MX project files to the NonStop system, use DeployProject in the NonStop Project Explorer view.

5. To enter run command options, program arguments, or to select a non-default remote workingdirectory:

a. Select the Arguments tab to show the Arguments page:

Figure 43: Arguments pageb. Enter run command options in the Run command options text field. You can enter options on

more than one line, as any new lines will be converted to spaces when your program is run.c. Enter program arguments in the Program arguments text field. You can enter arguments on

multiple lines, as any new lines will be converted to spaces when your program is run.d. Select Set initial $volume.subvolume (or Set working directory if you selected the OSS

platform) that will be the working directory for your program (or select Browse to browse theremote system for a working directory).

6. Optional: To set environment variables (OSS) or DEFINEs, ASSIGNs, and PARAMs (Guardian) priorto launching your application:

a. Select the Environment tab to show the Environment page.

Figure 45: Environment page for Guardian launches on page 118 shows the Environment pagefor OSS launches. Figure 44: Environment page for OSS launches on page 118 shows theenvironment tab for Guardian launches.

Tasks 117

Page 118: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 44: Environment page for OSS launches

Figure 45: Environment page for Guardian launchesb. Select the top radio button to enter environment variables settings (OSS) or DEFINEs, ASSIGNs,

and PARAMs settings (Guardian) directly in the text box below it. For OSS, these settings will beissued directly in the shell. Be sure to use export so that your application will inherit settings, asin, for example:

export MY_PROGRAM_VAR="somevalue"For Guardian DEFINEs, ASSIGNs, and PARAMs, list them as you would enter them at a TACLprompt.

Alternatively, you can specify your environment settings in a file on the remote system, select thebottom radio button, and below the button enter the path of the remote file (or select Browse tobrowse for it).

• For OSS, the remote file is executed using this syntax:

$ . /path/to/remote/file• For Guardian, the remote file is executed using obey:

TACL>obey $volume.subvol.rfile7. Optional: The Common page is provided by CDT and is documented in the C/C++ Development User

Guide.

118 Tasks

Page 119: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

Standard Input and Output options and the Launch in background option are ignored for NSDEEprojects. Those options are specific to applications run locally on Windows.

8. To save your new run configuration, you can select Run, which will both save the run configurationand launch your application. Alternatively, you can select Apply and then Close to save your runconfiguration but postpone launching your application.

Running an application as a TS/MP serverNSDEE 7.0 introduces a new feature to run applications as a TS/MP server. This feature is accessedusing the Run Configurations dialog box. Several parameters must be provided to configure and run theTS/MP server. The following sections describe the tabbed pages in the Run Configurations dialog boxthat require input from the user:

• Main• TS/MP Server• Arguments• Environment• Common

Run TS/MP Server: Main tabSelect SET SERVER PROCESSTYPE to determine whether the processtype is Guardian or OSS. SelectNonStop executable's path (SET SERVER PROGRAM). The remaining fields are the same as NonStopApplication run launch. For information, see Creating a run configuration on page 116

Running an application as a TS/MP server 119

Page 120: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Run TS/MP Server: Server tabThe TS/MP Server tab is divided into 3 groups:

1. Pathmon Process2. Server Class3. Server Attributes

Pathmon Process

The Pathmon Process name is a mandatory field and must be started on the NonStop system by theuser.

The process name can be preceded with a “$”, or click Browse. The dialog box lists all the Pathmonprocesses running on the host for the selection. The filter can be used to sort the results. The server classis configured in this Pathmon process.

120 Run TS/MP Server: Server tab

Page 121: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

If the process browser is invoked and no Pathmon processes are running on the NonStop host, anerror message appears.

Server Class

The Server Class name is mandatory. NSDEE uses this name to configure the server class on theselected Pathmon process. If no Server Class name is entered, an error message appears.

The Server Status radio button determines the status of the server. For server status New, NSDEE allowsthe user to configure all the server attributes, arguments, and environment. The optional Delete theserver class, if exist check-box is enabled.

If the run is launched with server status New, NSDEE issues commands:

• add server <server-class name>• start server <server-class name>

If Delete the server class, if exist is selected, NSDEE tries to stop and delete the server before startingthe server. For Server Status Restart, all the fields are disabled. Only the modified executable can bedeployed. NSDEE issues commands:

• freeze server <server-class name>• stop server <server-class name>

If the Local executable to be transferred to NonStop path specified above option was selected in theMain tab, NSDEE transfers the modified executable and issues commands:

Tasks 121

Page 122: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

• thaw server <server-class name>• start server <server-class name>

Server Attributes

The Server Attributes group configures the server parameters. The following options are provided:

• Configure parameters from Add commands• Configure parameters using Guardian script file. The local file can be transferred to the Guardian

location.

To configure parameters from Add commands, the wizard lists a limited set of server attributes withdefault values. These attributes can be selected or cleared and values can be modified. To populate theselected values into the text box, click OK.

To configure parameters from a Guardian script file, choose from a script file. The script file shouldcontain all the server attributes without the following commands:

• Add server• Start/stop server• Freeze/thaw server

NSDEE uses the obey <script-file> command to execute the script file. For a remote Guardian file,click Browse and choose a file from the dialog box.

122 Tasks

Page 123: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

If a remote file is not specified, an error message appears.

If the Local file to be transferred to Guardian path specified above option is selected, choose thelocal file. The local file is transferred and “obeyed” using Pathcom. Select the local file using the Opendialog box. After selection, the absolute path of the file is populated into the text box.

If the local file does not exist, an error message appears.

If server attributes are not specified from one of the above methods, an error message appears.

Run TS/MP Server: Arguments tabThe Arguments tab is optionally used to pass the values for SET SERVER ARGLIST (OSS) or SETSERVER STARTUP (Guardian).

The label automatically changes its name to ARGLIST or STARTUP according to the NonStop TS/MPServer type from the Main tab.

In the text box, provide only the values of ARGLIST or STARTUP. NSDEE internally prefixes thecommand SET SERVER ARGLIST or SET SERVER STARTUP to the values passed in the text box.Provide the values without any spaces and on one line. Valid argument values:

• -1,process/log,-t• -Djdbcmx.schema=catalog.schema,-Djdbcmx.maxStatements=50,-

Djdbcmx.minPoolSize=25,-Djdbcmx.maxPoolSize= 25,-Xmx128m,-Xms128m,-XX:MaxPermSize=48m,-DenableMFC=ON,-DcompiledModuleLocation=/home/mfcfiles/

NonStop TS/MP Server type is OSS:

Run TS/MP Server: Arguments tab 123

Page 124: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NonStop TS/MP Server type is Guardian:

Run TS/MP Server: Environment tabThe Environment tab is optionally used to pass the values for SET SERVER ENV and SET SERVERDEFINE. SET SERVER ENV is disabled for Guardian Server type. In the text box, provide only the valuesfor SET SERVER ENV and SET SERVER DEFINE. NSDEE internally prefixes the command SETSERVER ENV and SET SERVER DEFINE to the values passed in the text box. Use enter or line break ifthere is more than one ENV or DEFINE.

Valid ENV values:

• (more than 1 ENV value)• Hangaround=true• CLASSPATH=/home/lib/user.jar:/home/lib/user2.jar:• Trace=1

Valid DEFINE Values:

• (more than 1 DEFINE value)• =EMP, CLASS MAP, FILE \SYS.$D.APPL.EMP• =parts, CLASS MAP, FILE $DATA.REG.PRTFIL

For OSS:

124 Run TS/MP Server: Environment tab

Page 125: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

For Guardian:

Run TS/MP Server: Common tabThe content on the Common tab is the same as NonStop Application run launch. For information, see Creating a run configuration on page 116.

Limitations1. The Pathmon process must be started on NonStop by the user. The process must be stopped

manually.2. The Add commands dialog box has a limited set of Server attributes and pathway attributes are not

supported. However, as a workaround add those parameters in a script file and choose the usingscript file option.

3. The Alter and Like commands are not supported.4. The script file option only supports Guardian files.5. NSDEE does not support stopping the server classes unless it is part of a restart.

Run TS/MP Server: Common tab 125

Page 126: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Launching an application using a saved run configurationAfter you save a run configuration, you can reuse it to launch your application without having to re-specifythe details of the launch.

If for example, you named your run configuration CarTest, you could then launch your application ineither of the following ways:

• Select Run > Run History > CarTest (as shown in Figure 46: Launching a saved run configurationon page 126)

Figure 46: Launching a saved run configuration• Select CarTest from the drop-down menu of the run icon in the main toolbar:

Figure 47: Selecting a program to run

Setting build variablesAs described in Environment variables and build variables on page 58, build variables are evaluatedby Eclipse prior to launching a build, so any build variables you use in build settings are evaluated prior toa build. For example, the default argument to the compiler option –Wsystype= is the build variable,TARGET_SYSTYPE. TARGET_SYSTYPE is set to either “guardian” or “oss” when you create a project withmanaged builds based on the platform you choose in the new project wizard.

You can change the value of TARGET_SYSTYPE and other build variables using the Build Variablesproperty page. You can also define your own build variables. For example, to change the value of theTARGET_SYSTYPE build variable, perform the following steps from the NonStop Developmentperspective:

1. In the NonStop Projects Explorer view, select a project that you want to change TARGET_SYSTYPEfor.

2. Select Properties from the context menu of the NonStop Projects Explorer view.3. Select the Build Variables entry under C/C++ Build (see Figure 48: Build Variables property page

on page 127).

126 Launching an application using a saved run configuration

Page 127: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 48: Build Variables property page4. Select the Show system variables check box, then select TARGET_SYSTYPE (see Figure 48: Build

Variables property page on page 127).5. Select the Edit button to open the Edit Existing Build Variable dialog box:

Figure 49: Edit Existing Build Variable dialog box6. Change the text in the Value field to guardian instead of oss (or vice versa).7. Select OK to dismiss the dialog box.8. Select OK to apply the change and dismiss the Properties dialog box.

For additional information on build variables, see the C/C++ Development User Guide.

Changing build options (project properties)The Settings property page lets you change the options passed to the tools used in managed builds. TheTool Settings tabbed page of the Settings property page shows all the tools in the tool chain defined foryour project. For a discussion of tool chains, see Tool chains on page 72.

Figure 50: Tool Settings tabbed page on page 128 shows the Tool Settings page for a C project withSQL/MX and managed builds.

Changing build options (project properties) 127

Page 128: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 50: Tool Settings tabbed page

When you select the main entry for a tool on the left of the Tool Settings page, the right side of the pagedisplays the command the tool invokes as well as the options that will be passed to the tool. To editoptions passed to a tool, select one of the categories below the tool on the left. If you don’t see the optionof interest, use the Miscellaneous category for the tool to add the option.

NOTE:

Options for settings, such as for the Deploy tool or arguments to –Wsqlhost and similar optionsare shown as disabled on the Tool Settings page (due to a CDT limitation). To change values forremote options, use the Settings (Remote) property page.

If, for example, you want to pass –WIEEE_float to the C Compiler tool for TNS/E, perform thefollowing steps from the NonStop Development perspective:

1. Select the project of interest in the NonStop Project Explorer view.2. Select Properties from the NonStop Project Explorer view context menu.3. In the Properties dialog box, select C/C++ Build > Settings.4. In the Configuration combo box, select [ All configurations ] so that changes you make will be

applied to all build configurations (see Figure 51: Miscellaneous category for C compiler on page129).

5. In the Tool Settings tabbed page, select the Miscellaneous category under C Compiler (TNS/E).

128 Tasks

Page 129: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 51: Miscellaneous category for C compiler6. Select the Add button to open the Enter Value dialog box.7. Enter –WIEEE_float in the Enter Value dialog box, then select OK.8. Select OK to apply your change and dismiss the Properties dialog box.

Specifying DEFINES for SQL/MP tablesCross compilers provide the –Wdef_obey= option for passing in an Obey file which sets up DEFINEs.You can, for example, use ADD DEFINE statements to map logical SQL table names to physical tablenames and avoid hard coding SQL table names in source code. If you set up such a file for a COBOLproject, for instance, you should pass it to both the COBOL Compiler with SQL/MP and COBOLSQL/MP Compile and Deploy tools in your project’s tool chain. For example, if you created a file namedC:\\mydefines.txt that contains your ADD DEFINE statements for a TNS/E COBOL program withSQL/MP, you would perform the following steps to pass the file to the compiler and linker:

1. Select the COBOL SQL/MP project in the NonStop Project Explorer view.2. Select Properties from the context menu of the NonStop Project Explorer view.3. Select C/C++ Build > Settings on the left of the Properties dialog box.4. Select [ All configurations ] in the Configurationcombo box if you want your changes to be applied

to all build configurations.5. In the Tool Settings tabbed page, select the SQL/MP Preprocessor category for the COBOL

Compiler with SQL/MP (TNS/E) tool (see Figure 52: SQL/MP Preprocessor category on page129).

Figure 52: SQL/MP Preprocessor category6. Select the Add button to open the Enter Value dialog box.7. Enter –Wdef_obey=C:\mydefines.txt in the Enter Value dialog box, then select OK.8. Select the Miscellaneous category for the COBOL SQL/MP Compiler and Deploy (TNS/E) tool

(Figure 53: Miscellaneous category for COBOL SQL/MP Compile and Deploy on page 130).

Specifying DEFINES for SQL/MP tables 129

Page 130: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 53: Miscellaneous category for COBOL SQL/MP Compile and Deploy9. Select the Add button to open the Enter Value dialog box.10. Enter –Wdef_obey=C:\mydefines.txt in the Enter Value dialog box, then select OK.11. Select OK to apply your change and dismiss the Properties dialog box.

Building for both OSS and GuardianWhen you create a project with managed builds, the initial project is set up to build for OSS or Guardian,but not both. To build a project for both OSS and Guardian, create new build configurations and set theTARGET_SYSTYPE build macro to a different value in the new configurations.

Consider, for example, a project named HelloWorld that was created to be built for OSS and TNS/E.From the NonStop Development perspective, you would perform the following steps to add buildconfigurations that build for Guardian:

1. Select the HelloWorld project in the NonStop Project Explorer view.2. Select Build Configurations > Manage from the context menu of the NonStop Project Explorer view

to open the Manage Configurations dialog box:

Figure 54: Manage Configurations dialog box3. Select New to open the Create New Configuration dialog box (Figure 55: Create New

Configuration dialog box on page 131) which you will use to create a new build configuration.

130 Building for both OSS and Guardian

Page 131: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 55: Create New Configuration dialog box4. Enter a name for the build configuration (such as Debug Guardian) and optionally enter a description.5. Make sure Existing configuration is selected and that the configuration specified to the right of it is

Debug. As a result, all settings in the Debug configuration are copied to your new configuration.6. Select OK to add the new configuration and dismiss the Create New Configuration dialog box.7. Repeat steps 3 through 6, but name the new configuration Release Guardian and copy settings from

the existing configuration named, Release.8. Select OK to apply your changes and dismiss the Manage Configurations dialog box.9. In the Build Variables properties page of the HelloWorld project, set TARGET_SYSTYPE to “guardian”

for both the Release Guardian and Debug Guardian build configurations. For details on how to setTARGET_SYSTYPE, refer to Setting build variables on page 126.

For more information on creating and managing build configurations, refer to the C/C++ DevelopmentUser Guide.

Removing errors and warnings in C/C++ editorsThe C/C++ editor shows the results of code analysis of the source file it is opened on. When you seeincorrect analysis, there is usually something you can do remove errors and warnings. This sectiondescribes how you can remove different types of errors and warnings.

Errors and warnings after creating a projectA defect in CDT can result in the indexer not running when you create a project, which results in errorsbeing shown as in this example:

Removing errors and warnings in C/C++ editors 131

Page 132: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Incorrect errors for new project source file

You can remove the errors by forcing the indexer to run:

1. In the NonStop Project Explorer view, select the project associated with the source file.2. Select Index > Rebuild from the NonStop Project Explorer view context menu.

Errors for SQL statementsC/C++ code analysis marks SQL table and field names with errors in the Editor. Example of errormarkings shown for SQL statement on page 132 shows the error markings displayed for SQL/MX fieldnames in C/C++ editor.

Example of error markings shown for SQL statement

132 Errors for SQL statements

Page 133: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

In the NonStop Project Explorer view, the .sqlmxStatements.txtand .sqlmpStatements.txt files are not visible by default. To make files starting with “.” visible,see Filtering NonStop Project Explorer view content on page 154.

Disabling specific code analysis errors and warningsYou can selectively disable code analysis errors and warnings using project properties for code analysis. Example of error markings shown for SQL statement on page 132 shows a C/C++ editor that marksSQL record fields as errors, as the code analyzer does not have definitions of those fields. To disable thattype of error:

1. Select the project containing the source file in the NonStop Project Explorer view.2. Select Properties from the context menu of the NonStop Project Explorer view.3. In the Properties dialog box, select C/C++ General > Code Analysis.4. In the Code Analysis page, click Use project settings.5. Clear Field cannot be resolved check box.

(Alternatively: Select Configure Workspace Settings to change settings across all projects.)6. Select OK to apply the change and dismiss the dialog box.7. If the record fields are still shown with errors, select Index > Rebuild from the context menu of the

NonStop Project Explorer view.

The errors are cleared.

Disabling specific code analysis errors and warnings 133

Page 134: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 56: Disabling record field errors

The following figure shows the source code of Example of error markings shown for SQL statementon page 132 after the specific error type is disabled in the Editor.

134 Tasks

Page 135: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 57: Example of error markings cleared for SQL statement

Specifying locations for C/C++ headers, COBOL COPYlibraries, and pTAL source files

For managed builds, NSDEE provides an Includes settings category for all cross compiler tools andSQL/MX preprocessor tools. Specifying the locations of files to be included in builds similar for all of thesetools for including C/C++ headers, COBOL COPY libraries, or pTAL SOURCE files.

To specify files in Includes settings, open a project's properties, locate the Includes page for the compileror SQL/MX preprocessor of interest. You can find the Includes page for any of these tools by openingproject properties and selecting C/C++ Build > Settings and selecting the Includes entry under the toolof interest.

For example, to specify the locations of COPY libraries for COBOL compilers, perform the following stepsfrom the NonStop Development perspective (and similar steps for any other tool):

1. Select a COBOL project in the NonStop Project Explorer view.2. Select Properties from the NonStop Project view context menu.3. Select C/C++ Build > Settings at the left of the Properties dialog box.4. In the Tool Settings tabbed page, select the Includes entry under the COBOL Compiler tool.

5. Select the Add button to bring up the Add directory path dialog box.6. In the Add directory path dialog box, enter the path of the directory containing the COPY libraries.

NOTE:

To enter a relative path, enter a path relative to the build directory, which is a directory with thename of the configuration being built that is created in a directory under the root project directory.

Specifying locations for C/C++ headers, COBOL COPY libraries, and pTAL source files 135

Page 136: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

7. Select OK to add the path. Figure 58: Includes settings page on page 136 shows the Includes pageafter adding a relative path.

8. Select OK to apply the setting and close the Properties dialog box.

Figure 58: Includes settings page

Instructing NSDEE not to build source filesBy default, managed builds build source files in a given project. You can exclude one or more source filesfrom being built using source file properties.

This section discusses how to exclude COBOL COPY libraries from builds; however, the same fileproperties discussed can be used to exclude C, C++, and pTAL sources from builds as well. Source filescan be excluded from builds individually, or entire directories of source files can be excluded from builds.

Excluding a single COPY libraryTo exclude a COPY library from a build, perform the following steps from the NonStop Developmentperspective:

1. Select the COPY library in the NonStop Project Explorer view.2. Select Properties from the NonStop Project Explorer context menu.3. In the Properties dialog box, select C/C++ Build > Settings.4. In the Settings page, select the Exclude resource from build check box (see Figure 59: Exclude a

single COPY library from a build on page 137).

136 Instructing NSDEE not to build source files

Page 137: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 59: Exclude a single COPY library from a build5. Select OK to apply the change and dismiss the Properties dialog box.

The file excluded from the build is shown with a pin through it, as a reminder in the following figure.

Tasks 137

Page 138: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Excluding all sources in a folderTo exclude a folder containing only COBOL COPY libraries from a build, perform the following steps fromthe NonStop Development perspective:

1. Select the folder in the NonStop Project Explorer view.2. Select Properties from the NonStop Project Explorer context menu.3. In the Properties dialog box, select C/C++ Build > Settings.4. In the Settings page, select the Exclude resource from build check box.

Figure 60: Exclude a folder from a build5. Select OK to apply the change and dismiss the Properties dialog box.

The folder that will be excluded from the build is shown with a tack in it following. (The tack indicatesonly that the folder has non-default properties set on it.) The following figure shows a folder with non-default properties (tack indicator).

138 Excluding all sources in a folder

Page 139: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Turning off SQL/MP builds for source files and foldersWhen you select the SQL/MP button when you create a project, NSDEE creates a compiler tool definitionspecific to SQL/MP builds which includes settings for SQL/MP builds (unlike the more typical compiler tooldefinitions which do not contain such settings). This means that, by default, all object builds in the projectwill include SQL/MP options.

You can turn off SQL/MP settings for any particular source file or for the contents of an entire folder if itonly contains source files that do not need to be built with SQL/MP options.

Turning off SQL/MP builds for specific source filesTo turn off SQL/MP builds for a specific source file, perform the following steps from the NonStopDevelopment perspective:

1. Select the source file in the NonStop Project Explorer view.2. Select Properties from the NonStop Project view context menu.3. In the Properties dialog box, select C/C++ Build > Settings.4. In the Tool Settings tabbed page of the Settings page, select the SQL/MP Preprocessor entry under

the compiler tool with SQL/MP.5. In the SQL/MP Preprocessor page, clear the Build with SQL/MP preprocessor check box. Figure

61: Specifying locations of COPY libraries to include in build (for COBOL compilers) on page139 shows an example of this for the C Compiler with SQL/MP tool.

Figure 61: Specifying locations of COPY libraries to include in build (for COBOL compilers)6. Select OK to apply the change and dismiss the Properties dialog box. The file that will not be built with

SQL/MP options is shown with a tack in it, as shown in Figure 62: File with non-default settings onpage 140. The tack is shown for any file that has non-default settings.

Turning off SQL/MP builds for source files and folders 139

Page 140: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 62: File with non-default settings

Turning off SQL/MP builds for all sources in a folderTo turn off SQL/MP builds for all source files in a folder, perform the following steps from the NonStopDevelopment perspective:

1. Select the folder in the NonStop Project Explorer view.2. Select Properties from the NonStop Project view context menu.3. In the Properties dialog box, select C/C++ Build > Settings.4. In the Tool Settings tabbed page of the settings page, select the SQL/MP Preprocessor entry under

the compiler tool with SQL/MP.5. In the SQL/MP Preprocessor page, clear the Build with SQL/MP preprocessor check box. Figure

61: Specifying locations of COPY libraries to include in build (for COBOL compilers) on page139 shows an example of this for the C Compiler with SQL/MP tool.

Figure 63: Turn off SQL/MP folder6. Select OK to apply the change and dismiss the Properties dialog box. The folder that will not be built

with SQL/MP options is shown with a tack in it, as shown in Figure 64: File with non-default settingson page 140. The tack is shown for any folder that has non-default settings.

Figure 64: File with non-default settings

140 Turning off SQL/MP builds for all sources in a folder

Page 141: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Configuring indexing for C and C++ sourcesWhen you create a local project, NSDEE sets an environment variable namedNSDEE_SYS_INCLUDE_PATH to the location of the include directory for system headers under thecompiler and linkers location you chose during project creation. NSDEE_SYS_INCLUDE_PATH determineswhere the C/C++ indexer looks for system headers. The initial path NSDEE_SYS_INCLUDE_PATH is set tois shown under the Includes folder of your project.

The C/C++ indexer will also search any paths you specify in Includes pages for compiler tools inmanaged projects, and these paths will also be displayed under the top-level Includes folder for yourproject. For this reason, it is important that you specify includes for managed projects using the Includesoption page and not the Miscellaneous options page for a compiler.

The following sections describe additional ways you can configure the indexer.

Indexing headers for makefile projectsFor local makefile projects, the C/C++ indexer will not be able to locate your header files automatically.You can indicate where your header files are located by performing the following steps form the NonStopDevelopment perspective:

1. Select a makefile project in the NonStop Project Explorer view.2. Select Properties from the NonStop Project Explorer context menu.3. Select C/C++ General > Paths and Symbols to open the Paths and Symbols page.4. In the Includes tabbed page of the Paths and Symbols page, select either C or C++ depending on

whether the include directory contains C or C++ source. (Select C++ if the include directory containsboth.)

Figure 65: Paths and Symbols page with C++ selected5. Select Add to open the Add directory path dialog box:

Configuring indexing for C and C++ sources 141

Page 142: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

6. Enter the path of an include directory you want the C/C++ indexer to search. If you enter a projectrelative path, select the Is a workspace path check box.

7. Select OK to add the path for the includes list for C or C++ and dismiss the Add directory path dialogbox.

8. Select OK to apply your change and dismiss the Properties page.9. A Paths and Symbols dialog box will open asking if you want to immediately rebuild the index (see

Figure 66: Paths and Symbols dialog box on page 142). Select No if you do not want an immediaterebuild, else select Yes.

Figure 66: Paths and Symbols dialog box

Changing the system headers indexed when changing build configurationsBy default, the C/C++ indexer does not regenerate the index when you change build configurations. Thisis reflected in the path shown for system headers under a project's top-level Includes directory. The indexis not regenerated by default because, depending on the size of your code base, regenerating it may takeseveral minutes, particularly when, you change from building for TNS/E to TNS/X.

Indexing is, by default, tied to the initial build configuration set after project creation (typically a debugconfiguration). You can change the default behavior by performing the following steps from the NonStopDevelopment perspective:

1. Select a local NonStop project in the NonStop Project Explorer view.2. Select Properties from the NonStop Project Explorer context menu.3. Select C/C++ General > Indexer to open the Indexer page (see Figure 67: Indexer page on page

143).

142 Changing the system headers indexed when changing build configurations

Page 143: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 67: Indexer page4. From the Indexer page, you have numerous options, almost all of which require selecting the Enable

project specific settings check box. For details, see the C/C++ Development User Guide. To changethe configuration used by the indexer, select a different build configuration in the combo box in theBuild configuration for the indexer group box.

5. Select Apply, then OK, to apply the change and dismiss the Properties page.

NOTE:

A CDT defect requires that you select both Apply and OK for the change to take effect.

Forcing a rebuild of the C/C++ indexSometimes you may want to force a rebuild of the C/C++ index if it appears that the indexer has not runor needs to be run again. One example is that the indexer sometimes fails to run immediately after projectcreation, leading to spurious errors shown in the C/C++ editor for symbols that should have beendetected.

To force a rebuild of the index, perform the following steps from the NonStop Development perspective:

1. Select a local NonStop project in the NonStop Project Explorer view.2. Select Index > Rebuild from the context menu.

Adding externally-built objects and linkfiles to managedbuilds

When a project build depends on objects or linkfiles built in other projects or that exist outside of yourworkspace, it is important to specify these files in the Other objects list of the linker tool so that the filesget inserted into the final build rule properly. For example, if your C application depends on a linkfile

Forcing a rebuild of the C/C++ index 143

Page 144: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

named utils.tlo in the project Utils, you would add utils.tlo to the linker tool by performing thefollowing steps from the NonStop Development perspective:

1. In the NonStop Project Explorer view, select the project that depends on utils.tlo.2. Select Properties from the context menu for the NonStop Project Explorer view to open the Properties

page for the project.3. In the Properties page, select C/C++ Build > Settings on the left to open the Settings page. The Tool

Settings tabbed page will be open by default.4. Select the Miscellaneous entry under the C Linker.

5. Select the Add button ( ) for Other objects to open the Add file path dialog box.6. Enter the path to utils.tlo in the File field in the Add file path dialog box (as shown in Figure 68:

Add file path dialog box on page 144), then select OK to dismiss it and add the path to Otherobjects.

Figure 68: Add file path dialog box7. Optional: Repeat steps 5 and 6 for other build configurations. (Select a different build configuration in

the Configuration combo box, then repeat steps 5 and 6. Make sure to use the appropriate builddirectory, such as Release, that matches the build configuration you selected for the current projectusing the Configuration combo box.)

8. Select OK to apply your changes and dismiss the Properties dialog.

Linking libraries in managed buildsTo link an application against libraries, use the normal mechanisms that compilers provide by putting theoptions in the list of Additional options in the Linker tool's Miscellaneous page. You also need to linkagainst librld.so to enable your application to load dynamic libraries.

For example, if your TNS/E C application needs to link against two shared libraries, one namedstdll.tso in project StaticDLL and the other named dydll.tso in project DynamicDLL, you wouldperform the following steps to link your main application against the libraries:

1. In the NonStop Project Explorer view, select the project that depends on stdll.tso anddydll.tso.

2. To open the Properties page for the selected project, click Properties from the context menu for theNonStop Project Explorer view.

3. In the Properties page, select C/C++ Build > Settings on the left to open the Settings page.

The Tool Settings tabbed page is displayed by default.4. Select the Miscellaneous entry under the C Linker (TNS/E) tool.

5. Select Add for Additional Options.

The Enter Value dialog is displayed.6. In the Enter Value dialog, enter -Weld= followed by the linker option used to specify libraries (-

lib).7. Select OK to dismiss the Enter Value dialog and To add the -Weld option to Other objects.8. Repeat steps 5 through 7, but specify the path to dydll.tso instead of stdll.tso.

144 Linking libraries in managed builds

Page 145: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 69: Adding libraries to link on page 145 shows the Additional options list with the twolibraries added.

Figure 69: Adding libraries to link

9. Optional: Repeat steps 5 through 8 for other build configurations. (Select a different buildconfiguration in the Configuration combo box, then repeat steps 5 through 8. Make sure to use theappropriate build directory, such as Release, that matches the build configuration you selected forthe current project using the Configuration combo box.)

10. To add librld.so to the final link:

a. Select the Libraries entry under the C Linker (TNS/E).b. To open the Add file path dialog box, click in the Libraries (-l) section.c. In File: box, enter rld.

Tasks 145

Page 146: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

Since NSDEE defines COMP_ROOT for managed project builds, there's no need to specify alibrary search path in the Library search path (-l) list box as the compiler will useCOMP_ROOT to find it.

d. Click OK.

rld is added to the Libraries(-l), as shown in the following figure.

Figure 70: rld in library list11. To apply your changes, click OK.

Adding and customizing build targetsYou can add build targets to any type of NSDEE project, including projects that use managed builds. Youcan also customize predefined build targets for managed builds. How to add and customize build targetsis described in the following sections:

• Creating a makefile.targets file for managed builds on page 146• Adding build targets on page 148• Creating custom build targets for managed projects on page 149• Creating custom deploy targets on page 151

Creating a makefile.targets file for managed buildsTo add or customize build targets for managed builds, you must create a makefile.targets file as atop-level file in your project. You can use this file to add build targets and create custom build targets. Themain makefile that NSDEE creates for your project automatically includes makefile.targets if itexists.

146 Adding and customizing build targets

Page 147: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

To create a makefile.targets file, perform the following steps from the NonStop Developmentperspective:

1. In the NonStop Project Explorer view, select the project which you will add makefile.targets to asa top-level project file.

2. Select New > File from the context menu to open the New File wizard.3. In the New File wizard, enter the file name makefile.targets in the File name field:

Figure 71: Creating makefile.target file4. Click Finish to dismiss the New File wizard and create the file. The file will automatically be opened in

a text editor.

Since makefile.targets is not automatically associated with the Makefile editor, perform the followingsteps to make the association:

1. Close the text editor open on makefile.targets.2. Select makefile.targets in the NonStop Project Explorer view.3. Select Open With > Other from the context menu of the NonStop Project Explorer view to open the

Editor Selection dialog box:

Tasks 147

Page 148: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 72: Editor Selection dialog box4. In the Editor Selection dialog box, select Makefile Editor.5. Select OK to dismiss the dialog box and open makefile.targets in the Makefile editor. The

Makefile editor will now be the default editor for makefile.targets in the containing project.

Adding build targetsAdding a build target consists of both adding the target to a makefile and adding the same target to theMake Target view so you can start a build of the target from NSDEE.

For both local and remote makefile projects, you must add additional targets to your own makefile. Forprojects that use managed builds, add the additional targets to the makefile.targets file. For detailson creating this file, see Creating a makefile.targets file for managed builds on page 146.

To add targets you define to the Make Target view, perform the following steps from the NonStop ProjectExplorer view:

1. In the Make Target view, select the project you want to add a build target to.2. Select New from the context menu of the Make Target view to open the Create Make Target dialog

box.3. In the Create Make Target dialog box, enter the name of the target in the Target name field as shown

in the following figure.

148 Adding build targets

Page 149: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

4. Select OK to add the target and dismiss the dialog box. The following figure shows a target namedmy_target added to the project Car in the Make Target view.

5. Double-click the new target to launch a build with that target. For example, if you were to double-clickthe my_target target shown in the above figure, NSDEE would invoke make my_target.

Creating custom build targets for managed projectsYou can create custom build targets to replace the standard all, clean, and deploy targets that aregenerated automatically for managed builds. To do this, you first need to change the name of the target ofinterest in project properties so that the corresponding menu item (Build Project, Clean Project, orDeploy Project) invokes make using your custom target name instead of the default target name of all,clean, or deploy. Then, define your custom build target in a makefile.targets file.

For example, to create your own clean target that also cleans COBOL list (.L) files, which NSDEE doesnot do (and assume that you do not want to turn off generation of list files using the -Wnolist option).First, change the clean target to clean-all, the clean target you will define in makefile.targets.Second, create a makefile.targets file with your clean-all target.

To change the clean target to clean-all, perform the following steps from the NonStop Developmentperspective:

Creating custom build targets for managed projects 149

Page 150: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

1. Select the project of interest in the NonStop Project Explorer view.2. Select Properties from the context menu for the NonStop Project Explorer view to open the Properties

page for the selected project.3. Select C/C++ Build on the left to open the C/C++ Build page on the right of the Properties dialog box.4. Select the Behavior tabbed page and replace clean with clean-all.

5. Select OK to apply the change and dismiss the Properties dialog box.

Add a clean-all to the projects makefile.targets file. If you have not already created this file, see Creating a makefile.targets file for managed builds on page 146.

To add the clean-all target to makefile.targets, perform the following steps from the NonStopDevelopment perspective:

1. Double-click makefile.targets in the NonStop Project Explorer view to open the makefile.targetsview in an editor.

2. Enter the following text in makefile.targets to create a clean-all target that will invoke theautomatically generated clean target and additionally remove list files (Remember to use a hard tabbefore each rule under clean-all):

clean-all: clean rm -f ./*.L

3. Select Save from the File menu or select the Save icon .

Now, when you select the project and then select Clean Project from the context menu, you will seeoutput similar to that shown in the following figure. The first rm command is issued by the automaticallygenerated clean target in the main makefile. The second rm command is issued by the clean-alltarget you created.

150 Tasks

Page 151: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Creating custom deploy targetsYou can create custom deploy targets for both local managed and makefile projects. The advantage ofcreating custom deploy targets is that, if you use, for example, sftp (an Open SSH program for filetransfers available with Cygwin), you can create much more flexible and complex deploy targets.

This section provides sample steps for creating a custom deploy target for a managed project named Carthat transfers an executable to OSS, sets permissions on the file, and runs sftp's ls command to showthe permissions set. This section also describes how to create similar deploy targets for Guardian usingsftp.

Using sftp in a deploy target requires setting up passphrase authentication so that sftp can connect inbatch mode without requesting a password from you. For information on setting up passphraseauthentication, see Sample programs and projects on page 215.

The following steps are specific to projects using managed builds; however, the steps for makefileprojects are the same if you use your own makefile instead of makefile.targets.

To create a custom deploy target for the project Car, perform the following steps from the NonStopDevelopment perspective:

1. Select the Car project in the NonStop Project Explorer view.2. Select Properties from the context menu for the NonStop Project Explorer view to open the Properties

page for the Car project.3. Select Settings (Remote) on the left to open the Settings (Remote) property page on the right.4. In the Deploy Target Settings group box of the Settings (Remote) page, change the Deploy target

field from deploy to custom_deploy, as in shown in the following figure. This will cause the DeployProject action on the context menu of the NonStop Project Explorer view to issue the command makecustom_deploy instead of make deploy.

Creating custom deploy targets 151

Page 152: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

5. Select OK to save your change and close the Properties dialog box.6. Create a top-level file named makefile.targets. (For details, see Creating a makefile.targets file

for managed builds on page 146).7. Add text similar to the following to makefile.targets (Remember to use a hard tab before the echo

command): See: example

The above custom_deploy target uses echo -e to pipe a series of commands to the standard inputof sftp instead of passing sftp a batch file. This allows the custom_deploy target to takeadvantage of the environment variables set based on project properties in the Settings (Remote)property page. For details on environment variables, see Environment variables and build variableson page 58.

Setting all as a dependency for custom_deploy, above, ensures that the project has been builtbefore the sftp command runs.

8. Select Save from the File menu or select the Save icon in the main toolbar to save your changes tomakefile.targets.

9. Select the Car project in the NonStop Project Explorer view, then select Deploy Project from thecontext menu to deploy the file Car.txe from the Car project. The Console view shows output similarto the following: See: example

The custom_deploy target above shows only a few of the many sftp commands available.Additionally, you can issue ssh commands to execute commands on NonStop servers if sftp doesnot provide all the commands you need. For custom Guardian deploy targets, sftp is not as flexible;however, you can combine both sftp and ssh commands to get the same custom_deploy targetbehavior.

Custom Guardian deploy target on page 153 shows an example of a custom_deploy target fromGuardian. To use the NSDEE_DEPLOY_DEST environment variable, you must set the deploydestination in the Settings (Remote) page to a path in the form “/G/volume/subvolume”.

The use of GUARDIAN_PATH above converts a path such as “/G/volume/subvolum” to “\$$volume.subvolum”, a path suitable to pass to a Guardian command. (The “\$$” is a “double-escape”sequence; “$$” escapes the dollar sign for make and “\$” escapes the dollar sign for the shell.) Buildoutput to the Console view from the above target is similar to the following:

make custom_deploy echo -e "put ./Car.txe /G/data4/doontest/car,800\n \

152 Tasks

Page 153: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

exit" | sftp -b - [email protected]> put ./Car.txe /G/data4/doontest/car,800Uploading ./Car.txe to /G/data4/doontest/car,800sftp> exitecho -e "fup secure \$data4.doontest.car, NOGO\n \fileinfo \$data4.doontest.car" | ssh -s [email protected] tacl TACL (T9205H01 - 10MAY2011), Operating System H06, Release H06.25.00(C) Copyright 2005-2011 Hewlett Packard Development Company, L.P.CPU 0, process has no backupApril 5, 2012 12:42:21(Invoking $SYSTEM.SYSTEM.TACLLOCL)(Invoking $DATA4.DOON2.TACLCSTM)Current volume is $DATA4.DOON21> 2> $DATA4.DOONTEST

CODE EOF LAST MODIFIED OWNER RWEP PExt SExt

CAR 800 3010816 05APR2012 12:42 102,31 NOGO 14 112

**** Build Finished ****custom_deploy: all echo -e "put ./Car.txe $(NSDEE_DEPLOY_DEST)/$(NSDEE_DEPLOY_FILENAME)\n \chmod 754 $(NSDEE_DEPLOY_DEST)/$(NSDEE_DEPLOY_FILENAME)\n \ls -l $(NSDEE_DEPLOY_DEST)/$(NSDEE_DEPLOY_FILENAME)\n \exit" | sftp -b - $(NSDEE_DEPLOY_USER)@$(NSDEE_DEPLOY_SYSTEM)**** Build of configuration Debug for project Car ****

make custom_deployecho -e "put ./Car.txe /home/chloe/test/car\n \chmod 754 /home/chloe/test/car\n \ls -l /home/chloe/test/car\n \exit" | sftp -b - [email protected]> put ./Car.txe /home/chloe/test/carUploading ./Car.txe to /home/chloe/test/carsftp> chmod 754 /home/chloe/test/carChanging mode on /home/chloe/test/carsftp> ls -l /home/chloe/test/car-rwxr-xr-- 0 26143 102 3010816 Apr 4 16:43 /home/chloe/test/carsftp> exit

**** Build Finished ****

Custom Guardian deploy target# Change "/G/volume/subvol" format required for sftp to $volume.subvolume format.GUARDIAN_PATH = $(subst /,.,$(subst /G/,\$$,$(NSDEE_DEPLOY_DEST))).$(NSDEE_DEPLOY_FILENAME)

custom_deploy: all echo -e "put ./Car.txe $(NSDEE_DEPLOY_DEST)/$(NSDEE_DEPLOY_FILENAME),800\n \

Tasks 153

Page 154: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

exit" | sftp -b - $(NSDEE_DEPLOY_USER)@$(NSDEE_DEPLOY_SYSTEM) echo -e "fup secure $(GUARDIAN_PATH), NOGO\n \fileinfo $(GUARDIAN_PATH)" | ssh -s [email protected] tacl

Filtering NonStop Project Explorer view contentTo make project files visible:

1. Select Filters from the local drop-down for the NonStop Project Explorer view to open the C ElementFilters dialog box.

2. In the C Element Filters dialog box, clear .*resources.

3. Select OK in the C Element Filters dialog box.

Creating a remote folder in a local project via SambaIf you use Samba to access the OSS file system from Windows, you can create linked folders in yourlocal projects that point to network drives mapped to Samba mount points. This section describes how tocreate a linked folder and also describes some of the performance considerations of using Samba andEclipse.

Creating a linked folderThe New folder wizard provides the capability of creating project folders that appear to be under a localproject but are actually links outside your workspace. You can use this capability to link to network drivesmapped to Samba mount points so you can drag and drop folders and files between NonStop and yourEclipse project. This also allows you to open and edit remote files directly in Eclipse in the same manneryou would open and edit local files.

To create a linked folder to a network drive, consider the following scenario: You have drive S: mapped toan OSS location on a NonStop system and you want to create a linked folder (NonStopFolder) to thatlocation in a project named TestProj. To create the link, perform the following steps from the NonStopDevelopment perspective:

1. Select TestProj in the NonStop Project Explorer view.2. Select New > Folder from the context menu.

154 Filtering NonStop Project Explorer view content

Page 155: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

3. In the Folder field of the New Folder wizard, enter NonStopFolder.4. Select Advanced to expand the advanced area of the New Folder wizard.5. Select the Link to alternate location button and enter S:\in the field below the button.

The following figure shows the New Folder wizard with the advanced area expanded and theinformation specified in steps 3 and 5 entered:

Figure 73: New Folder wizard (expanded view)6. Click Finish.

After you click Finish, NSDEE creates a linked folder under your project. Expand the folder to view thecontents of the location the network drive is mapped to. The following figure shows linked folder contents:

NOTE:

Accessing OSS files via Samba imposes some restrictions on file names. For details, see theSamba on NonStop User Manual. This manual is available in the NonStop Technical Library (NTL)at:

http://www.hpe.com/info/nonstop-docs

Performance considerations for using Samba with EclipseSamba is considered a chatty protocol. Though its performance is good in a local intranet, it can be slowover the internet. Another consideration is that the Eclipse file system implementation peruses all files

Performance considerations for using Samba with Eclipse 155

Page 156: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

and directories under your workspace, including those you link to outside your workspace via Samba.Eclipse does this for a number of reasons, including file history management and undo capabilities.

You can mitigate performance issues by setting up Samba sharepoints on OSS that limit the portion of thefile system accessed. For example, mounting the root directory of OSS and linking to it in Eclipse resultsin poor performance because Eclipse attempts to peruse the entire OSS file system. However, if youmount an OSS directory that contains only a small number of files and sub-directories, performance isimproved, especially on an intranet.

For details on setting up Samba sharepoints, see the Samba on NonStop User Manual.

Using NSDEE with SCM tools: examples and proceduresYou can use local projects with a software configuration management (SCM) tool in one of two ways. Thefirst is to use an Eclipse plug-in provided for use with an SCM tool to check-in and check-out files directlyin Eclipse. The second is to use an SCM outside of Eclipse to check-in and check-out files, and to importprojects from the SCM file repository into NSDEE's NonStop Project Explorer for editing and building.

Because a number of SCM tools are available, this section uses Subversion as an example of usingNSDEE with SCM tools. This section only provides minimal guidance. For details on any particular SCMtool, refer to the tool's own documentation.

NOTE:

Save NSDEE project files (.project, .cproject, and .remote) using SCM tool just as you saveyour source files. These files contain important information about project properties and buildtargets. To make project files visible in the NonStop Project Explorer view, see Filtering NonStopProject Explorer view content on page 154.

To avoid sharing your deploy settings with the other developers, do not check in the .remote file tothe SCM repository.

Using NSDEE with an external SCM toolTo use NSDEE local projects with an external SCM tool, check-in and check-out project files outside ofEclipse using the SCM tool, but edit project files and build projects within NSDEE. you have imported alocal project into an SCM system, you can then work with the project in NSDEE using the followinggeneral steps in the NonStop Development perspective:

1. Import the project into NSDEE (see Importing external NSDEE projects on page 103). Verify theCopy projects into workspace check box in the Import wizard is cleared. This ensures that the filechanges you make are located where the SCM tool detects the changes.

2. Edit sources in Eclipse. When you are ready to check-in changes, return to the SCM tool. It detectsthe files you changed and you can use the SCM tool to check-in your changes.

3. Depending on your SCM tool, when you want to add files or directories to your project, it may be bestto do this using the SCM tool. you have added files or directories:

a. Return to Eclipse and select the project you added files or directories to in the NonStop ProjectExplorer view.

b. Select Refresh from the context menu. NSDEE detects the new files and directories.4. To check out changes to a project contributed by others:

a. Use the SCM tool to update with the change.b. Select Refresh from the context menu of the NonStop Project Explorer view. NSDEE detects any

changed files and updates them.

156 Using NSDEE with SCM tools: examples and procedures

Page 157: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Using NSDEE with an SCM plug-inThis section describes how to use the Subclipse plug-in for Subversion with NSDEE managed projects.Other SCM tools use similar but differing procedures. Three main activities are described in this section:

• Adding a local NonStop project to an SVN repository on page 157• Checking in project files on page 158• Checking out project files on page 158

This section provides only an example. For detailed information about Subclipse, see the online help forSubclipse - Subversion Eclipse Plugin.

Adding a local NonStop project to an SVN repositoryIf you created a simple managed C project named HelloWorld and you want to add it to a Subversionrepository that you set up in the Subversion Repository Exploring perspective at the location C:\svn-repository. To add HelloWorld to the repository, perform the following steps from the NonStopDevelopment perspective:

1. In the NonStop Project Explorer view, select the HelloWorld project.2. From the context menu, select Team > Share Project to open the Share Project wizard.3. In the Share Project wizard, select SVN.4. Click Next. In the following page, your repository should already be selected as well as the Use

existing repository location button. (Do not change these selections.)5. Click Next. The next page shows file:///C:/svn-repository/HelloWorld as the location of

HelloWorld in the repository (see Figure 74: Adding a project to the subversion repository on page157).

Figure 74: Adding a project to the subversion repository6. Click Finish.7. A dialog box opens asking if you want to open the Team Synchronizing perspective. Select Yes to see

HelloWorld in this perspective. Regardless of your choice, HelloWorld is added to the repository.That perspective is particularly useful for viewing file history and for comparing and merging fileversions.

To see HelloWorld in the SVN Repositories view (in the SVN Repository Exploring perspective):

1. In the SVN Repositories view, select file:///C:/svn-repository2. Select Refresh from the context menu.3. Expand file:///C:/svn-repository (if it is not already expanded).4. Select the HelloWorld directory under file:///C:/svn-repository.5. Select Refresh from the context menu.

Using NSDEE with an SCM plug-in 157

Page 158: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Checking in project filesContinuing from the example in the previous section, you can now check in files for HelloWorld byselecting the HelloWorld project in the NonStop Project Explorer view in the NonStop Developmentperspective by performing the following steps:

1. Select the HelloWorld project.2. Select Team > Commit from the context menu to open the Commit dialog box. The Commit dialog box

appears with the files to verify in pre-selected. Notice that the .project and .cproject files areselected, which is important for saving project settings.

3. In the Commit dialog box, optionally enter a comment, then select OK to check-in your project files.

The following figure shows pre-selected files for check-in.

If you change HelloWorld.c, you can use the same procedure to check it in to the repository whenyour changes are complete.

NOTE:

In NSDEE 6.0 and earlier versions, the deploy information was stored in the .cproject file.

From NSDEE 7.0 onwards, the deploy information is stored in the .remote file if the option isenabled in the NonStop Development dialog box. For more information, see NonStopDevelopment. When this option is enabled, you can commit the changes to the source coderepository, without committing the .remote file. This avoids overwriting the deploy settings by otherusers working on the project.

To retrieve deploy information, while checking out the project, add the .remote file.

Checking out project filesAfter you have checked in a project to a repository, you can check it out in any Eclipse workspace addedto the SVN Repository Exploring perspective in that workspace. Continuing with the example from theprevious section, you can check out HelloWorld into a different workspace by performing the followingsteps from the SVN Repository Exploring perspective:

1. In the SVN Repositories view, expand file:///C:/svn-repository and select the HelloWorld folder.2. Select Checkout from the context menu to open the Checkout from SVN wizard.3. Click Finish in the Checkout from SVN wizard to check out the latest version of HelloWorld.4. Return to the NonStop Development perspective to work with the newly checked-out project.

Generating Code coverageThere are two methods to enable code coverage:

• Enabling code coverage during project creation using the Project creation wizard. For moreinformation, see Creating a managed project from scratch on page 16.

• Enabling code coverage after a project is created using the project properties. For more information,see Enabling Code coverage on page 159.

158 Checking in project files

Page 159: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Enabling Code coverage

Procedure

1. Select the required project in the NonStop Project Explorer view.2. Right-click on the project name and in NonStop Project Explorer view context menu, click

Properties.

The Properties for project name dialog box appears.3. Expand project type Build = C/C++ Build and select the sub-item Setting.4. Select the Miscellaneous category under Linker or Compiler.5. For all C, C++, and COBOL tools, check Code coverage (-Wcodecov) option.

For pTAL compiler, check Code coverage (–codecov) option.

For linker tools (eld and xld), check Code coverage (–lpgo) option.6. Click Apply.

Generating Code coverage for managed projects

Procedure

1. In the NonStop Project Explorer, select the required project.2. Select Project > Generate Code coverage.

Or, right-click on the project name and select Generate Code coverage.

The Generate Code coverage for project name screen appears.

Enabling Code coverage 159

Page 160: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 75: Generate Code coverage screen3. Specify the following:

a. Select the system from the drop-down menu.b. Select OSS or Guardian platform.c. To specify the Location, click Browse and navigate to the required location.d. Select the check boxes corresponding to the required raw data files.

4. Click Generate code coverage.

The selected files are transferred from the remote NonStop to the build location of the project. Thetarget codecov is invoked, which invokes profmrg and codecov commands in the makefile andgenerates the code coverage report. The final code coverage report opens in the default html editor.

Generating Code coverage for makefile projects

Procedure

1. In the NonStop Project Explorer, select the required project.

Or, right-click on the project name and select Generate Code coverage.2. Select Project > Generate Code coverage.

The Generate Code coverage for project name screen appears.

160 Generating Code coverage for makefile projects

Page 161: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 76: Generate Code coverage screen (for a makefile project)3. Specify the following:

a. Enter the required target name in the Make Target box.

The Make Target information is used for invoking Profmrg and Code coverage tools.b. Select the system from the drop-down menu.c. Select OSS or Guardian platform.d. To specify the Location, click Browse and navigate to the required location.e. Select the check boxes corresponding to the required raw data files.

4. Click Generate code coverage.

The selected files are transferred from the remote NonStop to the build location of the project. Theuser specified target is invoked, which invokes profmrg and codecov commands in the makefile andgenerates the code coverage report. The final code coverage report opens in the default html editor.

Enabling or disabling tracingProcedure

1. Select Window > Preferences > General > Tracing.

Enabling or disabling tracing 161

Page 162: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Figure 77: Tracing2. Corresponding to the required plugin, to enable or disable tracing, select True or False.

The trace messages are sent to a file named trace.log which is located next to the platform log file.

NOTE:

You can specify an option to print traces to the console, when the application is run from thesource file. The traces are printed to the Eclipse console not the C/C++ build console.

To enable NSDEEREG traces, you must enable com.hp.nsdee.debug.core/debug trace.

More InformationTracing on page 197

162 Tasks

Page 163: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

ReferenceThe NonStop Development perspective is an extension of the C/C++ perspective. This chapter providesreference information about the many ways in which the C/C++ perspective is extended in NSDEE.

Views and editorsThe NonStop Development perspective provides the same views and editors available in the C/C++perspective with the addition of COBOL and pTAL editor views and the addition of the NonStop ProjectExplorer view.

By default, the NonStop Development perspective shows the views in the following table. For details onviews provided by CDT, refer to the C/C++ Development User Guide.

Table 5: NonStop views

View Provider Description

NonStopProjectExplorer

NSDEE Displays projects in a tree structure so you can browse, open,and manage your project's files. Using the context menu, youcan perform many actions from the NonStop Project Explorer,such as initiating builds and changing the active buildconfiguration.

COBOL Editor NSDEE An editor for COBOL source files that provides syntaxhighlighting, and content assist.

pTAL Editor NSDEE An editor for pTAL source files that provides syntaxhighlighting.

C/C++ Editor CDT An editor for C/C++ source files that provides manyspecialized features for C/C++.

Problems CDT Provides a list of build errors and warnings for all openprojects shown in the NonStop Project Explorer. Double-click awarning or error to open an editor to the file locationresponsible for the error or warning.

Tasks CDT Automatically lists C/C++ source file comments containing thetext FIXME or TODO. Double-click an entry to open a C/C++source file that contains the comment. You can also add yourown task entries.

Console CDT Displays output of running processes (including buildprocesses and NonStop applications launched from NSDEE)and accepts keyboard input to a running process.

Properties CDT Displays properties of the resource (such as a project,directory, or file) selected in the NonStop Project Explorer.

Table Continued

Reference 163

Page 164: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

View Provider Description

Outline CDT Displays a list of structural elements of a C/C++ source fileopen in a C/C++ editor. (Does not display an outline forCOBOL or pTAL sources.)

Make Target CDT Allows you to initiate builds for custom make targets. If youadd a custom make target to a makefile.targets file (see Creating a makefile.targets file for managed builds onpage 146), you can add that target to the Make Target view asa named build icon. Then you can initiate a build of that targetby double-clicking the named build icon in the Make Targetview.

CDT provides additional views for showing call hierarchies, type hierarchies, and more. To see all viewsavailable to you, select Window > Show View > Other to open the Show View dialog box. The followingfigure shows the Show View dialog box with C/C++-specific views visible.

Many of the views shown in the NonStop Development perspective are available in the General foldershown in the above figure, whereas the Make Target view is available in the Make folder shown above.

NOTE:

You can restore the NonStop Development perspective's default views and default view locations byselecting Window > Reset Perspective.

164 Reference

Page 165: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

The following figure shows the one view specific to NonStop available from the Show View dialog box.

NonStop Project Explorer viewThe NonStop Project Explorer view displays the contents of your projects, whether they are remote orlocal to Windows. Projects are displayed in a tree structure, where the root node is your project folder,and where your project folder contains additional folders and files which may or may not be in your localworkspace.

You can perform many tasks from the NonStop Project Explorer view, including:

• Creating new projects, files, and folders• Managing existing files (editing, deleting, moving, and renaming)• Opening files in an editor• Importing and exporting files and projects• Browsing the contents of some project elements such as C/C++ source files and object files

The NonStop Project Explorer extends the C/C++ Projects view for NonStop development by addingcontext menu items and icons specific to NonStop development. More specifically, the NonStop ProjectExplorer adds the following items to the C/C++ Projects view context menu:

• New submenu items specific to creating projects, folders, and files for NonStop development, includingthe ability to create and open remote folders and files in remote NonStop projects.

• A Deploy Project menu item for invoking make deploy, which in turn transfers a project's final buildobject to NonStop.

• Delete, Move, and Rename menu items that work for local as well as remote projects.• An Open menu item that opens COBOL and pTAL editors.

The NonStop Project Explorer view also adds the following icons:

NonStop Project Explorer view 165

Page 166: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Icon What it represents

NonStop managed or makefile project

NonStop remote makefile project

COBOL source file

pTAL source file

Remote NonStop executable

For more information about the C/C++ Project view, see the C/C++ Development User Guide.

pTAL editorspTAL editors are text editors with language-specific syntax highlighting added. These editors providebasic Eclipse editor functionality and can be configured using Eclipse preferences. For example, you canuse:

• The Keys preference page (Window > Preferences > General > Keys) to change key bindings forpTAL editor.

• The Text Editors page (Window > Preferences > General > Keys) to change undo history size, tabwidth, whether line numbers are shown, and so on.

• The Code Templates page (Window > Preferences > C/C++ > Code Templates) to change thetemplate applied to new pTAL files. pTAL editors do not have the full range of features available in C/C++ editors.

• For UNIX formatting of exit codes, use the pTAL option –unix_status. By default, pTAL crosscompilers return exit status '0' only if the command does not result in any warnings or errors. It returnsexit status '1' if the compilation results in some warnings. In such cases, the linker command might notbe executed in NSDEE because NSDEE assumes that the compilation is not successful. To proceedwith linking and ignore compilation warnings, add the -unix_status option to the compiler tool. Thisoption returns exit status '0' even if the compilation has warnings, enabling NSDEE to continue thebuild by linking the object files.

COBOL editorsIn NSDEE 7.0, there are two types of COBOL editors:

• COBOL Editor on page 166• COBOL Editor++ on page 166

COBOL EditorCOBOL Editor is a text-based with basic language-specific syntax highlighting. This editor provides basicEclipse editor functionality and is configured using Eclipse preferences. By default, COBOL files areopened in this editor.

COBOL Editor++COBOL Editor++ is a new editor in NSDEE 7.0 which has additional features such as, outline view,advanced color coding, and content assist.

To open a COBOL file in COBOL Editor++, right-click the file and select Open With > Cobol Editor++.

166 pTAL editors

Page 167: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

COBOL Editor++ features

Syntax highlighting

The rules for syntax highlighting are listed in the following table. These rules cannot be configured.

Syntax Rule for syntax highlighting

Keywords Highlighted in bold.

String literals The text is in blue color.

Variables The text is in black color.

Comments The text is in green color.

The following figure shows the syntax highlighting.

Reference 167

Page 168: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Content assist

Content assist is supported for all the COBOL division and section headings. It is enabled based on theCOBOL grammar defined for the editor.

NOTE:

COBOL Editor++ features are only supported for local, Tandem COBOL source files.

Content assist has limited support inside the Procedure division.

COBOL Outline viewThe COBOL Outline view shows the structure of an active COBOL source file. This view is updated whileyou edit the COBOL project. You can also view the definition of an element by clicking it in the outlineview.

When a COBOL file is opened in COBOL Editor++, the Outline view is populated with all the variablesand procedures defined in the file. Outline view lists the following:

• Program ID• Data Division• Procedure Division

The variables and procedures defined under the Data Division and Procedure Division are alsodisplayed.

168 Reference

Page 169: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

If there is any error in the code, the Outline view may not be generated correctly.

C/C++ editorThe C/C++ editor provides a rich set of features for editing C and C++ source files. For details, see theC/C++ Development User Guide.

Outline viewThe Outline view provides an outline of C/C++ methods in the currently active C/C++ editor and can beused to quickly navigate to methods in the active editor. For details, see the C/C++ Development UserGuide.

Make Target viewYou can use the Make Target view to launch builds using make targets that you have defined in additionto the standard all, clean, and deploy targets. The Make Target view can be used for all project types,both local and remote. For details, see the C/C++ Development User Guide.

Problems viewThe Problems view shows warnings and errors across all open projects. You can quickly navigate tosource locations responsible for a warning or error by double-clicking the warning or error in the Problemsview. For details, see the C/C++ Development User Guide.

Tasks viewThe Tasks view provides a place for you to track tasks. It automatically adds TODO and FIXME entries thatyou add to your source code comments in C and C++ source files (but not in pTAL nor COBOL sources).For details, see the C/C++ Development User Guide.

Console viewThe Console view shows build output and output of programs you launch on NonStop, and provides adebug console for NSDEE's Debug product. For builds that involve more than one project, the Consoleview switches to showing the build output for a particular project when you select that project in theNonStop Project Explorer view. For details, see the C/C++ Development User Guide.

C/C++ editor 169

Page 170: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Properties viewThe properties view shows properties for the currently selected item in the NonStop Project Explorer view.For details, see the C/C++ Development User Guide.

Target Management terminalHow to open the Terminal view

To open the Terminal view:

• Open the Show View dialog box by selecting Window > Show View > Others.• In Show View dialog box, select Terminal under the Terminal folder.

Toolbars available in a terminal view

Connect

Toolbar toggle button to connect to a remote system configured setting.

Disconnect

Toolbar toggle button to disconnect an active remote connection.

Settings

Toolbar push button to open the Terminal settings dialog box.

170 Properties view

Page 171: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Toggle command input field

Toolbar toggle button to open or close the command input field.

New terminal drop down

Toolbar drop down button to open a new connection in the same view or open a new Terminal view.

How to use the Terminal view to connect to a remote NonStop system

Terminal view can be used to connect to a remote NonStop system using Telnet or SSH.

To use Telnet:

• Open the Terminal Settings dialog box by clicking on the Settings push button on the toolbar.• Select Telnet from the Connection Type drop down menu.• Enter the host.• Click OK.

To use SSH:

• Open the Terminal Settings dialog box by clicking on the Settings push button on the toolbar.• Select SSH from the Connection Type drop down menu.• Enter the host, user, and password.• Click OK.

Reference 171

Page 172: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Target Management terminal limitations

• The Guardian command tedit is not supported.• The block mode is not supported.• For SSH connections, the OSH command exit terminates the connection instead of taking you back

to the TACL prompt.• SSH connections usually take you to an OSH prompt. To switch to a TACL prompt, enter gtacl at the

OSH prompt and re-enter login credentials. For example:

/: gtaclTACL 1> logon super.superPassword:

For more information about Target Management, see http://www.eclipse.org/tm/tutorial/index.php.

New project wizardsNSDEE provides separate project wizards for local and remote projects, as well as one import wizard thatcreates local makefile projects from existing source. This section describes each of these wizards.

Local new project wizardsFour separate new project wizards can be used for local projects. Each is language-specific but almostidentical otherwise. Each wizard has four-to-five wizard pages, all of which are described below.

NonStop C, C++, COBOL, and pTAL Project wizard pagesExcept for their names, the first page of all four local new project wizards are the same. The settings onthe first page for these wizards are described in the following table.

172 New project wizards

Page 173: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Table 6: NonStop C, C++, COBOL, and pTAL Project wizard page settings

Setting Description

Project name Enter name for top-level project folder.

Use default location Clear to create project outside of workspace; else,project is created as a top-level directory in yourworkspace.

Location If you clear Use default location, enter path ofyour project in this field.

Project type Choose type of project to create. Project typesdescribes the project types in the list.

Toolchains Choose one or both tool chains depending onwhether you want to build for TNS/E, TNS/X, orboth.

Select project types and toolchains only if theyare supported on the platform

This check box is not applicable to NonStopprojects. (New project wizards are extended fromCDT where the check box is useful.)

The following table describes the project types listed in the Project type list.

Table 7: Project types

Setting Description

NonStop Executable Select Empty Project to create a managed projectthat builds an executable. Select the Hello Worldproject in the language associated with the project(for example, Hello World COBOL project) tocreate a project with a sample source file for ahello world program.

NonStop Dynamic Link Library Select Empty Project to create a managed projectthat builds a dynamic link library.

NonStop Linkfile Select Empty Project to create a managed projectthat builds a linkfile. (Linkfile projects provide a wayto breakup your application into multiple projects.

NonStop Archive Library Select Empty Project to create a managed projectto build an archive library.

NonStop Makefile project Select Empty Project to create a makefile projectwhere you supply the makefile.

Reference 173

Page 174: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Basic Settings pageThe Basic Settings page appears only if you select a hello world executable project on the first wizardpage. Whatever fields you fill in on the Basic Settings page are written to the comment header in thehello world source file written to your project.

Initial Build Settings page (managed builds)The Initial Build Settings page lets you configure the tools managed builds use to build your project.(The same page for makefile projects is described in the next section.) The following table describes eachof the settings on the Initial Build Settings page for managed builds. Which settings are visible dependson which project type and tool chains you chose on the first wizard page.

Table 8: Initial Build Settings page settings (managed builds)

Setting Description

Target Platform Choose the OSS or Guardian button, dependingon which platform you want your initial project tobuild for. Your choice is used to set theTARGET_SYSTYPE macro, which is passed to tooloptions that take OSS and Guardian options.

TNS/E or TNS/X compiler Select the c89, c99, or c11 option depending onwhether you want to build your project with thec89, c99, or c11 compiler on TNS/E or TNS/X. Anyof the compilers can be used to build the project,as long as it is part of the cross-compiler selected.

NOTE:

The preferred order for executing the c89linker command is c89 “list ofcompiler/eld options” “list ofobjects” “archives” “user/publicdlls”.

TNS/E tools root Select the root location of the RVU you want to usefor TNS/E builds. The locations in the combo boxare preceded by a plus sign if the RVU has all thetools you need or a minus sign if the RVU doesnot. (This selection is available only when youselect the TNS/E tool chain on the first wizardpage.)

TNS/X tools root Select the root location of the RVU you want to usefor TNS/X builds. The locations in the combo boxare TNS/X tools root preceded by a plus sign if theRVU has all the tools you need or a minus sign ifthe RVU does not. (This selection is available onlywhen you select the TNS/X tool chain on the firstwizard page.)

Table Continued

174 Basic Settings page

Page 175: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Setting Description

Cygwin/Msys bin Select the location of a bin directory for eitherCygwin or Msys (where make and other programsfor builds are located). NSDEE prepends bin toPATH before launching builds. Leave the comboblank if PATH already has an entry for a Cygwin orMsys bin.

Additional languages Select check boxes for any additional languagesyou expect the project to use.

SQL tools Select the SQL/MX or SQL/MP button if yourproject sources include SQL. Otherwise, select theNone button.

SQL/MX Preprocessor Locations The combo boxes in this group are only enabledwhen you select the SQL/MX button. Use thecombo boxes to specify the location of C/C++and/or COBOL preprocessors. NSDEE use theselocations to set the environment variables MXSQLC(for C/C++) and MXSQLCO (for COBOL).

Initial Build Settings page (makefile projects)The Initial Build Settings page for makefile projects lets you specify where the C/C++ indexer searchesfor system headers. It also provides options for setting PATH and COMP_ROOT environment variables. Thedefault settings configured in NonStop Development preferences are displayed in the Initial BuildSettings page for makefile projects. For more information, see NonStop Development on page 188.

The following table describes each of the settings on the Initial Build settings page for makefile projects.Which settings are visible depends on which tool chains you chose on the first wizard page.

Table 9: Initial Build Settings page settings (makefile projects)

Setting Description

TNS/E tools root Location of the RVU for TNS/E builds. The C/C++indexer uses this location to find system headers.

TNS/X tools root Location of the RVU for TNS/X builds. The C/C++indexer uses this location to find system headers.

Table Continued

Initial Build Settings page (makefile projects) 175

Page 176: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Setting Description

Cygwin/Msys bin Location of a bin directory for either Cygwin orMsys (where make and other programs for buildsare located). NSDEE prepends bin to PATH beforelaunching builds. Leave the combo blank if PATHalready has an entry for a Cygwin or Msys bin.

Set COMP_ROOT and update PATH based ontools root above

If selected, NSDEE sets the COMP_ROOTenvironment variable based on your TNS/E toolsroot or TNS/X tools root selection. NSDEE alsoprepends the bin directory under tools rootdirectories to the PATH environment variable.

Remote Settings pageThe Remote Settings page lets you specify the NonStop system and location where you want a project’sfinal build object deployed. If you chose SQL/MX or SQL/MP on the previous page, Remote Settings alsocontains areas for specifying systems for SQL preprocessing and compilation. If you chose multiple toolchains, Remote Settings contains one tabbed page for the platform associated with each tool chain youchose.

The following table describes the settings available on the Remote Settings page when neither SQL/MXnor SQL/MP is selected on the previous page.

Table 10: Remote Settings page settings (no SQL)

Setting Description

Target system/user (-h/-u) The system and user name to be passed to theDeploy tool for the deploy makefile target. Thesystem/user name pair in the combo box is split upso that system and user can be passed separatelyto the -h and -u options, respectively.

Target destination (-dir) Optional. Remote directory or subvolume wherelocally built object is transferred on the selectedNonStop system (passed to -dir option forDeploy tool).

Target file name (-r) Optional. File name that is given to the remotecopy of the transferred file (passed to –r option ofDeploy tool).

The following table describes settings available on the Remote Settings page when SQL/MX is selectedon the previous page.

176 Remote Settings page

Page 177: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Table 11: Remote Settings page settings (SQL/MX)

Setting Description

Target system/user (-Wsql{host/user}=) NonStop system and user ID to be passed to thecompiler for SQL compilation. The system/username pair in the combo box is split up so thatsystem and user can be passed separately to the –Wsqlhost and -Wsqluser options, respectively.

OSS compilation directory (-Wsqlloc=) Remote directory where SQL compilation takesplace (passed to –Wsqlloc= option).

Use same system as for SQL/MX compilation Select these if the same system and user set forSQL/MX compilation can also be used for Deployand SQL/MX preprocessing.

Target system/user (-h/-u) The system and user name to be passed to theDeploy tool for the deploy makefile target. Thesystem/user name pair in the combo box is split upso that system and user can be passed separatelyto the -h and -u options, respectively.

Target destination (-dir) Optional. Remote directory or subvolume wherelocally built object is transferred on the selectedNonStop system (passed to -dir option forDeploy tool).

Target file name (-r) Optional. File name that is given to the remotecopy of the transferred file (passed to –r option ofDeploy tool).

System (-Wsql{host/user}=) NonStop system and user ID to be passed to thecompiler for SQL preprocessing. The system/username pair in the combo box is split up so thatsystem and user can be passed separately to the –Wsqlhostand -Wsqluser options, respectively.

ODBC port (-Wsqlmx_port=) Specifies the NonStop system port to connect to asthe ODBC port (passed as argument to –Wsqlmx_port=).

The following table describes settings available on the Remote Settings page when SQL/MP is selectedon the previous page.

Reference 177

Page 178: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Table 12: Remote Settings page settings (SQL/MP)

Setting Description

Target system/user (-Wsql{host/user}=) NonStop system and user ID to be passed to thecompiler for SQL compilation and preprocessing.The system/user name pair in the combo box issplit up so that system and user can be passedseparately to the –Wsqlhost and -Wsqluseroptions, respectively.

Target file name (-Wsqlprog=) Optional. Specifies the file name given to the finalbuild output when it is copied to a NonStop system(passed as argument to –Wsqlprog=).

Working subvolume (-Wsqlwork=) Optional. Specifies the working directory to use onthe NonStop system (passed as argument to –Wsqlprog=).

Catalog location (-Wsqlcomp=catalog ) Optional. Specifies subvolume catalog (passed asargument to –Wsqlcomp=catalog).

Use same system as for SQL/MP compilation Select this if the same system and user set forSQL/MP compilation can also be used for SQL/MPpreprocessing.

Select Configurations pageThe Select Configurations page lets you choose the initial build configurations created for a project. Fordetails, see the C/C++ Development User Guide.

Import Existing Code wizardThe Import Existing Code wizard provides a simple way to create a makefile project for an existing codebase. To open the wizard, select Create Makefile Project with Existing Code from the New submenu ofthe context menu for the NonStop Project Explorer view. Import Existing Code wizard settingsdescribes the settings for the Import Existing Code wizard.

The default settings you configure in NonStop Development preferences are displayed in the ImportExisting Code wizard. You can change these settings. For more information on NonStop Developmentpreference settings, see NonStop Development on page 188.

Table 13: Import Existing Code wizard settings

Setting Description

Project name Enter name for top-level project folder.

Existing Code Location Location of existing code base.

Table Continued

178 Select Configurations page

Page 179: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Setting Description

Tools root Location of the RVU for builds. The C/C++ indexeruses this location to find system headers. Thedefault settings for TNS/X cross compiler takespreference over the default setting for TNS/E. If thedefault TNS/X cross compiler setting is notavailable, the default setting for TNS/E crosscompiler is set for the makefile project.

Cygwin/Msys bin Location of a bin directory for either Cygwin orMsys (where make and other programs for buildsare located). NSDEE prepends bin to PATH beforelaunching builds. Leave the combo blank if PATHalready has an entry for a Cygwin or Msys bin.

Set COMP_ROOT and update PATH based ontools root above

If selected, NSDEE sets the COMP_ROOTenvironment variable based on your Tools rootselection. NSDEE also prepends the bin directoryTools root selection to the PATH environmentvariable.

Remote Makefile Project wizardThe Remote Makefile Project wizard lets you create makefile projects hosted on NonStop. The RemoteMakefile Project wizard has two wizard pages named Remote Makefile Project and Build Settings. Thefollowing table describes the settings for the Remote Makefile Project wizard.

Table 14: Remote Makefile page settings

Setting Description

Project name Enter name for top-level project folder.

Build system NonStop system where project files reside andwhere project is built.

Project Location Location of project on NonStop system.

Enter Guardian project location in the format[\<systemname>.]$<volume>.<subvol> andan OSS project location in the format /E/systemname/remote project. You can browse andadd a folder to the Remote Project from ExpandNonStop systems.

Platform Choose the OSS or Guardian button based on theplatform that your project sources reside on.

Connect to Build System Select this button to establish a connection to thesystem you select from the Build system combo.

Referenced remote makefile projects Select other remote projects (if any) that must bebuilt before the project you are creating is built.

Remote Makefile Project wizard 179

Page 180: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

The following table describes the settings for the Build Settings page.

Table 15: Build Settings page settings

Setting Description

Use default Select to use the default build command (make forOSS, gmake for Guardian).

Remote build command Command invoked on remote system when youchoose Build Project or Clean Project actions orwhen you choose a custom build target in theMake Target view.

When Remote build command is invoked on aGuardian or OSS remote project with multiplefolders, the build or clean is triggered for theselected remote project while creating the RemoteMakefile project.

Build (incremental build) Argument passed to build command when youchoose the Build Project action.

Clean Argument passed to build command when youchoose the Clean Project action.

Create makefile Select if you want NSDEE to create a makefile inthe remote top-level directory of the project.

Overwrite makefile Select if you want NSDEE to overwrite an existingmakefile (if any) in the remote top-level directory ofthe project.

Default editor For Guardian projects only, select the default editorto use for source files in the project. In theNonStop Project Explorer view, Guardian sourcefiles appear with a suffix that matches the defaulteditor you choose. The suffix aids Eclipse inopening the correct editor, but the actual Guardiansource file names do not have the suffix.

New file, folder, and class wizardsThe NonStop Development perspective provides the new file, folder, and class wizards available in theC/C++ perspective with enhancements to support COBOL, pTAL, and remote file systems. This sectiondescribes the NSDEE-specific enhancements to these wizards.

New FileThe New File wizard creates a new file in a selected directory. For details, see the Workbench UserGuide. NSDEE extends this wizard to work with remote NSDEE projects in addition to local projects. Youcan create remote files using the same procedures you use to create local files.

180 New file, folder, and class wizards

Page 181: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

New File from TemplateThe New File from Template wizard is an extension of the New File wizard by CDT which provides achoice of templates (initial file content) to be used when creating a file. NSDEE extends this wizard towork with remote NSDEE projects in addition to local projects.

NOTE:

This wizard can only create remote Guardian files using the default file type for the remote Guardianproject. To create a file from a template for a non-default file type for Guardian, use the New SourceFile wizard.

New FolderThe New Folder wizard creates a new folder in a selected directory. For details, see the Workbench UserGuide.

NSDEE extends this wizard to work with remote NSDEE projects in addition to local projects. NSDEEalso adds a feature specific to remote projects, which is the ability to link to remote directories andsubvolumes in remote projects. While adding new folder to a Remote Project, you can choose the folderfrom Expand node. A new folder added to an existing remote Guardian project uses the system name asthe prefix for the folder name. For an existing remote OSS project, the new folder is added to the systemname folder.

To create a link to a remote directory or subvolume:

1. Select the remote project in the NonStop Project Explorer view.2. Enter the path of the remote directory or subvolume in the Folder name field, or select the Remote

Browse button to browse the remote system for a directory or subvolume.3. Click Finish to create the link.

For remote OSS projects, the newly created remote project folder is added below the remote systemname folder.

Figure 78: Adding a subvolume to a remote Guardian project on page 181 shows an example of aproject named Car where the original project location was $NSDEE.CAR and the New Folder wizard wasused to add $NSDEE.CARDEMO.

Figure 78: Adding a subvolume to a remote Guardian project

New C/C++ Class WizardThe New C++ Class wizard creates both source and header files for the class name you specify, andcreates initial constructors and destructors for your class. For details, see the C/C++ Development UserGuide.

NOTE:

This wizard does not support remote projects.

New Header FileThe New Header File wizard creates a new C or C++ header file in a selected directory and optionallyapplies a header template. For details, see the C/C++ Development User Guide.

New File from Template 181

Page 182: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NSDEE extends this wizard to work with remote NSDEE projects in addition to local projects. You cancreate remote header files using the same procedures you use to create local header files.

New Source FileThe New Source File wizard creates a new C, C++, COBOL, or pTAL source file in a selected directoryand optionally applies a language-specific source template. For details, see the C/C++ Development UserGuide.

NSDEE extends this wizard to work with remote NSDEE projects in addition to local projects and alsoextends it to work with COBOL and pTAL sources. You can create remote source files using the sameprocedures you use to create local source files.

New Source FolderThe New Source Folder wizard creates a new source directory for projects with managed builds. It isimportant to use this wizard for projects with managed builds because it automatically precludes issueswith nested folders in builds by setting filters for nested source folders. You can view and edit these filtersfrom the Source Location tab of the Paths and Symbols property page. For details, see the C/C++Development User Guide.

NOTE:

This wizard does not support remote projects.

ToolsThe NonStop Tools menu in the NonStop Development perspective provides tools for tasks that aren’tpart of the typical edit-build-deploy cycle of work. Two of the menu items on the NonStop Tools menu(Configure Tool Locations and Configure Connections) are actually shortcuts to preference pagesdescribed in Preferences on page 55. The other menu items open the tools described in this section, aswell as a remote file system browser which can be opened from many dialogs.

The following shortcut keys are also available for the NonStop Tools menu.

NonStop Tools Alt+O

Transfer Files Alt+O+T

Configure Connections Alt+O+C

Configure Tools Location Alt+O+L

Launch Visual Inspect Alt+O+V

Open Remote File Alt+O+O

Import ETK Projects Alt+E+N

Import NSDEE2.x Projects Alt+O+N

Open Remote File dialog boxThe Open Remote File dialog box opens a file on a remote NonStop system so you can edit the file inEclipse. When NSDEE opens the file, it downloads and opens a cached local copy. Each time you savethe local copy, NSDEE uploads the file to the NonStop system. NSDEE also detects and reports issues

182 New Source File

Page 183: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

should your local copy become out of sync with the remote file (as when someone else makes an edit tothe local file).

Open Remote File provides the history of the ten most recently opened files. To choose a file from thehistory list, select the File location drop down menu. Information such as platform, system, and editor arealready filled. If the File location path length is greater than 50 characters, the path is truncated to 50characters and prefixed with "…". The full path is displayed after selecting the file from the drop downmenu.

You can also use the Open Remote File dialog box to create a file on a NonStop system. If NSDEEdetects that the path you specify doesn’t exist, it asks you if you want to create a new file.

The following table describes settings in the Open Remote File dialog box.

Table 16: Settings in the Open Remote File dialog box

Settings Description

Platform Choose the OSS or Guardian button based on theplatform the file resides on.

System Select the NonStop system the file resides on.

File location Enter the full path to the remote file or select arecently opened file.

You can specify a Guardian file location in theformat [\<systemname>.]$<volume>.<subvol>.<filename> and anOSS file location in the format E/systemname/remote project. While opening a remote fileyou can also select a file from the Expand node.

Editor Select the type of editor to open the file with.

Editors supported on both OSS and Guardianplatform:

• Text• C• C++• COBOL

Java editor is supported only on OSS platform andpTAL editor is supported only on Guardianplatform.

Open Select to open the remote file and dismiss thedialog box.

Cancel Select to cancel opening a remote file and todismiss the dialog box.

Transfer Files WizardThe Transfer Files export wizard transfers one or more project files to a location on a NonStop system.You can use the Transfer Files wizard to transfer a single file, multiple files, or all files contained in aproject, including executable and object files.

Transfer Files Wizard 183

Page 184: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

You can open the Transfer Files wizard by selecting Export from the context menu of the NonStopProject Explorer and then selecting NonStop Development > Transfer Files, or you can select TransferFiles from the NonStop Tool menu.

If you select a project or project directories or files before opening the Transfer Files wizard, the wizardopens with your selections already made. The Transfer Files wizard has three main areas. The top area isfor choosing files to be transferred. The middle Destination group box is where you enter details of whereyou want files transferred to. The lower Options group box provides various options for file transfer.

Table 5 describes the selections you can make in each of the three areas.

Table 17: Transfer Files wizard controls

Control Description

Project and file selection area

Directories for project combo andproject directories tree

Combo selection sets project shown in the project directorytree. Select a directory to show its files to the right. Select adirectory check box to select all files in that directory.

Files in selected project directory list Use the check boxes next to file names to select or clearindividual files for transfer.

Filter Types Opens the Filter Types dialog, which allows you to filter filesby file extension. For example, to transfer only .c files, selectthe .c check box in the Filter Types dialog box, then selectwhich .c files to transfer in the Transfer Files wizard.

Select All Selects all files and directories in project (or all files anddirectories after filtering if you applied filters using the FilterTypes dialog box).

Deselect All Clears all files and directories in project (or all files anddirectories after filtering if you applied filters using the FilterTypes dialog box).

Destination

group box

System

comboNonStop server where files are transferred.

Edit: Opens Network Configuration preferences which you can useto add systems and adjust connection settings.

Platform Select platform for transferred files (OSS or Guardian).

Location Directory or subvolume where files are transferred.

You can specify a Guardian file location in the format[\<systemname>.]$<volume>.<subvol> and an OSSfile location in the format E/systemname.

Options group box

Table Continued

184 Reference

Page 185: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Control Description

Overwrite existing remote file Select if you want the transfer of files to overwrite existingfiles with the same name on the remote system.

Transfer only if modified locally sinceprevious transfer

Select to transfer only those files which you modified since aprevious transfer using the Transfer Files wizard.

Copy all files to OSS destinationwithout creating sub-directories

For OSS only, select if you want all files selected to betransferred into the location specified in the Destination groupbox without creating the sub-directories in your project underthe remote location.

Create and transfer obey file thatmaps source locations for Inspect

Creates an obey file that you can use with Inspect to mapWindows locations of source files to the locations where youtransferred those files. This enables Inspect to find thesources for programs compiled on Windows.

Import ETK Projects wizardThe Import ETK Projects wizard creates one or more NSDEE managed build projects from one or moreETK projects, applying ETK project settings to the new NSDEE projects. The following table describes thesettings available for the Import ETK Projects wizard.

Table 18: Import ETK Projects wizard settings

Setting Description

Solution file Enter the path to an ETK solution file.

Projects Lists all projects associated with the ETK solution file youenter in the Solution file field. Clear any projects youdon’t want to import.

Copy projects into workspace Copy the files in the ETK projects into your workspace. Ifyour ETK projects are not self-contained, not copyingproject files may be a better option.

Hide projects that already exist in theworkspace

Hide ETK projects that already exist in the workspace inProjects: field in Import ETK Projects wizard.

Create TNS/X configurations forselected projects

Select to create TNS/X configurations for all projectsselected for migration based on the TNS/E configurationsin the respective projects.

Add project to working sets Select this check box to add the projects created toworking sets. See the Workbench User Guide forinformation on working sets.

All project properties of migrated projects are maintained unless otherwise noted in the project migrationreport.

NSDEE does not support non-NonStop projects. ETK solution files may contain non-NonStop projectswhich will not be migrated into NSDEE. If NonStop projects contain references to internal non-NonStop

Import ETK Projects wizard 185

Page 186: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

projects, then these project references are not migrated to NSDEE. NSDEE 7.0 does not supportimporting TNS/R-based projects.

Import NSDEE 2.x Project wizardThe Import NSDEE 2.x Project wizard creates one or more NSDEE 7.0 projects from NSDEE 2.1 localprojects. The following table describes the settings available for the Import NSDEE 2.x Project wizard.

Table 19: Import NSDEE 2.x Project wizard settings

Setting Description

Select root directory Enter a directory path under which NSDEE should searchfor NSDEE 2.x projects.

Projects Lists all projects found under the directory path youspecified for Select root directory. Clear any projects youdo not want to import.

Search for nested projects Search for nested NSDEE 2.x projects in the path.

Copy projects into workspace Copy the files in the NSDEE 2.x projects into yourworkspace.

Hide projects that already exist in theworkspace

Hide NSDEE 2.x projects that already exist in theworkspace in Projects: field in Import NSDEE 2.xProjects wizard.

Create TNS/X configurations forselected projects

Select to create TNS/X configurations for all projectsselected for migration based on the TNS/E configurationsin the respective projects.

Add project to working sets Select this check box to add the projects created toworking sets. See the Workbench User Guide forinformation on working sets.

All project properties of migrated projects are maintained unless otherwise noted in the project migrationreport.

NSDEE does not support non-NonStop projects. ETK solution files may contain non-NonStop projectswhich will not be migrated into NSDEE. If NonStop projects contain references to internal non-NonStopprojects, then these project references are not migrated to NSDEE. NSDEE 6.0 does not supportimporting TNS/R-based projects.

Launch Visual Inspect dialog boxThe Launch Visual Inspect dialog box invokes Visual Inspect from a location you specify.

To launch Visual Inspect, select NonStop Tools > Launch Visual Inspect:

186 Import NSDEE 2.x Project wizard

Page 187: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Remote file browserNSDEE provides a remote file browser that is opened by the Browse button in many dialog boxes. Thename of the browser varies according to what type of object you are browsing for. When you are browsingfor a file, for example, the browser name is Choose a file.

Figure 79: Remote browsing for a Guardian file on page 187 shows the remote browser when openedto choose a Guardian file.

Figure 79: Remote browsing for a Guardian file

The Contents of field at the top of the browser shows the directory, volume, or subvolume whose content(files and folders) is shown in the center of the dialog. You can edit the Contents of field and select

Return or the load contents button to see the contents of the location you enter.

You can choose the up button to view the contents of the parent directory and double-click folderentries in the folder and file list to open and view the content of a child folder.

The field at the bottom is for a file or folder name, depending on what your search. Selecting a file orfolder above it adds the file or folder name to the field, as appropriate.

Generate Code coverageThe Code coverage tool is used to generate the code coverage report. To open this tool, select theproject and then click Project > Generate Code coverage. Or, right-click the project and select GenerateCode coverage.

Remote file browser 187

Page 188: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

More InformationGenerating Code coverage for managed projects on page 159Generating Code coverage for makefile projects on page 160Code coverage basics on page 45

PreferencesPreferences specific to NSDEE are available in the Preferences dialog box under the category, NonStopDevelopment. The General and C/C++ categories also have many settings that alter the default behaviorof NSDEE.

To open the Preferences dialog box, choose Preferences from the Windows menu. Preferencecategories are listed to the left of the dialog box.

NonStop DevelopmentThe NonStop Development preferences dialog box is used to configure default values for the projectsettings.

Figure 80: NonStop Development preference dialog box

188 Preferences

Page 189: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Table 20: NonStop Development preferences dialog box

Setting Description

Platform for projects, launchers, file transfers Select OSS or Guardian as the default selection fordialog boxes that give you a choice of platform.The default value is OSS.

TNS/X tools root for projects Select the cross compiler version for TNS/X fromthe list, or click Configure locations to configurethe path. The default value is the latest crosscompiler.

TNS/E tools root for projects Select the default cross compiler version for TNS/Efrom the list, or click Configure locations toconfigure the path. The default value is the latestcross compiler.

Cygwin/Msys bin Select the default tool for the make tool from thelist, or click Configure locations to configure thepath. Click Apply to save the preference settingsor click Restore Defaults to restore the defaultsettings. The specified settings appear in projectcreation wizard and other tools.

Store deploy and other remote NonStop systeminformation in separate project file

Select the corresponding checkbox to store thedeploy information in a separate file for all projectsin the workspace.

If this option is selected:

• The deploy information in all the projects in theworkspace is moved to a .remote file underthe respective projects. And, this information isdeleted from the .cproject file.

• For a new project created in the workspace, thedeploy information is stored in a .remote file inthe project directory.

• When an existing NSDEE project (of the oldstructure) is imported, the values of the deployinformation in the .cproject file is set toempty. This information is stored in anew .remote file

Once selected, this option is disabled for theworkspace.

If this option is not enabled for a workspace, and aproject with .remote file is imported, the projectsis closed in the workspace. This isbecause .remote file is not supported on theworkspace.

Table Continued

Reference 189

Page 190: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Setting Description

OK Apply all changes and dismiss dialog box.

Cancel Cancel all changes and dismiss dialog box.

Code TemplatesThe Code Templates preference page provides a link to the C/C++ Code Templates page, where you canchange the templates applied to new files you create. NSDEE adds COBOL and pTAL source filetemplates to those provided by CDT (see Figure 81: Default COBOL source template on page 190).For details on changing templates, refer to the C/C++ Development User Guide.

Figure 81: Default COBOL source template

Network ConnectionsThe Network Connections preference page provides a central place to configure connections to remotesystems. Connections configured using this page appear in combo boxes in the form: systemName(userID) in project property pages, launchers, and other dialog boxes where a NonStop system and userID must be input. The following table describes the settings in the Network Connections preference page.

190 Code Templates

Page 191: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Table 21: Network Connection settings

Setting Description

System combo Combo box containing list of system/user name pairs.Settings on the Network Connections page apply to thecurrently selected system and user name. To add asystem, select the Add/Remove button.

Add/Remove button Select to add or remove a system from the System combobox.

User name field User name or alias to use when connecting to a specifiedsystem.

SSH/SFTP button Select to use SSH and SFTP protocols (default).

Settings button (SSH/SFTP) Select to change default settings for SSH and SFTP.

Telnet/FTP button Select to use Telnet and FTP protocols.

Settings button (Telnet/FTP) Select to change default settings for Telnet and FTP.

Connect (Disconnect) button Select to connect (when button name is Connect) ordisconnect (when button name is Disconnect) from thecurrently selected system.

Import Opens the Import Connection Configurations wizard.

Export Opens the Export Connection Configurations wizard.

Add or Remove Connection Configurations dialog boxThe Add or Remove Connection Configurations dialog box lets you add, remove, and copy connectionconfigurations. To open it, select the Add/Remove button on the Network Connections preference page.The following table describes the settings in the Add or Remove Connections Configurations dialog box.

Table 22: Add or Remove Connection Configurations dialog box settings

Setting Description

Connection Configurations list List of system/user name pairs that can be removed orcopied.

Remove button Removes selected configurations.

Copy button Copies the currently selected configuration, including allprotocol settings.

System field Area for entering a system name or IP address.

Table Continued

Add or Remove Connection Configurations dialog box 191

Page 192: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Setting Description

Add button Select to add the entry in System field to the list ofconnection configurations.

OK button Apply all changes and dismiss dialog box.

Cancel button Cancel all changes and dismiss dialog box.

Secure Shell Settings dialog boxThe Secure Shell Settings dialog box lets you configure how SSH and SFTP connect to NonStopsystems. To open it, select the Settings button to the right of the SSH/SFTP button on the NetworkConnections preference page. The following table describes the settings in the Secure Shell Settingsdialog box.

Table 23: Secure Shell Settings dialog box settings

Setting Description

SSH/SFTP port field Port number SSH and SFTP connects to on the NonStopserver.

Use public key authentication check box Select to use public key authentication via a passphrase.

Private key file field Path to a private key file that you generated via a programsuch as ssh-keygen.

Check for known hosts check box Select to have SSH save validated hosts to a file. (If youcleared this setting, you are prompted on every login toverify that the login system is trusted.)

Known hosts file field Path to a file where trusted hosts can be stored.

SFTP-Default directories

GUARDIAN_HOME The GUARDIAN_HOME path. It is based on the SFTP-INITIAL-DIRECTORY set for the user in the SSH2database and INITIAL-DIRECTORY set for the user in theSafeguard database.

OSS_HOME The OSS_HOME path. It is based on the SFTP-INITIAL-DIRECTORY set for the user in the SSH2 database andINITIAL-DIRECTORY set for the user in the Safeguarddatabase.

SSH Configuration

Table Continued

192 Secure Shell Settings dialog box

Page 193: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Setting Description

SHELL-PROGRAM* list Specify the initial terminal settings by selecting one of thefollowing options from the SHELL-PROGRAM* list

• OSH - It is the default value.

• TACL - Select this option if the SSH configuration is‘SHELL-PROGRAM *MENU* TACL FORCE’.

The following error message is displayed if the setting onNonStop is TACL and TACL option is not selected inSHELL-PROGRAM* list:Problem in Initializing shell. Select SHELL-PROGRAM settings to TACL from SSH settings dialog box.

NOTE:

SHELL-PROGRAM option is supported only forTACL and OSH.

OK button Apply all changes and dismiss dialog box.

Cancel button Cancel all changes and dismiss dialog box.

Telnet/FTP settingsThe Telnet/FTP Settings dialog box lets you configure how Telnet and FTP connect to NonStop systems.To open it, select the Settings… button to the right of the Telnet/FTP button on the NetworkConnections preference page. The following table describes settings in the Telnet/FTP settings dialogbox.

Table 24: Telnet/FTP settings

Setting Description

Telnet port field Enter port NSDEE uses to connect to the Telnet server onthe NonStop system. (Default is 23.)

FTP port field Enter port NSDEE uses to connect to FTP server on theNonStop system. (Default is 21.)

Active FTP button Select to have NSDEE use active protocol when openingFTP ports.

Passive FTP button Select to have NSDEE use passive protocol when openingFTP ports.

Save password (encrypted) button Select to have NSDEE save password in encrypted formafter first successful login. NSDEE uses saved passwordon subsequent logins.

Table Continued

Telnet/FTP settings 193

Page 194: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Setting Description

Default (no service or window choice)button

Select when directly connecting to a STATIC windowbased on the IPv4 or IPv6 address of the client.

Service or window name button Enter the name of a service (such as TACL or OSH) or astatic window (such as #WIN05) NSDEE is to choosewhen logging in.

Enter Choice> prompt combo box Choose on if Telserv is configured to show the EnterChoice> prompt during login.

Authentication combo box Choose on if Telserv is configured to prompt for username and password when you login.

Login shell* combo Choose TACL or OSH, whichever is started by the serviceyou use to login. NSDEE cannot connect using a servicethat does not start a TACL or OSH process.

Tool LocationsThe Tool Locations preference page provides a central place to configure the locations of tools used forbuilding NonStop applications on a PC. The Tool Locations preference page consists of three tabbedpage titled Cross Compilers, SQL/MX Preprocessors, and Cygwin/Msys.

Cross Compilers pageThe Cross Compilers page lists all currently configured RVUs for cross compilers and linkers. Thefollowing table describes the cross compiler settings on this page.

Table 25: Cross Compiler page settings

Setting Description

Refresh button Refresh currently configured RVUs. This action does notdetect newly-installed RVUs.

Add button Opens the Add Cross Compiler Location dialog box.

Modify button Opens the Modify Cross Compilers Location dialog box.

Delete button Deletes selected rows from list of RVUs.

The Add Cross Compilers dialog box lists the RVUs for cross compilers and linkers that can be added.The following table describes the add cross compiler dialog box settings.

194 Tool Locations

Page 195: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Table 26: Add Cross Compiler dialog box settings

Setting Description

Location field Directory under which there are one or more RVUs.

Auto-detect root folders* for crosscompilers under the above locationbutton

Select to have NSDEE search for RVUs under the givenlocation and add all RVUs found to the list of configuredRVUs.

Use the above location as root folder*button

Select to add a single RVU. The location specified musthave an RVU ID as the name of the last directory in itspath.

Set the above non-standard location asfolder for button

Select to specify a non-standard directory as the locationof an RVU. Use the combo box to the right to select J or L.Use the text box to the right of the combo to enter theRVU version number.

OK button Apply all changes and dismiss dialog box.

Cancel button Cancel all changes and dismiss dialog box.

Modify Cross Compiler dialog box

The Modify Cross Compiler Location dialog box has one field only—the New location field. You canuse it to specify a different location for an RVU that you select from the list of RVUs.

SQL/MX Preprocessors pageThe SQL/MX Preprocessors page lists all currently configured SQL/MX preprocessors. The followingtable describes the SQL/MX preprocessor settings on this page.

Table 27: SQL/MX Preprocessors page settings

Setting Description

Refresh button Refresh currently configured preprocessors. This actiondoes not detect newly-installed preprocessors.

Add button Opens the Add SQL/MX Preprocessor Location dialogbox.

Modify button Opens the Modify SQL/MX Preprocessor Locationdialog box.

Delete button Deletes selected rows from list of preprocessors.

The Add SQL/MX Preprocessor Location dialog box lists the preprocessors that can be added. Thefollowing table describes the add SQL/MX preprocessor location dialog box settings on this page.

SQL/MX Preprocessors page 195

Page 196: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Table 28: Add SQL/MX Preprocessor Location dialog box settings

Setting Description

Location field Directory under which one or more preprocessorsinstalled.

Auto-detect root folders* for SQL/MXpreprocessors under the above locationbutton

Select to have NSDEE search for preprocessors under thegiven location and add all preprocessors found to the listof configured SQL/MX preprocessors.

Use the above location as root folder*button

Select to add a single preprocessor. The location specifiedmust have as the last directory in its path a name thatconforms to preprocessor naming conventions.

Set the above non-standard location asfolder for button

Select to specify a non-standard directory as the locationof the SQL/MX preprocessor. Use the combo box to theright to select C or COBOL version of the preprocessorname. Use the text box to the right of the combo to enterthe preprocessor's version number.

OK button Apply all changes and dismiss dialog box.

Cancel button Cancel all changes and dismiss dialog box.

Modify SQL/MX Preprocessor dialog box

The Modify SQL/MX Preprocessor Location dialog box has one field only—the New location field. Youcan use it to specify a different location for an SQL/MX preprocessor that you select from the list ofpreprocessors.

Cygwin/Msys Page settingsThe Cygwin/Msys page lists the bin locations for Cygwin and Msys. The following table describes thesettings on this page.

Table 29: Cygwin/Msys page settings

Setting Description

Cygwin bin field Select if tools are located in a Cygwin bin directory. Enterthe path of the Cygwin bin directory. Select Browse iftools are located in a different bin.

Msys bin field Select if tools are located in a Msys bin directory. Enterthe path of the Msys bin directory. Select Browse if toolsare located in a different bin.

Restore defaults button Select to restore the default bin directory location.

Apply button Apply all changes and dismiss dialog box.

Cancel button Cancel all changes and dismiss dialog box.

196 Cygwin/Msys Page settings

Page 197: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Transfer Files WizardThe Transfer Files wizard preference page lets you change the default settings for the Transfer Fileswizard. To open it, select the Settings… button to the right of the Telnet/FTP button on the NetworkConnections preference page. The following table describes the preference settings on this page.

Table 30: Transfer File Wizard preference page settings

Setting Description

Destination group box Group for setting transfer destination preferences.

System combo box Default system/user name pair.

OSS button Select to have OSS as the default destination platform.

Guardian button Select to have Guardian as the default destinationplatform.

Use default platform setting button Use the platform preference on the NetworkConnections preference page for this preference.

Location field Default location to transfer files.

Options group Group for setting file transfer option preferences.

Overwrite existing remote files check box Overwrite remote files if they already exist.

Transfer only if modified locally sinceprevious transfer check box

Do not transfer local file unless it has been modified sincea previous transfer.

Copy all files to OSS destination withoutcreating subdirectories check box

For OSS file transfers only, no directories be createdduring file transfer. All files are written to a single location(even though they may exist in different directorieslocally).

Create and transfer Obey file that mapssource locations for Inspect check box

Create an Obey file that can be passed to Inspect to pointInspect at the source files transferred from your PC for adebugging session.

TracingYou can modify the tracing options of plug-ins dynamically using the Tracing preference page. The tracingoutput settings allow you to choose where the tracing messages are saved and choose a different outputfile. A new file is created for the first time the plug-in is started. If the maximum number of trace filesstored is reached, the oldest file is deleted. To prevent creation of excessively large log files, set amaximum trace file size. The trace messages are sent to a file named trace.log, located next to theplatform log file.

More InformationEnabling or disabling tracing on page 161

Transfer Files Wizard 197

Page 198: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

PropertiesProperties are attributes of projects, directories, and files that enable you to customize various aspects ofbuilds and development activities. Many property pages available at the project level are not available forindividual source files and directories. For example, you can configure all build tools at the project levelbut only compilers at the source file level.

This section describes each of the property pages available from the Properties dialog box when youselect an item in the NonStop Project Explorer and then select Properties from the context menu.

ResourcesThe Resource property page shows file system attributes of a selected project, directory, file, or link. Fordetails, see the C/C++ Development User Guide.

BuildersThe Builders property page allows you to make changes to how project builders are run. For details, seethe C/C++ Development User Guide.

C/C++ BuildMake Settings

The C/C++ Build property page lets you customize builder settings and behavior for local projects and isapplicable to COBOL and pTAL as well as C/C++ projects. For details, see the C/C++ Development UserGuide.

Make SettingsThe Make Settings property page is for remote projects only. On its Make Build tabbed page, you canspecify an alternate command (other than make or gmake) to run your project builds. You can also specifyalternate targets to be passed to make or gmake instead of all and clean when you select the actionsBuild Project and Clean Project, respectively. Using the Environment tab, you can specify DEFINEs,ASSIGNs, and PARAMs to be set before a Guardian build, or environment variables to be set before anOSS build.

Build VariablesThe Build Variables page lets you add build variables or change existing ones for local NSDEE projects.For details, see the C/C++ Development User Guide. For details on setting NSDEE-specific buildvariables, see Setting build variables on page 126.

Discovery OptionsThe Discovery Options page provides settings for local SQL/MP or SQL/MX C/C++ projects. Thesettings assist you in turning off warnings and errors shown for SQL statements in C/C++ editors. Fordetails, see Removing errors and warnings in C/C++ editors on page 131.

NOTE:

Eclipse Mars hides the Discovery Options property page by default. To enable, from Window >Preferences > C/C++ > Property Pages Settings choose Display Discovery Option page.

EnvironmentThe Environment property page lets you configure what environment variables are set when you buildyour project and is available for local projects only. To set environment variables for remote projects, use

198 Properties

Page 199: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

the Environment tab of the Make Settings property page. For details, see the C/C++ Development UserGuide. For details on setting NSDEE-specific environment variables, see Environment variables andbuild variables on page 58.

LoggingThe Logging property page lets you specify a log file where build output is written to in addition to beingwritten to the Console view. This property page is for local projects only. For details, see the C/C++Development User Guide.

SettingsThe Settings property page is primarily for use with local projects with managed builds, though theBinary and Error Parsers tabbed pages are available for local makefile projects as well. This sectiondescribes each of the tabbed pages available in the Settings property page.

Tool Settings pageThe Tool Settings tabbed page lets you configure options passed to compilers, SQL tools, and linkersduring builds. The list of tools on the left of the Tool Settings page is determined by the tool chain andtool selections you made when you created your project. (For a description of NSDEE tool chains, see Tool chains on page 72).

The left side of the Tool Settings page shows the tools used to build your project. Each tool on the leftside has a main entry with subcategories under it (such as the C Linker (TNS/E) main entry in and its twosubcategories, Libraries and Miscellaneous as shown in Figure 82: Tool Settings page on page 199).

Figure 82: Tool Settings page

Select the main entry for a tool to see or alter the command used for the tool. Select a subcategory of thetool to change or add options to pass to the tool when it is invoked during builds.

All tools have a Miscellaneous category which you can use to enter most any tool option. However, besure to use categories to set tool options that are directly represented in categories, such as includepaths in the Includes category and library paths in the Libraries category. Managed builds use informationfrom these pages when creating makefiles.

For your convenience, OSS man pages for many tools are available via Help > Help Contents under theentry for NonStop Cross-Compilers and Tools man pages. Cross compilers and tools use almost allthe same options as the native OSS versions of the same tools. PC-specific options are documented inthe help file provided with NonStop cross compilers and tools. You can also access PC-specific help fromthe top-level page for NonStop Cross-Compilers and Tools man Pages using the View buttons. Crosscompiler documentation is also available as part of the cross-compiler product.

Logging 199

Page 200: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NOTE:

Due to CDT limitations, remote settings (such as those for the Deploy tool and for SQL options forspecifying NonStop systems) are disabled in the Tool Settings page. To change values for remotesettings, use the Settings (Remote) page.

Escaping special charactersNSDEE interacts with multiple programs like the make and bash shells of Cygwin or Msys, cross-compilers, and Windows OS which define some characters to have a special meaning. To avoid the issueof these special characters being interpreted by their special meaning, escaping is suggested for thesecharacters.

The special characters that need attention here are ' ' (space), '$' (dollar),'(' or ')' (parenthesis), and '\'(backslash).

• If a tool option or a path to a file or folder contains a space, it is advisable to quote the option or pathusing double quotes. For example:

C:\Program Files\Java should be "C:\Program Files\Java"• If a tool option or a Guardian path contains a '$' which is not escaped by default by NSDEE, then use

"$$" to escape the dollar sign for make and “\$” to escape the dollar sign for the shell. Therefore, “\$$”is a “double-escape” sequence. For example:

$DATA01.NSDEE should be \$$DATA01.NSDEE• If a tool option contains '$' as a special character to indicate an environment variable and if the

environment variable is preceded with a '\', then this could lead to '$' being treated as a non-specialcharacter. To avoid this, escape '\'. For example:

C:\NSDEE\${ConfigurationName} should be set as C:\NSDEE\\${ ConfigurationName}• If a tool option or a path to a file or folder contains parenthesis, quote the option or path using double

quotes. For example:

C:\Program Files (x86)\Java should be "C:\Program Files (x86)\Java"• If a tool option or a path to a file or folder contains ‘\’, specify it using double quotes. For example: "

C:\Program Files\Java must be ‘C:\Program Files\ Java."

Build Steps pageThe Build Steps tabbed page lets you specify commands to be invoked prior to and after builds. Fordetails, see the C/C++ Development User Guide.

Build Artifact pageThe Build Artifact tabbed page lets you change the default setting for the name used for final buildoutput. For executable projects, for example, the default final build output is named {$ProjName}.txe.For details, see the C/C++ Development User Guide.

Binary ParsersThe Binary Parsers page lets you choose which binary parsers are used to access information aboutbinaries (source files and methods) for display in the NonStop Project Explorer view when you expand abinary object in a project. Typically, you should not need to alter this page. For details, see the C/C++Development User Guide.

Error ParsersThe Error Parsers page lets you choose which parsers are run on build output. These parsers look forerrors and warnings and, when found, add them to the Problems view along with relevant information

200 Escaping special characters

Page 201: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

about the errors and warnings such as the source locations they are associated with. Typically, youshould not need to alter this page. For details, see the C/C++ Development User Guide.

Settings (Remote)The Settings (Remote) property page provides all tool options for remote settings for local projects aswell as deploy makefile target options. Depending on whether your project includes SQL tools, two-to-fourgroup boxes display on the Settings (Remote) page. This section describes each of the group boxes.

NOTE:

NonStop systems, destinations, and user IDs specified on this page are used to set a number ofenvironment variables available during builds. For details, see NSDEE_DEPLOY_SYSTEM,NSDEE_DEPLOY_USER, NSDEE_DEPLOY_DEST, NSDEE_DEPLOY_FILENAME on page 65.

Deploy Target Settings groupYou can use the Deploy Target Settings group to provide a custom deploy target name. For details, see Creating custom deploy targets on page 151. You can also use this group to specify pre-deploy andpost-deploy build targets for both managed builds and makefile projects. For details, see Runningcommands before and after deployment on page 81.

System for SQL/MX Compile groupThis group is available for SQL/MX projects only. Use it to specify the NonStop system and SQLcompilation location.

Destination for Deploy Target groupThis group is available for SQL/MX projects and projects that do not use SQL. Use this group to specifythe NonStop system and location where you want the Build Deploy action to transfer your final buildobject.

System for SQL/MX Preprocessor (INVOKE Processing) groupThis group is available for SQL/MX projects. Use it to specify the NonStop system for SQL/MX INVOKEpreprocessing.

System for SQL/MP Compile and Deploy groupThis group is available for SQL/MP projects. Use it to specify the NonStop system and SQL compilationlocation, as well as where the Build Deploy action transfers your final build object.

System for SQL/MP Preprocessing groupThis group is available for SQL/MP projects. Use it to specify the NonStop system for SQL/MPpreprocessing.

Tool Chain EditorThe Tool Chain Editor property page lists the tools used in managed builds. You can use this page toadd tools to your build that were not added at project creation time. For details, see the C/C++Development User Guide.

Settings (Remote) 201

Page 202: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

WARNING:

DO NOT select Restore Defaults and apply the changes. The "default" tool chain is all toolsavailable for a given platform (TNS/E or TNS/X). If you do choose and apply Restore Defaults, usethe Tool Chain Editor property page to remove tools not needed for your project builds.

Guardian File TransferThe Guardian File Transfer property page is available for files only. Use it to set the file code and filename to be used for transfers of files in your project. The Transfer Files wizard (available from theNonStop Tools menu) uses these settings when transferring files from your project to the Guardian filesystem.

C/C++ GeneralThe C/C++ General property page and the pages under it (Code Analysis, Code Style, and so on) areall described in the C/C++ Development User Guide.

NOTE:

By default, the C/C++ indexer continues to use the RVU you chose at project creation time to gathersymbols from system headers, even when you switch to using an RVU for a different platform. Forinformation on how to change the default behavior, see NSDEE_SYS_INCLUDE_PATH on page 62.

NOTE:

If you use Discovery Options to turn off warnings and errors on SQL statements in C/C++ editors,you can check if the settings are applied using the Symbols tabbed page of the Paths andSymbols property page. See Removing errors and warnings in C/C++ editors on page 131.

Project ReferencesThe Project References property page allows you to specify projects that the current project needs builtbefore the current project itself is built. Project references can also be added by selecting the referencingprojects in C/C++ General > Paths and Symbols > Project References. For details, see the C/C++Development User Guide.

Refactoring HistoryThe Refactoring History property page records all refactoring done for a given project and providesfacilities for perusing this history. For details, see the C/C++ Development User Guide.

Remote SettingsThe Remote Settings property page is for remote projects only. It lets you change the NonStop systemthat hosts a remote project.

Run/Debug SettingsThe Run/Debug Settings property page is not supported for NonStop projects.

MenusThe NonStop Development perspective contributes one menu to the main menu bar—the NonStop Toolsmenu. In addition, the NonStop Project Explorer view contributes many NonStop-specific items to itscontext menu. This section describes the items in both of these menus.

202 Guardian File Transfer

Page 203: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

NonStop Tools menuThe NonStop Tools menu in the NonStop Development perspective provides a single place where youcan open dialog boxes, wizards, and preferences pages that are specific to NonStop applicationdevelopment. Many items on the NonStop Tools menu can be accessed in other ways.

The Configure Tool Locations menu item is a short cut to opening the Tool Locations preference page.Similarly, the Configure Connections menu item is a short cut to opening the Network Configurationspreference page. Both of these preference pages are described in Preferences on page 55 and both canbe accessed via Window > Preferences > NonStop.

The NonStop tools menu also provides short cuts to import wizards for ETK projects (Import ETKProjects) and NSDEE 2.x projects (Import NSDEE 2.x Projects) as well as an export wizard fortransferring files from local projects to NonStop systems (Transfer Files). These import and exportwizards are described in Tools on page 182

Two tools can only be opened using the NonStop Tools menu—the Open Remote File dialog and theLaunch Visual Inspect dialog. Both are described in the Tools on page 182 section.

Context menu for NonStop Project ExplorerThe context menu for the NonStop Project Explorer view is that of the C/C++ Projects view with theaddition of a Deploy Project menu item (to invoke make deploy) and the addition to the New submenuof NonStop-specific actions for creating projects, folders, and files. For details on the content of thiscontext menu, see the C/C++ Development User Guide.

Content typesThe following table lists the supported file extensions for the languages in NSDEE.

Table 31: Supported extensions for the languages in NSDEE

Type of file Supported extension

C source file .c

C header file .h

C SQL/MX source file .ec and .sql

C++ source file .C, .cc, .c++, .cpp, and .cxx

C++ header file .h, .hh, .hxx, and .hpp

C++ SQL/MX source file .eC, .ecc, .ecpp, .ecxx, and .ec++

COBOL source file .cob and .cbl

COBOL SQL/MX source file .ecob and .ecbl

pTAL source file .tal

NonStop Tools menu 203

Page 204: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

IconsNSDEE provides a number of icons for actions specific to development of NonStop applications. Forinformation about Eclipse and CDT icons, see the Reference section of the Eclipse Workbench Guideand the C/C++ Development User Guide, respectively.

Table 10 describes the NonStop-specific icons in Eclipse.

Table 32: NonStop icons

Icon Location Description

Toolbar Opens NonStop C++ Project wizard bydefault. The drop-down allows selectionof the project wizard to be opened.

Toolbar (drop-down)

Shown in the new project icon menu,these icons open one of the new projectwizards for NonStop.

RunConfigurationsdialog,Toolbar (drop-down)

Represents NonStop run configurationsin the Run Configurations dialog box.Also shown in the toolbar's Run icondrop-down to list and allow re-runningyour most recent runs of yourapplications on NonStop systems.

Toolbar Opens New Source File wizard bydefault. Its drop-down menu allowsselection of either a new source folder,new header file, or new file wizard.

Toolbar (drop-down)

Shown in the new folder icon drop-downmenu, it opens the New Source Filewizard which you can use for managedprojects to create a folder in whichNSDEE looks for source files.

Toolbar (drop-down)

Shown in the new folder icon drop-downmenu, it opens the New Folder wizard,which you can use to create folders inboth local and remote makefile projects.

Toolbar Opens New Source File wizard bydefault. Its drop-down menu allowsselection of either a new source file, newheader file, or new file wizard.

Toolbar (drop-down)

Shown in the new file icon drop-downmenu, it opens the New Source Filewizard.

Table Continued

204 Icons

Page 205: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Icon Location Description

Toolbar (drop-down)

Shown in the new file icon drop-down, itopens the New Header File wizard.

Toolbar (drop-down)

Shown in the new file icon drop-down, itopens the New File From Templatewizard.

Toolbar Invokes make deploy for the activebuild configuration of a selected project,where the active configuration is shownin the tool tip of this icon. This iconappears next to the build andconfiguration management iconscontributed by CDT.

Toolbar Shortcut to open NonStop NetworkConnections preference page.

Clean Cleans the selected project based on theactive configuration of the project.

Perspective bar When selected in the workbench'sperspective bar, this icon opens theNonStop Development perspective.

NonStop ProjectExplorer

Root folder of a local NonStop managedproject or NonStop makefile project.

NonStop ProjectExplorer

Root folder of a remote NonStopmakefile project.

NonStop ProjectExplorerCOBOL editor

COBOL source file.

NonStop ProjectExplorerpTAL editor

pTAL source file.

NonStop ProjectExplorer

NonStop executable file in a remoteproject.

Export wizardNonStop Toolsmenu

Transfer Files export wizard fortransferring local project files to NonStopsystems.

Import wizardNonStop Toolsmenu

Import NSDEE 2.x project as an NSDEE7.0 managed project.

Table Continued

Reference 205

Page 206: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Icon Location Description

Import wizard Import ETK project as an NSDEE 7.0managed project.

Import wizard Import connection configurationsexported from another workspace.

Export wizard Export connection configurations.

New CDT featuresThe following feature is added as part of CDT 9.2 and is available for C/C++ source files for NonStopprojects:

• Syntax coloring for variables passed by non-const reference.

206 New CDT features

Page 207: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

TroubleshootingThis chapter lists the troubleshooting topics for the problems that you may encounter in NSDEE 7.0. Itlists the cause and corrective action for a symptom.

Static profile not found while generating code coverageSymptom

The following error message appears while generating code coverage for TNS/E projects. In theGenerate Code coverage screen, the Generate Code coverage button is disabled.

pgopti.spi file not found under the project.

Cause

The .spi file is not present in the current configuration directory of the projects for TNS/E projects.

Action

• Ensure the .spi file is present in the current configuration directory for TNS/E projects. Retry theGenerate Code coverage option.

Make target is not specified while generating codecoverageSymptom

The following error message appears while generating code coverage for a makefile project:

Make target for running Code Coverage has to be specified.

Cause

While generating code coverage for a makefile project, the make target for code coverage is not provided.

Action

• Enter the required value for Make Target in the Generate Code coverage screen and retrygenerating the code coverage.

Remote system not specified while generating codecoverageSymptom

The following error message appears while generating code coverage for a project:

Remote system on which raw files are located is not mentioned.

Cause

While generating code coverage for a project, the remote system details are not provided.

Troubleshooting 207

Page 208: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Action

• Enter the System details in the Generate Code coverage screen and retry the operation.

Connection failure while generating code coverageSymptom

The following error message appears while launching Generate Code coverage dialog:

Unable to connect to remote system.

Cause

Authentication or connection fails while connecting to remote system.

Action

• Check the connection to NonStop systems and retry the operation. For more information, see Configuring connections to NonStop systems.

Raw data files are not selected for transferSymptom

If there is no .dpi file in the build location for the current configuration, the following message appears asan error message. If the .dpi file is present in the build location, it appears as a warning.

None of the raw data files have been selected.

Cause

No raw data file is selected.

Action

• In the Generate Code coverage dialog, select at least one raw data file. Retry the operation.

Raw data files are not found in the remote target locationSymptom

The following error message appears while generating code coverage report. You will see an errormessage, if there is no .dpi file in the build location for the current configuration. You will see a warning,if the .dpi file is present in the build location. The error or warning message is:

No raw data files in the remote location.

Cause

Raw data files are not detected in the remote target location. This occurs if the final executable is not runor is run in a location other than the deploy location.

208 Connection failure while generating code coverage

Page 209: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Action

• Ensure to mention the current remote location. Also, ensure there is at least one raw data file in theremote location or a .dpi file in the local build directory. Retry the operation.

Generating code coverage report failsSymptom

The following error message appears while transferring the raw data files or while executing the target.

Unable to generate Code coverage report: reason

Cause

Issues while transferring the raw data files or while executing the target.

Action

• Check your file permissions for the raw data files in case a transfer has failed. Or, check your buildconsole for more details.

Project does not contain any TNS/X toolsSymptom

TNS/X configurations are not created for a project and the following error message appears:

Error while creating TNS/X configurations for the project try: There are no TNS/X tools configured in NSDEE.

Cause

The project (for which you attempted to create TNS/X configurations) does not contain any TNS/X tools(for example, compilers or linkers) necessary for the project build.

Action

• Ensure that the TNS/X tools are configured for the project. Retry creating TNS/X configurations.

Project does not contain any TNS/E configurationsSymptom

TNS/X configurations are not created for a project and the following error message appears:

Error while creating TNS/X configurations for the project try: Project does not contain TNS/E configurations.

Cause

The project (for which you attempted to create TNS/X configurations) does not have TNS/Econfigurations.

Generating code coverage report fails 209

Page 210: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Action

• Ensure that the TNS/E configurations are present for the project. Retry creating TNS/X configurations.

The configuration file name existsSymptom

TNS/X configurations are not created for a project and the following error message appears:

Error while creating TNS/X configurations for the project try: Configuration Deub_Tnsx exists.

Cause

The configuration file name you have provided exists.

Action

• Retry creating TNS/X configurations using a new configuration file name.

Project imported with warningsSymptom

If the project is imported with errors or warnings, the following warning message appears.

Some projects were imported with warnings.Please check the log file (log filelink) for details.

Cause

The project is imported with some errors. For the detailed cause, refer to the log file.

Action

• Refer to the log file and resolve the issue. To open the log and view the contents, select the linkdisplayed in the warning message.

If you imported ETK projects, open the log file at: workspace/.metadata/etkmigration/solution_name.log. If you imported NSDEE 2.x local projects, open the log file at:workspace/.metadata.nsdee2xmigration/project_name.log.

210 The configuration file name exists

Page 211: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

WebsitesGeneral websites

Hewlett Packard Enterprise Information Librarywww.hpe.com/info/EIL

Hewlett Packard Enterprise Support Center

www.hpe.com/support/hpesc

Contact Hewlett Packard Enterprise Worldwide

www.hpe.com/assistance

Subscription Service/Support Alerts

www.hpe.com/support/e-updates

Software Depot

www.hpe.com/support/softwaredepot

Customer Self Repair

www.hpe.com/support/selfrepair

Manuals for L-series

http://www.hpe.com/info/nonstop-ldocs

Manuals for J-series

http://www.hpe.com/info/nonstop-jdocs

For additional websites, see Support and other resources.

Websites 211

Page 212: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Support and other resources

Accessing Hewlett Packard Enterprise Support• For live assistance, go to the Contact Hewlett Packard Enterprise Worldwide website:

http://www.hpe.com/assistance• To access documentation and support services, go to the Hewlett Packard Enterprise Support Center

website:

http://www.hpe.com/support/hpesc

Information to collect

• Technical support registration number (if applicable)• Product name, model or version, and serial number• Operating system name and version• Firmware version• Error messages• Product-specific reports and logs• Add-on products or components• Third-party products or components

Accessing updates• Some software products provide a mechanism for accessing software updates through the product

interface. Review your product documentation to identify the recommended software update method.• To download product updates:

Hewlett Packard Enterprise Support Centerwww.hpe.com/support/hpesc

Hewlett Packard Enterprise Support Center: Software downloadswww.hpe.com/support/downloads

Software Depotwww.hpe.com/support/softwaredepot

• To subscribe to eNewsletters and alerts:

www.hpe.com/support/e-updates• To view and update your entitlements, and to link your contracts and warranties with your profile, go to

the Hewlett Packard Enterprise Support Center More Information on Access to Support Materialspage:

www.hpe.com/support/AccessToSupportMaterials

IMPORTANT:

Access to some updates might require product entitlement when accessed through the HewlettPackard Enterprise Support Center. You must have an HPE Passport set up with relevantentitlements.

212 Support and other resources

Page 213: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Customer self repairHewlett Packard Enterprise customer self repair (CSR) programs allow you to repair your product. If aCSR part needs to be replaced, it will be shipped directly to you so that you can install it at yourconvenience. Some parts do not qualify for CSR. Your Hewlett Packard Enterprise authorized serviceprovider will determine whether a repair can be accomplished by CSR.

For more information about CSR, contact your local service provider or go to the CSR website:

http://www.hpe.com/support/selfrepair

Remote supportRemote support is available with supported devices as part of your warranty or contractual supportagreement. It provides intelligent event diagnosis, and automatic, secure submission of hardware eventnotifications to Hewlett Packard Enterprise, which will initiate a fast and accurate resolution based on yourproduct's service level. Hewlett Packard Enterprise strongly recommends that you register your device forremote support.

If your product includes additional remote support details, use search to locate that information.

Remote support and Proactive Care informationHPE Get Connected

www.hpe.com/services/getconnectedHPE Proactive Care services

www.hpe.com/services/proactivecareHPE Proactive Care service: Supported products list

www.hpe.com/services/proactivecaresupportedproductsHPE Proactive Care advanced service: Supported products list

www.hpe.com/services/proactivecareadvancedsupportedproducts

Proactive Care customer informationProactive Care central

www.hpe.com/services/proactivecarecentralProactive Care service activation

www.hpe.com/services/proactivecarecentralgetstarted

Warranty informationTo view the warranty for your product, see the Safety and Compliance Information for Server, Storage,Power, Networking, and Rack Products document, available at the Hewlett Packard Enterprise SupportCenter:

www.hpe.com/support/Safety-Compliance-EnterpriseProducts

Additional warranty informationHPE ProLiant and x86 Servers and Options

www.hpe.com/support/ProLiantServers-WarrantiesHPE Enterprise Servers

www.hpe.com/support/EnterpriseServers-WarrantiesHPE Storage Products

www.hpe.com/support/Storage-Warranties

Customer self repair 213

Page 214: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

HPE Networking Productswww.hpe.com/support/Networking-Warranties

Regulatory informationTo view the regulatory information for your product, view the Safety and Compliance Information forServer, Storage, Power, Networking, and Rack Products, available at the Hewlett Packard EnterpriseSupport Center:

www.hpe.com/support/Safety-Compliance-EnterpriseProducts

Additional regulatory information

Hewlett Packard Enterprise is committed to providing our customers with information about the chemicalsubstances in our products as needed to comply with legal requirements such as REACH (Regulation ECNo 1907/2006 of the European Parliament and the Council). A chemical information report for this productcan be found at:

www.hpe.com/info/reach

For Hewlett Packard Enterprise product environmental and safety information and compliance data,including RoHS and REACH, see:

www.hpe.com/info/ecodata

For Hewlett Packard Enterprise environmental information, including company programs, productrecycling, and energy efficiency, see:

www.hpe.com/info/environment

Documentation feedbackHewlett Packard Enterprise is committed to providing documentation that meets your needs. To help usimprove the documentation, send any errors, suggestions, or comments to Documentation Feedback([email protected]). When submitting your feedback, include the document title, part number,edition, and publication date located on the front cover of the document. For online help content, includethe product name, product version, help edition, and publication date located on the legal notices page.

214 Regulatory information

Page 215: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Sample programs and projectsSample programs and projects are included with the NSDEE product. To access these files, unzip theExamples.zip file located at:

<eclipse install directory>\plugins\com.hp.nsdee_7.0.0\Examples.zip can be unzipped to any location, for example C:\Examples. This file contains thefollowing projects:

CarSources.zipA simple Car example for CPP for creating a managed project using existing sources without copyingso that the resulting project resides outside your Eclipse workspace

CarWithMakefile.zipAn example of creating a makefile project from existing sample sources for a simple application

GeneralCppSources.zipA simple Car example for CPP, similar to the example Car project

ManagedBuildWithLibraries.zipA simple Car application to demonstrate managed build with libraries

MultiProjectCarApp.zipAn example of creating a multi-project application, where one project named CarParts creates alinkfile, and the other project named Car links the linkfile into the main application

NestedFoldersCarApp.zipA simple Car project to demonstrate nested folder structure in an application

CobolSamplApp.zipA simple Cobol application that can be used as a Car project

PtalSampleAppA simple pTAL application that can be used as a Car project

MxMpSampleApp.zipProvides simple SQL/MX and MP samples. For details, refer to readme.txt included in this file. Thisfile contains the following MX and MP projects:

CmxtextsampleA simple C SQL/MX application which demonstrates SQL/MX invoke

CobmxtestA simple Cobol SQL/MX application which demonstrates SQL/MX invoke

testmpA simple C SQL/MP application which demonstrates SQL/MP invoke

testmpcobA simple Cobol SQL/MP application which demonstrates SQL/MP invoke

Sample programs and projects 215

Page 216: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Tips on setting up password free logins withOpen SSH

If you install Open SSH with Cygwin, you can use the sftp program to provide more flexible and betterperforming deploy targets for both managed builds and makefile project builds. For details, see Creatingcustom deploy targets on page 151. Using sftp in your deploy target, however, requires that you setup passphrase logins for SSH so the deploy target can run sftp in batch mode without having to supplya password.

This appendix provides tips on setting up both Open SSH on your Windows host and configuring HPENonStop SSH on NonStop servers for passphrase logins. For more information on Open SSH, refer tothe man pages for ssh, sftp, ssh-keygen, and ssh-agent. For more information on setting upNonStop SSH, refer to the NonStop SSH Reference Manual.

NOTE:

NSDEE supports password free logins to connect to a NonStop server. However, cross compilersdo not support password free login for building SQL/MP or SQL/MX projects.

The following are general steps for setting up passphrase logins for user ID swdev.doon for theNonStop system nonstopsystem.corp.net. Substitute your own user ID and system name asappropriate.

1. On your personal Windows system, generate a public/private key pair using the ssh-keygencommand. You'll be asked for a passphrase (twice). The passphrase should be a phrase that you caneasily remember. The longer the phrase, the better the security. The passphrase is used whenencrypting and decrypting your private key. When asked for a file where the key is to be saved, just hitRETURN to accept the default.

Here is the ssh-keygen command and its output (where XXXXXX represents the passphraseentered):

$ ssh-keygen -t dsa -E md5 -C HYPERLINK [email protected]/Generating public/private dsa key pair.Enter file in which to save the key (/home/doon/.ssh/id_dsa): Enter passphrase (empty for no passphrase): XXXXXXXXXXXEnter same passphrase again: XXXXXXXXXXXYour identification has been saved in /home/doon/.ssh/id_dsa.Your public key has been saved in /home/doon/.ssh/id_dsa.pub.The key fingerprint is:f7:7a:7e:4b:e9:39:c4:85:9c:e5:22:e9:a0:75:07:08 [email protected] key's randomart image is:+--[ DSA 1024]----+| E. . || . . .|| + = || o + * o|| So.+ + o || .. .. o. || ..o || ..oo. || .o..+o |

216 Tips on setting up password free logins with Open SSH

Page 217: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

+-----------------+

2. Add your public key on NonStop servers of interest. This requires running as super.super. If youcannot login as super.super, contact your system administrator.

First, find the SSH process name on the NonStop server (typically $ssh0) and open it with sshcom(sample commands are shown below). Use alter user to set your public key. Give it a name (suchas key1). You can use that name to delete the public key in the future.

Provide your public key on of two ways. You can provide the fingerprint (which you can get from theoutput of ssh-keygen above) or you can point SSH at a file containing the public key. (The examplebelow provides the fingerprint.)

Here are sample commands to go to the SSH volume, find the SSH process, and set your public key:

$SYSTEM STARTUP 5> volume zssh$SYSTEM ZSSH 6> status *,prog *Process Pri PFR %WT Userid Program file Hometerm$SSH0 0,611 150 P 005 255,255 $SYSTEM.ZSSH.SSH2 $ZHOME$ZPTY 0,792 168 P 011 255,255 $SYSTEM.ZSSH.STN $ZHOME$ZPTY B 1,1054 168 P 001 255,255 $SYSTEM.ZSSH.STN $ZHOME$SYSTEM ZSSH 7> sshcom $ssh0SSHCOM_H16_06FEB03OPEN $ssh0% alter user swdev.doon, publickey key1 fingerprint f7:7a:7e:4b:e9:39:c4:85:9c:e5:22:e9:a0:75:07:08% exitIf the alter user command complains that it does not know your user ID, then use the add usercommand.

% alter user swdev.doon, publickey key1 fingerprint f7:7a:7e:4b:e9:39:c4:85:9c:e5:22:e9:a0:75:07:08alter user swdev.doon, publickey key1 fingerprint f7:7a:7e:4b:e9:39:c4:85:9c:e5:22:e9:a0:75:07:08Error, user swdev.doon not found% add user swdev.doonadd user swdev.doonOK, user swdev.doon added% alter user swdev.doon, publickey key1 fingerprint f7:7a:7e:4b:e9:39:c4:85:9c:e5:22:e9:a0:75:07:08alter user swdev.doon, publickey key1 fingerprint f7:7a:7e:4b:e9:39:c4:85:9c:e5:22:e9:a0:75:07:08OK, user swdev.doon altered% exit

3. Try connecting to the NonStop server from a Cygwin shell as in this example:

$ ssh [email protected] passphrase for key '/home/doon/.ssh/id_dsa': . . .

4. Now try a password free login from a Cygwin shell. First, start ssh-agent:

$ ssh-agentSSH_AUTH_SOCK=/tmp/ssh-fuLUopQ796/agent.796; export SSH_AUTH_SOCK;SSH_AGENT_PID=7864; export SSH_AGENT_PID;echo Agent pid 7864;$

Tips on setting up password free logins with Open SSH 217

Page 218: NonStop Development Environment for Eclipse 7.0 User Guideh20628.€¦ · NonStop Development Environment for Eclipse 7.0 User Guide ... Guardian File Transfer ... • Added code

Export SSH_AUTH_SOCK and SSH_AGENT_PID, then run ssh-add, which prompts you for yourpassphrase and communicates success to ssh-agent:

$ export SSH_AUTH_SOCK=/tmp/ssh-fuLUopQ796/agent.796; export SSH_AUTH_SOCK;$ export SSH_AGENT_PID=7864; export SSH_AGENT_PID;$ ssh-addEnter passphrase for /home/doon/.ssh/id_dsa: Identity added: /home/doon/.ssh/id_dsa (/home/doon/.ssh/id_dsa)$ Now try logging on from the same Cygwin shell. You should not be prompted for a passphrase nor apassword. Any local processes started as descendents of your current shell can perform passwordfree logins to the remote system since ssh-agent handles the authentication for you.

NSDEE does not interact with ssh-agent, but sftp invoked by a make deploy project does, allowingsftp to run in batch mode without the need for a password. For this to work, you must launch NSDEEfrom a Cygwin shell (or a descendant shell or xterm). You may want to create an alias for this purpose,such as:

$ alias eclipse='/cygdrive/c/e3.7.2/eclipse/eclipse -vm \ "C:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe"'Enter eclipse at the Cygwin prompt.

5. If you want NSDEE to use passphrase authentication using the information you set up in Cygwin, usethe Settings dialog box for Network Configurations preferences for SSH to configure NSDEE to useyour Cygwin Open SSH settings as in Figure 83: Using Cygwin Open SSH settings with NSDEE onpage 218.

Figure 83: Using Cygwin Open SSH settings with NSDEE

218 Tips on setting up password free logins with Open SSH