client/server communications プログラミング 通信サポート .....4 sna lu タイプ6.2...

440
Communications Server for Windows バージョン 6.1 および パーソナル・コミュニケーションズ Windows バージョン 5.9 Client/Server Communications プログラミング SC88-5630-09 (英文原典:SC31-8479-09)

Upload: donhu

Post on 11-Feb-2019

229 views

Category:

Documents


0 download

TRANSCRIPT

Communications Server for Windows 6.1 Windows 5.9

Client/Server Communications

SC88-5630-09

(SC31-8479-09)

Communications Server for Windows 6.1 Windows 5.9

Client/Server Communications

SC88-5630-09

(SC31-8479-09)

411 G.

IBM Communications Server for Windows 6.1 IBM Personal Communications for Windows 5.9 (: 5639-I70)

URL

http://www.ibm.com/jp/manuals/main/mail.html

IBM

http://www.ibm.com/jp/manuals/

(URL )

SC31847909Communications Server for Windows, Version 6.1

Personal Communications for Windows, Version 5.9

Client/Server Communications Programming

1 2006.6

W3W7W9W3

W5W7(*)

* W3W7W9W3W5W7

Copyright International Business Machines Corporation 1994, 2006. All rights reserved.

Copyright IBM Japan 2006

. . . . . . . . . . . . . . . . . vii

. . . . . . . . . . . . . . . . . ix

. . . . . . . . . . . . xi . . . . . . . . . . . . . xii . . . . . . . . . . . . . xii . . . . . . . . . . . . . . xiv . . . . . . . . . . . . xiv

2 . . . . . . . xiv . . . . . . . . . . . . . . . xv

1 APPC API . . . . . . . . . 1

1 APPC . . . . . . . . . 3SNA . . . . . . . . . . . . 4SNA LU 6.2 . . . . . . . . 4

2 APPC . . . . . . . 5 ? . . . . . . 5

APPC . . . . . 5CPI . . . . 6 . . 6 . . . 6

? . . . . . . . . . . . . . 7LU . . . . . . . . . . . . . 7 LU LU . . . . . . . . . . . 7LU ? . . . . . . . . . . . . . 8

? . . . . . . . . . . . . . 8 ? . . . . . . . . . . . . . . . 9 LU . . . . 11

. . . . . . . . . . . . . . 12 . . . . . . . . . . . . . 12 . . . . . . . . . . . . . . 13

APPC . . . . . . . . . . . . . 13APPC . . . . . . . . . . . 14 . . . . . . . . . . . . . 14 . . . . . . . . . . . 14 . . . . . . . . . . . . . . 15 . . . . . . . . . . 15

. . . . . . . . . . . . 16 . . . . . . . . . . . . . . . . . 17

3 . . . . 19 . . . . . . . . . . . . . . . 20 . . . . . . 21 22 . . . . . . . . . . . . . 22 . . . . . . . . . . . . . 22

. . . . . . . . . 23 . . . . . . . . . . . . . 24

. . . . 24 . . . . 25Personal Communications . . . . . . . . . . . . . . . . . 25 . . . . . . . . . 25 . . . 26

RECEIVE_ALLOCATE verb . . . . . . . . . . . . . . 26 . . . . . . . . . 27 . . . . . . . . . . 27

Communications Server SNA API . . . . . . . . . . 30

SNA API . . . . . . . . . . . . 30SNA API 31

4 . . . . . . . . . . . . . . . . 33 . . . . . . . . 33 LU 6.2 . . . . . 33 . . . . . . . . . . . 36 . . . . . . . . . . 36 . . . . . . . . . . . . . 36 . . . . . . . . . . . . . 37 . . . . . . . . 38 . . . . 38 . . . . . . . 38

. . . . . . . . . . . . . . . 39 . . . . . . . 39 . . . . . 40 . . . . . . . . . 40 LU () . . . . . . . . . . . . . 40 () . . . . . . . . . . . . . . . 40

EBCDIC ASCII . . . . . . . . 41

5 APPC . . . . . . . . . . . . 43 . . . . . 43 . . . . . 43

VCB . . . . . . . . . . . . . . 45 . . . . . . 45

LU . . . . . . . . . 47

6 CPI-C . . . . 49CPIC . . . . . . . . . . 49CPI-C . . . . . . . . . . . 49

Copyright IBM Corp. 1994, 2006 iii

CPI-C . . . . . . . 50CPI-C . . . . . . . . . . . . . 53

TP . . . . . . . . . . . 55Local_LU . . . . . . 56

7 APPC . . 57APPC . . . . . . . . . . . . . . . . 58WinAsyncAPPC() . . . . . . . . . . . . . 59WinAsyncAPPCEx() . . . . . . . . . . . . 61WinAPPCCancelAsyncRequest() . . . . . . . . 63WinAPPCCancelBlockingCall() . . . . . . . . 64WinAPPCCleanup() . . . . . . . . . . . . 66WinAPPCIsBlocking() . . . . . . . . . . . 67WinAPPCStartup() . . . . . . . . . . . . 68WinAPPCSetBlockingHook() . . . . . . . . . 69WinAPPCUnhookBlockingHook() . . . . . . . . 71GetAppcConfig() . . . . . . . . . . . . . 72GetAppcReturnCode() . . . . . . . . . . . 73

8 APPC verb . . . . . . . . . 75verb . . . . . . . . . . . . 75 . . . . . . . . . . . . 75

APPC API . . . . . . . . . . . 76 verb . . . . . . . . . . 76

GET_TP_PROPERTIES . . . . . . . . . . . 78GET_TYPE . . . . . . . . . . . . . . 81RECEIVE_ALLOCATE . . . . . . . . . . . 83SET_TP_PROPERTIES . . . . . . . . . . . 86TP_ENDED . . . . . . . . . . . . . . 89TP_STARTED. . . . . . . . . . . . . . 91[MC_]ALLOCATE . . . . . . . . . . . . 93[MC_]CONFIRM . . . . . . . . . . . . . 99[MC_]CONFIRMED . . . . . . . . . . . 103[MC_]DEALLOCATE . . . . . . . . . . . 105[MC_]FLUSH . . . . . . . . . . . . . 110[MC_]GET_ATTRIBUTES . . . . . . . . . 113[MC_]PREPARE_TO_RECEIVE. . . . . . . . 117[MC_]RECEIVE_AND_POST . . . . . . . . 121[MC]RECEIVE_AND_WAIT . . . . . . . . . 126[MC_]RECEIVE_EXPEDITED_DATA . . . . . . 132[MC_]RECEIVE_IMMEDIATE . . . . . . . . 136[MC_]REQUEST_TO_SEND . . . . . . . . . 142[MC_]SEND_CONVERSATION . . . . . . . . 145[MC_]SEND_DATA . . . . . . . . . . . 150[MC_]SEND_ERROR . . . . . . . . . . . 154[MC_]SEND_EXPEDITED_DATA . . . . . . . 159[MC_]TEST_RTS . . . . . . . . . . . . 162[MC_]TEST_RTS_AND_POST . . . . . . . . 164

2 LUA API . . . . . . . . . 167

9 IBM LU . . . . . . . . . . . . . 169LUA SNA . . . . . . . . . . . 169 . . . . . . . . . . . . . . . 169

LUA . . . . . 170LUA verb. . . . . . . . . . . . . . . 170LU LU LU. . . . 170 (SSCP) . . . . . . 171SNA . . . . . . . . . . . . . . . 171 . . . . . . . . . 171 . . . . . . . . . . . . . 171 . . . . . . . . . . . . . 171 . . . . . . . . . 171 . . . . . . 172

SNA . . . . . . . . . . 172SNA . . . . . 172 . . . . . . . . . . . 173LU-LU . . . . 173 . . . . . . . . . . . 174 . . . . . . . . . 175

. . . . . . . . . . . . . 175 . . . . . . . . 175 176 . . . . . . 176/ . . . . . . . . . . . . 177 . . . . . . 177 . . . 178

. . . . . . . . . . . 179 . . . . . . . . . . 179 . . . . . . . . . . . . . 179LUA . . . . . . . . . . 179 (RQE) . . . . . . . . . 180

. . . . . . . . . 181TS . . . . . . . . . . . 181FM . . . . . . . . . . . 181

RUI LUA verb . . . . . . . . . . 182verb . . . . . . . . . . . . . 182

RUI . . . . . . . . . . . . 183RUI verb . . . . . . . . . . . . 183 verb . . . . . . . . . . 184LUA . . . . . . . . 185BIND . . . . . . . . . . . . . 186 SNA . . . . . . 187 . . . . . . . . . . . . . 188 . . . . . . . . . . 188 . . . . . . . . . . . 188 . . . . . . 189

. . . . . . . . . . . . . . . . 189LUA LU () . . . . . . . 189SNA API . . . . . 190

10 RUI LUA verb . . . 191 . . . . . . . . . . . . . 191

verb . . . . . . . . . . 191 . . . . . . 192

LAN . . . . . . . . 192RUI_BID . . . . . . . . . 192

. . . . . . . . . . . . . . 193RUI_INIT . . . . . . . . . . 193

iv Client/Server Communications

RUI_WRITE . . . . . . . . . 193RUI_READ . . . . . . . . . 193

. . . . . . . . . . . . . 193 . . . . . . . . . . . . . . . . 194

. . . . . . . . . 195

11 LUA . . . 197LUA . . . . . . . . . . 197LUA . . . . . . . . . 198

verb . . . . . . . . 198 . . . . . . . . . . . . 198 . . . . . . . . . . . . 198LUA verb . . . . . . . . . . . 199ASCII EBCDIC . . . . . . 199

12 RUI LUA . . . . . . . . . . . . . . . . 201RUI() . . . . . . . . . . . . . . . . 202WinRUI . . . . . . . . . . . . . . . 203WinRUICleanup() . . . . . . . . . . . . 204WinRUIGetLastInitStatus() . . . . . . . . . 205WinRUIStartup(). . . . . . . . . . . . . 208GetLuaReturnCode() . . . . . . . . . . . 209

13 RUI verb . . . . . . . . . 211LUA verb . . . . 211 verb . . . . . . . . . . 211RUI_BID . . . . . . . . . . 216

RUI_BID . . . . . . . . . . . . . . . 217RUI_INIT . . . . . . . . . . . . . . . 222RUI_PURGE . . . . . . . . . . . . . . 227RUI_READ . . . . . . . . . . . . . . 231RUI_TERM . . . . . . . . . . . . . . 238RUI_WRITE . . . . . . . . . . . . . . 241

14 SLI 249SLI() . . . . . . . . . . . . . . . . 250WinSLI() . . . . . . . . . . . . . . . 251WinSLICleanup() . . . . . . . . . . . . 252WinSLIStartup() . . . . . . . . . . . . . 253

15 SLI verb . . . . . . . . . 255SLI_BID . . . . . . . . . . . . . . . 256SLI_CLOSE . . . . . . . . . . . . . . 262SLI_OPEN . . . . . . . . . . . . . . 265SLI_PURGE . . . . . . . . . . . . . . 272SLI_RECEIVE . . . . . . . . . . . . . 274SLI_SEND . . . . . . . . . . . . . . 280SLI_BIND_ROUTINE . . . . . . . . . . . 284SLI_STSN_ROUTINE . . . . . . . . . . . 286SLI_SDT_ROUTINE . . . . . . . . . . . 288

3 API . . . . . 291

16 . . . . . . . . . . . . . . 293 . . . . . . . 293ACSSVC() . . . . . . . . . . . . . . 294WinCSV(). . . . . . . . . . . . . . . 295WinCSVCleanup() . . . . . . . . . . . . 296WinAsyncCSV() . . . . . . . . . . . . . 297WinCSVStartup() . . . . . . . . . . . . 298GetCsvReturnCode() . . . . . . . . . . . 299

17 verb (CSV) 301GET_CP_CONVERT_TABLE . . . . . . . . 302CONVERT . . . . . . . . . . . . . . 306TrnsDt . . . . . . . . . . . . . . . . 309

4 EHNAPPC API . . . . . . 313

18 EHNAPPC . . . 315EHNAPPC . . . . . . . . 315EHNAPPC . . . . . . . . . . . 315

EHNAPPC_Allocate . . . . . . . . . . 316EHNAPPC_Confirm . . . . . . . . . . 317EHNAPPC_Confirmed . . . . . . . . . . 317EHNAPPC_Deallocate . . . . . . . . . . 318EHNAPPC_ExtendedAllocate . . . . . . . . 318EHNAPPC_Flush . . . . . . . . . . . 320EHNAPPC_GetAttributes . . . . . . . . . 320EHNAPPC_GetCapabilities . . . . . . . . 321EHNAPPC_GetDefaultSystem . . . . . . . 322EHNAPPC_IsRouterLoaded . . . . . . . . 322EHNAPPC_PrepareToReceive . . . . . . . 322EHNAPPC_QueryConfiguredSystems . . . . . 323EHNAPPC_QueryConvState . . . . . . . . 323EHNAPPC_QueryFullSystems . . . . . . . 324EHNAPPC_QueryUserid . . . . . . . . . 325EHNAPPC_QuerySystems . . . . . . . . . 325EHNAPPC_ReceiveAndWait . . . . . . . . 326EHNAPPC_ReceiveImmediate . . . . . . . 327EHNAPPC_RemoteProgramStart . . . . . . . 328EHNAPPC_RqsToSend. . . . . . . . . . 329EHNAPPC_SendData . . . . . . . . . . 329EHNAPPC_SendError . . . . . . . . . . 330EHNAPPC_StartHostProgram . . . . . . . . 330

EHNAPPC . . . . . . . . . . . . 331AS400_SYS . . . . . . . . . . . . . 331appcrtrcap_hdr . . . . . . . . . . . . 332appcrtrcap_mult . . . . . . . . . . . . 332appcrtrcap_query. . . . . . . . . . . . 333

EHNAPPC API . . . . . . . . 33316 EHNAPPC . . . . 335

19 Windows . . . . . . . . . . . . . . . 337

v

Windows API . . . . . . 337EHNDT_ANSIToEBCDIC. . . . . . . . . 337EHNDT_ASCIIToEBCDIC . . . . . . . . 338EHNDT_EBCDICToANSI. . . . . . . . . 339EHNDT_EBCDICToASCII . . . . . . . . 340

5 Java . . . . . . . . . . 341

20 Java . . . . . . 343HACL ? . . . . . . . . . . . . . 343HACL . . . . . . . . . . . . . 344 . . . . . . . . . . . . . 344 . . . . . . . . 344 . . . . . . . . . 344 . . . . . . . . . . . . . . 345 . . . . . . . . . . . . . 345 () . . . . . 346

Communications Server for Windows Server HACL . . . . . . . . . . 346Communications Server 32 Windows HACL . . . . . 347

Classpath . . . . . . . . . . . 348HACL . . . . 348

HACL . . . . . . . . . . . . 348

21 Java CPI-C . . . 349Java CPI-C . . . . . . . . . . 349Java (Communications Server) CPI-C . . . . . . . . . . . . . . . . 350Java CPI-C . . . . . . . . . 350 . . . . . . . . . 350 . . . . . . . . . . 353

6 . . . . . . . . . . . 355

A. APPC . . . . 357

B. LUA verb . . . . 3631 . . . . . . . . . . . . . 3632 . . . . . . . . . . . . . 364

C. APPC . . . . 383

D. Communications Server . . . . . . . . . 389 API 389 . . . . . . . . . . . . . . . 389 . . . . . . . . . . . . . . 390DA- . . . . . 397SA . . . . . 397

. . . . . . . . . . 398 . . . . . . . . . . . . . . 398 . . . . . . . . . . 398 . . . . . . 398

E. . . . . 401 . . . . 401 . . . . 401 LU . . . . . . 402 LU . . . . . . 402TN3270 . . . . . . . 403TN3270 . . . . . . 404TN5250 . . . . . . . 405TN5250 . . . . . . 406LU 6.2 . . . . . . . 406LU 6.2 . . . . . . 407

F. DLL . . . . 40932 Windows DLL . . . . . . . . . 409

G. . . . . . . . . . . 411 . . . . . . . . . . . . . . . . 412

. . . . . . . . . . . . . . . 415

vi Client/Server Communications

1. Personal Communications Communications

Server APPC . . . . . . . . . . 32. 2 LU . . . . . . . 93. . . . . . . . . . . . . . 10

4. 2 105. LU . . . . . . . . 116. LU . . . . . . . . 127. APPC . . . . 20

Copyright IBM Corp. 1994, 2006 vii

viii Client/Server Communications

1. LU 6.2 . . . . . . . . . . . . 132. . . . . . . 143. . . . . 144. . . . . . . . 155. 166. . . . . . . . . . 167. verb . . . . . . . . . . . . . . . . 29

8. APPC . . . . . . . . . . . . . . . . 43

9. CPIC . . . . . . . . . . . . . . . . 49

10. CPI-C Personal Communications . . . . . . . . . . 53

11. RQE . . . . . . . . . . . . 18012. TS . . . . . . . . 18113. FM . . . . . . . . 18114. RUI verb . . . . . . . . . . 18415. RUI API

. . . . . . . . . . . . . 19716. SLI API

. . . . . . . . . . . . . 19717.

. . . . . . . . . . . . . . 28218.

. . . . . . . . 293

19. TrnsDT - 30920. TrnsDT - 30921. TrnsDT - 30922. TrnsDT - 31023.

. . . . . . . . 31524. . . . . . . . . . . . . 33325. HACL . . . . . . . . . . 34526. APPC . . . . . . 38327. APPC . . . . . . 38628. / . . . . . . 39129. CM_CSLIST_GETII . . . . . 39430. CM_CSLIST_GETII . . . . . 39431. Flags (cmi.h ) . . . . . . . . 39532. AgentType (csobjtyp.h ) . . . . . 39533. FilterList_t (Flags = CMCsListFlag_LBPool

) . . . . . . . . . . . . . . 39534. FilterList_t (Flags = zero | Flags =

CMCsListFlag_LBFilters ) . . . . . 39535. Filter_t . . . . . . . . . . . . . . 39636. FilterType (cmi.h ). . . . . . . 39637. CM_CSLIST_GETII_ACK 39638. CM_CSLIST_GETII_ACK

. . . . . . . . . . . 39739. LU Pool Name dev_type. . . . . 402

Copyright IBM Corp. 1994, 2006 ix

x Client/Server Communications

IBM Communications Server for Windows IBM PersonalCommunications for Windows API Windows 2000 WindowsServer 2003 Windows XP ( Win32 API )

IBM Communications Server for Windows Communications Server

IBM Personal Communications for Windows

v v v v SNA APIv TCP/IP SNA API

Personal Communications Communications Server verb xiv PersonalCommunications Communications Server Personal Communications Communications Server

v 1 APPC APIPersonal Communications Communications Server (APPC) APPC (LU) 6.2 (SNA) APPC Personal Communications Communications Server APPC

APPC

Copyright IBM Corp. 1994, 2006 xi

()

v 2 LUA APIIBM LU (LUA) SNA LU 012 3 (LUA (RUI) )

v 3 API API verb

v 4 EHNAPPC API APPC

v 5 Java IBM Java (HACL) 3270 5250

Windows Windows 2000Windows Server 2003Windows XP 1

APPC LUA

SNA Transaction Programmers Reference Manual for LU Type6.2

v 1 APPC (APPC)

v 2 APPC APPC

v 3

v 4

v 5 APPC APPC

v 6 CPI-C CPI-C

v 7 APPC APPC API

xii Client/Server Communications

v 8 APPC verbAPPC verb verb

v 9 IBM LU LUA

v 10 RUI LUA verb LUA verb

v 11 LUA LUA

v 12 RUI LUA LUA

v 13 RUI verb LUA verb v 14 SLI SLI

v 15 SLI verb SLI verb v 16

v 17 verb (CSV) verb

v 18 EHNAPPC EHNAPPC API

v 19 Windows Windows API

v 20 Java Java Java 3270 5250

v 21 Java CPI-C Java API CPI-C

v A. APPC

v B. LUA verb LUA

v C. APPC APPC verb verb

v D. Communications Server TCP/IP

v E. Communications Server

v F. DLL 32 Windows DLL

xiii

APPC verb verb 8 APPC verb

APPC verb verb 8 APPC verb

Personal Communications Communications Server

Personal Communications

Communications Server

2 BX'xxxx xxxx' BX'x' 2 xxxx xxxx

() 0

10 4 10 316 147

16 16 xxxx X'xxxx' ( 16 5D X'5d')

2 Personal Communications Communications Server 2 2 (DBCS) 256 2 2 DBCS DBCS

DBCS

xiv Client/Server Communications

ASCII PC 1 ASCII JISCII

Communications Server

Communications Server

1.

2. IBM Communications Server

3. (Documentation)

4.

Communications Server PDF Adobe Acrobat Reader

Communications Server APAR IBM Web Explorer URL

http://www.ibm.com/software/network/commserver

xv

Personal Communications

Personal Communications PDF CD-ROM Personal Communications CD-ROM

Personal Communications CD-ROM Adobe Acrobat Reader Acrobat Reader Acrobat Reader Acrobat ReaderCD-ROM

:

1. CD-ROM

2. HTML PersonalCommunications

Personal Communications APAR IBM Web Explorer URL

http://www.ibm.com/software/network/pcomm/

IBM Dictionary of Computing http://www.ibm.com/networking/nsg/nsgmain.htm WWW

xvi Client/Server Communications

1 APPC API

Copyright IBM Corp. 1994, 2006 1

2 Client/Server Communications

1 APPC

Personal Communications Communications Server (APPN)

Personal Communications Communications Server (TP) (APPC) APPN APPC

Personal Communications Communications Server (LAN) APPC APPC

v IBM v (SDLC)v v

: 1 APPC API

v Windows Communications Serverv Communications Server Windows SNA API

v Personal Communications for Windows

1 Personal Communications Communications Server APPC

LAN X.25

PU 2.1/2.0

LU 6.2

SDLC

1. Personal Communications Communications Server APPC

Copyright IBM Corp. 1994, 2006 3

SNA Personal Communications Communications Server (SNA) 2.1 (SNA LU 6.2 [LUs] SNA 2.0 SNA 2.1 ) IBM SNA

LU LU SNA LU APPC SDLC

Personal Communications Communications Server LU (API)

SNA LU 6.2 LU 6.2 Personal Communications Communications Server LU 6.2 SNA LU 6.2

v v v v v LUv

4 Client/Server Communications

2 APPC

Personal Communications APPC API

v APPC API v verb

?APPC APPC 64 (tp_name)

LU 6.2 API

v APPC () LU 6.2 IBM verb IBM SNA

v CPI-C () LU 6.2 IBM SAA IBM SNA API CPI-C

APPC APPC verb APPC verb 43 5 APPC CPI CPI CPI SAA CPI 6CPI

LU 6.2 API APPC API CPI-C

APPC APPC 1 8 (tp_id)

Copyright IBM Corp. 1994, 2006 5

APPC verb APPC verb

verb APPC verb APPC APPC verb 2

CPI CPI APPC APPC CPI verb CPI

CPI APPC verb () APPC verb

Communications Server CPI CPI

LU 6.2 API

6 Client/Server Communications

APPC API 1

LU 6.2

? (LU) SNA LU verb verb SNA LU APPC verb verb LU LU 1 LU LU

LU Personal Communications Communications Server LU 0123 6.2 LU 0123 () 2 LUA API

LU 6.2 5 2.1 2 APPC LU 6.2

LU LU LU 2 LU 2 LU 3

LU LU LU (SSCP) LU LU SSCP-LU LU LU LU-LU LU LU 1 LU 1 LU 1

2 APPC 7

LU SSCP LU LU LU

LU LU LU LU 2.1 ( 2 ) LU LU Personal Communications Communications Server LU LU 1 LU

LU ?LU (SNA) LU SNA ()

LU

? LU 2 LU LU-LU 9 2 2 LU LU-LU

SNA LU ()

8 Client/Server Communications

LU v v verb

? LU-LU APPC verb CPI

1 verb verb

verb

2. 2 LU

2 APPC 9

3

4 2

1 1 1

1 LU Attach () Attach 19 3

2 LU

11 5 2 LU 3

3.

4. 2

10 Client/Server Communications

APPC 2 1

LU LU LU 6.2 LU 6.2 API 6.2 LU

1 LU 6.2

LU LU12 6

5. LU

2 APPC 11

6 A LUA1 B LUB1 2 1 TPC1 TPS1

C LUC1 2 TPC3 TPC3 A TPS2 D TPC4 1 TPC4 TPC3 TPC3 TPS2

Personal Communications Communications Server LU 6.2 verb SNA (GDS) GDS GDS GDS 1 () (LL) GDS GDS (ID)

GDS GDS

6. LU

12 Client/Server Communications

Personal CommunicationsLU 6.2 GDS

v 1 0 65,535 Personal Communications Communications Server GDS

v 1 ( GDS)

APPC API

v v SNA GDS v v

0 32,765

v 1 0 65,535 1

v 1 1

APPC 1 LU 6.2

1. LU 6.2

2 APPC 13

1. LU 6.2 ()

LU 6.2 API () API 13 1 APPC verb SEND_DATA MC_SEND_DATA CPI-C CMSEND

APPC APPC v v v v

( 2 )

2.

1

2 ( 3 )

3.

1

14 Client/Server Communications

()

SNA

1 1 ( 4 )

4.

1

1

LU 6.2 API

16 5

2 APPC 15

5.

()

13 1 3

v LU 6.2

v

v ()

2

13 1 () 6

6.

1

()

16 Client/Server Communications

6. ()

()

() API ()

LU 6.2 2 API (APPC CPI-C) API

2 LU LU SNA 2 LU LU

2 APPC 17

18 Client/Server Communications

3

LU 6.2 1

(Attach manager) LU Attach () SNA Attach LU LU 6.2 Attach Attach Attach LU SNA Attach

v 1 () ()

v v v v v ()

v APPC RECEIVE_ALLOCATE verb CPI Accept_Conversation Accept_Incoming (CMACCPCMACCI)

7

Copyright IBM Corp. 1994, 2006 19

3

v (Attach)v APPC RECEIVE_ALLOCATE verb

CPI CMACCP CMACCI

v ID

TP 1 APPC [MC_]ALLOCATE verb [MC_]SEND_CONVERSATIONverb

Attach Attach Attach .EXE

APPC

APPC RECEIVE_ALLOCATE verb TP_STARTEDverb APPC APPC ID tp_id

7. APPC

20 Client/Server Communications

TP_ENDED verb APPC tp_id APPC

RECEIVE_ALLOCATE verb

verb tp_id 1 tp_id () ()APPC

Personal Communications Communications Server 2

v 64 (tp_name)

v (filespec)

2 APPC

TP

LU RECEIVE_ALLOCATE verb APPC [MC_]ALLOCATE verb [MC_]SEND_CONVERSATION verb

()

3 21

1 MYTP.EXE queued-attach manager startedMYTP.EXE

Personal Communications () LU 6.2 ( ID)

sync_levelconv_type security_rqd RECEIVE_ALLOCATE verb

sync_level verb APPCverb [MC_]CONFIRM [MC_]CONFIRMED [MC_]ALLOCATE[MC_]SEND_CONVERSATION[MC_]PREPARE_TO_RECEIVE [MC_]DEALLOCATE (CPIC) Set_Sync_Level (CMSSL) sync_level

verb

22 Client/Server Communications

NONE verb

CONFIRM verb verb sync_level (CONFIRM)

EITHEREITHER

conv_type verb verb

BASIC verb

MAPPED verb

EITHER verb verb

HALF

FULL

EITHER

3 23

1 verb verb

2

verb

ID ID [MC_]ALLOCATE verb [MC_]SEND_CONVERSATION verbCPIC Set_Conversation_Security_UserID (CMSCSU) Set_Conversation_Security_PassWord (CMSCSP) ID ID ID

24 Client/Server Communications

ID ID ID

() 3 ID [MC_]ALLOCATE verb [MC_]SEND_CONVERSATION verb security(SAME) 2 Attach 1 Attach ID

APPC ID ID ID [MC_]ALLOCATE verb [MC_]SEND_CONVERSATION verb security(SAME) Attach

ID

Personal Communications Personal Communications Communications Server

SNA Attach Attach verb

( APPC [MC_]ALLOCATE verb [MC_]SEND_CONVERSATION verb )Personal Communications Communications Server verb Enable Attach Manager Disable AttachManager

3 25

load_type

Console DOS

Background ()

( PersonalCommunications Communications Server )

RECEIVE_ALLOCATE

Attach = 0 ()

= 0 ()

= Yes ()

RECEIVE_ALLOCATE

RECEIVE_ALLOCATE verb APPC RECEIVE_ALLOCATE verb APPC RECEIVE_ALLOCATE verb APPC [MC_]ALLOCATE verb [MC_]SEND_CONVERSATION verb APPC RECEIVE_ALLOCATE verb

26 Client/Server Communications

RECEIVE_ALLOCATEverb Attach () APPC

2 ( ) 1 ( )queued dynamic load v Nonqueued-attach manager startedv Queued-attach manager startedv Operator started

RECEIVE_ALLOCATE verb RECEIVE_ALLOCATE verb (RECEIVE_ALLOCATE verb )

2

Attach manager started

Operator started

2 RECEIVE_ALLOCATE verb 1 RECEIVE_ALLOCATE verb incoming_alloc_timeout

3 27

RECEIVE_ALLOCATE verb

RECEIVE_ALLOCATE verb RECEIVE_ALLOCATE verb LUrcv_alloc_timeout RECEIVE_ALLOCATE verb RECEIVE_ALLOCATE verb ALLOCATE_NOT_PENDING RECEIVE_ALLOCATE verb 0 1

RECEIVE_ALLOCATE verb verb

RECEIVE_ALLOCATE verb verb

RECEIVE_ALLOCATE verb verb RECEIVE_ALLOCATE verb verb ( rcv_alloc_timeout ) RECEIVE_ALLOCATE verb

RECEIVE_ALLOCATE verb

RECEIVE_ALLOCATE verb

2

1:RECEIVE_ALLOCATEverb CPI CMACCP 1

28 Client/Server Communications

RECEIVE_ALLOCATE verb () RECEIVE_ALLOCATEverb

2:RECEIVE_ALLOCATE verb ()RECEIVE_ALLOCATE verb RECEIVE_ALLOCATE verb RECEIVE_ALLOCATE verb

29 7 queued dynamic load verb

7. verb

verb

Nonqueued-attach manager

started Operator started

Queued-attach manager

started

RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb RECEIVE_ALLOCATE

verb RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb

RECEIVE_ALLOCATE

verb

3 29

7. verb ()

verb

Nonqueued-attach manager

started Operator started

Queued-attach manager

started

Communications Server SNA API

Communications Server SNA API

Communications Server SNA API

SNA API SNA API (operatorstarted) (nonqueued)

Communications Server

v v v v v

Communications Server LU

30 Client/Server Communications

v v LUv v

LU (INI LDAP)

LU local_LU_alias LU

SNA API SNA

(APPC [MC_]ALLOCATE verb [MC_]SEND_CONVERSATION verb )

Communications Server for SNA Communications Server

(Attach Manager) Communications Server (Quit)

:

1. Windows () (AttachManager) 1 (Attach Manager)

2. MS-DOS 1 (Attach Manager)

v -i (AttachManager)

3 31

v -h (AttachManager) (Attach Manager)

v -q -h

32 Client/Server Communications

4

APPC v v v v v ASCII ()

PersonalCommunications

: LU 6.2 Personal Communications Communications Server

LU 6.2

LU 6.2 LU 6.2

v v

v

383 C. APPC (CPI-C) V2.0 (SC88-7217)

LU 6.2 LU 6.2

Copyright IBM Corp. 1994, 2006 33

LU LU

APPC verb ALLOCATE MC_ALLOCATESEND_CONVERSATION MC_SEND_CONVERSATION

CPI-C CMALLC

APPC verb SEND_DATA MC_SEND_DATA

CPI-C CMSEND

LU

: LU LU

APPC verb FLUSH MC_FLUSH

CPI-C CMFLUS

APPC verb RECEIVE_AND_WAITRECEIVE_IMMEDIATEMC_RECEIVE_AND_WAIT MC_RECEIVE_IMMEDIATE

CPI-C CMRCV

APPC verb SEND_EXPEDITED_DATA MC_SEND_EXPEDITED_DATA

CPI-C CMSNDX

APPC verb RECEIVE_EXPEDITED_DATA MC_RECEIVE_EXPEDITED_DATA

34 Client/Server Communications

CPI-C CMRCVX

APPC verb REQUEST_TO_SEND MC_REQUEST_TO_SEND

CPI-C CMRTS

APPC verb PREPARE_TO_RECEIVE MC_PREPARE_TO_RECEIVE

CPI-C CMPTR

APPC verb CONFIRM MC_CONFIRM

CPI-C CMCFM

APPC verb CONFIRMEDMC_CONFIRMEDSEND_ERROR MC_SEND_ERROR

CPI-C CMCFMD CMSERR

LU

APPC verb RECEIVE_AND_POST

verb SEND_ERROR MC_SEND_ERROR

CPI-C CMSERR

4 35

v LU v LU v v v

verb GET_ATTRIBUTESMC_GET_ATTRIBUTESGET_TYPE

verb DEALLOCATE MC_DEALLOCATE

ALLOCATE verb verb verb verb LU 6.2 verb GET_TYPE verb

verb verb verb 1

verb

SNA Formatand Protocol Reference Manual: Architecture Logic for LU Type 6.2Systems Network Architecture LU 6.2 Reference: Peer Protocols

1

36 Client/Server Communications

2 (LL ) LL

v LL 15 2 2 15 32,767 (32,765 2 )32,767 LU 6.2 LL 15

2 (LL ) 2 LU 6.2

v LU 6.2 LL 32,767 (GDS )

v PC

PC 16 32 LL 2 () PC

LL ()

verb LU 6.2 1 (GDS )

1 1 (BUFFER )

LU 6.2 2 LL IBM PC

verb LU 6.2

4 37

verb LU 6.2 LU 6.2

LU 6.2

v

v

LU verb LU LU 6.2

verb

verb GDSLU 6.2 LU

GDS SNA GDS IBM Systems Network Architecture Formats

verb

verb

38 Client/Server Communications

LU 6.2

verb

verb

1

()

4 39

EBCDIC (X40) EBCDIC X40 EBCDIC 64

LU 6.2 LU LU

LU () LU 2 LU LU LU LU 6.2 LU

() ID ID

ALLOCATE verb ID

() ID 2

40 Client/Server Communications

EBCDIC ASCII LU 6.2 () verb EBCDIC ALLOCATE LU ID ASCII ASCII EBCDIC

EBCDIC EBCDIC

LU 6.2 CONVERT verb verb ASCII EBCDIC EBCDIC ASCII 306CONVERT

4 41

42 Client/Server Communications

5 APPC

(DLL) APPC

APPC Windows Microsoft NT SNA OS/2 Communications Manager/2 1.0 APPC

APPC verb (DLL)

DLL DLL

APPC verb verb (VCB) APPC DLL verb APPC VCB verb

8 APPC

8. APPC

DLL

WIN32 WINAPPC.H WAPPC32.LIB WAPPC32.DLL

Personal Communications Communications Server APPC SNATransaction Programmers Reference for LU Type 6.2

101 LU

102

103 (RECEIVE_AND_POST verb )

104 (RECEIVE_AND_POST verb )

Copyright IBM Corp. 1994, 2006 43

105

106

109 ID

110

112

113

201

203

204 LU

205

211 LU-LU

212 ID

213 ID

214 ID

241 PIP

242 PIP

243

244

245

247

251

290

291 LU

401

501 CHANGE_SESSION_LIMIT verb

502 ACTIVATE_SESSION verb

504 DEACTIVATE_SESSION verb

505 LU verb

601 MIN_CONWINNERS_TARGET

602 RESPONSIBLE(TARGET)

603 DRAIN_TARGET(NO)

604 FORCE

605 LU-LU

606 LU

607 LU

610 RU

44 Client/Server Communications

612

613 (LU)

616 CPSVCMG

VCB 1 VCB WINAPPC.H WINAPPC_FORMAT_1 C

#define WINAPPC_FORMAT_1

#include

VCB 0

Personal Communications Communications Server APPC API APPC

verb verb verb verb Personal Communications verb verb

Personal Communications Communications Server verb 6 v (1 1)

v / (1 1 )v (1 1 )v (1 1 )v (1 1 )v (1 1 )

6 verb PersonalCommunications Communications Server () verb verb verb verb 1

5 APPC 45

verb opext AP_NON_BLOCKING Personal Communications Communications Server verb verb SECONDARY_RC Personal Communications verb verb

verb verb

verb AP_OPERATION_INCOMPLETE_FLAG opext

APPC verb

(MC_)ALLOCATE(MC_)SEND_CONVERSATION

APPC verb

(MC_)CONFIRM(MC_)CONFIRMED(MC_)DEALLOCATE(MC_)FLUSH(MC_)PREPARE_TO_RECEIVE(MC_)RECEIVE_AND_WAIT(MC_)RECEIVE_IMMEDIATE(MC_)SEND_DATA(MC_)SEND_ERROR

()APPC verb

(MC_)DEALLOCATE(MC_)FLUSH(MC_)SEND_DATA(MC_)SEND_ERROR

()APPC verb

(MC_)RECEIVE_AND_WAIT(MC_)RECEIVE_IMMEDIATE

()APPC verb

(MC_)RECEIVE_EXPEDITED_DATA

APPC verb

46 Client/Server Communications

(MC_)REQUEST_TO_SEND(MC_)SEND_EXPEDITED_DATA

APPC verb

(MC_)RECEIVE_AND_POST(MC_)TEST_RTS_AND_POST

() PersonalCommunications Communications Server APPC verb

(MC_)GET_ATTRIBUTESGET_TP_PROPERTIESGET_TYPERECEIVE_ALLOCATETEST_RTSTP_ENDEDTP_STARTEDCNOS

ALLOCATE verb RECEIVE_ALLOCATE verb (Personal Communications AP_PARAMETER_CHECK AP_BAD_CONV_ID) verb

verb () verb verb verb

verb () verb Personal Communications (primary_rc AP_TP_BUSY ) verb RECEIVE_AND_POST verb TEST_RTS_AND_POST verb ( verb ) verb verb verb TEST_RTSGET_ATTRIBUTESGET_STATE GET_TYPE AP_TP_BUSY

LUPersonal Communications Communications Server LU LU LU lu_alias TP_STARTED verb ( 91TP_STARTED) LU 6.2 LU LU Personal Communications LU LU LU 6.2 LU

5 APPC 47

DEFINE_LOCAL_LU verb Personal Communications LU LU

v LU LU Personal Communications LU LU TP_STARTED verb

v LU LU Personal Communications LU

v Personal Communications LU

Communications Server Windows SNA API

LU (INI LDAP)

APPC LU APPC LU 2 TP_START verb APPC API LU

48 Client/Server Communications

6 CPI-C

CPI-C Personal Communications v CPI-C v CPI-C v Personal Communications CPI-C

Personal Communications CPIC Windows Microsoft NTSNA OS/2Communications Manager/2 Communications Server/2 CPIC

: CPIC API

v Windows Communications Serverv Communications Server Win32

SNA API

v Personal Communications for Windows

CPIC Personal Communications CPIC (DLL)

DLL DLL

9 CPIC

9. CPIC

DLL

WIN32 WINCPIC.H WCPIC32.LIB WCPIC32.DLL

CPI-C CPI-C 2

v

Copyright IBM Corp. 1994, 2006 49

v

CPI-C CPI-C 2.1 IBM CPI-C 2.1(SC88-7217-01)

Communications Server

:CMACCP

Accept_Conversation

CMALLCAllocate

CMDEALDeallocate

CMINITInitialize_Conversation

CMRCVReceive

CMSENDSend_Data

:CMCFM

Confirm

CMCFMDConfirmed

CMECSExtract_Conversation_State

CMECTExtract_Conversation_Type

CMEMBSExtract_Maximum_Buffer_Size

CMEMNExtract_Mode_Name

CMESLExtract_Sync_Level

CMFLUSFlush

50 Client/Server Communications

CMPTRPrepare_To_Receive

CMRTSRequest_To_Send

CMSERRSend_Error

CMSCTSet_Conversation_Type

CMSDTSet_Deallocate_Type

CMSF Set_FillCMSLD

Set_Log_Data

CMSMNSet_Mode_Name

CMSPTRSet_Prepare_To_Receive_Type

CMSRTSet_Receive_Type

CMSRCSet_Return_Control

CMSSTSet_Send_Type

CMSSLSet_Sync_Level

sync_level CM_NONE CM_CONFIRM

CMSTPNSet_TP_Name

CMTRTSTest_Request_To_Send_Received

LU 6.2 LU 6.2 CMEPLN

Extract_Partner_LU_Name

CMSEDSet_Error_Direction

CMSPLNSet_Partner_LU_Name

CMCANC

Cancel_Conversation

CMSPMSet_Processing_Mode

CMWAITWait_For_Conversation

6 CPI-C 51

CPI-C CMACCI

Accept_Incoming

CMECTXExtract_Conversation_Context

CMETPNExtract_TP_Name

CMRLTPRelease_Local_TP_Name

CMINICInitialize_For_Incoming

CMSLTPSpecify_Local_TP_Name

EBCDIC CMCNVI

Convert_Incoming

CMCNVOConvert_Outgoing

CMESUI

Extract_Security_User_ID

CMSCSPSet_Conversation_Security_Password

CMSCSTSet_Conversation_Security_Type

Required conversation_security_type values:

CM_SECURITY_NONE

CM_SECURITY_PROGRAM

CM_SECURITY_PROGRAM_STRONG

CM_SECURITY_SAME

CMSCSUSet_Conversation_Security_User_ID

CMCANC

Cancel_Conversation

CMSQPMSet_Queue_Processing_Mode

CMWCMPWait_For_Completion

52 Client/Server Communications

CMCANC

Cancel_Conversation

CMSQCFSet_Queue_Callback_Function

2 2 CMESI

Extract_Secondary_Information

OSI TP () () () ()

CPI-C Personal Communications CPI-C 10

: MS Windows SNA API CPI-C Accept_Conversation (cmaccp) Specify_Local_TP-Name (cmsltp)

10. CPI-C Personal Communications

Win32

cmaccp Accept_Conversation xcmacci Accept_Incoming xcmallc Allocate xcmcanc Cancel_Conversation xcmcfm Confirm xcmcfmd Confirmed xcmcnvi Convert_Incoming xcmcnvo Convert_Outgoing xcmdeal Deallocate xxcmdsi Delete_CPIC_Side_Information xcmectx Extract_Conversation_Context xxcecst Extract_Conversation_Security_Type xcmecst Extract_Conversation_Security_Type xcmecs Extract_Conversation_State xcmect Extract_Conversation_Type xxcmesi Extract_CPIC_Side_Information xcmembs Extract_Maximum_Buffer_Size x

6 CPI-C 53

10. CPI-C Personal Communications ()

Win32

cmemn Extract_Mode_Name xcmepln Extract_Partner_LU_Name xcmesi Extract_Secondary_Information xcmesui Extract_Security_User_ID xcmecsu Extract_Security_User_ID xxcecsu Extract_Security_User_ID xcmesrm Extract_Send_Receive_Mode xcmesl Extract_Sync_Level xxceti Extract_TP_ID xcmetpn Extract_TP_Name xcmflus Flush xcminit Initialize_Conversation xxcinct Initialize_Conversation_For_TP xcminic Initialize_For_Incoming xcmptr Prepare_To_Receive xcmrcv Receive xcmrcvx Receive_Expedited xcmrltp Release_Local_TP_Name xcmrts Request_To_Send xcmsend Send_Data xcmsndx Send_Expedited xcmserr Send_Error xcmscsp Set_Conversation_Security_Password xxcscsp Set_Conversation_Security_Password xcmscst Set_Conversation_Security_Type xxcscst Set_Conversation_Security_Type xcmscsu Set_Conversation_Security_User_ID xxcscsu Set_Conversation_Security_User_ID xcmsct Set_Conversation_Type xxcmssi Set_CPIC_Side_Information xcmsdt Set_Deallocate_Type xcmsed Set_Error_Direction xcmsf Set_Fill xcmsld Set_Log_Data xcmsmn Set_Mode_Name xcmspln Set_Partner_LU_Name xcmsptr Set_Prepare_To_Receive_Type xcmspm Set_Processing_Mode xcmsqcf Set_Queue_Callback_Function xcmsqpm Set-Queue_Processing_Mode xcmsrt Set_Receive_Type xcmsrc Set_Return_Control xcmssrm Set_Send_Receive_Mode xcmsst Set_Send_Type xcmssl Set_Sync_Level xcmstpn Set_TP_Name xcmsltp Specify_Local_TP_Name xxchwnd* Specify_Windows_Handle xxcstp Start_TP xcmtrts Test_Request_To_Send_Received xcmwcmp Wait_For_Completion x

54 Client/Server Communications

10. CPI-C Personal Communications ()

Win32

cmwait Wait_For_Conversation xxcendt End_TP xWinCPICCleanup* xWinCPICIsBlocking* -WinCPICSetBlockingHook* -WinCPICStartup* xWinCPICUnhookBlockingHook* -

*: Microsoft Windows WOSA x: - indicates:

TP

Communications Server SNA API

CMSTPN CMSLTP CPI-C TP

CMSTPN CMSL

v 25 ASCII v 2 ASCII (0x23)

2 (2 3) ASCII

ASCII 1 TP 2 0x12 0x13

v 3 ASCII 007

0x23 007 0x120x13 007

6 CPI-C 55

Local_LU CPI-C TP_STARTED DEFAULT_LOCAL_LU DEFAULT_LOCAL_LU LOCAL_CP CP_NAME LOCAL_LU

LOCAL_LU DEFAULT_LOCAL_LU LOCAL_LU LOCAL_LU_ALIAS CPI-C LOCAL_LU CPI-C LOCAL_LU_ALIAS LOCAL_LU_ALIAS /

Personal Communications LOCAL_LU APPCLLU APPCLLU LOCAL_LU_ALIAS / ()CPI-C Operator_Started TP

56 Client/Server Communications

7 APPC

APPC

: 1 APPC API

v Windows Communications Serverv Communications Server Win32

SNA API

v Personal Communications for Windows

Copyright IBM Corp. 1994, 2006 57

APPC

APPC verb verb 2 opext (AP_NON_BLOCKING)

void WINAPI APPC(long)

verb

1 2

: 61WinAsyncAPPCEx()

APPC

58 Client/Server Communications

WinAsyncAPPC()

APPC verb Windows Personal Communications Communications Server

HANDLE WINAPI WinAsyncAPPC(HWND hWnd,long vcb)

hwnd

vcb verb

PersonalCommunications 0

APPC verb

v [MC_]ALLOCATEv [MC_]CONFIRMv [MC_]CONFIRMEDv [MC_]DEALLOCATEv [MC_]FLUSHv [MC_]PREPARE_TO_RECEIVEv RECEIVE_ALLOCATEv [MC_]RECEIVE_AND_WAITv [MC_]RECEIVE_EXPEDITED_DATAv [MC_]REQUEST_TO_SENDv [MC_]SEND_CONVERSATIONv [MC_]SEND DATAv [MC_]SEND_ERRORv [MC_]SEND_EXPEDITED_DATAv TP_ENDEDv TP_STARTED

WinAsyncAPPC verb APPC verb

WinAsyncAPPC()

7 APPC 59

AP_NON_BLOCKING Personal Communications 1 1 1 2 AP_CONV_BUSYWinAsyncAPPCEx APPC RECEIVE_AND_POST RECEIVE_AND_WAIT Personal Communications RECEIVE_AND_WAIT verb RECEIVE_AND_POST verb RECEIVE_AND_POST RECEIVE_AND_WAIT verb

v REQUEST_TO_SENDv GET_TYPEv GET_ATTRIBUTESv TEST_RTSv DEALLOCATE (AP_ABEND_PROGAP_ABEND_SVC

AP_ABEND_TIMER)

v SEND_ERRORv TP_ENDED

RECEIVE_AND_WAIT RECEIVE_AND_POST RECEIVE_AND_WAIT SEND_ERROR REQUEST_TO_SEND

hWnd WinAsyncAPPC RegisterWindowMessage wParam IParam VCB

WinAPPCCancelAsyncRequest APPC AP_CANCELLED

Personal Communications WinAsyncAPPC()

:61WinAsyncAPPCEx()63WinAPPCCancelAsyncRequest()

WinAsyncAPPC()

60 Client/Server Communications

WinAsyncAPPCEx()

APPC verb

verb APPC

HANDLE WINAPI WinAsyncAPPCEx(HANDLE handle,long vcb);

handle

vcb verb

PersonalCommunications 0

verb Win32 API WaitForMultipleObjects

APPC verb

v [MC_]ALLOCATEv [MC_]CONFIRMv [MC_]CONFIRMEDv [MC_]DEALLOCATEv [MC_]FLUSHv [MC_]PREPARE_TO_RECEIVEv RECEIVE_ALLOCATEv [MC_]RECEIVE_AND_WAITv [MC_]REQUEST_TO_SENDv [MC_]SEND_CONVERSATIONv [MC_]SEND_DATAv [MC_]SEND_ERRORv TP_ENDEDv TP_STARTED

WinAsyncAPPCEx()

7 APPC 61

AP_NON_BLOCKING Personal Communications 1 1 1 2 AP_CONV_BUSY

WinAsyncAPPCEx verb APPC verbRECEIVE_AND_POST RECEIVE_AND_WAIT Personal Communications RECEIVE_AND_WAIT verb RECEIVE_AND_POST verb RECEIVE_AND_POST RECEIVE_AND_WAIT verb

v REQUEST_TO_SENDv GET_TYPEv GET_ATTRIBUTESv TEST_RTSv DEALLOCATE (AP_ABEND_PROGAP_ABEND_SVC

AP_ABEND_TIMER)

v SEND_ERRORv TP_ENDED

RECEIVE_AND_WAIT RECEIVE_AND_POST RECEIVE_AND_WAIT SEND_ERROR REQUEST_TO_SEND

Personal Communications 1 2

:59WinAsyncAPPC()63WinAPPCCancelAsyncRequest()58APPC

WinAsyncAPPCEx()

62 Client/Server Communications

WinAPPCCancelAsyncRequest()

WinAsyncAPPC

int WINAPI WinAPPCCancelAsyncRequest(HANDLE handle);

handle

0 Personal Communications

WAPPCINVALID ID

WAPPCALREADY

WinAPPCCancelAsyncRequest() WinAsyncAPPC 1

verb verb ( SEND_DATA RECEIVE_AND_WAIT) Personal Communications verb verb verb ( RECEIVE_ALLOCATE TP_STARTED) Personal Communications Personal Communications Personal Communications verb

WinAsyncAPPC WAPPCALREADY APPC verb

: 59WinAsyncAPPC()

WinAPPCCancelAsyncRequest()

7 APPC 63

WinAPPCCancelBlockingCall()

PersonalCommunications AP_CANCELLED Personal Communications CommunicationsServer

Int WINAPI WINAPPCCancelBlockingCall(void);

0 Personal Communications

WAPPCINVALID

verb verb ( SEND_DATA RECEIVE_AND_WAIT) Personal Communications verb verb verb ( RECEIVE_ALLOCATE TP_STARTED) Personal Communications Personal Communications

1 1 WinAPPCCancelBlockingCall() APPC WinAPPCSetBlockingHook (WinAPPCCancelBlockingCall() )

WinAPPCCancelBlockingCall()

64 Client/Server Communications

Win32 SNA API

WinAPPCCancelBlockingCall()

7 APPC 65

WinAPPCCleanup()

APPC API

BOOL WINAPI WinAPPCCleanup(void);

0 Personal Communications Personal Communications 0

APPC API Personal Communications WinAPPCCleanup()

Personal Communications Communications Server TP_ENDED(HARD)

: 68WinAPPCStartup()

WinAPPCCleanup()

66 Client/Server Communications

WinAPPCIsBlocking()

Personal Communications Communications Server

BOOL WlNAPI WinAPPCIsBlocking(void);

0 0

Personal Communications Communications Server DLL 1 AP_THREAD_BLOCKING WinAPPClsBlocking TRUE

:64WinAPPCCancelBlockingCall()69WinAPPCSetBlockingHook()71WinAPPCUnhookBlockingHook()

Win32 SNA API

WinAPPCIsBlocking()

7 APPC 67

WinAPPCStartup()

Personal Communications Personal Communications

int WINAPI WinAPPCStartup(WORD wVersionRequired,

LPWAPPCDATA wappcdata);

wVersionRequired Personal Communications ()

wappcdataAPPC API API

Personal Communications 0 Personal Communications

WAPPCSYSNOTREADY

WAPPCVERNOTSUPPORTED Personal Communications Communications Server Personal Communications Communications Server

WAPPCINVALIDPersonal Communications Communications Server

WinAPPCStartup() API DLL J1.0

: 66WinAPPCCleanup()

WinAPPCStartup()

68 Client/Server Communications

WinAPPCSetBlockingHook()

APPC API APPC APPC

Personal Communications Communications Server

FARPROC WINAPI WinAPPCSetBlockingHook(FARPROC IpBlockFunc);

IpBlockFunc

SetBlockingHook (WinAPPCSetBlockingHook() WinAPPCUnhookBlockingHook )

WM_QUIT FALSE Personal Communications TRUE

TRUE verb1 AP_CANCELLED

:64WinAPPCCancelBlockingCall()67WinAPPCIsBlocking()71WinAPPCUnhookBlockingHook()

WinAPPCSetBlockingHook()

7 APPC 69

Win32 SNA API

WinAPPCSetBlockingHook()

70 Client/Server Communications

WinAPPCUnhookBlockingHook()

Personal Communications Communications Server

BOOL WINAPI WinAPPCUnhookBlockingHook (void);

Personal Communications 0 PersonalCommunications 0

: 69WinAPPCSetBlockingHook().

Win32 SNA API

WinAPPCUnhookBlockingHook()

7 APPC 71

GetAppcConfig()PersonalCommunications APPC_CFG_SUCESS_NO_DEFAULT_REMOTE NULL RemLu

Personal Communications APPN LU ALLOCATE LU (NOF) NOF

GetAppcConfig()

72 Client/Server Communications

GetAppcReturnCode()

VCB 1 2 APPC

int WINAPI GetAppcReturnCode (struct appc_hdr *vcb,

UINT buffer_length,unsigned char *buffer_addr);

vcb verb

buffer_lengthbuffer_addr 256

buffer_addr/NULL

0x20000001

verb

0x20000002

buffer_addr (n)

GetAppcReturnCode()

7 APPC 73

GetAppcReturnCode()

74 Client/Server Communications

8 APPC verb

APPC API verb verb

APPC APPC verb verb

verb

verb

verb [MC_]VERBNAME

: 1 APPC API

v Windows Communications Serverv Communications Server Win32 SNA

API

v Personal Communications for Windows

verb verb

VCB

opcode verb verb

format VCB VCB verb

Copyright IBM Corp. 1994, 2006 75

primary_rc1 verb

secondary_rc2 1 verb VCB

opext verb verb verb AP_NON_BLOCKING

TP 8 Personal Communications

TP_ENDED verb verb

verb

APPC API

verbPersonal Communications APPC API verb

verbGET_TP_PROPERTIES

GET_TYPE

RECEIVE_ALLOCATE

SET_TP_PROPERTIES

TP_ENDED

TP_STARTED

verb[MC_]ALLOCATE[MC_]CONFIRM[MC_]CONFIRMED[MC_]DEALLOCATE[MC_]FLUSH[MC_]GET_ATTRIBUTES[MC_]PREPARE_TO_RECEIVE[MC_]RECEIVE_AND_POST[MC_]RECEIVE_AND_WAIT[MC_]RECEIVE_EXPEDITED_DATA[MC_]RECEIVE_IMMEDIATE[MC_]REQUEST_TO_SEND[MC_]SEND_CONVERSATION

76 Client/Server Communications

[MC_]SEND_DATA[MC_]SEND_ERROR[MC_]SEND_EXPEDITED_DATA[MC_]TEST_RTS[MC_]TEST_RTS_AND_POST

GET_TP_PROPERTIES

8 APPC verb 77

GET_TP_PROPERTIES

GET_TP_PROPERTIES

VCB typedef struct get_tp_properties{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned char reserv2[2] /* verb format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned char tp_name[64]; /* TP name */unsigned char lu_alias[8]; /* LU alias */luw_id_overlay luw_id; /* LUW identifier */unsigned char fqlu_name[17]; /* fully qualified LU name */unsigned char reserv3[10]; /* reserved */unsigned char user_id[10]; /* user id */} GET_TP_PROPERTIES;typedef struct luw_id_overlay{unsigned char fqlu_name_len; /* fully qualified LU name length */unsigned char fqlu_name[17]; /* fully qualified LU name */unsigned char instance[6]; /* instance number */unsigned char sequence[2]; /* sequence number */} LUW_ID_OVERLAY;

Personal Communications

opcode AP_GET_TP_PROPERTIES

tp_id TP_STARTED verb RECEIVE_ALLOCATE verb

opext AP_BASIC_CONVERSATION

format VCB VCB 1

verb Personal Communications

primary_rcAP_OK

tp_name ( verb ) Personal Communications

GET_TP_PROPERTIES

78 Client/Server Communications

lu_alias LU 8 JISCII 8

luw_id (sync_level AP_NONE AP_CONFIRM_SYNC_LEVEL ) luw_id_overlay

luw_id_overlay.fqlu_name_len LU

luw_id_overlay.fqlu_name LU 1717 EBCDIC EBCDIC 2 A EBCDIC (1 8 ID ) 17 instance sequence (LUW_ID_OVERLAY instance sequence )

luw_id_overlay.instance 6

luw_id_overlay.sequence 2

luw_id_overlay.fqlu_name_len 17 luw_id_overlay (instance sequence ) EBCDIC

fqlu_name LU 17 17 EBCDIC EBCDIC 2 A EBCDIC (1 8 ID )

user_id ID 10 AE EBCDIC 10 EBCDIC

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

GET_TP_PROPERTIES

8 APPC verb 79

secondary_rcAP_BAD_TP_ID

1 (primary_rc) 357 A. APPC

AP_TP_BUSY

AP_UNEXPECTED_SYSTEM_ERROR

GET_TP_PROPERTIES

80 Client/Server Communications

GET_TYPE

GET_TYPE verb ()

VCB typedef struct get_type{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char conv_type; /* conversation type */unsigned char conv_style; /* conversation style */} GET_TYPE;

Personal Communications

opcode AP_GET_TYPE

opext AP_BASIC_CONVERSATION

format VCB VCB 1

tp_id TP_STARTED verb RECEIVE_ALLOCATE verb

conv_id ALLOCATE verb RECEIVE_ALLOCATE verb

verb Personal Communications

primary_rcAP_OK

conv_typeconv_id

AP_BASIC_CONVERSATION

AP_MAPPED_CONVERSATION

conv_styleconv_id VCB

GET_TYPE

8 APPC verb 81

1 1 VCB 45 VCB

AP_HALF_DUPLEX

AP_FULL_DUPLEX

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_BAD_TP_ID

AP_BAD_CONV_ID

1 (primary_rc) 357 A. APPC

AP_TP_BUSY

AP_UNEXPECTED_SYSTEM_ERROR

GET_TYPE

82 Client/Server Communications

RECEIVE_ALLOCATE

RECEIVE_ALLOCATE verb ALLOCATE verb MC_ALLOCATE verb

VCB typedef struct receive_allocate{unsigned shor opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned shor primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_name[64]; /* TP name */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char sync_level; /* sync Level */unsigned char conv_type; /* conversation type */unsigned char user_id[10]; /* user ID */unsigned char lu_alias[8]; /* LU alias */unsigned char plu_alias[8]; /* partner LU alias */unsigned char mode_name[8]; /* mode name */unsigned char reserv3[2]; /* reserved */unsigned long conv_group_id; /* conversation group ID */unsigned char fqplu_name[17]; /* fully qualified partner LU name */unsigned char pip_incoming; /* received PIP data */unsigned char conversation_style; /* conversation style */unsigned char reserv4[3]; /* reserved */unsigned char password[10]; /* security password */unsigned char reserv5[2]; /* reserved */unsigned char dload_id[8]; /* user ID */} RECEIVE_ALLOCATE;

Personal Communications

opcode AP_RECEIVE_ALLOCATE

opext AP_BASIC_CONVERSATION

format VCB VCB 0

tp_name Personal Communications

verb Personal Communications

primary_rcAP_OK

tp_id PersonalCommunications

RECEIVE_ALLOCATE

8 APPC verb 83

APPC verb Personal Communications

conv_id2

sync_level

AP_CONFIRM_SYNC_LEVEL

AP_NONE

conv_typeconv_id

AP_BASIC_CONVERSATION

AP_MAPPED_CONVERSATION

user_id ID 10 AE EBCDIC 10 EBCDIC

lu_alias LU 8 JISCII 8

plu_alias LU 8 JISCII 8

mode_name8 A EBCDIC () 8 EBCDIC

conv_group_id

fqplu_name LU LU 17 17 EBCDIC EBCDIC 2 A EBCDIC (1 8 ID )

pip_incoming [MC_]ALLOCATE (PIP) AP_YES AP_NO AP_YES [MC_]RECEIVE_* verb PIP

RECEIVE_ALLOCATE

84 Client/Server Communications

conversation_styleconv_id

AP_HALF_DUPLEX

AP_FULL_DUPLEX

passworduser_id 10 AE EBCDIC 10 EBCDIC Security = Program(AP_PGM AP_PGM_STRONG)

dload_idformat 1 DYNAMIC_LOAD_INDICATION RECEIVE_ALLOCATE 2

dload_id RECEIVE_ALLOCATE DYNAMIC_LOAD_INDICATION

v v DYNAMIC_LOAD_INDICATION dload_id

: SNA API

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_UNDEFINED_TP_NAME

1 (primary_rc) 357 A. APPC

AP_UNEXPECTED_SYSTEM_ERROR

RECEIVE_ALLOCATE

8 APPC verb 85

SET_TP_PROPERTIES

SET_TP_PROPERTIES TP

VCB typedef struct set_tp_properties{

unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned char set_prot_id; /* set protected LUW identifier */unsigned char new_prot_id; /* new protected LUW identifier */unsigned char prot_id[26]; /* protected LUW identifier */unsigned char set_unprot_id; /* set unprotected LUW identifier */unsigned char new_unprot_id; /* new unprotected LUW identifier */unsigned char unprot_id[26]; /* unprotected LUW identifier */unsigned char set_user_id; /* */unsigned char set_password; /* */unsigned char user_id[10]; /* */unsigned char new_password[10];/* */

} SET_TP_PROPERTIES;

TP Personal Communications

opcode AP_SET_TP_PROPERTIES

tp_id TP TP TP_STARTED verb TP RECEIVE_ALLOCATE

opext AP_BASIC_CONVERSATION

format VCB VCB 0

set_prot_id ID

AP_YES

AP_NO

new_prot_id ID Personal Communications prot_id LUW ID set_prot_id AP_NO

AP_YES

AP_NO

set_prot_id AP_YES new_prot_id AP_NO prot_id LUW ID

SET_TP_PROPERTIES

86 Client/Server Communications

set_unprot_id ID

AP_YES

AP_NO

new_unprot_id ID Personal Communications unprot_id LUW ID set_unprot_id AP_NO

AP_YES

AP_NO

set_unprot_id AP_YES new_unprot_id AP_NO unprot_id LUW ID

set_user_iduser_id

AP_YES

AP_NO

set_passwordnew_password

AP_YES

AP_NO

user_idset_user_id AP_YES ID

new_passwordset_password AP_YES

: ALLOCATE SEND_CONVERSATION NAP_SAME ID SET_TP_PROPERTIES verb () ALLOCATE SEND_CONVERSATION ID ID SET_TP_PROPERTIES verb

verb Personal Communications

primary_rcAP_OK

verb PersonalCommunications

SET_TP_PROPERTIES

8 APPC verb 87

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_BAD_TP_ID

1 (primary_rc) 2 (secondary_rc) 357 A. APPC

AP_TP_BUSY

AP_UNEXPECTED_SYSTEM_ERROR

SET_TP_PROPERTIES

88 Client/Server Communications

TP_ENDED

TP_ENDED verb Personal Communications

VCB typedef struct tp_ended{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned char type; /* type of TP ended */} TP_ENDED;

Personal Communications

opcode AP_TP_ENDED

opext AP_BASIC_CONVERSATION

format VCB VCB 0

tp_id TP_STARTED verb RECEIVE_ALLOCATE verb

type TP_ENDED

AP_HARD

AP_SOFT

AP_ABEND

AP_CANCEL

AP_ABEND Personal Communications TP_ENDED

verb Personal Communications

primary_rcAP_OK

verb PersonalCommunications

TP_ENDED

8 APPC verb 89

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_BAD_TP_ID

AP_BAD_TYPE

1 (primary_rc) 357 A. APPC

AP_TP_BUSY

AP_UNEXPECTED_SYSTEM_ERROR

TP_ENDED

90 Client/Server Communications

TP_STARTED

TP_STARTED verb Personal Communications

VCB typedef struct tp_started{unsigned short opcode; /* verb operation */unsigned char opext; /* verb extension */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char lu_alias[8]; /* LU alias */unsigned char tp_id[8]; /* TP identifier */unsigned char tp_name[64]; /* TP name */} TP_STARTED;

Personal Communications

opcode AP_TP_STARTED

opext AP_BASIC_CONVERSATION

format VCB VCB 0

lu_alias LU 0 Communications Server LU 8 JISCII Personal Communications LU LU 8 JISCII 8 lu_alias Communications Server LU PersonalCommunications LU Personal Communications LU

Communications Server Win32 SNA API

LU (INI LDAP)

TP_STARTED

8 APPC verb 91

APPC LU APPC local_LU_alias 2 TP_START verb APPCAPI LU

tp_name Personal Communications

verb Personal Communications

primary_rcAP_OK

tp_id PersonalCommunications APPC verb Personal Communications

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_INVALID_LU_NAME

AP_INVALID_ENABLE_POOL

1 (primary_rc) 357 A. APPC

AP_UNEXPECTED_SYSTEM_ERROR

TP_STARTED

92 Client/Server Communications

[MC_]ALLOCATE

[MC_]ALLOCATE verb verb LU LU (RECEIVE_ALLOCATE verb )

ALLOCATE verb ALLOCATE verb verb

Personal Communications verb (conv_id) APPC verb

VCB typedef struct allocate{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char conv_type; /* conversation type */unsigned char sync_level; /* sync level */unsigned char reserv3[2]; /* reserved */unsigned char rtn_ctl; /* return control */unsigned char conversation_style; /* conversation style */unsigned long conv_group_id; /* conversation group identifier */unsigned long sense_data; /* sense data */unsigned char plu_alias[8]; /* partner LU alias */unsigned char mode_name[8]; /* mode name */unsigned char tp_name[64]; /* partner TP name */unsigned char security; /* security level */unsigned char reserv5[11]; /* reserved */unsigned char pwd[10]; /* security password */unsigned char user_id[10]; /* security user_id */unsigned short pip_dlen; /* PIP data length */unsigned char *pip_dptr; /* pointer to PIP data */unsigned char reserv5a; /* reserved */unsigned char fqplu_name[17]; /* fully qualified partner LU */

/* name */unsigned char reserv6[8]; /* reserved */} ALLOCATE;

typedef struct mc_allocate{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char reserv3; /* reserved */unsigned char sync_level; /* sync level */

[MC_]ALLOCATE

8 APPC verb 93

unsigned char reserv4[2]; /* reserved */unsigned char rtn_ctl; /* return control */unsigned char conversation_style; /* conversation style */unsigned long conv_group_id; /* conversation group identifier */unsigned long sense_data; /* sense data */unsigned char plu_alias[8]; /* partner LU alias */unsigned char mode_name[8]; /* mode name */unsigned char tp_name[64]; /* partner TP name */unsigned char security; /* security level */unsigned char reserv6[11]; /* reserved */unsigned char pwd[10]; /* security password */unsigned char user_id[10]; /* security user_id */unsigned short pip_dlen; /* PIP data length */unsigned char *pip_dptr; /* pointer to PIP data */unsigned char reserv6a; /* reserved */unsigned char fqplu_name[17]; /* fully qualified partner LU */

/* name */unsigned char reserv7[8]; /* reserved */} MC_ALLOCATE;

Personal Communications

opcode

AP_B_ALLOCATE

AP_M_ALLOCATE

format VCB VCB 0

opext AP_BASIC_CONVERSATION AP_MAPPED_CONVERSATION AP_NON_BLOCKING OR

tp_id

TP_STARTED verb RECEIVE_ALLOCATE verb

conv_type

AP_BASIC_CONVERSATION

AP_MAPPED_CONVERSATION

ALLOCATE verb verb verb verb (

[MC_]ALLOCATE

94 Client/Server Communications

APPC verb )IBM Systems Network Architecture: LU 6.2 Reference: PeerProtocols

sync_level

AP_CONFIRM_SYNC_LEVEL

AP_NONE

rtn_ctl LU

AP_IMMEDIATE

AP_WHEN_SESSION_ALLOCATED

AP_WHEN_SESSION_FREE

AP_WHEN_CONV_GROUP_ALLOC

AP_WHEN_CONWINNER_ALLOC

AP_WHEN_CONLOSER_ALLOC

conversation_styleconv_id

AP_HALF_DUPLEX

AP_FULL_DUPLEX

conv_group_idrtn_ctl AP_WHEN_CONV_GROUP_ALLOC

plu_alias LU 8 JISCII 8 LU 0 PersonalCommunications fqplu_name LU

Communications Server Win32 SNA API

LU (INI LDAP)

APPC LU APPC partner_LU_alias fully_qualified_partner_LU 2

[MC_]ALLOCATE

8 APPC verb 95

ALLOCATE verb APPC API LU

mode_name8 A EBCDIC () 8 EBCDIC

tp_name PersonalCommunications ALLOCATE verb tp_name RECEIVE_ALLOCATE verb tp_name

security LU

AP_NONE

AP_PGM

ID

AP_SAME

ID

AP_PGM_STRONG

AP_PGM LU ALLOCATE

: [MC_]ALLOCATE AP_SAME ID SET_TP_PROPERTIES verb () ID[MC_]ALLOCATE ID SET_TP_PROPERTIES verb

pwd user_id 10 AE EBCDIC 10

[MC_]ALLOCATE

96 Client/Server Communications

EBCDIC Security = Program(AP_PGM AP_PGM_STRONG)

user_id ID 10 AE EBCDIC 10 EBCDIC Security = Program (AP_PGM AP_PGM_STRONG)

pip_dlen (PIP) 0 32767

pip_dptrPIP pip_dlen 0

fqplu_name LU LU 17 17 EBCDIC EBCDIC 2 A EBCDIC (1 8 ID )plu_alias 0

verb Personal Communications

primary_rcAP_OK

conv_id2

conv_group_id

verb Personal Communications

primary_rcAP_OPERATION_INCOMPLETE

opext AP_OPERATION_INCOMPLETE_FLAG

rtn_ctl AP_IMMEDIATE Personal Communications

[MC_]ALLOCATE

8 APPC verb 97

primary_rcAP_UNSUCCESSFUL

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rc

AP_BAD_CONV_TYPE

AP_BAD_DUPLEX_TYPE

AP_BAD_RETURN_CONTROL

AP_BAD_SECURITY

AP_BAD_SYNC_LEVEL

AP_CONFIRM_INVALID_FOR_FDX

AP_NO_USE_OF_SNASVCMG_CPSVCMG

AP_BAD_TP_ID

AP_PIP_LEN_INCORRECT

AP_UNKNOWN_PARTNER_MODE

sense_data[MC_]ALLOCATE

1 (primary_rc) 2 (secondary_rc) 357 A. APPC

AP_ALLOCATION_ERROR

AP_ALLOCATION_FAILURE_NO_RETRY

AP_ALLOCATION_FAILURE_RETRY

AP_FDX_NOT_SUPPORTED_BY_LU

AP_SEC_REQUESTED_NOT_SUPPORTED

AP_TP_BUSY

AP_UNSUCCESSFUL

AP_UNEXPECTED_SYSTEM_ERROR

AP_CANCELLED

primary_rc AP_ALLOCATION_ERROR sense_data

[MC_]ALLOCATE

98 Client/Server Communications

[MC_]CONFIRM

CONFIRM verb LU CONFIRM verb CONFIRMED verb (SEND_ERRORverb )

CONFIRM verb (ALLOCATE verb ) AP_CONFIRM_SYNC_LEVEL

VCB typedef struct confirm{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char rts_rcvd; /* request to send received */#ifdef WINAPPC_FORMAT_1unsigned char expd_data_rcvd; /* expedited data received */#endif} CONFIRM;

typedef struct mc_confirm{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char rts_rcvd; /* request to send received */#ifdef WINAPPC_FORMAT_1unsigned char expd_data_rcvd; /* expedited data received */#endif} MC_CONFIRM;

Personal Communications

opcode

AP_B_CONFIRM

AP_M_CONFIRM

opext AP_BASIC_CONVERSATION AP_MAPPED_CONVERSATION AP_NON_BLOCKING OR

[MC_]CONFIRM

8 APPC verb 99

format VCB VCB 1

tp_id TP_STARTED verb RECEIVE_ALLOCATE verb

conv_id ALLOCATE verb RECEIVE_ALLOCATE verb

verb Personal Communications

primary_rcAP_OK

rts_rcvd

AP_YES

AP_NO

expd_data_rcvdRECEIVE_EXPEDITED_DATA AP_YES

AP_YES

AP_NO

VCB 1 1 VCB 45 VCB

verb Personal Communications

primary_rcAP_OPERATION_INCOMPLETE

opext verb Personal Communications

AP_OPERATION_INCOMPLETE_FLAG

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

[MC_]CONFIRM

100 Client/Server Communications

secondary_rcAP_BAD_CONV_ID

AP_BAD_TP_ID

AP_CONFIRM_INVALID_FOR_FDX

AP_CONFIRM_ON_SYNC_LEVEL_NONE

verb Personal Communications

primary_rcAP_STATE_CHECK

secondary_rcAP_CONFIRM_BAD_STATE

AP_CONFIRM_NOT_LL_BDY

1 (primary_rc) 2 (secondary_rc) 357 A. APPC

AP_ALLOCATION_ERROR

AP_SECURITY_NOT_VALID

AP_TRANS_PGM_NOT_AVAIL_RETRY

AP_TRANS_PGM_NOT_AVAIL_NO_RETRY

AP_TP_NAME_NOT_RECOGNIZED

AP_PIP_NOT_ALLOWED

AP_PIP_NOT_SPECIFIED_CORRECTLY

AP_CONVERSATION_TYPE_MISMATCH

AP_SYNC_LEVEL_NOT_SUPPORTED

AP_CONV_FAILURE_NO_RETRY

AP_CONV_FAILURE_RETRY

AP_DEALLOC_ABEND

AP_DEALLOC_ABEND_PROG

AP_DEALLOC_ABEND_TIMER

AP_PROG_ERROR_PURGING

AP_SVC_ERROR_PURGING

AP_CONVERSATION_TYPE_MIXED

[MC_]CONFIRM

8 APPC verb 101

AP_UNEXPECTED_SYSTEM_ERROR

AP_TP_BUSY

AP_CANCELLED

: SNA API [MC_]SEND_DATA verb [MC_]CONFIRM verb [MC_]SEND_DATA [MC_]SEND_DATA [MC_]CONFIRM verb 150[MC_]SEND_DATA

[MC_]CONFIRM

102 Client/Server Communications

[MC_]CONFIRMED

CONFIRMED verb verb

CONFIRMED verb 2

VCB typedef struct confirmed{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */} CONFIRMED;

typedef struct mc_confirmed{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */} MC_CONFIRMED;

Personal Communications

opcode

AP_B_CONFIRMED

AP_M_CONFIRMED

opext AP_BASIC_CONVERSATION AP_MAPPED_CONVERSATION AP_NON_BLOCKING OR

format VCB VCB 0

tp_id TP_STARTED verb RECEIVE_ALLOCATE verb

[MC_]CONFIRMED

8 APPC verb 103

conv_id ALLOCATE verb RECEIVE_ALLOCATE verb

verb Personal Communications

primary_rcAP_OK

verb Personal Communications

primary_rcAP_OPERATION_INCOMPLETE

opext AP_OPERATION_INCOMPLETE_FLAG

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_BAD_CONV_ID

AP_BAD_TP_ID

AP_CONFIRMED_INVALID_FOR_FDX

verb Personal Communications

primary_rcAP_STATE_CHECK

secondary_rcAP_CONFIRMED_BAD_STATE

1 (primary_rc) 357 A. APPC

AP_TP_BUSY

AP_UNEXPECTED_SYSTEM_ERROR

AP_CONVERSATION_TYPE_MIXED

[MC_]CONFIRMED

104 Client/Server Communications

[MC_]DEALLOCATE

DEALLOCATE verb 2 verb verb

v FLUSH verb LU LU ()

v CONFIRM verb LU

verb ID (conv_id)

:

v FLUSH CONFIRM verb

:

v TYPE(FLUSH) DEALLOCATE 2 DEALLOCATE TYPE(FLUSH) verbDEALLOCATE_NORMAL

v TYPE(ABEND) DEALLOCATE ERROR_INDICATION DEALLOCATE_ABEND

VCB typedef struct deallocate{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */#ifdef WINAPPC_FORMAT_1unsigned char expd_data_rcvd; /* expedited data received */unsigned char reserv3; /* reserved */#endifunsigned char dealloc_type; /* deallocate type */unsigned short log_dlen; /* log data length */unsigned char *log_dptr; /* pointer to log data */} DEALLOCATE;

typedef struct mc_deallocate{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */

[MC_]DEALLOCATE

8 APPC verb 105

unsigned long conv_id; /* conversation identifier */#ifdef WINAPPC_FORMAT_1unsigned char expd_data_rcvd; /* expedited data received */unsigned char reserv3; /* reserved */#endif

unsigned char dealloc_type; /* deallocate type */unsigned char reserv4[2]; /* reserved */unsigned char reserv5[4]; /* reserved */} MC_DEALLOCATE;

Personal Communications

opcode

AP_B_DEALLOCATE

AP_M_DEALLOCATE

opext AP_BASIC_CONVERSATION AP_MAPPED_CONVERSATION AP_NON_BLOCKING OR

AP_FULL_DUPLEX_CONVERSATION

OR

format VCB VCB 1

tp_id TP_STARTED verb RECEIVE_ALLOCATE verb

conv_id ALLOCATE verb RECEIVE_ALLOCATE verb

dealloc_type

AP_ABEND

AP_ABEND_PROG

AP_ABEND_SVC

AP_ABEND_TIMER

AP_FLUSH

AP_SYNC_LEVEL

[MC_]DEALLOCATE

106 Client/Server Communications

AP_TP_NOT_AVAIL_NO_RETRY

AP_TP_NOT_AVAIL_RETRY

AP_TPN_NOT_RECOGNIZED

AP_PIP_DATA_NOT_ALLOWED

AP_PIP_DATA_INCORRECT

AP_RESOURCE_FAILURE_NO_RETRY

AP_CONV_TYPE_MISMATCH

AP_SYNC_LVL_NOT_SUPPORTED

AP_SECURITY_PARAMS_INVALID

log_dlen

0 32767

VCB 0 log_dptr NULL ( 0 )

log_dptr

VCB log_dptr NULL

LU (GDS) IBM Systems Network Architecture: LU 6.2 Reference: PeerProtocols

verb Personal Communications

primary_rcAP_OK

expd_data_rcvdRECEIVE_EXPEDITED_DATA AP_YES

VCB 1 1 VCB 45VCB

[MC_]DEALLOCATE

8 APPC verb 107

AP_YES

AP_NO

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_BAD_CONV_ID

AP_BAD_TP_ID

AP_DEALLOC_BAD_TYPE

AP_DEALLOC_LOG_LL_WRONG

verb PersonalCommunications (

)

primary_rcAP_OPERATION_INCOMPLETE

opext AP_OPERATION_INCOMPLETE_FLAG

verb Personal Communications

primary_rcAP_STATE_CHECK

secondary_rcAP_DEALLOC_CONFIRM_BAD_STATE

AP_DEALLOC_FLUSH_BAD_STATE

AP_DEALLOC_NOT_LL_BDY

1 (primary_rc) 2 (secondary_rc) 357 A. APPC

AP_ALLOCATION_ERROR

AP_SECURITY_NOT_VALID

AP_TRANS_PGM_NOT_AVAIL_RETRY

AP_TRANS_PGM_NOT_AVAIL_NO_RTRY

AP_TP_NAME_NOT_RECOGNIZED

AP_PIP_NOT_ALLOWED

AP_PIP_NOT_SPECIFIED_CORRECTLY

AP_CONVERSATION_TYPE_MISMATCH

AP_SYNC_LEVEL_NOT_SUPPORTED

AP_CONV_FAILURE_NO_RETRY

AP_CONV_FAILURE_RETRY

[MC_]DEALLOCATE

108 Client/Server Communications

AP_DEALLOC_ABEND

AP_DEALLOC_ABEND_PROG

AP_DEALLOC_ABEND_SVC

AP_DEALLOC_ABEND_TIMER

AP_PROG_ERROR_PURGING

AP_SVC_ERROR_PURGING

AP_TP_BUSY

AP_CONVERSATION_TYPE_MIXED

AP_DUPLEX_TYPE_MIXED

AP_UNEXPECTED_SYSTEM_ERROR

AP_CANCELLED

AP_ERROR_INDICATION

AP_ALLOCATION_ERROR_PENDING

AP_DEALLOC_ABEND_PROG_PENDING

AP_DEALLOC_ABEND_SVC_PENDING

AP_DEALLOC_ABEND_TIMER_PENDING

AP_UNKNOWN_ERROR_TYPE_PENDING

: SNA API [MC_]SEND_DATA verb [MC_]DEALLOCATE verb [MC_]SEND_DATA [MC_]SEND_DATA [MC_]DEALLOCATE verb 150[MC_]SEND_DATA

[MC_]DEALLOCATE

8 APPC verb 109

[MC_]FLUSH

FLUSH verb LU LU () verb

VCB typedef struct flush{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */} FLUSH;

typedef struct mc_flush{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */} MC_FLUSH;

Personal Communications

opcode

AP_B_FLUSH

AP_M_FLUSH

opext AP_BASIC_CONVERSATION AP_MAPPED_CONVERSATION AP_NON_BLOCKING OR

AP_FULL_DUPLEX_CONVERSATION OR

format VCB VCB 0

tp_id TP_STARTED verb RECEIVE_ALLOCATE verb

conv_id

[MC_]FLUSH

110 Client/Server Communications

ALLOCATE verb RECEIVE_ALLOCATE verb

verb Personal Communications

primary_rcAP_OK

verb Personal Communications

primary_rcAP_OPERATION_INCOMPLETE

opext AP_OPERATION_INCOMPLETE_FLAG

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_BAD_CONV_ID

AP_BAD_TP_ID

verb Personal Communications

primary_rcAP_STATE_CHECK

secondary_rcAP_FLUSH_NOT_SEND_STATE

1 (primary_rc) 2 (secondary_rc) 357 A. APPC

AP_TP_BUSY

AP_CONVERSATION_TYPE_MIXED

AP_DUPLEX_TYPE_MIXED

AP_UNEXPECTED_SYSTEM_ERROR

AP_ERROR_INDICATION

AP_ALLOCATION_ERROR_PENDING

AP_DEALLOC_ABEND_PROG_PENDING

AP_DEALLOC_ABEND_SVC_PENDING

AP_DEALLOC_ABEND_TIMER_PENDING

AP_UNKNOWN_ERROR_TYPE_PENDING

[MC_]FLUSH

8 APPC verb 111

: SNA API [MC_]SEND_DATA verb [MC_]FLUSH verb [MC_]SEND_DATA [MC_]SEND_DATA [MC_]FLUSH verb 150[MC_]SEND_DATA

[MC_]FLUSH

112 Client/Server Communications

[MC_]GET_ATTRIBUTES

GET_ATTRIBUTES verb

VCB typedef struct get_attributes{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* verb format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char reserv3; /* reserved */unsigned char sync_level; /* sync_level */unsigned char mode_name[8]; /* mode name */unsigned char net_name[8]; /* network name of local LU */unsigned char lu_name[8]; /* local LU name */unsigned char lu_alias[8]; /* local LU alias */unsigned char plu_alias[8]; /* partner LU alias */unsigned char plu_un_name[8];

/* partner LU uninterpreted name */unsigned char reserv4[2]; /* reserved */unsigned char fqplu_name[17];

/* fully qualified partner LU *//* name */

unsigned char reserv5; /* reserved */unsigned char user_id[10]; /* user identifier */unsigned long conv_group_id; /* conversation group identifier */unsigned char conv_corr_len; /* conversation correlator */

/* length */unsigned char conv_corr[8]; /* conversation correlator */unsigned char reserv6[13]; /* reserved */} GET_ATTRIBUTES;

typedef struct mc_get_attributes{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* verb format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char reserv3; /* reserved */unsigned char sync_level; /* sync_level */unsigned char mode_name[8]; /* mode name */unsigned char net_name[8]; /* network name of local LU */unsigned char lu_name[8]; /* local LU name */unsigned char lu_alias[8]; /* local LU alias */unsigned char plu_alias[8]; /* partner LU alias */unsigned char plu_un_name[8]; /* partner LU uninterpreted name */unsigned char reserv4[2]; /* reserved */unsigned char fqplu_name[17]; /* fully qualified partner LU */

/* name */unsigned char reserv5; /* reserved */unsigned char user_id[10]; /* user identifier */unsigned long conv_group_id; /* conversation group identifier */unsigned char conv_corr_len; /* conversation correlator */

/* length */unsigned char conv_corr[8]; /* conversation correlator */unsigned char reserv6[13]; /* reserved */} MC_GET_ATTRIBUTES;

[MC_]GET_ATTRIBUTES

8 APPC verb 113

Personal Communications

opcode

AP_B_GET_ATTRIBUTES

AP_M_GET_ATTRIBUTES

opext AP_BASIC_CONVERSATION AP_MAPPED_CONVERSATION

AP_FULL_DUPLEX_CONVERSATION OR

format VCB VCB 0

tp_id

TP_STARTED verb RECEIVE_ALLOCATE verb

conv_id

ALLOCATE verb RECEIVE_ALLOCATE verb

verb Personal Communications

primary_rcAP_OK

sync_level

AP_CONFIRM_SYNC_LEVEL

AP_NONE

mode_name8 A EBCDIC () 8 EBCDIC

net_name LU 8 A EBCDIC () 8 EBCDIC

[MC_]GET_ATTRIBUTES

114 Client/Server Communications

lu_name LU 8 A EBCDIC () 8 EBCDIC

lu_alias LU 8 JISCII 8

plu_alias LU 8 JISCII 8

plu_un_name LU (SSCP) LU 8 A EBCDIC

fqplu_name LU 17 17 EBCDIC EBCDIC 2 A EBCDIC (1 8 ID )

user_idALLOCATE verb ID 10 AE EBCDIC 10 EBCDIC

conv_group_id

conv_corr_len 0

: 08

conv_corr 0

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_BAD_CONV_ID

AP_BAD_TP_ID

[MC_]GET_ATTRIBUTES

8 APPC verb 115

1 (primary_rc) 2 (secondary_rc) 357 A. APPC

AP_TP_BUSY

AP_CONVERSATION_TYPE_MIXED

AP_DUPLEX_TYPE_MIXED

AP_UNEXPECTED_SYSTEM_ERROR

[MC_]GET_ATTRIBUTES

116 Client/Server Communications

[MC_]PREPARE_TO_RECEIVE

PREPARE_TO_RECEIVE verb SEND SEND_PENDING RECEIVE

verb verb

v FLUSH verb LU LU ()

v CONFIRM verb LU

verb

VCB typedef struct prepare_to_receive{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char ptr_type; /* prepare to receive type */unsigned char locks; /* prepare to receive locks */} PREPARE_TO_RECEIVE;

typedef struct mc_prepare_to_receive{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned char ptr_type; /* prepare to receive type */unsigned char locks; /* prepare to receive locks */} MC_PREPARE_TO_RECEIVE;

Personal Communications

opcode

AP_B_PREPARE_TO_RECEIVE

AP_M_PREPARE_TO_RECEIVE

opext AP_BASIC_CONVERSATION AP_MAPPED_CONVERSATION AP_NON_BLOCKING OR

[MC_]PREPARE_TO_RECEIVE

8 APPC verb 117

format VCB VCB 0

tp_id TP_STARTED verb RECEIVE_ALLOCATE verb

conv_id

ALLOCATE verb RECEIVE_ALLOCATE verb

ptr_type

AP_FLUSH

AP_SYNC_LEVEL

AP_P_TO_R_CONFIRM

locks Personal Communications

AP_LONG

AP_SHORT

verb Personal Communications

primary_rcAP_OK

verb Personal Communications

primary_rcAP_OPERATION_INCOMPLETE

opext AP_OPERATION_INCOMPLETE_FLAG

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_BAD_CONV_ID

AP_BAD_TP_ID

AP_P_TO_R_INVALID_FOR_FDX

AP_P_TO_R_INVALID_TYPE

[MC_]PREPARE_TO_RECEIVE

118 Client/Server Communications

verb Personal Communications

primary_rcAP_STATE_CHECK

secondary_rc

AP_TO_R_NOT_LL_BDY

AP_P_TO_R_NOT_SEND_STATE

1 (primary_rc) 2 (secondary_rc) 357 A. APPC

AP_ALLOCATION_ERROR

AP_SECURITY_NOT_VALID

AP_TRANS_PGM_NOT_AVAIL_RETRY

AP_TRANS_PGM_NOT_AVAIL_NO_RTRY

AP_TP_NAME_NOT_RECOGNIZED

AP_PIP_NOT_ALLOWED

AP_PIP_NOT_SPECIFIED_CORRECTLY

AP_CONVERSATION_TYPE_MISMATCH

AP_SYNC_LEVEL_NOT_SUPPORTED

AP_CONV_FAILURE_NO_RETRY

AP_CONV_FAILURE_RETRY

AP_DEALLOC_ABEND

AP_DEALLOC_ABEND_PROG

AP_DEALLOC_ABEND_SVC

AP_DEALLOC_ABEND_TIMER

AP_PROG_ERROR_PURGING

AP_SVC_ERROR_PURGING

AP_TP_BUSY

AP_CONVERSATION_TYPE_MIXED

AP_UNEXPECTED_SYSTEM_ERROR

AP_CANCELLED

: SNA API [MC_]SEND_DATA verb [MC_]PREPARE_TO_RECEIVE verb [MC_]SEND_DATA [MC_]SEND_DATA

[MC_]PREPARE_TO_RECEIVE

8 APPC verb 119

[MC_]PREPARE_TO_RECEIVE verb 150[MC_]SEND_DATA

[MC_]PREPARE_TO_RECEIVE

120 Client/Server Communications

[MC_]RECEIVE_AND_POST

RECEIVE_AND_POST verb verb LU verb APPC

VCB typedef struct receive_and_post{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned short what_rcvd; /* what received */unsigned char rtn_status; /* return status with data */unsigned char fill; /* data fill */unsigned char rts_rcvd; /* request to send received */unsigned char expd_data_rcvd; /* expedited data received */unsigned short max_len; /* maximum length of received */

/* data */unsigned short dlen; /* actual length of received */

/* data */unsigned char *dptr; /* pointer to data buffer */unsigned long *sema; /* post handle for verb */unsigned char reserv5; /* reserved */} RECEIVE_AND_POST;

typedef struct mc_receive_and_post{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned short what_rcvd; /* what received */unsigned char rtn_status; /* return status with data */unsigned char reserv4; /* reserved */unsigned char rts_rcvd; /* request to send received */unsigned char expd_data_rcvd; /* expedited data received */unsigned short max_len; /* maximum length of received */

/* data */unsigned short dlen; /* actual length of received */

/* data */unsigned char *dptr; /* pointer to data buffer */unsigned long *sema; /* post handle for verb */unsigned char reserv6; /* reserved */} MC_RECEIVE_AND_POST;

Personal Communications

opcode

AP_B_RECEIVE_AND_POST

[MC_]RECEIVE_AND_POST

8 APPC verb 121

AP_M_RECEIVE_AND_POST

opext AP_BASIC_CONVERSATION AP_MAPPED_CONVERSATION

format VCB VCB 0

tp_id TP_STARTED verb RECEIVE_ALLOCATE verb

conv_id

ALLOCATE verb RECEIVE_ALLOCATE verb

rtn_status verb

AP_YES

AP_NO

fill

AP_BUFFER

AP_LL

max_len

: 0 65535

dptr LU VCB dptr NULL

sema verb Win32API WaitForMultipleObjects

verb Personal Communications

primary_rcAP_OK

[MC_]RECEIVE_AND_POST

122 Client/Server Communications

AP_DEALLOC_NORMAL

what_rcvd rtn_status AP_NO

AP_NONE

AP_CONFIRM_DEALLOCATE

AP_CONFIRM_SEND

AP_CONFIRM_WHAT_RECEIVED

AP_DATA

AP_DATA_COMPLETE

AP_DATA_INCOMPLETE

AP_SEND

AP_USER_CONTROL_DATA_COMPLETE

AP_USER_CONTROL_DATA_INCMP

AP_PS_HEADER_COMPLETE

AP_PS_HEADER_INCOMPLETE

AP_DATA_CONFIRM

AP_DATA_COMPLETE_CONFIRM

AP_DATA_CONFIRM_DEALLOCATE

AP_DATA_COMPLETE_CONFIRM_DEALL

AP_DATA_CONFIRM_SEND

AP_DATA_COMPLETE_CONFIRM_SEND

AP_DATA_SEND

AP_DATA_COMPLETE_SEND

rtn_status AP_YES

AP_UC_DATA_COMPLETE_CONFIRM

AP_UC_DATA_COMPLETE_CNFM_DEALL

AP_UC_DATA_COMPLETE_CNFM_SEND

AP_UC_DATA_COMPLETE_SEND

AP_PS_HDR_COMPLETE_CONFIRM

AP_PS_HDR_COMPLETE_CNFM_DEALL

AP_PS_HDR_COMPLETE_CNFM_SEND

AP_PS_HDR_COMPLETE_SEND

rts_rcvd

[MC_]RECEIVE_AND_POST

8 APPC verb 123

AP_YES

AP_NO

expd_data_rcvdRECEIVE_EXPEDITED_DATA AP_YES

AP_YES

AP_NO

VCB 1 1 VCB 45 VCB

dlen (dptr ) 0 what_rcvd

verb PersonalCommunications

primary_rcAP_PARAMETER_CHECK

secondary_rcAP_BAD_CONV_ID

AP_BAD_RETURN_STATUS_WITH_DATA

AP_BAD_TP_ID

AP_RCV_AND_POST_BAD_FILL

verb Personal Communications

primary_rcAP_STATE_CHECK

secondary_rcAP_RCV_AND_POST_BAD_STATE

AP_RCV_AND_POST_NOT_LL_BDY

verb verb Personal Communications

primary_rcAP_CANCELLED

1 (primary_rc) 2 (secondary_rc) 357 A. APPC

AP_ALLOCATION_ERROR

AP_SECURITY_NOT_VALID

[MC_]RECEIVE_AND_POST

124 Client/Server Communications

AP_TRANS_PGM_NOT_AVAIL_RETRY

AP_TRANS_PGM_NOT_AVAIL_NO_RTRY

AP_TP_NAME_NOT_RECOGNIZED

AP_PIP_NOT_ALLOWED

AP_PIP_NOT_SPECIFIED_CORRECTLY

AP_CONVERSATION_TYPE_MISMATCH

AP_SYNC_LEVEL_NOT_SUPPORTED

AP_CONV_FAILURE_NO_RETRY

AP_CONV_FAILURE_RETRY

AP_DEALLOC_ABEND

AP_DEALLOC_ABEND_PROG

AP_DEALLOC_ABEND_SVC

AP_DEALLOC_ABEND_TIMER

AP_DEALLOC_NORMAL

AP_PROG_ERROR_NO_TRUNC

AP_PROG_ERROR_PURGING

AP_PROG_ERROR_TRUNC

AP_SVC_ERROR_NO_TRUNC

AP_SVC_ERROR_PURGING

AP_SVC_ERROR_TRUNC

AP_TP_BUSY

AP_CONVERSATION_TYPE_MIXED

AP_UNEXPECTED_SYSTEM_ERROR

AP_CANCELLED

: SNA API [MC_]SEND_DATA verb [MC_]RECEIVE_AND_POST verb [MC_]SEND_DATA [MC_]SEND_DATA [MC_]RECEIVE_AND_POST verb 150[MC_]SEND_DATA

[MC_]RECEIVE_AND_POST

8 APPC verb 125

[MC]RECEIVE_AND_WAIT

RECEIVE_AND_WAIT verb

: verb LU SEND LU SEND

: verb LU FLUSH verb

VCB typedef struct receive_and_wait{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned short what_rcvd; /* what received */unsigned char rtn_status; /* return status with data */unsigned char fill; /* data fill */unsigned char rts_rcvd; /* request to send received */unsigned char expd_data_rcvd; /* expedited data received */unsigned short max_len; /* maximum length of received */

/* data */unsigned short dlen; /* actual length of received */

/* data */unsigned char *dptr; /* pointer to data buffer */unsigned char reserv5[5]; /* reserved */} RECEIVE_AND_WAIT;

typedef struct mc_receive_and_wait{unsigned short opcode; /* verb operation code */unsigned char opext; /* verb extension code */unsigned char format; /* format */unsigned short primary_rc; /* primary return code */unsigned long secondary_rc; /* secondary return code */unsigned char tp_id[8]; /* TP identifier */unsigned long conv_id; /* conversation identifier */unsigned short what_rcvd; /* what received */unsigned char rtn_status; /* return status with data */unsigned char reserv4; /* reserved */unsigned char rts_rcvd; /* request to send received */unsigned char expd_data_rcvd; /* expedited data received */unsigned short max_len; /* maximum length of received */

/* data */

[MC_]RECEIVE_AND_WAIT

126 Client/Server Communications

unsigned short dlen; /* actual length of received *//* data */