当前位置:网站首页>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
边栏推荐
- 关于白盒测试,这些技巧你得游刃有余~
- [无线通信基础-14]:图解移动通信技术与应用发展-2-第一代移动模拟通信大哥大
- Log4j2 ThreadContext日志链路追踪
- 求两个线段公共部分的长度
- Microbial safety and health, what is biological treatment?
- 7-2 punch in reward DP for puzzle a
- 3dsmax插件开发遍历节点对象和Object获取及INode变换矩阵说明
- neo4j安装、运行以及项目的构建和功能实现
- org.redisson.client.RedisResponseTimeoutException: Redis server response timeout (3000 ms)错误解决
- 软件开发中的上游和下游
猜你喜欢
随机推荐
How to select securities companies? In addition, is it safe to open a mobile account?
[Agora] user management
Log4j2 ThreadContext日志链路追踪
Microbial safety and health, what is biological treatment?
laravel+redis 生成订单号-当天从1开始自增
TypeError: Argument ‘angle‘ can not be treated as a double
dc_ Study and summary of labs--lab1
[deepin] common sets
More pragmatic in business
org.redisson.client.RedisResponseTimeoutException: Redis server response timeout (3000 ms)错误解决
【agora】用户管理
Some essential differences
Analysis on user behavior loss of data exploration e-commerce platform
Neo4j installation, operation, project construction and function realization
Log logrus third party library usage
Zero of DC learning notes -- overview and basic process introduction
测试必备工具-Postman实战教程
Using recyclerreview to show banner is very simple
laravel 事件 & 订阅
Understanding and application of Qt5 layout in creation







![[无线通信基础-14]:图解移动通信技术与应用发展-2-第一代移动模拟通信大哥大](/img/fa/f9bad44147ba9af21183b7bd630e32.png)

