星期一, 11月 06, 2023

2003-07-29 如何利用 RPG 寫 TCP/IP Socket 程式 ?


如何利用 RPG 寫 TCP/IP Socket 程式 ?

要利用 RPG 寫 TCP/IP socket 程式,則需要透過呼叫 C 的相關 API,與 TCP/IP 相關的
C API 詳細表列於
https://www.ibm.com/docs/en/i/7.5?topic=communications-socket-programming
Sockets APIs system functions 
https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/apis/unix8a.html

Sockets APIs network functions 
https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/apis/unix8b.html

若想要了解 Socket 程式設計請參考 Sockets Programming,此連結文件包含所有相關紅皮書及 Socket 的觀念。

紅皮書  Who Knew You Could Do That with RPG IV? A Sorcerer's Guide to System Access and More. 
http://www.redbooks.ibm.com/abstracts/sg245402.html
章節 5.5 詳細說明如何利用 RPG 撰寫 Socket 程式。請自行下載參考。

一個非常好的 RPG socket 工具:
RPG IV Sockets Tutorial 
https://www.scottklement.com/rpg/socktut/index.html
內含教育手冊及 SAVF 範例。可以將 SAVF 上傳至 AS/400,
再 restore,內含許多範例。




沒有留言: