home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
pc3270sa.zip
/
srpsmp
/
srpsmp.doc
< prev
next >
Wrap
Text File
|
2002-02-28
|
8KB
|
195 lines
***************************************************************************
* IBM Personal Communications/3270 Version 4.1 *
* for Windows 95 / Windows NT *
* *
* *
* SRPSMP.EXE *
* SRPI sample program that supports server requester *
* programming interface *
***************************************************************************
SRPI SAMPLE PROGRAMS
The SRPI sample programs are provided as an example of how the SRPI
Send_Request interface verb can be used by a PC requester application
to invoke a server on the host. The function of the sample programs
is to request records from a customer records data set on the IBM host
computer. The IBM host computer sends the customer records to the
requester program for processing. If the customer's balance in the
record is positive, the record is sent back to the server. The server
puts the positive balance into an accounts receivable data set on the
IBM host computer. To support this function, a sample PC requester
program, a sample host server program and a sample host data file are
provided.
The sample programs are designed to work in the Windows 95 and Windows NT.
Sample program source code and the supporting files are provided for the
MSVC 2.2 . Since the sample programs are in source
form, you will need to go through additional steps to run these
programs.
RESTRICTIONS
1. The Personal Communications/3270 must be loaded with at least one
3270 terminal session configured for use with SRPI.
2. The sample server is based on the sample server source program
documented in the "Programmer's Guide to the Server-Requester
Programming Interface for VM/System Product". The sample server
provided is used to run under VM/CMS environment only. For a
sample server that will run under MVS environment, refer to the
"TSO Extensions Programmer's Guide to the Server-Requester
Programming Interface for MVS/Extended Architecture" for more
information.
3. The balance field in the customer record is in binary format and
it is non-displayable on VM in the sample customer data set.
PREREQUISTES
To run a sample program, you must be familiar with the following
things:
1. Windows 95 or Windows NT installation and command prompt
2. PC/3270 installation
3. Compiler for the desired language
4. VM/CMS operation and commands
INSTALLATION
Install Windows 95 or Windows NT and the PC/3270 according to instructions
in the documentation provided with the product.
The API setting need to be selected.
The compiler associated with the desired language also needs to be
installed using the installation procedure of that language compiler.
Refer to the following language sections for additional information.
SAMPLE REQUESTER PROGRAMS
C LANGUAGE
The C sample requester program is called SRPSMP.C.
■ ENVIRONMENT:
After setting up the environment for C compiling, add LIB
and INCLUDE paths. UUCCPRB.H, UUCCPR32.H and
PCSCAL32.LIB.
■ COMPILING AND LINKING:
To compile and link the sample requester program, make the SRPI
API directory and execute the following command at the
command prompt:
nmake /f "srpsmp.mak" CFG="Win32 (80x86) Release" [press Enter]
The executable file SRPSMP.EXE will be created.
HARDWARE REQUIREMENTS:
A 3270 terminal emulation connection to an IBM host computer via
a SNA controller from an IBM Personal Computer AT using the IBM 3278/79
Adapter (DCA) or from a PS/2 using The IBM 3270 Connection adapter.
INSTALL SAMPLE SRPI SERVER:
To set up the sample server environment, two files are needed on the
IBM host computer:
IBMABASE MODULE (the sample server)
INPUT FILE (the sample customer data set)
The following instructions will guide you to properly install the SRPI
sample server on the host.
At the command prompt, enter the following commands to upload the
three host sample files from the diskette:
For SBCS environment:
SEND IBMABASE.ASM h: IBMABASE ASSEMBLE A (ASCII CRLF RECFM F
SEND ALGABASE.EXC h: ALGABASE EXEC A (ASCII CRLF
SEND INPUT.FIL h: INPUT FILE A (LRECL 109
For DBCS environment:
SEND IBMABASE.ASM h: IBMABASE ASSEMBLE A [(JISCII CRLF RECFM F
SEND ALGABASE.EXC h: ALGABASE EXEC A [(JISCII CRLF
SEND INPUT.FIL h: INPUT FILE A [(LRECL 109
Note: specify the drive and path name to the above files if they are
not located on the current path.
h: 3270 terminal short session ID.
After the file transfer completes, switch to the same 3270 session and
type ALGABASE at the VM/CMS command line to assemble and link. This
will generate the executable sample server file with the name of
IBMABASE MODULE.
RUNNING SRPI REQUESTER AND SERVER SAMPLE PROGRAMS
Create a new directory SAMPLE on the PC where your requester sample
program will reside. For C language, copy the file SRPSMP.EXE.
Enter CMSSERV from the CMS command line in the 3270 session you just
started. The IBM Enhanced Connectivity Facilities screen appears.
Switch to an command prompt and change the current directory to
SAMPLE. Execute the sample requester program. When the program
completes, switch back to the 3270 session with CMSSERV screen. Press
PF3 key to end the communication between CMSSERV and your PC. Verify
that there are two files generated in your 3270 session as a result of
the SRPI requester execution. The names of these two files are OUTPUT
FILE and LOG FILE.
The approximate content of the OUTPUT FILE is listed below:
Barttwell, Jim 300 Top Bend Austin Texas 78759 1000-2000-3020 A"""""""
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The approximate content of the LOG FILE is listed below:
CUSTOMER RECORDS READ ***
Ahab, John 1000 High Circle Austin Texas 78759 1000-2000-3000 a""""
"ADMIN
CUSTOMER RECORDS READ ***
Black, Edward 2000 Big Top Road Austin Texas 78759 1000-2000-3010 """"
"ADMIN
CUSTOMER RECORDS READ ***
Barttwell, Jim 3000 Top Bend Austin Texas 78759 1000-2000-3020 A"""
"ADMIN
CUSTOMER RECORDS UPDATED
Barttwell, Jim 3000 Top Bend Austin Texas 78759 1000-2000-3020 A"""
Barttwell, Jim 3000 Top Bend Austin Texas 78759 1000-2000-3020 A"""
"ADMIN
CUSTOMER RECORDS READ ***
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""
"ADMIN
CUSTOMER RECORDS UPDATED
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""
"ADMIN
WSCOMM RECEIVED BY SERVER