Professional Documents
Culture Documents
71 W445ngsc415443
71 W445ngsc415443
Read Operation
data with
Write operation with data, confirm and data, return code =0014
confirm, allow-write change-direction
indicator
return code = 0001 response write operation with
respond-to-confirm
data, change-direction write operation with
indicator allow-write, data
Read operation
read operation
Write operation with detach end the transaction return code = 0308
close
write with end-of-session
start of session
MC ALLOCATE with (if not already available)
TPN (Program C),
sync level (confirm)
start of transaction
resource ID,
RETURN CODE(OK)
Program C is started
data with
MC PREPARE TO RECEIVE confirm and DATA, RETURN CODE(OK)
RESOURCE(resource ID) change-direction WHAT RECEIVED(CONFIRM SEND,
TYPE(CONFIRM) indicator DATA COMPLETE)
RETURN CODE(OK)
Program C completes
Program A completes normally
normally
RV2P752-1
*CURLIB:
To manage the communications side information object, the
The current library for the job is used to create the
AS/400 system provides CL commands (as well as command
communications side information object. If no library
prompting from a display) that allow you to create, display,
is specified as the current library for the job, the
print, change, delete, and work with the communications side
QGPL library is used.
information. The following is a list of the CL commands you
can use to manage the communications side information library-name: Specify the name of the library in
object: which the communications side information object
will be stored.
CRTCSI
Used to create the CPI Communications side information RMTLOCNAME
object. Specifies the remote location name associated with the
CHGCSI symbolic destination name. This name is the logical unit
Used to change the CPI Communications side informa- on the remote system and corresponds to the second
tion object. part of the CPI Communications partner_LU_name. This
is a required parameter.
DSPCSI
Used to display or print the CPI Communications side remote-location-name: Enter the name of the remote
information object. location that should be associated with the symbolic des-
tination name.
DLTCSI
Used to delete the CPI Communications side information TNSPGM
object. Specifies the name (up to 64 characters) of the trans-
action program to be started. This is a required param-
WRKCSI
eter.
Provides a menu from which the user can create,
change, display, delete, or print the CPI Communications transaction-program-name: Specify the transaction
side information object. program name.
Notes:
Specifying the Communications Side Information
Commands: The following describes the parameters for 1. If a program start request is received on the AS/400
the CRTCSI and CHGCSI commands and lists the values for system with an unqualified program name, (that is, it
each parameter. Refer to “Using the Location Parameters” on has no library name) the system uses the library list
page 3-3 for more information on how the AS/400 system specified on the QUSRLIBL system value at the
uses the RMTNETID, RMTLOCNAME, DEV, LCLLOCNAME, time the subsystem that is handling the program
and MODE parameters. start request was started.
CPI Communications provides a set of system files that can COBOL/400 CMCOBOL QLBLSRC QSYSINC
be used to define pseudonyms for the characteristics, vari- ILE CMCOBOL QCBLLESRC QSYSINC
ables, and parameters needed by a CPI Communications COBOL/400
application. Pseudonyms enhance the readability of the FORTRAN/400 CMFORTRN QIFOINC QFTN
program text and provide consistency in the naming of char- RPG/400 CMRPG QRPGSRC QSYSINC
acteristics, variables, and parameters that make up the call
ILE RPG/400 CMRPG QRPGLESRC QSYSINC
interface. For example, instead of stating that the variable
return_code is set to an integer value of 0, it is shown to be Notes:
set to a pseudonym value of CM_OK. 1. No pseudonym files are provided for CSP or REXX/400
languages on the AS/400 system.
Pseudonyms can also be used for integer values in program 2. The CPI Communications Reference provides example
code by making use of equate or define statements. On the pseudonym files for ILE C/400, FORTRAN/400, ILE
AS/400 system, pseudonym files for the supported high-level RPG/400, ILE COBOL/400, CSP, and REXX/400 lan-
languages are included in the library for the language you guages.
are using. Table 6-3 shows the name of the member, the
source physical file, and the library containing the
pseudonym files for each high-level language supported by
CPI Communications on the AS/400 system.
Mapping of CPI Communications Calls to
ICF Operations and Functions
Table 6-4 lists the CPI Communications calls and
pseudonyms and the corresponding ICF operation or func-
tion, the DDS keyword, and the system-supplied format. The
mappings provided in this table apply when the CPI Commu-
nications conversations are at their default values. If a con-
versation characteristic is not a default value, one or more of
these mappings may differ. For example, if SEND_TYPE is
set to CM_SEND_AND_PREP_TO_RECEIVE, then the ICF
operation or function would show a write operation; however,
the DDS keyword would also include an ALWWRT.
Table 6-4 (Page 1 of 3). Mapping of CPI Communications Calls to ICF Operations and Functions
Program Call and ICF Operation or Function DDS Keyword System-Supplied Format
Pseudonym
CMINIT Initialize_ Conversa- Open operation Not applicable Not applicable
tion
CMALLC Allocate Combination of acquire opera- EVOKE $$EVOKNI
tion and evoke function