IBM Universe Uvnet
IBM Universe Uvnet
IBM Universe Uvnet
2A\uvnet\Front
February 22, 2008 3:23 pm
Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta
Beta Beta Beta Beta
UniVerse
UV/Net II Guide
Version 10.2
February, 2008
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Front
February 22, 2008 3:23 pm
Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta
IBM Corporation
555 Bailey Avenue
San Jose, CA 95141
© Copyright International Business Machines Corporation 2006, 2008. All rights reserved.
AIX, DB2, DB2 Universal Database, Distributed Relational Database Architecture, NUMA-Q, OS/2, OS/390, and
OS/400, IBM Informix®, C-ISAM®, Foundation.2000 ™, IBM Informix® 4GL, IBM Informix® DataBlade® module,
Client SDK™, Cloudscape™, Cloudsync™, IBM Informix® Connect, IBM Informix® Driver for JDBC, Dynamic
Connect™, IBM Informix® Dynamic Scalable Architecture™ (DSA), IBM Informix® Dynamic Server™, IBM
Informix® Enterprise Gateway Manager (Enterprise Gateway Manager), IBM Informix® Extended Parallel Server™,
i.Financial Services™, J/Foundation™, MaxConnect™, Object Translator™, Red Brick® Decision Server™, IBM
Informix® SE, IBM Informix® SQL, InformiXML™, RedBack®, SystemBuilder™, U2™, UniData®, UniVerse®,
wIntegrate® are trademarks or registered trademarks of International Business Machines Corporation.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the
United States and other countries.
Windows, Windows NT, and Excel are either registered trademarks or trademarks of Microsoft Corporation in the United
States and/or other countries.
UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company
Limited.
Other company, product, and service names used in this publication may be trademarks or service marks of others.
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
ii UV/Net II Guide
Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta
Table of
Contents
Table of Contents
Preface
Organization of This Manual . . . . . . . . . . . . . . . v
Documentation Conventions. . . . . . . . . . . . . . . . vi
UniVerse Documentation. . . . . . . . . . . . . . . . . viii
Related Documentation . . . . . . . . . . . . . . . . . x
API Documentation . . . . . . . . . . . . . . . . . . xi
Preface
This manual describes UV/Net II, the UniVerse transparent database networking
facility that lets you access UniVerse files on remote systems. It is for experienced
UniVerse administrators.
You should familiarize yourself with the system administrator’s guide for your
system before you install UV/Net II.
iv UV/Net II Guide
C:\Program
Files\Adobe\FrameMaker8\UniVerse
Chapter 1, “Getting Started,” contains an overview of UV/Net II, its packaging and
system requirements, and installation information.
Chapter 2, “Accessing Remote Files,” describes several ways to access remote files.
v
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Preface
2/22/08
Documentation Conventions
This manual uses the following conventions:
Convention Usage
Courier Bold In examples, courier bold indicates characters that the user types
or keys the user presses (for example, <Return>).
itemA | itemB A vertical bar separating items indicates that you can choose
only one item. Do not type the vertical bar.
... Three periods indicate that more of the same type of item can
optionally follow.
vi UV/Net II Guide
C:\Program
Files\Adobe\FrameMaker8\UniVerse
Convention Usage
T Text mark. For example, the text mark ( T ) in the following string
delimits elements 4 and 5: 1F2S3V4T5
Documentation Conventions (Continued)
The following are also used:
vii
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Preface
2/22/08
UniVerse Documentation
UniVerse documentation includes the following:
UniVerse New Features Version 10.2: Describes enhancements and changes made
in the UniVerse 10.2 release for all UniVerse products.
UniVerse BASIC SQL Client Interface Guide: Describes how to use the BASIC
SQL Client Interface (BCI), an interface to UniVerse and non-UniVerse databases
from UniVerse BASIC. The BASIC SQL Client Interface uses ODBC-like function
calls to execute SQL statements on local or remote database servers such as
UniVerse, DB2, SYBASE, or INFORMIX. This book is for experienced SQL
programmers.
Using UniAdmin: Describes the UniAdmin tool, which enables you to configure
UniVerse, configure and manage servers and databases, and monitor UniVerse
performance and locks.
UniVerse User Reference: Contains reference pages for all UniVerse commands,
keywords, and user records, allowing experienced users to refer to syntax details
quickly.
Guide to RetrieVe: Describes RetrieVe, the UniVerse query language that lets users
select, sort, process, and display data in UniVerse files. This book is for users who
are familiar with UniVerse.
Guide to the UniVerse Editor: Describes in detail how to use the Editor, allowing
users to modify UniVerse files or programs. This book also includes reference pages
for all UniVerse Editor commands.
UniVerse NLS Guide: Describes how to use and manage UniVerse’s National
Language Support (NLS). This book is for users, programmers, and administrators.
UniVerse SQL User Guide: Describes how to use SQL functionality in UniVerse
applications. This book is for application developers who are familiar with UniVerse.
UniVerse SQL Reference: Contains reference pages for all SQL statements and
keywords, allowing experienced SQL users to refer to syntax details quickly. It
includes the complete UniVerse SQL grammar in Backus Naur Form (BNF).
ix
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Preface
2/22/08
Related Documentation
The following documentation is also available:
UniVerse GCI Guide: Describes how to use the General Calling Interface (GCI) to
call subroutines written in C, C++, or FORTRAN from BASIC programs. This book
is for experienced programmers who are familiar with UniVerse.
UniVerse ODBC Guide: Describes how to install and configure a UniVerse ODBC
server on a UniVerse host system. It also describes how to use UniVerse ODBC
Config and how to install, configure, and use UniVerse ODBC drivers on client
systems. This book is for experienced UniVerse developers who are familiar with
SQL and ODBC.
UniVerse Guide for Pick Users: Describes UniVerse for new UniVerse users familiar
with Pick-based systems.
x UV/Net II Guide
C:\Program
Files\Adobe\FrameMaker8\UniVerse
API Documentation
The following books document application programming interfaces (APIs) used for
developing client applications that connect to UniVerse and UniData servers.
Administrative Supplement for Client APIs: Introduces IBM’s seven common APIs,
and provides important information that developers using any of the common APIs
will need. It includes information about the UniRPC, the UCI Config Editor, the
ud_database file, and device licensing.
UCI Developer’s Guide: Describes how to use UCI (Uni Call Interface), an interface
to UniVerse and UniData databases from C-based client programs. UCI uses ODBC-
like function calls to execute SQL statements on local or remote UniVerse and
UniData servers. This book is for experienced SQL programmers.
IBM JDBC Driver for UniData and UniVerse: Describes UniJDBC, an interface to
UniData and UniVerse databases from JDBC applications. This book is for experi-
enced programmers and application developers who are familiar with UniData and
UniVerse, Java, JDBC, and who want to write JDBC applications that access these
databases.
InterCall Developer’s Guide: Describes how to use the InterCall API to access data
on UniVerse and UniData systems from external programs. This book is for experi-
enced programmers who are familiar with UniVerse or UniData.
UniObjects for Java Developer’s Guide: Describes UniObjects for Java, an interface
to UniVerse and UniData systems from Java. This book is for experienced
programmers and application developers who are familiar with UniVerse or UniData,
and with Java, and who want to write Java programs that access these databases.
xi
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Preface
2/22/08
Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta
Chapter
Getting Started
1
How UV/Net II Works . . . . . . . . . . . . . . . . . 1-3
UV/Net II Packaging and System Requirements . . . . . . . . . 1-4
On UNIX Systems . . . . . . . . . . . . . . . . . 1-4
On Windows Platforms . . . . . . . . . . . . . . . 1-4
UV/Net II Restrictions . . . . . . . . . . . . . . . . . 1-6
Setting Up UV/Net II . . . . . . . . . . . . . . . . . 1-8
UV/Net II, the UniVerse transparent database networking facility, lets you access
(with full concurrency control) files on remote systems. UV/Net II uses the UniVerse
remote procedure call utility (UniRPC) for connections to and from remote systems.
The communicating systems use TCP/IP or LAN Manager networking software to
connect to each other.
You install UV/Net II on remote hosts whose files you want to access from the local
system. If remote systems do not need access to files on the local system, you need
not install UV/Net II on the local system.
In order for local and remote systems to communicate with each other, the UniRPC
daemon must be running on the remote system, and the UniRPC port number must
be defined on both systems.
The UV/Net daemon, uvnetd. It processes a request for data from a client
system.
Enhancements to the network configuration file, unirpcservices. This
UniVerse file defines the UniRPC services available on the host system,
including UV/Net.
The process that receives requests from remote machines for services and
starts those services.
On UNIX, this process is the UniRPC daemon, unirpcd.
On Windows platforms, this process is the unirpc service.
UniVerse BASIC programs for administering the UniRPC.
Note: In this guide, any reference to the UniRPC daemon (unirpcd) also refers to the
unirpc service.
1-3
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Ch1
2/22/08
To access files on a remote system, you must construct VOC entries for the files.
These VOC entries specify the network node name and full paths of the remote files.
UniVerse commands and BASIC statements can access remote files transparently
through these VOC entries. See Chapter 2, “Accessing Remote Files,” for more
information.
On UNIX Systems
Before installing UV/Net II on a UNIX system, you must install and configure
TCP/IP, using the instructions supplied by the TCP/IP facility vendor. You should
then identify the systems to be networked with UniVerse by defining them in the
hosts file. For information about adding nodes to the hosts file, see Administering
UniVerse.
You must also modify the configurable UniVerse parameter MFILES. MFILES
specifies the size of the UniVerse rotating file pool, which is normally at least eight
less than the system’s limit for open files per process. For each host system added to
the hosts file for UV/Net access, you should decrease the value of MFILES by one.
For information about configurable UniVerse parameters, see Administering
UniVerse.
You must install and authorize UV/Net II before you can use it.
On Windows Platforms
For homogenous Windows networking, you need not install TCP/IP. The default is a
connection using LAN pipes. You can specify that you want to use TCP/IP when you
define the node in the hosts file using UniAdmin.
UV/Net II is installed and licensed as part of the main UniVerse installation program.
UV/Net II Restrictions
I-Descriptors and UniVerse BASIC Object Code
UV/Net II gives users read and write access to files on remote systems. However, you
cannot execute I-descriptors and UniVerse BASIC object code located on remote
systems.
CREATE.FILE
DELETE.FILE
LIST.SICA
BASIC WRITE statements within a transaction
1-5
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Ch1
2/22/08
If your local UniVerse system does not support 64-bit files (UniVerse Release 9.5.1B
or earlier), you cannot access 64-bit files on remote systems that support them
(UniVerse Release 9.5.1E or later).
/?"%*:<>\
Performance
You should expect some decrease in performance when accessing remote files with
UV/Net.
Setting Up UV/Net II
To set up and run UV/Net II, you need to do the following:
For information about defining the UniRPC port number and starting the UniRPC
daemon, see Administering UniVerse.
1-7
1Administering UniData on Windows NT or Windows 2000
0
Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta
Chapter
This chapter describes how to access remote UniVerse files across UV/Net II. It also
describes how UV/Net handles remote file permissions.
You can use almost any UniVerse command (such as LIST) to access a remote file.
The difference between local file access and remote file access is in the file pointer
syntax.
To support remote file access, the syntax in field 2 (and possibly field 3) is extended
to include a system node name that identifies the remote system where the requested
file is located. The node name is separated from the path by an exclamation point ( ! ).
The syntax is as follows:
filename
001 F
002 node ! path
003 [ node ! ] path
For example, to access a file on system beta from an account on system alpha, make
the following entry in the VOC file of the account on the UNIX system alpha:
RFILE.NAME
001 F - Remote file - the data file is on beta
002 beta!/u2/REMACC/RFILE
003 D_RFILE
The VOC entry for a file on a Windows system would look like this:
RFILE.NAME
001 F - Remote file - the data file is on beta
002 beta!G:\uv\remmac\RFILE
003 D_RFILE
After creating this VOC entry, you have access to the data file, RFILE, which resides
on the remote system. The dictionary of the remote data file is on the local system.
2-3
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Ch2
2/22/08
Since you cannot execute I-descriptors on remote systems, we recommend that you
use local dictionaries with remote data files. However, if the remote file dictionary
does not contain I-descriptors, you could define a path to a remote file dictionary. For
example:
RFILE.NAME
001 F - Remote file - the data file is on beta
002 beta!/u2/REMACC/RFILE
003 beta!/u2/REMACC/D_RFILE
MULTI.RFILE.NAME
001 F - Remote file with multiple data files
002 beta!/u2/REMMAC/MULTI.RFILE
003 D_MULTI.RFILE
004 M
1. Your local UniVerse process contacts the RPC daemon or service on the
remote machine.
2. The RPC daemon starts a UV/Net daemon, uvnetd. Each local UniVerse
process has its own remote UV/Net daemon.
3. The remote UV/Net daemon executes all requests of the local UniVerse
process. Requests for access to remote files are sent to the remote UV/Net
daemon. The UV/Net daemon accesses the file on the remote system, sets
any locks, and passes results back to the local UniVerse process.
The RPC connection remains open until you log out or until the timeout limit is
reached for an inactive open connection. Timeouts for each service are defined in the
unirpcservices file.
You can list remote locks using the LIST.READU and SEMAPHORE.STATUS
commands. You can unlock remote locks using the UNLOCK command.
To use a Q-pointer, create an entry in the UV.ACCOUNT file that defines the remote
account. Then in the user account, create an entry in the VOC file that references the
remote file.
For example, to access a file on system beta from an account on system alpha, add
an entry to the UV.ACCOUNT file defining the remote account named REMACC.
The pathname of the account should be something like beta!/u2/REMACC. In the
user account, the VOC entry pointing to the remote file looks like the following:
RFILE.NAME
001 Q
002 REMACC
003 RFILE
Q-pointers to files on remote systems assume that the data files and the file dictionary
are all on the remote system. You must use an F-type file pointer if you want the
remote data file to use a local dictionary.
2-5
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Ch2
2/22/08
Different access rules apply, depending on which local and remote systems are
connected to each other.
Group permissions are defined by the /etc/passwd and /etc/group files on the remote
system. Users belong to all groups on the remote system to which their user names
are assigned in the /etc/group file, unless the SET.REMOTE.ID command assigns
them to a specified group.
root users have root permissions on remote machines. uvadm users do not have root
permissions on remote machines.
You can use SET.REMOTE.ID to specify a particular group name for the user on the
remote system to log in to.
If you are using a LAN Manager connection, you need not use SET.REMOTE.ID to
specify a user name or password, although any effective user names and passwords
you specify this way are honored.
Using the UVNETRID environment variable means you do not have to use
SET.REMOTE.ID each time you log in to UniVerse.
In BASIC programs you can use the AUTHORIZATION statement to change the
effective run-time user name of the program. UV/Net uses the effective run-time user
name when requesting remote access to SQL tables.
2-7
2Administering UniData on Windows NT or Windows 2000
0
Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta
Chapter
UV/Net II BASIC
Enhancements 3
Setting Timeouts . . . . . . . . . . . . . . . . . . . 3-3
Invoking Remote Procedures . . . . . . . . . . . . . . . 3-5
Examples . . . . . . . . . . . . . . . . . . . . 3-5
Set timeouts for any UniVerse BASIC operations running on a remote host
Invoke procedures stored on a remote host
3-2
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Ch3
2/22/08
Setting Timeouts
You can set separate timeouts on all UV/Net links to remote hosts. A UV/Net timeout
is set for a specific host. It disables the automatic retry capability of UV/Net and sets
a timeout for all UniVerse BASIC operations to be executed on that host.
Timeouts for all UV/Net links are stacked for each UniVerse BASIC execution level.
(Execution levels are changed by the EXECUTE statement.) If the program sets a
timeout and then does an EXECUTE statement, timeouts are set for all UniVerse
commands to be run by the EXECUTE statement. Timeouts are reset to 0 (no
timeout) when the program returns control to the command processor.
Programmers should set timeouts for each call to be executed. Since different opera-
tions take longer or shorter times to execute (for example, an SSELECT statement
takes longer than a READ statement), programmers should set timeouts appropriate
to each call.
Use the TIMEOUT statement after you open a UV/Net connection to set a UV/Net
timeout. The syntax is as follows:
time is an expression that evaluates to the number of seconds to elapse before the
UV/Net link is closed.
You can use the SYSTEM function after you open a UV/Net connection to get the
UV/Net link number. The syntax is as follows:
hostname is an expression that evaluates to the host name part of the path of a file
opened through UV/Net. This path can be found either in the F-pointer to the file in
the local VOC file, or in the UV.ACCOUNT file if a Q-pointer points to the file. For
example, if the path is VEGA!/u1/filename, VEGA is the hostname.
Use the SYSTEM function to get the timeout associated with a remote host. The
syntax is as follows:
directory is an expression evaluating to the name of the directory on the remote host
where the procedure is to run.
Note: If a timeout is currently set for the remote host, REMOTE.B will time out in the
same way as any other remote operation.
Examples
Here is an example of a UniVerse BASIC program called UPDATE that is stored as
a procedure on a remote host:
DIM ARG.LIST(4)
The following statement runs the procedure and writes NEW.VALUE to RECORD3:
CALL *REMOTE.B("test", "RUN UPDATE NEW.VALUE RECORD3",
"/u/test.account", RESULT)
3-4
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Ch3
2/22/08
DIM ARG.LIST(100)
MATPARSE ARG.LIST FROM TRIM(@SENTENCE), " "
COMMAND = TRIM(@SENTENCE)
COMMAND.LEN = LEN(COMMAND)
COMMAND.START = INDEX(COMMAND, " ", 4) + 1
COMMAND = COMMAND[COMMAND.START, COMMAND,LEN - COMMAND.START + 1]
EXECUTE COMMAND
EXECUTE "SAVE.LIST"
END
HOST = "kong"
COMMAND = "RUN BP GEN.REMOTE.LIST ":TARGET.LIST:" ":SELECT.COMMAND
DIRECTORY = "/usr/people/fred"
CALL *REMOTE.B(HOST, COMMAND, DIRECTORY, RESULT)
REMSL = HOST:"!":DIRECTORY:"/&SAVEDLISTS&"
OPENPATH REMSL TO FV.REMSL ELSE ABORT "CANNOT OPEN ":REMSL
READ SAVELIST FROM FV.REMSL, LIST ELSE ABORT "CANNOT READ ":LIST
The next examples show how to create transactional procedures. Two sample
programs are shown:
HOST = "TestSystem"
REMOTE.DIR = "/usr/people/fred"
LOOP
LOOP
PRINT "Order number":
INPUT ORD.NUM
READU ORDER.DATA FROM ORDERS, ORD.NUM THEN BREAK
PRINT "ORDER NOT ON FILE"
RELEASE ORDERS, ORD.NUM
REPEAT
* Modify data
.
.
.
* Format record for transmission. Field marks and value marks
don't
* work here==change them to something else.
* Call procedure
RELEASE ORDERS
RELEASE CUST.FILE
.
.
.
DIM ARGS(10)
3-6
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\uvnet\Ch3
2/22/08
STOP
END
ORD.KEY = ARGS(3)
ORD.DATA = CHANGE(ARGS(4), "]", @VM
ORD.DATA = CHANGE(ORD.DATA, "~", @FM
BEGIN TRANSACTION
WRITE ORD.DATA ON ORD.FILE, ORD,KEY
COMMIT WORK ELSE PRINT "ERROR ON COMMIT"
END TRANSACTION
END
Index
Index
F
C
file descriptors 1-4, 2-3
characters node names in 2-3
control 1-7 file dictionaries
mapped 1-7 local 2-4
configurable parameters, MFILES 1-4 remote 2-4
connection timeout 2-5, 3-3 file permissions 2-6 to 2-7
control characters 1-7 file pool 1-4
CREATE.FILE command 1-6 files
64-bit 1-7
distributed 1-6
D hosts 1-4
daemons with multiple data files 2-4
UniRPC (unirpcd) 1-2, 2-4 network configuration 1-2
:\Program Files\Adobe\FrameMaker8\UniVerse
10.2A\uvnet\UvnetIX.doc
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z @
UV/NET II Guide 2
10.2A\uvnet\UvnetIX.doc
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z @
W
WRITE statements in transactions 1-6
Symbols
/etc/group file 2-6
/etc/passwd file 2-6
3 UV/Net II Guide