IBM Universe Intrcall
IBM Universe Intrcall
IBM Universe Intrcall
2A\intercall\Front
February 19, 2008 1:40 pm
Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta
Beta Beta Beta
IBM
Version 10.2
February, 2008
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Front
February 19, 2008 1:40 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.
Table of Contents
Preface
Organization of This Manual . . . . . . . . . . . . . . . viii
Documentation Conventions. . . . . . . . . . . . . . . . ix
Help . . . . . . . . . . . . . . . . . . . . . . . xi
API Documentation . . . . . . . . . . . . . . . . . . xii
Chapter 1 Introduction
About InterCall . . . . . . . . . . . . . . . . . . . . 1-2
Minimum System Requirements . . . . . . . . . . . . . . 1-3
InterCall Installation . . . . . . . . . . . . . . . . . . 1-4
On Windows Platforms. . . . . . . . . . . . . . . . 1-4
On UNIX Systems . . . . . . . . . . . . . . . . . 1-5
How InterCall Works . . . . . . . . . . . . . . . . . . 1-6
Copying the Software . . . . . . . . . . . . . . . . . . 1-7
UniVerse NLS in Client Programs . . . . . . . . . . . . . . 1-8
NLS Configurable Parameters . . . . . . . . . . . . . 1-8
Character Mapping . . . . . . . . . . . . . . . . . 1-8
The Sample Program . . . . . . . . . . . . . . . . . . 1-10
Table of Contents v
Appendix B Error Codes
Database Error Codes . . . . . . . . . . . . . . . . . B-2
Preface
This manual describes how to use InterCall, an application programming interface to
UniVerse and UniData. This book is for application developers who have a good
working knowledge of UniVerse or UniData, UNIX, and Windows environments.
vii
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Preface
2/19/08
Appendix B, “Error Codes,” describes the InterCall error reporting system and lists
the error codes and their meanings.
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.
ix
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Preface
2/19/08
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:
Help
To get Help about InterCall, choose Programs -> IBM U2 -> UniDK -> InterCall
-> Help from the Start menu.
xi
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Preface
2/19/08
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 APIs: Introduces IBM’s seven common APIs for
UniData and UniVerse, 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
experienced 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
experienced 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.
xiii
1Administering UniData on Windows NT or Windows 2000
0
Chapter
Introduction
1
About InterCall . . . . . . . . . . . . . . . . . . . 1-2
Minimum System Requirements . . . . . . . . . . . . . . 1-3
InterCall Installation. . . . . . . . . . . . . . . . . . 1-4
On Windows Platforms . . . . . . . . . . . . . . . 1-4
On UNIX Systems . . . . . . . . . . . . . . . . . 1-5
How InterCall Works . . . . . . . . . . . . . . . . . 1-6
Copying the Software . . . . . . . . . . . . . . . . . 1-7
UniVerse NLS in Client Programs . . . . . . . . . . . . . 1-8
NLS Configurable Parameters . . . . . . . . . . . . . 1-8
Character Mapping. . . . . . . . . . . . . . . . . 1-8
The Sample Program . . . . . . . . . . . . . . . . . 1-10
About InterCall
InterCall is an API (application programming interface) that enables a UNIX or
Windows client to access data on UniVerse and UniData servers. With InterCall, your
applications can:
On Windows platforms, you can write applications for client programs using any
development tool that accesses DLLs, for example, Visual Basic, C, or Visual C/C++.
On UNIX, you can use any tool that accesses static libraries, typically a C compiler.
1-2
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch1
2/19/08
On a UNIX server:
UniVerse Release 8.3.3.1G or later, or UniData Release 5.1 or later
TCP/IP
UniRPC daemon (unirpcd) running
On a Windows server:
UniVerse Release 9.3.1 or later, or UniData Release 5.1 or later
TCP/IP, if connected to a UNIX client
TCP/IP or LAN Manager, if connected to a Windows client
UniRPC service (unirpc) running
On a UNIX client:
TCP/IP
On a Windows client:
TCP/IP, if connected to a UNIX server
TCP/IP or LAN Manager, if connected to a Windows server
Required InterCall files copied from the development system
InterCall Installation
The installation of InterCall is different on Windows platforms and UNIX platforms.
On Windows Platforms
InterCall is one of several APIs in the UniDK (Uni Development Kit). The UniDK is
installed using the standard Microsoft Windows installation procedure. The
following UniDK files are used for InterCall development.
File Description
1-4
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch1
2/19/08
On UNIX Systems
The InterCall SDK is included on the UniVerse and UniData installation tapes for
UNIX systems. It is installed from the IC group as part of the standard installation.
The installation process creates a directory called icsdk in the unishared directory,
whose path is stored in the file /.unishared. The icsdk directory contains the following
files:
File Description
ic_opensession
ic_unidata_session
ic_universe_session
These functions log on to a host system over TCP/IP and run a server.
As the client program runs, InterCall functions send requests to the server to be
executed. The program can access files, records, commands, and UniVerse BASIC
programs that are available in the server database environment. When it finishes, it
calls ic_quit or ic_quitall and the server program terminates.
1-6
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch1
2/19/08
You may not copy or redistribute the server program unless your license agreement
explicitly allows you to.
UVIC32.DLL
UVCLNT32.DLL
unirpc32.dll
Note: On UNIX systems you do not need to redistribute any InterCall components.
Parameter Description
NLSDEFSRVLC Specifies the name of the default locale to use for passing data to and
from client programs. This locale is used if the client program does
not specify a server locale. The default value is ISO8859-
1+MARKS.
NLSDEFSRVMAP Specifies the name of the default map to use for passing data to or
from client programs. This map is used if the client program does not
specify a server map. The default value is ISO8859-1+MARKS.
NLSMODE Turns NLS mode on or off. A value of 1 indicates that NLS is on, a
value of 0 indicates NLS is off. If NLS mode is off, UniVerse does
not check any other NLS parameters.
Configurable Parameters
Character Mapping
UniVerse performs character mapping on the server. Your program can inform the
server of the appropriate map name or the character set you use to send and receive
data. In theory, you can set and reset maps as many times as you want in a program.
All users who log on in a client/server system have their own individual copies of the
server program.
1-8
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch1
2/19/08
Locale Conversion
UniVerse does locale conversions on the server. Your program must inform the server
of the locale your programs want to use in order to send or receive data. Once a
connection to the server is established, you can change the locale settings as you
wish. These settings do not interfere with other client/server users.
You may need to copy the directory, change its permissions, or both, before you can
write to it.
1-10
1Administering UniData on Windows NT or Windows 2000
0
Chapter
2-2
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch2
2/19/08
Server Sessions
An InterCall client can support up to 10 simultaneous sessions on different database
servers.
ic_opensession
ic_unidata_session
ic_universe_session
These functions return a unique session identifier for the new session. Each time you
use one of these functions to open a new session on the server, the new session
becomes the current session on which subsequent InterCall functions act.
Move among sessions using the ic_setsession function. ic_setsession finds the
desired session using the session identifier returned by ic_opensession,
ic_unidata_session, or ic_universe_session.
Get information about the current session using the ic_session_info function.
Close a session using the ic_quit function. ic_quit closes any open files and releases
locks in the current session, and closes the connection with the server. However, a
closed session still will be the current session until you use ic_setsession to switch to
another session.
When you open a file on the server using ic_open, InterCall returns a unique file
identifier for that file within the current session. If you try to use this unique file
identifier to reference the file from any other session, InterCall returns the error
IE_FIFS (file invalid for session).
Device Licensing
Device licensing restricts InterCall connections, just at it restricts any other type of
connection. Without device licensing, the connection limit is the lesser of the server’s
license limit, or 1024.
You can use the security token to make a LAN pipes connection from InterCall to a
Windows server.
To use the security token, set the user_name and password parameters in the
ic_opensession, ic_unidata_session, or ic_universe_session expression to empty
strings.
2-4
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch2
2/19/08
The structure has the following definition in the intcall.h header file:
typedef struct icstring
{
long len;
unsigned char * text;
} ICSTRING;
len is used to store the length of the data being used. text is an unsigned char pointer
that points to an area of memory containing the data.
Allocate the memory to which text points using ic_malloc or ic_calloc. Release
memory with ic_free.
Create a new module and load INTCALL.TXT into it using the Load Text option
under the File menu. This module can be added to any new program that needs to use
InterCall procedures. For example:
Declare Sub ic_open Lib "UVIC.DLL" (FileID As Long, DictFlag As
Long, ByVal FileName As String, FileLength As Long, StatusFunc As
Long, Status As Long)
Numeric arguments are declared using As Long; character arguments are declared
using ByVal and As String.
For information about string arguments used as output arguments, see Size of Output
Buffers in the next section.
One way to call an InterCall function that returns a string value is to make the
returned argument long enough by filling it with characters:
Dim ListBuffer As String
ListBuffer = String$(1000, 0)
ic_readlist 0, ListBuffer, Len(ListBuffer), ListLength, ListCount,
ErrorCode
In either case, you should refer to the data returned by ic_readlist as:
Left$(ListBuffer, ListLength)
2-6
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch2
2/19/08
The terminal number. This is the UNIX path of the terminal connected, or a
number representing the connection from a Windows system.
The string phantom. This is set if a phantom process is connected to the
server.
The string uvcs (on UniVerse systems) or udcs (on UniData systems).
This is set if the connection is made from InterCall.
You can use this returned value, by adding a paragraph entry to the VOC file. For
example:
PA
IF @TTY = 'uvcs' THEN GO END:
START.APP
END:
ic_execute
ic_opensession
ic_subcall
Chapter
InterCall Functions
3
Function Summary . . . . . . . . . . . . . . . . . . 3-5
Error Codes . . . . . . . . . . . . . . . . . . . . 3-8
ic_alpha . . . . . . . . . . . . . . . . . . . . . 3-9
ic_calloc . . . . . . . . . . . . . . . . . . . . . 3-10
ic_cleardata . . . . . . . . . . . . . . . . . . . . 3-11
ic_clearfile. . . . . . . . . . . . . . . . . . . . . 3-12
ic_clearselect . . . . . . . . . . . . . . . . . . . . 3-14
ic_close. . . . . . . . . . . . . . . . . . . . . . 3-16
ic_closeseq . . . . . . . . . . . . . . . . . . . . 3-18
ic_data . . . . . . . . . . . . . . . . . . . . . . 3-20
ic_date . . . . . . . . . . . . . . . . . . . . . . 3-22
ic_delete . . . . . . . . . . . . . . . . . . . . . 3-23
ic_execute . . . . . . . . . . . . . . . . . . . . . 3-25
ic_executecontinue . . . . . . . . . . . . . . . . . . 3-27
ic_extract . . . . . . . . . . . . . . . . . . . . . 3-29
ic_fileinfo . . . . . . . . . . . . . . . . . . . . . 3-31
ic_filelock . . . . . . . . . . . . . . . . . . . . . 3-34
ic_fileunlock . . . . . . . . . . . . . . . . . . . . 3-36
ic_fmt . . . . . . . . . . . . . . . . . . . . . . 3-38
ic_formlist . . . . . . . . . . . . . . . . . . . . . 3-40
ic_free . . . . . . . . . . . . . . . . . . . . . . 3-42
ic_getlist . . . . . . . . . . . . . . . . . . . . . 3-43
ic_get_locale . . . . . . . . . . . . . . . . . . . . 3-45
ic_get_map . . . . . . . . . . . . . . . . . . . . 3-47
ic_get_mark_value . . . . . . . . . . . . . . . . . . 3-49
ic_getvalue . . . . . . . . . . . . . . . . . . . . 3-51
ic_iconv . . . . . . . . . . . . . . . . . . . . . 3-54
ic_indices . . . . . . . . . . . . . . . . . . . . . 3-56
ic_inputreply . . . . . . . . . . . . . . . . . . . . 3-59
ic_insert. . . . . . . . . . . . . . . . . . . . . . 3-61
ic_itype . . . . . . . . . . . . . . . . . . . . . . 3-63
ic_locate . . . . . . . . . . . . . . . . . . . . . 3-65
ic_lock . . . . . . . . . . . . . . . . . . . . . . 3-67
ic_lower . . . . . . . . . . . . . . . . . . . . . 3-68
ic_malloc . . . . . . . . . . . . . . . . . . . . . 3-70
ic_oconv . . . . . . . . . . . . . . . . . . . . . 3-71
ic_open . . . . . . . . . . . . . . . . . . . . . . 3-73
ic_openseq . . . . . . . . . . . . . . . . . . . . . 3-76
ic_opensession . . . . . . . . . . . . . . . . . . . 3-78
ic_quit . . . . . . . . . . . . . . . . . . . . . . 3-81
ic_quitall . . . . . . . . . . . . . . . . . . . . . 3-82
ic_raise . . . . . . . . . . . . . . . . . . . . . . 3-83
ic_read . . . . . . . . . . . . . . . . . . . . . . 3-85
ic_readblk . . . . . . . . . . . . . . . . . . . . . 3-88
ic_readlist . . . . . . . . . . . . . . . . . . . . . 3-90
ic_readnext. . . . . . . . . . . . . . . . . . . . . 3-92
ic_readseq . . . . . . . . . . . . . . . . . . . . . 3-94
ic_readv. . . . . . . . . . . . . . . . . . . . . . 3-96
ic_recordlock . . . . . . . . . . . . . . . . . . . . 3-99
ic_recordlocked . . . . . . . . . . . . . . . . . . . 3-102
ic_release . . . . . . . . . . . . . . . . . . . . . 3-105
ic_remove . . . . . . . . . . . . . . . . . . . . . 3-107
ic_replace . . . . . . . . . . . . . . . . . . . . . 3-110
ic_seek . . . . . . . . . . . . . . . . . . . . . . 3-113
ic_select . . . . . . . . . . . . . . . . . . . . . 3-115
ic_selectindex . . . . . . . . . . . . . . . . . . . . 3-117
ic_session_info . . . . . . . . . . . . . . . . . . . 3-119
ic_set_comms_timeout . . . . . . . . . . . . . . . . . 3-121
ic_set_locale . . . . . . . . . . . . . . . . . . . . 3-123
ic_set_map (UniVerse only) . . . . . . . . . . . . . . . 3-125
ic_setsession . . . . . . . . . . . . . . . . . . . . 3-127
ic_setvalue . . . . . . . . . . . . . . . . . . . . . 3-129
ic_strdel. . . . . . . . . . . . . . . . . . . . . . 3-131
ic_subcall. . . . . . . . . . . . . . . . . . . . . . 3-133
ic_time . . . . . . . . . . . . . . . . . . . . . . 3-135
ic_timedate . . . . . . . . . . . . . . . . . . . . . 3-136
ic_trans . . . . . . . . . . . . . . . . . . . . . . 3-138
ic_unlock . . . . . . . . . . . . . . . . . . . . . . 3-140
ic_unidata_session . . . . . . . . . . . . . . . . . . . 3-141
ic_universe_session . . . . . . . . . . . . . . . . . . 3-144
ic_weofseq . . . . . . . . . . . . . . . . . . . . . 3-147
ic_write . . . . . . . . . . . . . . . . . . . . . . 3-149
ic_writeblk . . . . . . . . . . . . . . . . . . . . . 3-151
ic_writeseq . . . . . . . . . . . . . . . . . . . . . 3-153
ic_writev . . . . . . . . . . . . . . . . . . . . . . 3-155
This chapter describes the InterCall functions in alphabetical order. All InterCall
functions begin with the prefix ic_. The syntax diagram for each function includes
the function name and any applicable input and output variables. For example:
Function Summary
The following table lists all InterCall functions. See also the general explanation of
argument passing in Using the Microsoft Security Token and the description of the
ICSTRING structure in The ICSTRING Type in Chapter 2, “Programming with
InterCall.”
Use Function
3-5
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Use Function
Use Function
3-7
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Error Codes
InterCall functions return error information as a status code. Symbolic constants
representing each error number can be found in the files intcall.h (for C) and
INTCALL.TXT (for Visual Basic) in the include subdirectory of the InterCall install
directory. For a list of InterCall error codes, see Appendix B, “Error Codes.”
ic_alpha
Syntax
ic_alpha (string, string_len, code)
Input Variables
The following table describes the input variables.
Output Variable
The following table describes the output variable.
Description
ic_alpha determines whether a string is alphabetic or nonalphabetic. If the string
contains the characters a through z or A through Z, it returns a value of 1. If the string
contains any other characters or an empty string, it returns 0.
ic_alpha 3-9
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_calloc
Syntax
ptr = ic_calloc (size)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
ic_calloc allocates and zeros a piece of memory for use by ic_subcall, returning a
pointer, i, to the allocated memory. Use ptr with ic_free to release the memory when
it is no longer needed.
Related Function
ic_malloc
ic_cleardata
Syntax
ic_cleardata (code)
Output Variable
The following table describes the output variable.
Description
ic_cleardata flushes data loaded by the ic_data function from the input stack.
ic_cleardata 3-11
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_clearfile
Syntax
ic_clearfile (file_id, code)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
ic_clearfile deletes all open data or dictionary records of a server database file.
ic_clearfile deletes the record content only, not the file itself. You must specify each
file to be cleared in a separate ic_clearfile statement.
Related Functions
ic_close
ic_delete
ic_clearselect
Syntax
ic_clearselect (select_list_num, code)
Input Variable
The following table describes the input variable.
select_list_num long * Identifies the select list (0 through 10) that is to be cleared.
ic_clearselect Input Variable
Output Variable
The following table describes the output variable.
Description
ic_clearselect clears an active select list. You can get an active select list by:
ic_clearselect 3-13
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Related Functions
ic_formlist
ic_readlist
ic_readnext
ic_selectindex
ic_close
Syntax
ic_close (file_id, code)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
ic_close closes an open server database file. Use ic_close after opening and
processing a file. This function releases any file locks or record locks for the current
user.
ic_close 3-15
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Related Functions
ic_filelock
ic_fileunlock
ic_recordlock
ic_closeseq
Syntax
ic_closeseq (file_id, code)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
Note: UniData databases do not support the ic_closeseq function.
ic_closeseq 3-17
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Related Functions
ic_readseq
ic_weofseq
ic_writeseq
ic_data
Syntax
ic_data (string, string_len, code)
Input Variables
The following table describes the input variables.
Output Variable
The following table describes the output variable.
Description
ic_data loads strings onto the input stack. These values can be used as responses to
UniVerse BASIC or UniBasic INPUT statements executed on the server.
ic_data 3-19
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Related Functions
ic_cleardata
ic_execute
ic_executecontinue
ic_date
Syntax
ic_date (date, code)
Output Variables
The following table describes the output variables.
Description
ic_date returns the server system date in internal format. The internal format for the
date is based on a reference date of December 31, 1967, which is day 0. All dates
therefore are positive numbers representing the number of days elapsed since day 0.
Related Functions
ic_time
ic_timedate
ic_date 3-21
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_delete
Syntax
ic_delete (file_id, lock, record_id, id_len, status_func, code)
Input Variables
The following table describes the input variables.
lock long * Specifies what actions to perform if the user has locked the
record:
Output Variables
The following table describes the output variables.
status_func long * Value of the UniVerse BASIC or UniBasic STATUS function after
ic_delete is executed.
code long * Either 0 if execution was successful or a specific error code if
execution was not successful.
ic_delete Output Variables
Description
ic_delete deletes a record from an open server database file. The value of lock
specifies what actions ic_delete performs. If the record is not found, code will
contain the error IE_RNF (record not found).
Related Functions
ic_clearfile
ic_close
ic_release
ic_delete 3-23
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_execute
Syntax
ic_execute (command, command_len, text_buffer, text_buf_size, text_len,
return_code, return_code_2, code)
Input Variables
The following table describes the input variables.
text_buffer long * Buffer where the output from the command is to be placed.
New lines in the output are replaced by field marks.
Output Variables
The following table describes the output variables.
Description
ic_execute executes a server database command and copies the resulting output into
a buffer supplied by the user. The output is truncated if it is larger than text_buf_size
bytes in length and the error IE_BTS (buffer too small) is returned. The output from
a Windows server is always paged, whereas the output from a UNIX server is not. If
the executed command requests input, then the function returns the output and the
error code IE_AT_INPUT (server at input).
See also Using the @TTY Variable in Chapter 2, “Programming with InterCall.”
Related Function
ic_inputreply
ic_execute 3-25
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_executecontinue
Syntax
ic_executecontinue (text_buffer, text_buf_size, text_len, return_code,
return_code_2, code)
Input Variable
The following table describes the input variable.
Output Variables
Parameter Type Description
text_buffer char * Buffer where the output from the command is to be placed.
New lines in the output are replaced by field marks.
Description
ic_executecontinue lets you supply an additional buffer to continue reading output
when ic_execute returns IE_BTS (buffer too small) in its code argument. If
ic_executecontinue returns IE_BTS, use this function for as many times as
necessary. The output from a Windows server is always paged, whereas the output
from a UNIX server is not.
ic_executecontinue 3-27
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_extract
Syntax
ic_extract (dynamic_array, length_da, field, value, subvalue, string, max_str_size,
string_len, code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
Description
ic_extract returns data from a single field, value, or subvalue of a dynamic array. The
numeric values of field, value, and subvalue determine which data is returned:
If the string buffer is too small for the specified field, value, or subvalue, IE_BTS
(buffer too small) is returned in code.
Related Functions
ic_insert
ic_remove
ic_replace
ic_strdel
ic_extract 3-29
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_fileinfo
Syntax
ic_fileinfo (key, file_id, data, buffer, buffer_size, code)
Input Variables
The following table describes the input variables.
key long * Specifies what information is required. The symbolic names for
key are included in the intcall.h and INTCALL.TXT files.
Output Variables
The following table describes the output variables.
Description
ic_fileinfo returns a specified item of information relating to an open server database
file. For multivolume or distributed files, most data items are returned as a dynamic
array, one element for each part.
If the returned data is numeric, its value is placed in data, and code is set to 0. The
buffer argument is not used. If the data item is a string or a dynamic array, it is
returned in buffer, code is set to IE_STR, and data is set to the length of data returned,
in bytes.
If the size of the returned output exceeds buffer_size bytes, IE_BTS (buffer too small)
is returned in code. Any other value is a specific error code.
ic_fileinfo 3-31
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Related Function
ic_extract
ic_filelock
Syntax
ic_filelock (file_id, status_func, code)
Input Variable
The following table describes the input variable.
Output Variables
The following table describes the output variables.
Description
ic_filelock locks an open server database file, preventing any other user from:
ic_filelock 3-33
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Reading any record in that file using the ic_read function with a
IK_READU or IK_READL lock, or any of the UniVerse BASIC or
UniBasic READL, READU, READVU, or MATREADU statements
Reading any field in that file using the ic_readv function with a IK_READU
lock or the UniVerse BASIC or UniBasic READVU statement
Locking the file using ic_filelock or the UniVerse BASIC or UniBasic
FILELOCK statement
Related Functions
ic_close
ic_write
ic_writev
ic_fileunlock
Syntax
ic_fileunlock (file_id, status_func, code)
Input Variable
The following table describes the input variable.
Output Variables
The following table describes the output variables.
Description
ic_fileunlock unlocks a file locked by ic_filelock. ic_fileunlock does not unlock
records that were locked using:
ic_fileunlock 3-35
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Related Functions
ic_close
ic_write
ic_writev
ic_fmt
Syntax
ic_fmt (format, format_len, string, string_len, result, max_rslt_size, result_len,
status_func)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
ic_fmt 3-37
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_fmt formats a string into various patterns. You can specify the following
characteristics:
Related Functions
ic_iconv
ic_oconv
ic_formlist
Syntax
ic_formlist (dynamic_array, dynamic_len, selnum, code)
Input Variables
The following table describes the input variables.
selnum long * Select list number into which to load the dynamic array.
ic_formlist Input Variables
Output Variable
The following table describes the output variable.
Description
ic_formlist produces a select list from a dynamic array.
ic_formlist 3-39
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Related Functions
ic_clearselect
ic_getlist
ic_readlist
ic_readnext
ic_select
ic_free
Syntax
ic_free (ptr)
Input Variable
The following table describes the input variable.
Description
ic_free releases a piece of memory previously allocated by ic_calloc or ic_malloc.
Related Function
ic_subcall
ic_free 3-41
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_getlist
Syntax
ic_getlist (list_name, length, select_list_num, code)
Input Variables
The following table describes the input variables.
select_list_num long * Select list number (0 through 10) to be assigned to the restored
select list.
ic_getlist Input Variables
Output Variable
The following table describes the output variable.
Description
ic_getlist restores a select list from the &SAVEDLISTS& file. This function allows
an application to use the record IDs previously saved by the SAVE.LIST command.
Related Functions
ic_clearselect
ic_formlist
ic_readlist
ic_readnext
ic_select
ic_getlist 3-43
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_get_locale
Syntax
ic_get_locale (key, locale_string, max_buff_size, locale_string_len, code)
Input Variables
The following table describes the input variables.
key long * Specifies the locale information you want to retrieve. It must be
one of the following tokens:
IK_LC_ALL = All categories
IK_LC_TIME = Time category
IK_LC_NUMERIC = Numeric category
IK_LC_MONETARY = Monetary category
IK_LC_CTYPE = Ctype category
IK_LC_COLLATE = Collate category
Output Variables
The following table describes the output variables.
Description
Note: UniData databases do not support the ic_get_locale function.
ic_get_locale retrieves the name of the locale that the server is using.
If NLS mode is not enabled on the server, the error code IE_NO_NLS is returned in
code.
If you specify IK_LC_ALL, all five category settings are returned, separated by the
current field mark character. (You must use ic_get_mark_value to determine the
value of the field mark character.)
ic_get_map
Syntax
ic_get_map (map_name, max_buff_size, map_name_len, code)
Input Variable
The following table describes the input variable.
Output Variables
The following table describes the output variables.
Description
Note: UniData databases do not support the ic_get_map function.
ic_get_map retrieves the name of the map currently used on the server.
If NLS mode is not enabled on the server, the error code IE_NO_NLS is returned in
code. For more information, see “UniVerse NLS in Client Programs” in Chapter 1,
“Introduction.”
ic_get_mark_value
Syntax
ic_get_mark_value (key, mark_string, max_buff_size, mark_string_len, code)
Input Variables
The following table describes the input variables.
key long * Type of system delimiter. It must be one the following tokens:
IK_IM = Item mark
IK_FM = Field mark
IK_VM = Value mark
IK_SM = Subvalue mark
IK_TM = Text mark
IK_NULL = The null value
Output Variables
The following table describes the output variables.
Description
Note: UniData databases do not support the ic_get_mark_value function.
A system delimiter that is used in the current character set on the server.
The system delimiter values retrieved are valid only for the current connection with
the server. If NLS mode is off, the default values for these tokens (128, 251 to 255)
are returned. For more information, see “UniVerse NLS in Client Programs” in
Chapter 1, “Introduction.”
ic_getvalue
Syntax
ic_getvalue (key, text_buffer, buffer_size, text_len, code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
text_buffer char * Buffer that contains the value returned, as a string of characters.
Description
ic_getvalue returns the value of a system variable from the server program.
Valu
e Symbolic Name Equivalent to Description
ic_getvalue 3-51
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Valu
e Symbolic Name Equivalent to Description
Related Function
ic_setvalue
ic_iconv
Syntax
ic_iconv (conv, conv_len, string, string_len, result, max_rslt_size, result_len,
status_func)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
status_func long * Value of the UniVerse BASIC or UniBasic STATUS function after
ic_iconv is executed:
0 The conversion was successful.
ic_iconv Output Variables
ic_iconv 3-53
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_iconv converts a character string to an internal format specified by the conversion
code. This function also can be used to check the validity of data. It is equivalent to
the UniVerse BASIC or UniBasic ICONV function.
Related Functions
ic_alpha
ic_fmt
ic_oconv
ic_indices
Syntax
ic_indices (file_id, ak_name, ak_name_len, text_buffer, text_buf_size, text_len,
code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
text_buffer char * Buffer where the output from the command is to be placed. New
lines in the output are replaced by field marks.
ic_indices 3-55
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_indices returns information about the secondary indexes on a file. You can find the
name of secondary indexes or return specific information about an index.
Related Function
ic_selectindex
ic_indices 3-57
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_inputreply
Syntax
ic_inputreply (reply_string, reply_len, add_newline, text_buffer, text_buf_size,
text_len, return_code, return_code_2, code)
Input Variables
The following table describes the input variables.
add_newline long * Indicates whether the input should be terminated with a return
(NEWLINE) character. If add_newline is False (0), no newline
is added; if add_newline is True (any nonzero value), the
running program receives the characters of reply_string
followed by a newline.
Output Variables
The following table describes the output variables.
text_buffer char * Buffer where the output from the command is to be placed.
New lines in the output are replaced by field marks.
Description
ic_inputreply responds to a request for input during execution of a command.
ic_inputreply lets you send data to a server at input (IE_AT_INPUT).
When ic_execute returns IE_AT_INPUT in code, indicating that the command being
executed is waiting for terminal input, use ic_inputreply to supply characters as if
they had come from a terminal. If ic_inputreply also returns IE_AT_INPUT, you can
call ic_inputreply again, as many times as necessary.
ic_inputreply 3-59
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_insert
Syntax
ic_insert (dynamic_array, max_da_size, length_da, field, value, subvalue, string,
string_len, code)
Input Variables
The following table describes the input variables.
field long * Number of the field at which to insert the new string.
value long * Number of the value at which to insert the new string.
subvalue long * Number of the subvalue at which to insert the new string.
Input/Output Variables
The following table describes the input/output variables.
length_da long * Length of the old and new dynamic array in bytes.
ic_insert Input/Output Variables
Output Variable
The following table describes the output variable.
Paramete
r Type Description
Description
ic_insert inserts a new field, value, or subvalue into a dynamic array at a specified
location, returning the new dynamic array and its new length. The data content to be
inserted is specified by string. The numeric values of field, value, and subvalue
determine whether the new data is inserted as a field, value, or subvalue.
If both value and subvalue are 0, the new data is inserted before the specified
field.
If only subvalue is 0, the new data is inserted before the specified value.
If no argument is 0, the new data is inserted before the specified subvalue.
If the number of characters to be added extends the length of the dynamic array past
max_da_size, the original dynamic array is not altered and an error value is returned
in code.
Related Functions
ic_extract
ic_remove
ic_replace
ic_strdel
ic_insert 3-61
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_itype
Syntax
ic_itype (filename, filename_len, record_id, record_id_len, itype_id, itype_id_len,
text_buffer, text_buf_size, text_len, code)
Input Variables
The following table describes the input variables.
record_id char * Record ID of the data record to be supplied as data during the
evaluation.
Output Variables
The following table describes the output variables.
text_buffer char * Buffer that will contain the value returned, as a string of
characters.
Description
ic_itype evaluates an I-descriptor taken from the dictionary of a server database file,
and returns the result. When ic_itype is executed, the server attempts to open the
dictionary of the specified file on the server, and then read the I-descriptor record.
If the I-descriptor is valid, it will always be evaluated. The system variable @ID is
set to the value of record_id, and the variable @RECORD is set to the contents of the
specified record, and the result is placed in text_buffer. If the data cannot be opened,
if record_id is null, or if the data record is not present, @RECORD is set to a null
string instead.
If the dictionary cannot be opened, if the I-descriptor record is not present in the file,
or if the I-descriptor field has not been compiled, then code will be set to an error
code.
ic_itype 3-63
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_locate
Syntax
ic_locate (search, search_len, dynamic_array, dynamic_len, field, value, start, order,
order_len, index, found, code)
Input Variables
The following table describes the input variables.
order char * String indicating the order of the elements within the
dynamic array.
Output Variables
The following table describes the output variables.
index long * A variable to receive the position within the dynamic array of the
string being sought.
Description
ic_locate searches a dynamic array for a string and returns a value indicating whether
the expression is in the array and where it is or where the expression should go if it
is not in the array. ic_locate searches the dynamic array for search and returns values
indicating the following:
The search can start anywhere in dynamic_array. field and value delimiter values
specify:
Related Functions
ic_extract
ic_insert
ic_replace
ic_strdel
ic_locate 3-65
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_lock
Syntax
ic_lock (lock_num, code)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
ic_lock sets a public process lock. The locks are used to protect user-defined
resources or events on the server from unauthorized or simultaneous data file access
by different users.
Related Function
ic_unlock
ic_lower
Syntax
ic_lower (string, string_len, code)
Input Variable
The following table describes the input variable.
Input/Output Variable
The following table describes the input/output variable.
Output Variable
The following table describes the output variable.
ic_lower 3-67
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_lower returns string with the system delimiters converted to the next lower-level
delimiter. For example, field marks are changed to value marks, value marks are
changed to subvalue marks, and so on.
Related Function
ic_raise
ic_malloc
Syntax
ptr = ic_malloc (size)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
ic_malloc allocates a piece of memory for use by ic_subcall, returning a pointer, ptr,
to the allocated memory. Use ptr with ic_free to release the memory when it is no
longer needed.
Related Function
ic_calloc
ic_malloc 3-69
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_oconv
Syntax
ic_oconv (conv, conv_len, string, string_len, result, max_rslt_size, result_len,
status_func)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
Description
ic_oconv converts a character string to an external format specified by the conversion
code. This function is equivalent to the UniVerse BASIC or UniBasic OCONV
function. Any string returned by ic_iconv can be supplied directly to ic_oconv using
the same conversion code.
Related Functions
ic_alpha
ic_fmt
ic_oconv 3-71
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_open
Syntax
ic_open (file_id, dict_flag, filename, file_len, status_func, code)
Input Variables
The following table describes the input variables.
file_id long * File identifier that should be used for all subsequent operations
on this file.
Output Variables
The following table describes the output variables.
Description
ic_open opens a server database file for reading, writing, and deleting. You must
open a database file with ic_open before any type of file I/O operation can be
executed.
The value of dict_flag determines whether a data or dictionary file is opened. To open
a dictionary file, the value of dict_flag must be IK_DICT. To open a data file, its value
must be IK_DATA.
The ic_open function returns an integer as the unique file identifier in file_id. All
subsequent file operations should use this argument when referring to the opened file.
If ic_open does not execute successfully, the value of file_id is 0.
The ic_open function uses the file’s VOC record in the account specified in the
ic_opensession, ic_unidata_session, or ic_universe_session call. The VOC file
record must be a valid file definition record.
Use separate ic_open functions for each file. Any number of files can be opened at
any point in the program.
For UniVerse files, status_func contains the external file type, 2 through 18, 25, or
30. For all other server database files, status_func contains the internal file type: 3 for
a dynamic, multivolume or distributed file, or 4 for a type 1 file. If the file is not
opened, status_func contains 0.
The following table lists the valid UniVerse values for status_func.
Value Meaning
−2* No file name or file. This error may occur when you cannot open a file across
UV/Net.
−3 UNIX access error that occurs when you do not have UNIX permissions to
access a database file in a UNIX directory. For example, this may occur when
trying to access a type 1 or type 30 file.
−4* Access error when you do not have UNIX permissions or if DATA.30 is missing
for a type 30 file.
UniVerse status_func Values
ic_open 3-73
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Value Meaning
−10 A problem occurred while the file was being rolled forward during warmstart
recovery. Therefore, the file is marked “inconsistent”.
Related Functions
ic_close
ic_filelock
ic_fileunlock
ic_read
ic_readv
ic_recordlock
ic_write
ic_writev
ic_openseq
Syntax
ic_openseq (file_id, filename, file_len, record_id, record_id_len, status_func, code)
Input Variables
The following table describes the input variables.
file_id long * File identifier that should be used for all subsequent operations
on this file.
Output Variables
The following table describes the output variables.
ic_openseq 3-75
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
Note: UniData databases do not support the ic_openseq function.
Related Functions
ic_closeseq
ic_readblk
ic_seek
ic_writeblk
ic_opensession
Syntax
session_id = ic_opensession (server_name, user_name, password, account, status,
subkey)
Input Variables
The following table describes the input variables.
server_name char * Name of the server to which to connect. See “Description” for
details on how you can use this to specify the transport type to
use for the connection.
Output Variables
The following table describes the output variables.
ic_opensession 3-77
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_opensession opens a new session from the client to a UniVerse or UniData server,
and returns session_id, a unique session identifier. Use the ic_setsession function to
switch among sessions using the contents of session_id.
The way in which you specify server_name determines the transport type used for the
connection:
For TCP/IP connections, you can also specify the port number and/or the IP address
to use as part of server_name. For example:
Server Sessions
Using the @TTY Variable
Using the Microsoft Security Token
Related Functions
ic_quit
ic_quitall
ic_unidata_session
ic_universe_session
ic_opensession 3-79
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_quit
Syntax
ic_quit (code)
Output Variable
The following table describes the output variable.
Description
ic_quit terminates the current InterCall session, closes all files opened during this
session, releases all locks used during this session, and logs out the server process
used to invoke the server database.
Related Functions
ic_opensession
ic_quitall
ic_setsession
ic_unidata_session
ic_universe_session
ic_quitall
Syntax
ic_quitall (code)
Output Variable
The following table describes the output variable.
Paramete
r Type Description
Description
ic_quitall closes all the sessions opened by ic_opensession, ic_unidata_session, or
ic_universe_session. It functionally is the same as using ic_quit on individual
sessions. All files are closed and locks are released.
Related Function
ic_quit
ic_setsession
ic_quitall 3-81
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_raise
Syntax
ic_raise (string, string_len, code)
Input Variable
The following table describes the input variable.
Input/Output Variable
The following table describes the input/output variable.
Output Variable
The following table describes the output variable.
Description
ic_raise returns string with its delimiters converted to the next higher-level delimiter.
For example, value marks are changed to field marks, subvalue marks are changed to
value marks, and so on.
Related Function
ic_lower
ic_raise 3-83
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_read
Syntax
ic_read (file_id, lock, record_id, id_len, record, max_rec_size, record_len,
status_func, code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
record char * Buffer that will contain the record returned by the ic_read
function.
Description
ic_read reads a record from an open server database file.
If you do not specify a buffer large enough for the record, the buffer is filled to the
value of max_rec_size and the error IE_BTS (buffer too small) is returned.
If the record does not exist, the value of record_len is set to 0 and record is set to null.
Lock Meaning
IK_READL The record is locked with an IK_READL lock, preventing other users
from setting an IK_READU lock. Users are able to read the record using
an IK_READL lock.
IK_READU The record is locked with an IK_READU lock, preventing other users
from setting a lock on the same record.
IK_READLW The record is locked with an IK_READL lock, preventing other users
from setting an IK_READU lock. Users are able to read the record using
an IK_READL lock.
lock Values
ic_read 3-85
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Lock Meaning
IK_READUW The record is locked with an IK_READU lock, preventing other users
from setting a lock on the same record.
If the record is already locked by another user and the value of lock is
IK_READU, the error IE_LCK (record is locked by another user) is
returned in code, and the user number of the user who has locked the
record is returned in status_func. If a value of IK_READU or
IK_READL is specified for lock, the record is locked even if ic_read
does not execute successfully.
The lock is released if an attempt is made to write to the record with the
ic_write or ic_writev function. The lock also can be released by calling
the ic_release function.
lock Values (Continued)
Related Functions
ic_close
ic_readv
ic_release
ic_write
ic_writev
ic_readblk
Syntax
ic_readblk (file_id, text_buffer, text_len, block_size, status_func, code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
text_buffer char * Buffer that will contain the record returned by the
ic_readblk function.
text_len long * Length of the record in bytes.
ic_readblk 3-87
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
Note: UniData databases do not support the ic_readblk function.
ic_readblk reads a block of a set size from a server file opened for sequential
processing.
Related Functions
ic_closeseq
ic_readseq
ic_seek
ic_writeblk
ic_writeseq
ic_readlist
Syntax
ic_readlist (select_list_num, list_buffer, list_buf_size, list_len, id_count, code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
ic_readlist 3-89
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_readlist reads the remains of an active select list into a dynamic array, and copies
the list of record IDs, separated by field marks, into a buffer supplied by the user. You
can get an active select list by:
If you do not specify a buffer large enough for the select list, the buffer is filled to the
value of list_buf_size and the error IE_BTS (buffer too small) is returned in code. If
the select list for the number specified is inactive, the error IE_LRR (last record read)
is returned in code.
Related Functions
ic_clearselect
ic_formlist
ic_readnext
ic_readnext
Syntax
ic_readnext (select_list_num, record_id, max_id_size, id_len, code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
ic_readnext 3-91
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_readnext returns record_id from a currently active select list. The select list is
read sequentially and values of record_id are returned sequentially. You can get an
active select list by:
If the maximum length specified for record_id is too small to receive the record_id
being read, the error IE_BTS (buffer too small) is returned in code. If the select list
is empty, the error IE_LRR (last record read) is returned in code.
If the active select list is the result of an exploded select, then ic_readnext writes a
multivalued string containing the record ID, relative value position, and the relative
subvalue position in record_id. You must extract the record ID before attempting any
read or write operation.
Related Functions
ic_clearselect
ic_formlist
ic_readseq
Syntax
ic_readseq (file_id, text_buffer, max_buff, text_len, status_func, code)
Input Variables
The following table describes the input variables.
Paramete
r Type Description
Output Variables
The following table describes the output variables.
text_buffer char * Buffer that will contain the record returned by the ic_readseq
function.
ic_readseq 3-93
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
Note: UniData databases do not support the ic_readseq function.
ic_readseq reads a line from an open server database file which has been opened for
sequential processing. Each ic_readseq function reads data from the current position
through the end of the line. The current position is updated to the position after the
end of the line.
Note: UNIX uses NEWLINE (ASCII 10) as the end-of-line string. UniVerse for
Windows Platforms uses the CARRIAGE RETURN-NEWLINE pair (ASCII 13-ASCII
10).
Related Functions
ic_closeseq
ic_readblk
ic_seek
ic_writeblk
ic_writeseq
ic_readv
Syntax
ic_readv (file_id, lock, record_id, id_len, field_number, field, max_field_size,
field_len, status_func, code)
Input Variables
The following table describes the input variables.
record_id char * Character string containing the record ID of the record that
contains the field to be read.
ic_readv Input Variables
ic_readv 3-95
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
field_number long * Number of the field from which the data is to be read.
Output Variables
The following table describes the output variables.
field char * Character buffer that will contain the field that is being read.
Description
ic_readv reads a specified field from a record in an open server database file.
If a value of 0 is specified for field_number, ic_readv checks if the record exists. The
value of field_len is set to 0 and field is set to null. If the record exists, a value of 0 is
returned in code. If the record does not exist, the error IE_RNF (record not found) is
returned in code.
If you do not specify a buffer large enough for the field, the buffer is filled to the value
of max_field_size, and IE_BTS (buffer too small) is returned in code.
IK_READUW: If the record is already locked by another user and the value of lock
is IK_READU, the error IE_LCK (record is locked by another user) is returned in
code, and the user number of the user who has locked the record is returned in
status_func. If a value of IK_READU or IK_READL is specified for lock, the record
is locked even if ic_readv does not execute successfully. The lock is released if an
attempt is made to write to the record with the ic_write or ic_writev function. The
lock can also be released by calling the ic_release function.
Related Functions
ic_close
ic_read
ic_release
ic_write
ic_writev
ic_readv 3-97
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_recordlock
Syntax
ic_recordlock (file_id, lock, record_id, id_len, status_func, code)
Input Variables
The following table describes the input variables.
record_id char * Character string containing the record ID of the record for which
the lock is being taken.
Output Variables
The following table describes the output variables.
Description
ic_recordlock sets an IK_READU lock on a record in an open server database file
without performing a read.
IK_READUW: If the record is already locked by another user and the value of lock
is IK_READU, the error IE_LCK (record is locked by another user) is returned in
code, and the user number of the user who has locked the record is returned in
status_func. The record can be released explicitly with ic_release or implicitly with
the ic_write, ic_writev, or ic_delete function.
ic_recordlock 3-99
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Related Functions
ic_close
ic_delete
ic_read
ic_readv
ic_release
ic_write
ic_writev
ic_recordlocked
Syntax
ic_recordlocked (file_id, record_id, id_length, lock_status, status_func, code)
Input Variables
The following table describes the input variables.
record_id char * Character string containing the record ID of the record for which
the lock is being taken.
Output Variables
The following table describes the output variables.
ic_recordlocked 3-101
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_recordlocked returns the status of a record lock in the lock_status argument.
Related Functions
ic_clearfile
ic_delete
ic_release
ic_trans
ic_recordlocked 3-103
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_release
Syntax
ic_release (file_id, record_id, id_len, code)
Input Variables
The following table describes the input variables.
file_id long * File identifier returned by the ic_open function, or 0 if all locks are
to be released.
record_id char * Character string containing the record ID of the record for which
locks are to be released.
Output Variable
The following table describes the output variable.
Description
ic_release releases records locked by the ic_filelock, ic_read, or ic_readv function,
or by the UniVerse BASIC or UniBasic FILELOCK, MATREADU, READL,
READU, or READVU statements.
If the value of file_id is 0, ic_release releases all records locked by all ic_filelock,
ic_read, ic_readv, and ic_recordlock calls made during the current session.
If the value of id_len is 0, all records in the specified file are released. If values are
supplied for file_id, record_id, and id_len, only locks on the specified record are
released.
Use ic_quit or ic_quitall to release all file and record locks. If the file has been opened
more than once, the locks are released on the last close.
Related Functions
ic_close
ic_fileunlock
ic_release 3-105
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_remove
Syntax
ic_remove (dynamic_array, length_da, string, max_str_size, string_len, delimiter,
remove_pointer, code)
Input Variables
The following table describes the input variables.
Input/Output Variables
The following table describes the input/output variables.
Output Variables
The following table describes the output variables.
Description
ic_remove assigns a substring of a dynamic array to string. The substring can be
delimited by an item, field, value, subvalue, or text mark.
You can reset the pointer to 0 at any time to begin again at the start of the string, but
its value must not be altered otherwise. The ic_remove function does not change the
value of the dynamic array.
If the string extracted from the dynamic array exceeds max_str_size, IE_BTS (buffer
too small) is returned in code.
ic_remove 3-107
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Related Functions
ic_extract
ic_insert
ic_readlist
ic_replace
ic_strdel
ic_replace
Syntax
ic_replace (dynamic_array, max_da_size, length_da, field, value, subvalue, string,
string_len, code)
Input Variables
The following table describes the input variables.
Input/Output Variables
The following table describes the input/output variables.
ic_replace 3-109
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Output Variable
The following table describes the output variable.
Description
ic_replace replaces the data content of an element of a dynamic array, returning the
new dynamic array and its new length. The data content to be inserted is specified by
string. The numeric values of field, value, and subvalue determine whether the new
data replaces a field, value, or subvalue.
If value and subvalue are 0, the new data replaces the specified field.
If only subvalue is 0, the new data replaces the specified value.
If no argument is 0, the new data replaces the specified subvalue.
If a higher-level argument has a value of 0, and a lower-level argument is
nonzero, the 0 value becomes 1. (Field is the highest level, subvalue is the
lowest.)
If field, value, or subvalue evaluate to −1, the data is placed after the last
field, value, or subvalue, respectively.
If the number of characters to be added extends the length of the dynamic
array past max_da_size, the original dynamic array is not altered, and the
error IE_BTS (buffer too small) is returned in code.
Related Functions
ic_extract
ic_insert
ic_readlist
ic_remove
ic_strdel
ic_replace 3-111
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_seek
Syntax
ic_seek (file_id, offset, relto, code)
Input Variables
The following table describes the input variables.
file_id long * Specifies the file identifier of a file opened for sequential access.
relto long * Value that specifies the reference position relative to:
0 = The beginning of the file
1 = The current position
2 = The end of the file
ic_seek Input Variables
Output Variable
The following table describes the output variable.
Description
Note: UniData databases do not support the ic_seek function.
ic_seek moves a file pointer from the beginning or end of a file, relative to the current
position. offset is the number of bytes before or after the relto reference point. A
negative offset results in the pointer being moved before the position specified by
relto.
Note: UNIX uses NEWLINE (ASCII 10) as the end-of-line string. UniVerse for
Windows Platforms uses the CARRIAGE RETURN-NEWLINE pair (ASCII 13−ASCII
10). Programs using these routines must be aware of the system type with which they
are communicating, as it affects the seek position in the files.
Related Functions
ic_closeseq
ic_openseq
ic_readblk
ic_readseq
ic_writeblk
ic_writeseq
ic_seek 3-113
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_select
Syntax
ic_select (file_id, select_list_num, code)
Input Variables
The following table describes the input variables.
Output Variable
The following table describes the output variable.
Description
ic_select creates a list of all record IDs from an open server database file. It is similar
to the UniVerse BASIC or UniBasic SELECT statement.
Related Functions
ic_clearselect
ic_formlist
ic_getlist
ic_readlist
ic_readnext
ic_select 3-115
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_selectindex
Syntax
ic_selectindex (file_id, select_list_num, ak_name, ak_name_len, ak_value,
ak_value_len, status_func, code)
Input Variables
The following table describes the input variables.
select_list_num long * Select list number (0 through 10) to be used for the newly
created list.
ak_value char * Name of a particular secondary index value for which a select
list is requested.
Output Variables
The following table describes the output variables.
status_func long * The status value. It uses the same values as the UniVerse BASIC or
UniBasic STATUS function following a SELECTINDEX
statement: 0 if the operation was successful or 1 if the index name
supplied is not the name of a secondary index on the file.
Description
ic_selectindex creates a select list based on a secondary index.
If ak_name does not correspond to the name of a secondary index on the specified
file, no select list is created, and status_func is set to 1. Otherwise, status_func is set
to 0.
Related Functions
ic_clearselect
ic_indices
ic_readlist
ic_readnext
ic_select
ic_selectindex 3-117
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_session_info
Syntax
ic_session_info (key, data, max_data_len, data_len, code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
Description
ic_session_info returns information about the current session. The information
returned is determined by the key value.
Related Functions
ic_opensession
ic_setsession
ic_unidata_session
ic_universe_session
ic_session_info 3-119
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_set_comms_timeout
Syntax
ic_set_comms_timeout (timeout, code)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
ic_set_comms_timeout sets the UniRPC timeout in seconds for the current session.
This function can be used at any time except when ic_execute or ic_executecontinue
is running. In this case, the command being executed must complete before you can
use ic_set_comms_timeout.
The default timeout is 24 hours (86400 seconds). You can disable the timeout by
entering a negative value or 0 for the timeout parameter.
Note: If you enter a value for the timeout that is too small, a running command may
time out (for example, if you use ic_read). An error code is returned, and the
connection to the server is dropped.
ic_set_comms_timeout 3-121
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_set_locale
Syntax
ic_set_locale (key, locale_string, locale_string_len, status, code)
Input Variables
The following table describes the input variables.
key long * Specifies the locale information you want to set. It must be one
of the following tokens:
IK_LC_ALL = All categories
IK_LC_TIME = Time category
IK_LC_NUMERIC = Numeric category
IK_LC_MONETARY = Monetary category
IK_LC_CTYPE = Ctype category
IK_LC_COLLATE = Collate category
locale_string char * Specifies the locale string setting for the requested category.
Output Variables
The following table describes the output variables.
status long * Contains the code IE_NLS_DEFAULT if the default locale is used.
Description
UniData databases do not support the ic_set_locale function.
If you specify IK_LC_ALL, all five categories are set to locale_string. If NLS mode
is not enabled on the server, the error code IE_NO_NLS is returned in code. If NLS
is enabled on the server, ic_set_locale does one of the following in this order:
Looks for the specified locale string on the server in the NLS.CLIENT.LCS
file. If it is found, uses the NLS locale name it defines.
Looks for the default entry in the NLS.CLIENT.LCS file. If it is found, uses
the NLS locale name it defines.
Looks for the locale string directly to see if it is loaded. If a locale name is
loaded, uses it.
Syntax
ic_set_map (map_string, map_string_len, status, code)
Input Variables
The following table describes the input variables.
map_string char * Specifies the map name for the current server locale.
Output Variables
The following table describes the output variables.
Description
Note: UniData databases do not support the ic_set_map function.
If NLS mode is not enabled on the server, the error code IE_NO_NLS is returned in
code. If NLS mode is enabled on the server, ic_set_map does one of the following in
this order:
Looks for the specified map string in the NLS.CLIENT.MAPS file on the
server. If it is found, uses the NLS map name it defines.
Looks for the default entry in the NLS.CLIENT.MAPS file on the server. If
it is found, uses the NLS map name it defines.
If the map string is DEFAULT, uses the NLSDEFSRVMAP configurable
parameter.
If an NLS map string is not found, uses the map string supplied to the routine
directly.
See also UniVerse NLS in Client Programs in Chapter 1, “Introduction.”
ic_setsession
Syntax
ic_setsession (session_id, code)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
ic_setsession changes the current InterCall session for the current task. The new
current session opened by ic_opensession, ic_unidata_session, or
ic_universe_session, must be open when you call ic_setsession. All InterCall
functions will use the current session for that task until the current session is changed.
ic_quit only terminates the current session; it has no effect on other sessions started
by the current task. Use ic_quitall to close all sessions. Use ic_session_info to get
information about the current session.
ic_setsession 3-127
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_setvalue
Syntax
ic_setvalue (key, data, data_len, code)
Input Variables
The following table describes the input variables.
Output Variable
The following table describes the output variable.
Paramete
r Type Description
Description
ic_setvalue sets the value of a system variable from the server program.
7 IK_AT_USER_RETURN_CODE @USER.RETURN.CODE
Related Function
ic_getvalue
ic_setvalue 3-129
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_strdel
Syntax
ic_strdel (dynamic_array, length_da, field, value, subvalue, code)
Input Variables
The following table describes the input variables.
Input/Output Variables
The following table describes the input/output variables.
dynamic_array char * String that contains a server database dynamic array from
which the specific field, value, or subvalue is to be deleted.
Output Variable
The following table describes the output variable.
Description
ic_strdel deletes an element in a dynamic array. The numeric values of field, value,
and subvalue determine whether the data to be removed is a field, value, or subvalue.
Related Functions
ic_extract
ic_insert
ic_remove
ic_replace
ic_strdel 3-131
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_subcall
Syntax
ic_subcall (sub_name, sub_name_len, code, num_args, var_args...)
Input Variables
The following table describes the input variables.
Input/Output Variable
The following table describes the input/output variable.
Output Variable
The following table describes the output variable.
Description
ic_subcall calls a cataloged BASIC subroutine on the server. If the subroutine has
arguments, before you use ic_subcall you must:
Warning: Your program will not work correctly and you may corrupt memory if you
use any other function to allocate or free memory.
Visual Basic does not support variable arguments. Visual Basic users should use the
features in the UniObjects Programming Interface instead.
See also Using the @TTY Variable in Chapter 2, “Programming with InterCall.”
Example
char subname[4] = "TEST";
long subname_len = 4;
long code = 0;
long numargs = 3;
long size = 6;
long size2 = 7;
ICSTRING arg1, arg2, arg3;
arg1.len = 0;/* This is a null argument */
arg2.len = size;
arg2.text = ic_malloc(size);
memcpy(arg2.text, "132456", arg2.len);
arg3.len = size2;
arg3.text = ic_malloc(size2);
memcpy(arg3.text, "ACCOUNT", arg3.len);
ic_subcall(subname, &subname_len, &code, &numargs, &arg1,
&arg2, &arg3);
ic_free(arg2.text);
ic_free(arg3.text);
if(arg1.len)
{
ic_free(arg1.text);
}
ic_subcall 3-133
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_time
Syntax
ic_time (time, code)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
ic_time returns the server system time in internal format. The internal format for the
time is based on a reference time of midnight, which is 0. All times are positive
numbers representing the number of seconds elapsed since midnight.
Related Functions
ic_date
ic_timedate
ic_timedate
Syntax
ic_timedate (string, max_str_len, string_len, code)
Input Variable
The following table describes the input variable.
Output Variables
The following table describes the output variables.
ic_timedate 3-135
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_timedate returns the time and date in external format. The format is hh:mm:ss dd
mmm yyyy, where:
mm Minutes
ss Seconds
dd Day
yyyy Year
To return the full date and time, the max_str_len needs to be set to at least 21.
Related Functions
ic_date
ic_time
ic_trans
Syntax
ic_trans (filename, filename_len, dict_flag, record_id, record_id_len, field_no,
control_code, control_code_len, text_buffer, max_buff, text_len, status, code)
Input Variables
The following table describes the input variables.
dict_flag long * Indicates whether the data or dictionary records of a file are to
be used.
field_no long * Field number of the record from which the data is to be
extracted.
control_code char * Specifies what action to take if data is not found or is null.
ic_trans 3-137
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Output Variable
The following table describes the output variables.
text_buffer char * Buffer that contains the result of the data transfer.
Description
ic_trans returns the contents of a field or a record in a server database file. ic_trans
opens the file, reads the record, and extracts the specified data.
If field_no is −1, the entire record is returned, except for the record ID. control_code
specifies what is done if data is not found or is the null value:
Code Description
X (Default) Returns an empty string if the record does not exist or data cannot be
found.
C Returns the value of record_id if the record does not exist or data cannot be found.
ic_unlock
Syntax
ic_unlock (lock_num, code)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
ic_unlock clears a public process lock. Process locks are used to protect user-defined
resources or events on the server from unauthorized or simultaneous data file access
by different users.
Related Function
ic_lock
ic_unlock 3-139
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_unidata_session
Syntax
session_id = ic_unidata_session (server_name, user_name, password, account,
subkey, status, unidata_server)
Input Variables
The following table describes the input variables.
server_name char * Name of the server to which you want to connect. See
“Description” for details on how you can use this to specify the
transport type to use for the connection.
subkey char * Name of the device subkey, used when an application connects
to a database server through a multiple-tier connection.
unidata_server char * Name of the UniData server to which you want to connect. If
you do not specify unidata_server, the server udcs is opened.
ic_unidata_session Input Variables
Output Variables
The following table describes the output variables.
Description
ic_unidata_session opens a new session from the client to a UniData server and
returns session_id, a unique session identifier. Use the ic_setsession function to
switch among sessions using the contents of session_id.
The way in which you specify server_name determines the transport type used for the
connection:
For TCP/IP connections, you can also specify the port number and/or the IP address
to use as part of server_name. For example:
ic_unidata_session 3-141
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Server Sessions
Using the @TTY Variable
Using the Microsoft Security Token
Related Functions
ic_opensession
ic_quit
ic_quitall
ic_universe_session
ic_universe_session
Syntax
session_id = ic_universe_session (server_name, user_name, password, account,
subkey, status)
Input Variables
The following table describes the input variables.
server_name char * Name of the server to which you want to connect. See
“Description” for details on how you can use this to specify the
transport type to use for the connection.
subkey char * Name of the device subkey, used when an application connects
to a database server through a multiple-tier connection.
ic_universe_session Input Variables
Output Variables
The following table describes the output variables.
ic_universe_session 3-143
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
Description
ic_universe_session opens a new session from the client to a UniVerse server and
returns session_id, a unique session identifier. Use the ic_setsession function to
switch among sessions using the contents of session_id.
The way in which you specify server_name determines the transport type used for the
connection:
For TCP/IP connections, you can also specify the port number and/or the IP address
to use as part of server_name. For example:
Server Sessions
Using the @TTY Variable
Using the Microsoft Security Token
Related Functions
ic_opensession
ic_quit
ic_quitall
ic_unidata_session
ic_universe_session 3-145
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_weofseq
Syntax
ic_weofseq (file_id, code)
Input Variable
The following table describes the input variable.
Output Variable
The following table describes the output variable.
Description
Note: UniData databases do not support the ic_weofseq function.
ic_weofseq writes an end-of-file (EOF) mark onto a file opened for sequential
processing. The EOF mark truncates the file at the current processing position.
Related Functions
ic_closeseq
ic_readblk
ic_readseq
ic_writeblk
ic_writeseq
ic_weofseq 3-147
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_write
Syntax
ic_write (file_id, lock, record_id, id_len, record, record_len, status_func, code)
Input Variables
The following table describes the input variables.
lock long * Specifies what actions to perform if the record was previously
locked:
Output Variables
The following table describes the output variables.
status_func long * Value of the UniVerse BASIC or UniBasic STATUS function after
ic_write is executed:
−3 The record failed an SQL integrity check.
0 The record was locked before the operation, and the value
of lock is IK_WRITE.
Description
ic_write writes a record to an open server database file.
Related Functions
ic_close
ic_read
ic_readv
ic_writev
ic_write 3-149
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_writeblk
Syntax
ic_writeblk (file_id, data, data_len, status_func, code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
Description
Note: UniData databases do not support the ic_writeblk function.
ic_writeblk writes the data held in data starting at the current position in a file that
has been opened for sequential processing.
Related Functions
ic_closeseq
ic_readblk
ic_readseq
ic_seek
ic_writeseq
ic_writeblk 3-151
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_writeseq
Syntax
ic_writeseq (file_id, data, data_len, status_func, code)
Input Variables
The following table describes the input variables.
Output Variables
The following table describes the output variables.
Description
Note: UniData databases do not support the ic_writeseq function.
Each ic_writeseq function writes data starting at the current position in a file that has
been opened for sequential processing. An end-of-line string is written into the end
of the data and the pointer is then set past the end of the line.
Note: UNIX uses NEWLINE (ASCII 10) as the end-of-line string. UniVerse for
Windows NT uses the CARRIAGE RETURN-NEWLINE pair (ASCII 13−ASCII 10).
Related Functions
ic_closeseq
ic_readblk
ic_readseq
ic_seek
ic_writeblk
ic_writeseq 3-153
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\Ch3
2/19/08
ic_writev
Syntax
ic_writev (file_id, lock, record_id, id_len, field_number, field, field_len, status_func,
code)
Input Variables
The following table describes the input variables.
lock long * Specifies what actions to perform if the record was previously
locked:
Output Variables
The following table describes the output variables.
status_func long * Value of the UniVerse BASIC or UniBasic STATUS function after
ic_writev is executed:
−3 The record failed an SQL integrity check.
0 The record was locked before the operation, and the value
of lock is IK_WRITE.
Description
ic_writev writes a specified field to a record in an open server database file.
Related Functions
ic_close
ic_read
ic_readv
ic_write
ic_writev 3-155
Appendix
InterCall Functions
by Use A
This appendix summarizes the InterCall functions described in detail in
Chapter 3, “InterCall Functions.” The functions are grouped according
to use.
Accessing a Server
Function Description
ic_readv Reads a single field value from a record in an open server database file.
ic_writev Writes a new value to a field in a record in an open server database file.
ic_trans Returns the contents of a field or a record in an open server database file.
A-3
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\AppA
2/19/08
ic_readseq Reads a line of data from a file opened for sequential processing.
ic_readblk Reads a block of data of a specified length from a file opened for
sequential processing.
ic_writeseq Writes a line of data from a file opened for sequential processing.
ic_writeblk Writes a block of data of a specified length from a file opened for
sequential processing.
ic_locate Searches a dynamic array for a string and returns a value indicating where
the expression is in the array and/or where the expression should go if it is
not in the array.
A-5
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\AppA
2/19/08
A-7
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\AppA
2/19/08
Function Description
ic_get_locale Retrieves the name of the locale that the server is using.
ic_get_map Retrieves the name of the map the server is currently using.
ic_set_map (UniVerse Sets a map name for data transfer to and from the server.
only)
Functions for Using UniVerse NLS
A-9
Appendix
Error Codes
B
InterCall functions return error information as a status code. Symbolic
constants representing each error number are in the files intcall.h (for
C) and INTCALL.TXT (for Visual Basic) in the include subdirectory
of the InterCall install directory.
1 IE_NLS_DEFAULT
B-2
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\AppB
2/19/08
B-4
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\AppB
2/19/08
B-6
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\AppB
2/19/08
B-8
C:\Program Files\Adobe\FrameMaker8\UniVerse 10.2A\intercall\AppB
2/19/08
Glossary
client A computer system or program that uses the resources and services of another system
or program (called a server).
A process that uses resources provided by a local or remote server process. See also
server.
dynamic link A special executable library that applications can use to share code and resources.
library (DLL)
extended A database that uses a three-dimensional file structure that supports multivalued data
relational within nested tables, and extensible, variable-length data formats. This enables a
database single file (table) to contain the information that otherwise would be scattered among
several interrelated files.
graphical user A user interface that lets users interact with a computer application using images and
interface (GUI) text.
InterCall A library of functions that let a client using UNIX or Windows access data on a
database server.
locale (UniVerse NLS only) The language, character set, and data formatting conventions
used by a group of people. In UniVerse, a locale comprises a set of conventions in
specific categories (Time, Numeric, Monetary, Ctype, and Collate).
select list A string of pointers to records in a file. A select list contains the record IDs of records
that meet specified criteria. Select lists can be used with other database utilities such
as RetrieVe on UniVerse or UniQuery on UniData.
UniObjects An interface that allows database clients to access and manipulate data from
Programming Windows applications. It provides a bridge between a database server with its
Interface extended relational database structure and a powerful programming environment
such as Visual Basic.
Glossary 1
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 @
Index
Index
:\Program Files\Adobe\FrameMaker8\UniVerse
10.2A\intercall\IntrcallIX.fm
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 @
Index 2
10.2A\intercall\IntrcallIX.fm
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 @
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 @
Index 4