Getting Started Visual Age
Getting Started Visual Age
Getting Started
Version 3.0.2
GC27-0811-02
VisualAge COBOL for Windows NT
Getting Started
Version 3.0.2
GC27-0811-02
Note!
Before using this information and the product it supports, be sure to read the general information under “Appendix.
Notices” on page 81.
iv Getting Started
What’s new in this release
This section lists the primary changes in Version 3 of IBM VisualAge COBOL for
Windows NT.
Version 3
v Enhanced OS/390 host connectivity for remote editing, compiling, and
debugging of COBOL source code that resides on an OS/390 host
v A new wizard for setting up COBOL projects and a new MVS connections
manager for configuring and managing connections to MVS systems
v A job monitor for submitting JCL to an OS/390 system and then monitoring job
status and job output.
v Job monitor support for JES2 and JES3
v A stored procedure manager for creating and managing DB2 Universal Database
for OS/390 stored procedure definitions associated with your MVS projects
v An HTML help system, making information easier to find
v Enhanced debugging capability with IBM Distributed Debugger for debugging
COBOL, C++, and compiled Java programs running on an OS/390 host system
or on your workstation
v File locking (as for ISPF) so that only one user can edit a file at the same time
v Support for Windows 2000
v Support for long file names
RELATED CONCEPTS
“Chapter 1. Product overview” on page 1
With VisualAge COBOL, you develop host COBOL programs remotely from your
workstation without downloading files. Application parts (such as COBOL source
code, COBOL copy books, and host JCL) stay in partitioned data sets (PDSs) on the
host. You access and work with them through an MVS project on your
workstation, as if they resided on your workstation.
Communication between the workstation and the host for remote editing,
compiling, and debugging is accomplished through a TCP/IP connection. A wizard
helps you create MVS projects on your workstation, and a connection manager
helps you configure and manage your connection to the MVS system.
With remote ECD, you can develop or enhance many types of applications,
including CICS, batch, TSO, or IMS Database Manager and IMS Transaction
Manager (with or without BTS) applications. These applications can access many
forms of data, including DB2, VSAM, DL/I, and QSAM data.
RELATED CONCEPTS
“Working with OS/390 host applications”
“Working in a project environment” on page 4
“Editing source code” on page 4
“Creating GUI applications” on page 5
“Creating COBOL applications for the workstation” on page 5
Debugging applications“Debugging workstation applications” on page 6
“Developing CICS host applications from your workstation” on page 7
“Accessing IMS databases” on page 8
“Analyzing program performance” on page 8
RELATED CONCEPTS
“Building stored procedures”
“Comparing workstation and host concepts” on page 3
Using the stored procedure manager, you can do the following tasks:
v Associate a DB2 Universal Database for OS/390 stored procedure definition with
an MVS project.
v Create, view, modify and drop the stored procedure definition.
v Generate SQL to create, modify or drop the definition.
v Understand the impact that the definition has on the COBOL development and
run-time environments.
RELATED REFERENCES
DB2 UDB for OS/390 V5 Application Programming and SQL Guide (SC26-8958-02)
2 Getting Started
HTML PDF
DB2 UDB for OS/390 V6 Application Programming and SQL Guide (SC26-9004-00)
HTML PDF
With VisualAge COBOL, you organize your code by grouping related files into
projects. A COBOL project is the complete set of data and actions you need to
complete a programming task. An MVS project typically includes the COBOL
source programs you want to edit and compile, as well as related files like JCL and
BMS maps. A workstation project typically includes the files and other information
needed to build a single target, such as a dynamic link library (DLL) or executable
(EXE).
VisualAge COBOL provides preconfigured COBOL projects. When you create your
own COBOL projects, you get a complete set of actions, types, and environment
variable settings preconfigured for your particular project type. This means that
you get an environment with the tools and actions already set up for you.
RELATED CONCEPTS
“Editing source code”
RELATED TASKS
“Chapter 6. Creating your first VisualAge COBOL application” on page 45
Aside from standard editing functions, you can create GUI code, generate SQL
statements, and generate calls to invoke CICS transactions with the following
components of VisualAge COBOL.
Code Assistant
Generates code to access the data and attributes of your graphical user
interface parts. Code Assistant is available only if you have installed the
Visual Builder. Code Assistant works with files with CBV and CPV
extensions. The Visual Builder must be running to access Code Assistant.
Data Assistant
Simplifies the process of constructing embedded SQL statements. SQL
4 Getting Started
statements generated by Data Assistant can be compiled and executed in
Windows and host COBOL programs. Data Assistant is available only for
non-GUI applications.
The COBOL editor displays certain tool bar icons and menu choices for the coding
assistants when you need them. The tool bar icons and menu choices for the Data
and Transaction Assistants come up only if you are editing a COBOL file (CBL), a
copy file (CPY), a DB2 file (SQB), or a CICS file (CCP).
RELATED CONCEPTS
“Creating GUI applications”
RELATED CONCEPTS
“Creating COBOL applications for the workstation”
RELATED TASKS
“Chapter 7. Creating a simple Visual Builder application” on page 53
The IBM COBOL language is by in large the same across platforms, with minor
differences between IBM COBOL for OS/390 & VM and VisualAge COBOL.
DB2 coprocessor
The COBOL compiler on the workstation provides a DB2 coprocessor, which
eliminates the DB2 precompiling step, resulting in better optimization of EXEC
SQL statements. The DB2 support is fully integrated with the compiler. Your source
program containing embedded SQL statements is handled by the compiler without
your having to use a separate precompiler. When the compiler encounters SQL
statements and at significant points in the source program, the DB2 coprocessor
processes the SQL statements by taking appropriate actions and indicating to the
compiler what native COBOL statements to generate.
These services complement their counterpart services on the host, enabling you to
create client/server and cooperative processing applications using the IBM COBOL
language. Your applications can also call the utilities directly using the application
programming interfaces (APIs) that come with the utilities.
RELATED CONCEPTS
Debugging applications“Debugging workstation applications”
6 Getting Started
Step through or run a program
You can step through your program one line at a time, or you can run the
program until a breakpoint is encountered, the program is halted, or the
program ends.
You can also select the way the Distributed Debugger steps through a
program. If you are debugging a call, for example, you can halt the run
when the call is complete, at the first statement in the called program, or at
the return statement of the current program. The Distributed Debugger can
also step over any program for which debugging is not available, such as
library and system routines.
Set breakpoints
You can control how your program executes by setting breakpoints. A
breakpoint stops the execution of your program at a specific location or
when a specific event occurs.
View the program source code
You can view the source code of the program you are debugging. You can
view it as a source, disassembly (assembler instructions), or mixed (a
combination of source and disassembled code).
Monitor variables
You can display and change the variables during debugging.
Monitor the registers
You can view all the processor and coprocessor registers for a particular
thread.
Monitor the call stack
You can display all of the active programs, the stack frame size, and the
return address. When the state of the program changes, such as when you
execute the program or you update displayed data, the Distributed
Debugger changes the information displayed to reflect the current state.
Monitor storage
You can monitor variables in a storage window. For example, if you are
monitoring a pointer, as the pointer changes, the storage window changes
to show the new location referenced by the pointer.
RELATED CONCEPTS
“Developing CICS host applications from your workstation”
RELATED CONCEPTS
“Accessing IMS databases”
With VisualAge COBOL’s Remote DL/I support, you can develop, compile and
test COBOL programs that run in an IMS batch environment and use CBLTDLI
calls on the workstation.
Note:
v Remote DL/I does not provide access to IMS message queues or IMS fastpath
databases.
v Remote DL/I runs using only S/390 data types as input and output. It does not
provide any data conversion function.
Remote DL/I uses APPC and an IMS batch environment to provide the remote
DL/I call support. When Remote DL/I is first initialized on the workstation, you
are prompted for your TSO user ID and password, which are used when the
remote job is started on MVS. APPC is used by Remote DL/I to start a job on
MVS, which brings up an IMS batch environment. When the IMS batch
environment is available, remote DL/I calls can be processed. The DL/I calls on
the workstation are sent to the IMS batch environment environment and executed.
The results of the DL/I call are then sent back to the program running on the
workstation.
RELATED CONCEPTS
“Analyzing program performance”
It traces the execution of your application and allows you to analyze the call-return
path of your COBOL programs as well as the paragraphs within your programs.
The generated trace file contains trace analysis data that can be graphically
8 Getting Started
displayed in diagrams. Using these diagrams, you can improve the performance of
an application, examine occurrences that produce faults, and in general,
understand what happens when your application runs.
The Performance Analyzer does not replace static analyzers or debug tools, but it
can complement them by helping you understand aspects of the application that
would otherwise be difficult or impossible to see.
RELATED REFERENCES
“Required hardware”
“Required software”
“Optional software” on page 13
Required hardware
This section provides hardware requirements for VisualAge COBOL for Windows
NT, Version 3.0.2.
Processor
Pentium-based 100MHz processor (minimum) or higher (recommended)
Memory
128 MB or higher
All hard drive space estimates are for the full product. You can reduce the space
required by selectively installing components. InstallShield displays the amount of
hard drive space required for the components you select.
Adapter card
For host communications, LAN adapter card supported by Windows NT
RELATED REFERENCES
“Required software”
“Optional software” on page 13
Required software
This section provides the minimum software required for VisualAge COBOL for
Windows NT, Version 3.0.2.
On the workstation
v IBM VisualAge COBOL for Windows NT, Version 3.0.2 (5639-I44)
v One of the following:
– Microsoft Windows NT** Version 4.0 (Service Pack 4 or later is required)
– Microsoft Windows 2000** Professional
v Microsoft Loopback Adapter
v For the Information Center (online help):
– One of the following:
- Netscape Navigator for Windows 4.51 or later
- Microsoft Internet Explorer 5.0 or later
– For online books in PDF format, Adobe Acrobat Reader 4.0 or later
– For a shared installation, Microsoft Peer Web Services on the network server
12 Getting Started
COBOL note
v Source code must be at the ANSI 85 level.
RELATED REFERENCES
“Optional software”
Optional software
This section lists requirements for components of VisualAge COBOL that you
choose to install or use, such as the stored procedure manager. It also includes
requirements for specific products that operate with VisualAge COBOL, such as
MQSeries.
v “Stored procedure manager”
v “Data Assistant”
v “Remote data access” on page 14
v “LAN data access” on page 14
v “Local DB2 development” on page 15
v “Local CICS development” on page 16
v “MQSeries for Windows NT” on page 17
v Oracle“Oracle* *” on page 17
v Sybase“Sybase* *” on page 17
On the workstation
For accessing DB2 data on an OS/390 host:
v Run-time Client for DB2 Universal Database Version 6.1
– Available from the Web
– Included in DB2 server software
v One of the following:
– DB2 Connect Enterprise Edition (included with DB2 Universal Developer’s
Edition Version 6.1)
– DB2 Connect Personal Edition (included with DB2 Personal Developer’s
Edition Version 6.1)
Data Assistant
For Data Assistant, the following are required on the Windows NT workstation
(“Packaging note” on page 16):
v SDK for DB2 Universal Database Version 5.2 or Version 6.1
– Available from the Web
– Included in DB2 server software
v One of the following:
On the workstation
v For accessing DB2 data on an OS/390 host:
– Run-time Client for DB2 Universal Database Version 5.2 or Version 6.1
- Available from the Web
- Included in DB2 server software
– One of the following:
- DB2 Connect Enterprise Edition (included with DB2 Universal Developer’s
Edition Version 5.2 or Version 6.1)
- DB2 Connect Personal Edition (included with DB2 Personal Developer’s
Edition Version 5.2 or Version 6.1)
v For communications, one or more of the following, as appropriate:
– IBM eNetwork Personal Communications Version 4.2 for Windows (for IMS
and SdU, but not CICS)
– IBM eNetwork Communications Server Version 5.0 for Windows NT (for IMS
and SdU, but not CICS)
– Microsoft SNA Server Version 3.0 or later (for CICS and SdU, but not IMS)
14 Getting Started
– TX Series Version 4.2 for Windows NT (which contains CICS Version 4.2 for
Windows NT) (no support for host data types)
– Transaction Server Version 4.0 for Windows NT (which includes CICS Version
4.0 for Windows NT) plus the PTF1 Refresh Level (no support for host data
types)
On the workstation
v For developing applications that access DB2 data on a LAN, the following:
(“DB2 note”)
– Run-time Client for DB2 Universal Database Version 5.2 or Version 6.1:
- Available from the Web
- Included in DB2 server software
– SDK for DB2 Universal Database corresponding to the Run-time Client level
(“Packaging note” on page 16)
– Workstation DB2 requirements for LAN scenario“Workstation DB2
requirements for LAN access” on page 16
v For developing applications that access CICS data on a LAN, one of the
following:
– VisualAge CICS Enterprise Application Development Version 3.1, which
includes host data type support and is provided with VisualAge COBOL for
Windows NT, Version 3.0.2 (recommended).
– TX Series Version 4.2 for Windows NT (which contains CICS Version 4.2 for
Windows NT) (no host data type support)
– Transaction Server Version 4.0 for Windows NT (which includes CICS Version
4.0 for Windows NT) plus the PTF1 Refresh Level (no host data type support)
DB2 note
Before embarking, you are strongly urged to get more information from one or
more of the following Web addresses.
v Web information
v DB2 library
v Installing and Configuring DB2 Clients book (with requirements)
v CompuServe: GO IBMDB2
v Anonymous FTP site: ftp.software.ibm.com/
Server requirements
v For IPX/SPX, NetBIOS, or TCP/IP, the Windows NT base operating system
provides support.
v For APPC, Microsoft SNA Server Version 3.0 (or later)
16 Getting Started
v TX Series for Windows NT Version 4.2 (which contains CICS for Windows NT
Version 4.2)
v Transaction Server for Windows NT Version 4.0 (which includes CICS for
Windows NT Version 4.0) plus the PTF1 Refresh Level.
For developing and testing applications on Windows NT that are targeted for an
OS/390 host:
v VisualAge CICS Enterprise Application Development (provided with VisualAge
COBOL Version 3.0.2)
Oracle* *
Oracle7 or Oracle 8
Sybase* *
Sybase System 10
Before you start the installation, be sure you have done the following:
v You have read the readme.htm file for late-breaking information or other
information that supplements the VisualAge COBOL online help.
v Your workstation meets the hardware and software requirements for the
components of VisualAge COBOL that you choose to install, and for the
applications you want to operate with VisualAge COBOL. Also make sure that
your workstation has enough virtual memory. Your paging file should be 128
MB.
v You have uninstalled Version 2.2 or earlier versions of VisualAge COBOL before
you install Version 3.0.2. You do not have to uninstall Version 3.0 or Version
3.0.1.
v If the contents of the Windows NT CD are not already on your workstation, you
have a Windows NT CD for installing and configuring the MS Loopback
Adapter.
v If you have IBM AntiVirus installed on your workstation, you have V3.02 or
greater. Remove any earlier versions from your workstation before you install.
v If you plan to use IBM VisualAge C++ Version 3.5 for Windows, you have
installed it before you install IBM VisualAge COBOL.
After the installation, be sure to configure your browser so you can access
VisualAge COBOL online help.
RELATED TASKS
“Installing Version 3.0.2 if Version 3.0 is already installed”
“Uninstalling VisualAge COBOL” on page 20
Installing and configuring the MS Loopback Adaptor on Windows NT“Installing
and configuring the MS Loopback Adapter on Windows NT” on page 23
Installing and configuring the MS Loopback Adaptor on Windows 2000“Installing
and configuring the MS Loopback Adapter on Windows 2000” on page 24
Installing Version 3.0.2 if Version 3.0 is not already installed“Installing Version 3.0.2
if Version 3.0 is not already installed” on page 24
“Configuring your browser for online help” on page 26
“Resetting environment variables” on page 27
“Installing by using a response file” on page 29
This procedure is the same for all three types of installations: basic, network, and
shared. For example, if Version 3.0 was installed as a network installation on a
network server, following this procedure will automatically install Version 3.0.2 as
a network installation.
RELATED TASKS
“Configuring your browser for online help” on page 26
“Resetting environment variables” on page 27
Directory where
Component File name located Comments
Compiler IGYCDOPT.DLL ibmcobw\bin Defines the
installation default
values for the
compiler options
Data Assistant *.SM and *.CPY ibmcobw\da Mapping and copy
files that Data
Assistant generates
Tivoli *.AOF, *.CDF, and ibmcobw\files Application
*.GDF description files that
the Tivoli Developer
Kit created
COBOL project Project (*.iwp and ibmcobw directories If you put the project
environment *.iwo) files and source ibmcobw\mainproj files in a directory
directories Files if you outside ibmcobw
used Tools Setup to when you created a
modify any actions project, no action is
needed.
20 Getting Started
Uninstalling VisualAge COBOL
Be sure that you have completed the preparatory steps above before uninstalling
Version 2.2 and earlier versions. Do the following steps to uninstall all versions of
VisualAge COBOL:
1. Click Start -> Settings -> Control Panel.
2. In the Control Panel window, click the Add/Remove Programs icon, and then
click the Install/Uninstall tab.
3. On the Install/Uninstall page, double-click IBM VisualAge COBOL
(double-click VisualAge COBOL in Version 2.2 and earlier).
4. Follow the prompts to proceed with the uninstall.
5. Shut down and restart your computer.
6. Check that the product directory (for example, c:\Ibmcobw) and all files in it
were deleted.
RELATED TASKS
Uninstalling the search system“Uninstalling the search system in Version 3.0 or
later”
“Resetting environment variables” on page 27
If the search system does not get uninstalled when you uninstalled IBM VisualAge
COBOL, you will see that the x:\imnnq directory is still there. This directory might
persist because:
v Another product is using the search system, so it cannot be (and should not be)
removed.
v The search system uninstall did not perform as expected.
If this command returns no indexes, you can safely proceed to remove the search
system as described below.
If the list contains indexes that do not belong to VisualAge COBOL (that is, their
names begin with something other than IWZ), you cannot remove the search
system. Another product requires it.
If the list contains only VisualAge COBOL index file names (IWZ3EN*, IWZ3JA*),
VisualAge COBOL could not unregister the indexes, causing the uninstall of the
search system to fail. This problem occurs if VisualAge COBOL was incorrectly
If the search system still does not uninstall, you can try removing it manually:
v Remove the registry entries that are under
\\HKEY_LOCAL_MACHINE\SOFTWARE\IBM\NetQuestion. Remove this
entry including all its subtrees.
v Remove the search system directory and all its subdirectories (x:\imnnq).
22 Getting Started
v Remove the environment variables IMNINST and IMNINSTSRV, and remove the
search system path from the PATH environment variable.
If you still cannot uninstall the search system, call VisualAge COBOL support.
To verify that the MS Loopback Adapter was installed and configured, do these
steps:
1. Right-click Network Neighborhood, then click Properties.
2. Click the Services tab. On the Services page of the Network window, click
NetBIOS Interface, then click Properties.
3. In the NetBIOS Configuration window, you will see that a Lana number with
the value NetBT->NDISLoop has been added.
In some cases, you can increase the speed of bringing up certain tasks by placing
the Loopback Adapter last in the protocol bindings. To do this:
1. Right-click Network Neighborhood, and then click Properties.
2. Click the Bindings tab. On the Bindings page in the Network window, select
all protocols in the box next to Show Bindings for.
3. Expand each protocol option by clicking the + sign.
RELATED TASKS
Installing Version 3.0.2 if Version 3.0 is not already installed
RELATED TASKS
Installing Version 3.0.2 if Version 3.0 is not already installed“Installing Version 3.0.2
if Version 3.0 is not already installed”
24 Getting Started
v Network installation“Network installation: installing on a network server”
installs the entire IBM VisualAge COBOL product on a network server, which
then lets you use IBM VisualAge COBOL in a LAN environment with a
minimum number of files on the local hard drives of your client workstations.
v Shared installation“Shared installation: installing on a client from a network
server” installs a minimum number of VisualAge COBOL files on a client
connected to a network server with VisualAge COBOL installed.
For more information on the product or to report problems, refer to the IBM
COBOL Web site.
RELATED TASKS
“Configuring your browser for online help”
“Resetting environment variables” on page 27
“Installing by using a response file” on page 29
26 Getting Started
Configuring Netscape
To check that your browser configuration for Netscape 4.x is correct, do the
following steps:
1. In Netscape, click Edit -> Preferences.
2. In the Preferences window, click Advanced -> Proxies.
3. If the Direct connection to the Internet button is selected, no action is required.
If the Automatic proxy configuration button is selected, contact your system
administrator to ensure that 127.0.0.1 is included in your proxy exceptions.
If the Manual proxy configuration button is selected, do the following steps:
a. Click View (next to the Manual proxy configuration button).
b. In the Manual Proxy Configuration window, add
localhost:49213,127.0.0.1 to the list of proxy exceptions at the bottom.
c. Click OK on both the Manual Proxy Configuration window and the
Preferences window to have your changes take effect.
If you use VisualAge COBOL without a TCP/IP connection to a network, and you
use Netscape for viewing the online help, you must click the Direct connection to
the Internet button for the online help to work.
RELATED TASKS
“Resetting environment variables”
“Installing by using a response file” on page 29
If you install VisualAge C++ after VisualAge COBOL, uninstalling VisualAge C++
will not restore your COBOL values. You will need to reset the following
environment variables for IBM VisualAge COBOL, where c:\Program
Files\IBM\VACOBOL is the path where IBM VisualAge COBOL was installed:
Variable Value
IPF_PATH32 c:\Program Files\IBM\VACOBOL
SOMIR c:\Program Files\IBM\VACOBOL\SOM\ETC\SOM.IR;SOM.IR
SOMBASE c:\Program Files\IBM\VACOBOL\SOM
SC SC
SOMBINDINGS c:\Program Files\IBM\VACOBOL\SOM\BINDINGS
SOMDDIR c:\Program Files\IBM\VACOBOL\SOM\ETC\DSOM
If you uninstall IBM VisualAge COBOL, you may need to manually reset the SOM
variables for VisualAge C++ to their original settings, where c:\ibmcppw is the
path where IBM VisualAge C++ was installed:
Variable Value
IPF_PATH32 c:\ibmcppw
SC SC
SMBINDINGS c:\ibmcppw\BINDINGS
SOMBASE c:\ibmcppw
SOMDDIR c:\ibmcppw\SOM\ETC\DSOM
For example, suppose that before you installed VisualAge COBOL, LPATH or
LPATH2 contained d:\MYMACROS. During the installation of VisualAge COBOL,
the COBLPATH4 environment variable was set to e:\IBMCOBW\MACROS. To
make your macros available, you would update the COBLPATH4 environment
variable to be e:\IBMCOBW\MACROS;d:\MYMACROS.
28 Getting Started
Using your own Interface Repository files
Similarly, before you installed VisualAge COBOL, you may have updated the
SOMIR environment variable to specify your own Interface Repository files. After
you install VisualAge COBOL, reset the SOMIR variable to point to your files.
A response file is a text file that contains information similar to what an end user
would enter as responses to requests for information when running a normal
installation. InstallShield Silent reads the necessary input from the response file at
run time. The format of a response file resembles that of an .ini file, but a response
file has the .iss extension.
You might want to use a response file when you have many workstations on
which to install the product and do not need to observe each install process.
The -s parameter requests a silent installation, the -f1 parameter gives the
location and name of the response file to use, and the -f2 parameter gives the
location and name of the log file to use.
3. Review the log file, especially the return values, to verify that the silent
installation succeeded.
RELATED REFERENCES
“Setup parameters for silent installation”
“Setup log file for silent installation” on page 30
RELATED TASKS
“Installing by using a response file” on page 29
RELATED REFERENCES
“Setup log file for silent installation”
30 Getting Started
Section Name Identifies:
2 [Application] Name and version of the installed
application
Company name
3 [ResponseResult] Result code indicating whether or not the
silent installation succeeded
InstallShield puts one of the following return values after the ResultCode keyname:
Value Meaning
0 Success
-1 General error
-2 The mode is not valid.
-3 The required data was not found in the setup.iss file.
-4 Not enough memory is available.
-5 The file does not exist.
-6 Cannot write to the response file.
-7 Cannot write to the log file.
-8 The path to the InstallShield Silent response file is not valid.
-9 The list type (string or number) is not valid.
-10 The data type is not valid.
-11 Unknown error during setup.
-12 The dialogs are out of order.
-51 Cannot create the specified folder.
-52 Cannot access the specified file or folder.
-53 The option selected is not valid.
RELATED TASKS
“Installing by using a response file” on page 29
RELATED REFERENCES
“Setup parameters for silent installation” on page 29
The person installing and configuring the server is usually an OS/390 system
programmer familiar with OS/390 security features and with UNIX System
RELATED CONCEPTS
Remote edit-compile-debug
RELATED TASKS
Installing and configuring the MS Loopback Adapter on WIndows NT“Installing
and configuring the MS Loopback Adapter on Windows NT” on page 23
Installing and configuring the MS Loopback Adapter on Windows 2000“Installing
and configuring the MS Loopback Adapter on Windows 2000” on page 24
“Configuring and connecting your workstation for remote ECD”
While you are configuring your workstation for remote ECD, you will select drive
letters that VisualAge COBOL will use to attach your host files. You can specify
more than one drive and more than one folder (directory) on a drive for a project.
For example, you might use one drive for your source files and another drive for
your test files. In a source folder, you might have different folders for your JCL
and your COBOL code.
34 Getting Started
3. On the Data Transfer page, check whether the default code pages are correct.
Typically, you should not need to change the default local code page. The host
code page must match the code page used on your MVS system.
You can accept the drive selected or choose a drive letter to represent the
virtual directory on your Windows workstation that VA COBOL creates for
linking to the host. Click Next.
You have completed configuring one connection to your MVS system! In the MVS
Connections Manager window, the information for your MVS system connection
36 Getting Started
should be displayed.
6. Check the information displayed and make sure you have entered everything
correctly. If you find a mistake, double-click the information you want to
change to open the Connection Properties window and make changes there.
You can add a directory to this drive by right-clicking on the drive and then
clicking Add Directory and filling in the information.
The mappings of local and host files in the lower right pane determine the file
extensions that PDS members will have on the workstation. To change these,
right-click an item and then click Properties. Or you can right-click a drive in
the top pane and then click Add Mapping.
When you have finished, click the Save changes icon at the far left of the tool
bar to save the configuration of your MVS connection.
7. You are now ready to establish a connection. Select the system connection that
you want to connect, and then click the Connect All icon. The status field
should change from Not Connected to Connected.
RELATED TASKS
Installing and configuring the MS Loopback Adapter“Installing and configuring
the MS Loopback Adapter on Windows NT” on page 23
Mapping MVS data sets
“Verifying your connection”
“Chapter 5. Creating an MVS project” on page 41
If the connection was unsuccessful, you might see the following message:
The host mymvs.ibm.com is not responding.
Please check that the MVS system name is valid and the host is accessible to
TPC/IP.
This message means that your host TCP/IP name is not valid. Check that you have
entered the correct name.
To find out why the drive failed to connect, you can check parts of the connection
as described below. If you find that something is wrong with the host connection
and you have narrowed the cause to a part on the host, contact your MVS system
programmer for help.
Here f: is the drive letter that you specified in the Connections properties
setup, and mvs1 is the short name that you specified for your MVS host.
2. Check the messages that you receive from the net use command for any errors.
If the command fails, the problem could be that the MS Loopback Adapter is
not installed and configured correctly. Go through the installation and
configuration steps for the Loopback Adapter to make sure it is working
correctly. If the connection still does not work, the IBM HTTP Server might not
be started, or the foreign file system server might not be installed and running
on your host system.
3. If the connection to the host was successful, disconnect from the host by using
the Disconnect all button or by using the net use delete command:
C:\>net use f: /d
Here mvsipaddr is the TCP/IP name of your MVS system, and port is the port
number of your Web server.
2. If prompted, fill in your TSO user ID and password.
38 Getting Started
3. If the server has started, you will see the Web page for the IBM HTTP Server.
Here mvsipaddr is the TCP/IP name of your MVS system, and port is the port
number of your Web server. FFSDS must be uppercase.
2. If the server has been installed, you will see the Web page for the VisualAge
foreign file system server.
RELATED TASKS
Installing and configuring the MS Loopback Adapter“Installing and configuring
the MS Loopback Adapter on Windows NT” on page 23
“Configuring and connecting your workstation for remote ECD” on page 34
5. Enter Project Folder information. Click Add to specify a folder for your source
files, which already exist as data sets on MVS. Choose the drive and folder that
42 Getting Started
RELATED TASKS
“Configuring and connecting your workstation for remote ECD” on page 34
Changing the source directories for your MVS project
With VisualAge COBOL, your can work with the following types of applications:
Non-GUI applications
Enables you to create applications using basic COBOL language features.
Visual Builder applications
Enables you to create applications with a graphical user interface (GUI).
Using a “construction from parts” paradigm, you create applications by
dropping parts onto a palette and then adding connections to define the
actions for those parts. For more complex applications, you then add user
code to complete the application.
Remote MVS applications
Using the remote edit-compile-debug component of VisualAge COBOL,
you can work with your host applications from the workstation, without
having to download the applications or data to the workstation.
The Hello Application you create in this chapter is a non-GUI application, which
contains a COBOL source file (a component) from which you build (compile and
link) the running COBOL program (a target). When you finish, you have an
application that displays a customized greeting.
A complete Hello Application is provided in the Guide to Samples. You can use
the Hello Application sample to get an idea of how your Hello Application will
run.
When you have finished coding your Hello Application, the application interface
will look like this:
RELATED CONCEPTS
“Creating a non-GUI project”
“Creating the application” on page 48
“Building the application” on page 49
“Running the application” on page 50
46 Getting Started
Accept the default names for the working folder that will hold your generated
files and for the folder that will hold your project definition files. Click Next.
You are prompted to have the folder C:\IBMCOBW\Projects\HELLOAPP created.
Click Yes.
6. Specify environment variables, or you can accept the default one. Click Finish.
A message confirms the creation of the project. Click OK. The COBOL Projects
window opens, and a COBOL Projects folder is created on your desktop.
The .IWP and .IWO files must reside in the same folder, and they must have the
same file name. They do not need to reside in the same folder as the project source
files. You can open existing projects from the COBOL_Projects folder by
double-clicking the .IWP file for the project.
The IBM VisualAge COBOL Project window includes the following items:
(1)System menu
Contains menu items for manipulating (minimizing, maximizing, or
closing) the window that contains your project.
(2)Project toolbar
Contains buttons for frequently used actions.
The left side of the project toolbar has buttons that let you clear, save, or
print the contents of the monitor window. It also has a button that opens
the Tasks help for COBOL projects.
Now that you have created your project, you can create the files you need for the
application.
RELATED TASKS
“Creating the application”
To create the COBOL source file for the Hello Application project, do the following
steps:
1. In the IBM VisualAge COBOL Project - HELLOAPP window, click Actions ->
Edit a new file. The parsing editor opens with a default document titled
Editor - Untitled Document 1.
To enable the COBOL language-sensitive editing features:
48 Getting Started
v Click Options -> Profiles -> Change profile.
v In the Change Profile window, click the arrow to display the list. Locate the
item cbl; you might have to scroll to find it. Click cbl to select it.
v Click OK. The COBOL language-sensitive editing features are enabled.
2. Enter the following source code:
Identification division.
Program-ID. Helloapp.
Data division.
Working-storage section.
01 Program-work-fields.
05 Input-name Pic x(30).
05 Output-name Pic x(37).
01 Program-flags.
05 Loop-flag Pic 9(01).
88 Loop-done Value 1.
Procedure division.
Initialize program-work-fields
Program-flags.
Goback.
3. Click File -> Save to save the source code. Ensure that the Directory list shows
IBMCOBW/PROJECTS/HELLOAPP as the selected directory. Enter HELLOAPP.CBL in the
File Name field and click OK. Then click File -> Exit to close the COBOL
Editor.
4. Press F5 to refresh the IBM VisualAge COBOL Project - HELLOAPP window.
The HELLOAPP project now contains the source file HELLOAPP.CBL.
RELATED TASKS
“Building the application”
The progress of the build is displayed in the Project Monitor Command window.
If errors are detected during the build step, the monitor displays the return code
and compiler error messages. Scroll up to the message lines that include the drive,
path names, source file name (HELLOAPP.CBL), and the error message text.
Double-click a message line.
The COBOL editor opens, showing the line in the HELLOAPP.CBL source file where
the error occurred. Correct the error and save the file. Rebuild the file and check
the results in the monitor window.
Some linker error messages also contain drive, path, and file names. You can
double-click only compiler error messages to fix errors in the source program.
RELATED TASKS
“Running the application”
A workstation window opens and runs your program, prompting you for a name.
50 Getting Started
Chapter 6. Creating your first VisualAge COBOL application 51
52 Getting Started
Chapter 7. Creating a simple Visual Builder application
This section introduces you to the Visual Builder where, from a Project
environment, you create a visual application using the Composition Editor, add
parts in a frame window, connect the parts, build the application, and run the
application. This section takes you through an example of how you use Visual
Builder to develop an application for creating and maintaining a simple to-do list.
Here is what the application will look like when it is finished.
A complete to-do list application is provided in Sample Projects (click Start ->
Programs -> IBM VisualAge COBOL -> Sample Projects). The TODOLIST sample
includes the date function, which you create when you expand your to-do list
application in “Adding and aligning new parts to display the date” on page 70.
The TODOLIST sample also includes additional connections, which are not
included in the to-do list application that you create in this section. You can use
the TODOLIST sample to get an idea of how your to-do list application will run.
RELATED TASKS
“Creating a visual project” on page 54
“Starting Visual Builder” on page 55
“Placing parts in the application window” on page 57
Resizing and aligning parts“Resizing and aligning the parts” on page 59
“Connecting the parts” on page 62
“Generating the COBOL code for your application” on page 65
“Building the application” on page 65
“Running the application” on page 66
“Exiting the Composition Editor and Visual Builder” on page 66
54 Getting Started
IBM VisualAge COBOL Project - TODOLIST window
RELATED TASKS
“Starting Visual Builder”
To start the Visual Builder, double-click the icon for TODOLIST.VCB in the IBM
VisualAge COBOL Project - TODOLIST window. The Visual Builder window and
the Composition Editor window open.
56 Getting Started
the window. It has no effect on the Composition Editor. The solid green
arrow pointing to the to-do list frame is the completed connection that
closes the to-do list application when a user clicks Close. You learn how to
connect parts later in this tutorial.
Help push button — When you run the application, clicking Help causes
a help window to open for the to-do list application.
The help file (VBHELP.HLP) is created from the supplied help source files
(VBHELP.RTF and VBHELP.HPJ) when you build the to-do list application.
The settings of the Help push button determine which help panel displays
based on a specific resource ID. For example, double-click the Help push
button to open the settings notebook. On the Control page, Help panel id
specifies 100 as the footnote ID for the Help push button. If you edit
VBHelp.hpj, you see that footnote 100 is included for the Main Window
Help panel.
The TODOLIST part also contains a subpart titled CHelpWindow2, which is outside
of the TODOLIST frame window on the free-form surface. This subpart represents
the actual help window and it is where you define the help libraries. (If you
double-click CHelpWindow2, the settings notebook opens. The default help library
is VBHELP.HLP.)
Before you place any parts in the frame window, first edit the title.
You are now ready to place parts (such as push buttons and static text) in the
application window.
RELATED TASKS
“Placing parts in the application window”
1. Click (Data entry category icon) on the left-hand side of the parts
palette.
1. Click (COBOL Text Entry Field icon) on the right-hand side of the
parts palette. (This icon is also in the Data entry category set of icons.)
2. Place the crosshairs beneath the first static text, indented a few spaces to the
right, and click the left mouse button. The entry field is placed beneath the
static text.
58 Getting Started
Placing a list box in the window
Because the to-do list will consist of a list of text strings, you want to store that list
in a COBOL ListBox. To place a list box in the to-do list frame window:
1. Click (Lists category icon) on the left-hand side of the parts palette.
Note: If you place the push buttons slightly out of alignment with the existing push
buttons, that’s OK. We’ll align and size the push buttons in the next step.
RELATED TASKS
Resizing and aligning parts“Resizing and aligning the parts”
Note: The following instructions are written for dragging and dropping multiple parts
simultaneously. If you want to drag and drop just one part at a time, select the
part and continue with Step 3.
To size the frame window in only one direction, either horizontally or vertically,
hold down the Ctrl key while dragging the mouse pointer.
Matching the width of the list box to the width of the entry
field
Follow these steps to match the width of the list box to the width of the entry
field:
1. Using the multiple selection technique you learned in Dragging and dropping
parts in the frame window, select the list box and then the entry field, making the
entry field the anchor part. (The last part you select becomes the anchor part.)
60 Getting Started
2. Click (Match Width tool icon) on the toolbar. The width of the list box
changes to match that of the entry field.
If you have not already done so, move the Close push button above the Help push
button.
Using the techniques you learned in the preceding steps, select all four push
buttons, using the Remove push button as the anchor part.
v Match the width of the push buttons by clicking (Match Width tool
icon).
While all four push buttons are still selected, match their height and align them
in the frame window.
v To match the height of the push buttons, click (Match Height tool
icon).
2. Click (Align Left tool icon) on the toolbar. The first static text part is
aligned with the second static text part.
Your To-Do List window should now look like the one shown below.
The Visual Builder helps you code the event logic. Each part you place on your
to-do list canvas has a connections menu, from which you select the event to
which your logic will respond.
For the to-do list, you need to connect the push buttons to the list box and entry
field. You add connections that will move the text that a user types in the To-Do
Item entry field to the end of the To-Do List list box when the user clicks the Add
push button. You will also add connections to remove one item from the To-Do
List list box when the user clicks the Remove push button.
62 Getting Started
Connecting the Add push button to the list box
The connection between the Add push button and the list box provides the
information your application needs to add items to the list box.
1. With the mouse pointer over the Add push button, click the right mouse
button. A pop-up menu displays.
2. Click Connect -> press. This action means you want something to happen
whenever a user clicks this push button. The mouse pointer changes to look
like a spider, indicating that it is ready for you to select another part.
3. Move the mouse pointer to the list box and click the right mouse button.
4. Click addItemEnd. This action means you want new items to be added to the
end of the to-do list whenever a user clicks the Add push button. Here is what
the connection looks like:
The line connecting the Add push button to the list box is dark green. It points
from the push button to the list box, showing that the event that occurs when the
user clicks the push button causes the list box to perform an action.
The dashed line means the connection is incomplete. The connection is supposed
to add something to the list box when the Add push button is clicked, but you
have not yet supplied what needs to be added. You will do that in the next step.
5. Move the mouse pointer to the dashed connection line between the Add push
button and the list box. Right-click.
6. Click Connect -> Item.
7. Move the mouse pointer over the entry field, and right-click.
8. Click contents. This action contents means you want to move the text that a
user types in the entry field to the Item parameter of addItemEnd. This text
string is added to the end of the to-do list whenever addItemEnd is called,
which occurs whenever the Add push button is clicked. Here is what the
completed connection looks like:
64 Getting Started
The removeOne action uses this index to determine which item to remove
whenever the Remove push button is clicked.
Making this connection completes your application. It should now look like
this:
Now that you have made all of the connections, the next step is to generate your
COBOL source code.
RELATED TASKS
“Generating the COBOL code for your application”
RELATED TASKS
“Building the application”
RELATED TASKS
“Running the application”
When you run the application, the list box might blend into the white background
of the To-Do List canvas. To see the list box, you can change the color of the
background in the Composition Editor:
1. Double-click the To-Do List canvas.
2. Click the Color notebook page.
3. Click Color values arrow.
4. Select a color.
5. Click OK.
After making this change, you need to regenerate the part source, build, and run
your application.
RELATED TASKS
“Exiting the Composition Editor and Visual Builder”
If you want to expand the to-do list application, continue to the next tutorial. Do
not close the Visual Builder or Composition Editor.
If you want to continue at another time, exit the Visual Builder. To exit, click File
-> Exit.
66 Getting Started
Chapter 8. Expanding the simple Visual Builder application
This section explains how to expand the to-do list application, which you created
in the previous section, to include user-supplied code contained in a nonvisual
part. You will create a nonvisual part contained in the TODOLIST part. You will
use the Part Interface Editor and System Interface Editor to generate feature code
(skeleton COBOL code) in which you will add code (using Code Assistant) that
will generate the current date in the to-do list application.
You will also add connections that will make the Add push button available (or
unavailable), based on the content in the To-Do Item entry field. Here is what the
application looks like when it is finished.
RELATED TASKS
“Opening the TODOLIST part” on page 68
“Enabling the Add push button” on page 68
“Adding and aligning new parts to display the date” on page 70
“Creating a nonvisual part” on page 71
“Defining features” on page 71
“Defining your system interface” on page 72
“Generating your code” on page 73
Updating the feature source“Updating feature source” on page 73
“Connecting the parts” on page 75
“Generating the COBOL code for your application” on page 76
“Building the application” on page 77
Running the application
Exiting Visual Builder“Exiting the Visual Builder” on page 77
Now you are ready to continue with the to-do list application.
RELATED TASKS
“Enabling the Add push button”
Notice that steps 3 and 4 are driven by the same event (clicking the Add push
button). When you have multiple actions occurring as a result of a single event,
you must code the connections in the same sequence as the actions occur.
68 Getting Started
6. Click enable. This action means that when something is changed in the entry
field (for example, typing text), the Add push button is available.
Now the Add push button will not be available after the user clicks on it.
When you have finished, your frame window should look like this:
70 Getting Started
You have added and aligned the new parts. Before you can connect them, you
need to create a nonvisual part that will define an action to get the date.
RELATED TASKS
“Creating a nonvisual part”
The Part Interface Editor is the default editor when you work with a nonvisual
part.
RELATED TASKS
“Defining features”
Defining features
To define a feature (an attribute, action, or event) for your part, you use the Part
Interface Editor. For additional details on the Part Interface Editor, see the Visual
Builder User’s Guide.
Now you need to define the files that will contain the code for this action (and
other features) and will be included when you build the to-do-list application.
RELATED TASKS
“Defining your system interface”
The Part file specification contains the path location of the theDate part.
72 Getting Started
RELATED TASKS
“Generating your code”
RELATED TASKS
“Updating feature source”
After you enter your code, the setDate method will look like this.
5. Scroll down a bit and add the following code to the PROCEDURE DIVISION of the
setDate method:
Move function current-date(1:8) to tempdate.
String tempdate(5:2) sep tempdate(7:2) sep tempdate(1:4)
delimited by spaces into temp2.
Move 10 To Tempday-Length.
Move Temp2 To Tempday-String.
Invoke self “setToday” using Tempday.
6. Save the file and close the Code Assistant window. Now you are ready to use
the part.
RELATED TASKS
“Connecting the parts” on page 75
74 Getting Started
Connecting the parts
In the Composition Editor for the TODOLIST visual part, you need to add the
nonvisual part to the TODOLIST free-form surface and connect the Date push
button to the blank static text field.
Selecting the setDate method indicates that when the to-do-list application is run,
the current date is calculated using the setDate method and stored in the attribute,
Today.
Connecting the Date push button to the blank static text field
1. Connect the press event of the Date button to the label action of the blank
static text field.
2. Connect the contents parameter of that connection to the Today attribute of the
theDate part.
Selecting the Today attribute means that you want to pass the system date, as
returned by the getToday method to the contents parameter of the label action.
The date is displayed in the static text field whenever the getToday action is called,
which occurs whenever the Date push button is clicked.
The completed connection looks like this. (Your connection lines might be slightly
different.)
When you click the Date push button, the application calls the getToday method in
the nonvisual part and passes the string, returned as a parameter, to set the label
of the static text field. When the contents parameter needs a value, it invokes the
getToday method of theDate2, which returns Today. The value is passed as a
parameter to the label action of the static text field. The label action then displays
the current date in the static text field.
Now that you have made the connections, you need to generate the COBOL code.
RELATED TASKS
“Generating the COBOL code for your application”
RELATED TASKS
“Building the application” on page 77
76 Getting Started
Building the application
You have now built your application. The next step is to run your application.
Typos or syntax errors in the feature source will cause compilation errors.
RELATED CONCEPTS
Running the application
Remember to use the Add button to add to-do items to your to-do list. Because the
initial focus is on the Close button, if you press the Enter key, the to-do list
application will close.
RELATED TASKS
Exiting Visual Builder“Exiting the Visual Builder”
RELATED TASKS
“Getting product support”
“Getting consulting services” on page 80
“Getting education and training” on page 80
CompuServe
If you have access to CompuServe, you can enter your comments about COBOL.
At the ! command prompt enter, GO IBMLANG. Place your messages or comments
regarding COBOL in “Section 11, COBOL Language”. Note that if you want a
guaranteed response to a problem, call 1-800-237-5511.
If you want to e-mail a Defect Report Form through CompuServe, you can find the
form in the Library area. To submit, send it to the Personal Systems Support
Family at [email protected].
Fixes
You can access fixes from the following sources.
v Call 1-800-237-5511 to request packaged fixes in the form of a CD-ROM.
v Download the fixes from the FTP site at:
ftp://ftp.software.ibm.com/ps/products/cobol/fixes
v Access fixes from your respective bulletin board services (BBS).
v Go to the IBM COBOL Web site and click the Support button.
FAX
You can also fax the Defect Report Form to IBM at 1-800-426-8602. To receive a
copy of this form, call 1-800-992-4777, Monday through Friday, 8:00 a.m. to 5:00
p.m., your time zone.
Phone
Phone support provides assistance for a variety of incidents, such as installation
problems and defect reporting. There may be a fee associated with voice support.
You may pay for the call on a per incident basis; elect to use bulletin board
services (BBS), CompuServe, or the Internet; or purchase an annual contract for
phone support. However, if IBM determines that the defect is in the IBM code, you
are not charged for the incident.
Mail
Mail your comments to:
IBM Corporation
Personal Systems Support Family
Internal Zip 2901
11400 Burnett Road
Austin, Texas 78758
RELATED TASKS
“Getting consulting services”
“Getting education and training”
If you have access to the Internet, you can go to the IBM COBOL Web site and
click the Support button.
RELATED TASKS
“Getting education and training”
80 Getting Started
Appendix. Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user’s responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
Any references in this publication to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
If you are viewing this information softcopy, the photographs and color
illustrations may not appear.
U
uninstalling 20
V
visual builder
aligning parts 59
building applications 65
composition editor 56
parts 56
resizing parts 59
running an application 66
running applications 77
starting 55
visual builder projects
creating 54
84 Getting Started
Readers’ Comments — We’d Like to Hear from You
VisualAge COBOL for Windows NT
Getting Started
Version 3.0.2
Overall, how satisfied are you with the information in this book?
How satisfied are you that the information in this book is:
When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any
way it believes appropriate without incurring any obligation to you.
Name Address
Company or Organization
Phone No.
___________________________________________________________________________________________________
Readers’ Comments — We’d Like to Hear from You Cut or Fold
GC27-0811-02 Along Line
_ _ _ _ _ _ _Fold
_ _ _and
_ _ _Tape
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Please
_ _ _ _ _do
_ _not
_ _ staple
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Fold
_ _ _and
_ _ Tape
______
NO POSTAGE
NECESSARY
IF MAILED IN THE
UNITED STATES
IBM Corporation
Department HHX/H3
P.O. Box 49023
San Jose, CA
United States of America
95161-9023
_________________________________________________________________________________________
Fold and Tape Please do not staple Fold and Tape
Cut or Fold
GC27-0811-02 Along Line
GC27-0811-02