当前位置:网站首页>The whole process of AS400 API from zero to one
The whole process of AS400 API from zero to one
2022-07-01 01:46:00 【Saidywin】
Simple sharing , If you have different opinions, you can discuss them together
1)AS400 Install the corresponding 577ODG1 This software
If you don't know if you're pretending , You can go through
GO LICPGM This command ,10 To see which software is installed

How to install is as follows :
1. To install the libraries, run the command go licpgm

2. Select option 11 to install a Licensed Program and install option 39

If you find any IBM HTTP Server For I
2) start-up HTTP service , This is the basic requirement .
STRTCPSVR *HTTP HTTPSVR(*ADMIN)
192.168.88.249 yes AS400 Of IP Address
http://192.168.88.249:2001/HTTPAdmin
If you say your User No permission to log in Admin, Need to give User profile *ALLOBJ and *IOSYSCFG To create a server


because Web Services need to specify corresponding user profile But if it's personal user profile The password has expired, which will lead to your user After the password expires API The service doesn't work . All to create A user who never expires :
CRTUSRPRF USRPRF(IWSREST02) PASSWORD(*NONE)


3) The server create After success, the next step is deployment rest API service

When deploying services, you can choose SRVPGM and PGM
Produce In the form of :
h nomain PGMINFO(∗PCML:∗MODULE)
d ConvertTemp pr
d tempIn 10 const
d tempOut 10
p ConvertTemp b export
d ConvertTemp pi
d tempIn 10 const
d tempOut 10
d tempI s 8P 2
d tempO s 8P 2
d value S 50A
/free
value = %STR(%ADDR(tempIn));
tempI=%DEC(value:7:2);
tempO = (5/9)∗(tempI - 32);
value = %CHAR(tempO);
tempOut = value;
%STR(%ADDR(tempOut):10)=tempOut;
/end-free
p ConvertTemp e
PGM In the form of :
/free
ctl-opt *debug(yes) PGMINFO(∗PCML:*DCLCASE:∗MODULE);
dcl-f custpf usage(*update) keyed
rename(TESTPFR:NEWNAME) USROPN ;
dcl-s k1cust like(CUBK) INZ(1);
dcl-ds w1request INZ qualified;
customer char(10);
customername char(10);
end-ds W1reqeust;
dcl-pi *n;
// request
customerds likeds(w1request);
//response
statuscode int(5);
end-pi;
exsr sr100;
eval *INLR = *ON;
return;'
// ==================================================
begsr SR100;
OPEN NEWNAME;
eval k1cust = w1request.customer;
Chain k1cust NEWNAME;
If %found(NEWNAME);
eval custname =w1request.customername;
update NEWNAME;
eval statuscode = 200;
else;
eval statuscode = 400;
endif;
Close NEWNAME;
endsr;
// ==================================================
/end-free
But remember if you say you want to IWS Identify the corresponding SRVPGM perhaps PGM
It needs to be H Spec Definition , Otherwise, I can't recognize
H PGMINFO(∗PCML:∗MODULE)

API Service to name
[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-nKNKCH1T-1656494130334)(https://mmbiz.qpic.cn/mmbiz_png/WxKgPiboJnT3CMr74DI8WmNj5DDvcQHnQxwsCAdwevG10PbOdLmcnfDTcsREWcajaX0ic41R7zmibv2Ck1M8bibGdg/640?wx_fmt=png)]

Choose the appropriate method

Plus library list

Deployment success

Property display Basic resources URL:
http://192.168.88.249:10021/web/services/fto
stop WEB service
ENDTCPSVR SERVER(*HTTP) HTTPSVR(IWSREST02)
need Debug API Job
Subsystem QUSRWRK
Job QZRCSRVS
STRSRVJOB Go then STRDBG debug To the corresponding API backstage QZRCSRVS job, Remember SRVPGM Yes, No Debug Of , As long as the deployment time is Program You can only
GET、POST、PUT、DELETE
GET and Delete Yes, it can only be used Path_Parm perhaps query_Parm You can't use Body Of

That's the deployment API Service for , Next is the need to API The service is carried out SSL Configuration of
To configure SSL/TLS Set up
Configure the machine to use SSL/TLS Encrypted communication can be enabled . This helps prevent data from being intercepted during transmission 、 To crack or tamper with .

Configuration process when using self signed certificates
Create and install device certificates :
IBM Mainly through iKeyman
Enable SSL/TLS:
To configure SSL
Restart the server

SSL Of IBM Of SSL Mainly used iKeyman Generate secret key :
How do I extract certificates from key databases using the iKeyman utility?
https://www.youtube.com/watch?v=aFUF8KAaMIQ
How do I receive a signed certificate from a certificate authority using the iKeyman utility?
https://www.youtube.com/watch?v=Wq1ftCAow9Y
边栏推荐
- AS400 大厂面试
- Relationship between ASCII, Unicode, GBK, UTF-8
- 未来的 Web3会带来什么?
- PHP array splicing MySQL in statement
- 如何选择券商?另外,手机开户安全么?
- PHP crawls data through third-party plug-ins
- zabbix如何配置告警短信?(预警短信通知设置流程)
- [Qt5 basics] random number display
- Test essential tool - postman practical tutorial
- Mathematical knowledge: finding combinatorial number III - finding combinatorial number
猜你喜欢
![[无线通信基础-14]:图解移动通信技术与应用发展-2-第一代移动模拟通信大哥大](/img/fa/f9bad44147ba9af21183b7bd630e32.png)
[无线通信基础-14]:图解移动通信技术与应用发展-2-第一代移动模拟通信大哥大

Sun Yuchen told Swiss media Bilan that the bear market will not last long

视频教程 | 长安链推出系列视频教程合集(入门)

Compile and install oh my Zsh

The argument type 'function' can't be assigned to the parameter type 'void function()‘

哪有什么未来可期,不过是打工人临死前最后的幻想罢了

Unknown database connection database error
![[Qt5 tab] tab label and content hierarchical analysis](/img/cc/c8c2e79877a958f742a8e9e60ceb43.png)
[Qt5 tab] tab label and content hierarchical analysis
![[Qt5 basics] random number display](/img/1f/a3d310788dbc45c71d3b5c47d50a5b.png)
[Qt5 basics] random number display

New opportunities for vr/ar brought by metauniverse
随机推荐
医疗HIS行业短信发送解决方案
Log4j2 ThreadContext日志链路追踪
Laravel+redis generates an order number - automatically increase from 1 on the same day
数学知识:求组合数 IV—求组合数
[Agora] user management
Construction and beautification of personal blog
opencv -- 笔记
For the sustainable development of software testing, we must learn to knock code?
【栈】921. Minimum Add to Make Parentheses Valid
日志 logrus第三方库的使用
PHP数组拼接MySQL的in语句
Sécurité et santé microbiennes, qu'est - ce que le traitement biologique?
[simulation] 922 Sort Array By Parity II
How to select securities companies? In addition, is it safe to open a mobile account?
求两个线段公共部分的长度
Handsontable data grid component
3500字归纳总结:一名合格的软件测试工程师需要掌握的技能大全
数学知识:求组合数 III—求组合数
[无线通信基础-15]:图解移动通信技术与应用发展-3- 数字通信2G GSM、CDMA、3G WDCMA/CDMA200/TD-SCDMA、4G LTE、5G NR概述
软件开发中的上游和下游