Guardian Programmer's Guide

Table Of Contents
Introduction to Guardian Programming
Guardian Programmer’s Guide 421922-014
1 - 18
Accessing Guardian Procedures
NonStop Server Object Gateway links popular desktop tools and critical business
services using ActiveX controls. It enables any application that supports ActiveX
controls to access Pathway services. SOG simplifies the development and deployment
of GUI clients by shielding developers from the complexities of the transaction
processing server. Pathway services appear as ActiveX objects within the client
application. Client developers need no knowledge of Pathway APIs. SOG also handles
communications and automatic data conversion between the client and the server
using TCP/IP protocol. See the Nonstop Server Object Gateway User’s Guide for
details.
Accessing Guardian Procedures
You can access the services provided by the Guardian procedures from any supported
high-level language, including C, C++, Pascal, COBOL85, and FORTRAN, as well as
the Transaction Application Language (TAL) and the Portable Transaction Application
Language (pTAL).
You must read the appropriate language reference manual to find out how to access
Guardian procedures from the language you are using. However, you need to read
this guide if your program makes calls to the Guardian procedures, regardless of the
programming language you are using.
Although most of the examples in this guide are given in TAL, they have been carefully
written to avoid, where possible, use of TAL features that are not normally found in
other programming languages; this approach helps to make the programming
examples more readable, especially if you do not normally write programs in TAL.
Calling Guardian Procedures From TAL or pTAL
Using TAL or pTAL (which compiles native RISC code), you can access Guardian
procedures contained in the $SYSTEM.SYSTEM.EXTDECS0 file. This file is a source
library for the external declarations for most of the procedures in the system library.
However, some external declarations are not found in the EXTDECS0 file but are
found in pTAL header files instead. (You cannot call these procedures from a TAL
program.) Refer to the Guardian Procedure Calls Reference Manual for information
about where external declarations are to be found for particular Guardian procedures.
Any Guardian procedure from the EXTDECS0 file that your program calls must be
listed in a ?SOURCE compiler directive before the first call to that procedure appears
within your program source. Typically, you include one ?SOURCE directive at the start
of your program that lists all the Guardian procedures that you use; for example:
!global declarations
?SOURCE $SYSTEM.SYSTEM.EXTDECS0(FILE_OPEN_,FILE_CLOSE_,READX,
? WRITEX,WRITEREADX)
!procedure declarations