Title: i-web RPG???Web?????????? ????
1i-web RPG???Web??????????????
2??????
1. iSeries Web????? HTTP?? CGI??
2. Web???????? ?????Excel???PDF???????? etc
(??)
3. Web?????? ???????? ?????
4.i-web RPG???? ????? ?????? ??
5. ?????????? ?????????? i-web RPG????????
31. iSeries Web?????
??????OS/400 V4R5?????????????
4??
- World Wide Web
- HTML
- HTTP
- CGI
51.World Wide Web
- World Wide Web????
- World Wide Web (???WWW,????W3)????????????????????
?????????????? - 1980??????????????????????????????????????????????
??????????????????????????????????????????????????
?????????????????????????????????????????????????
????????????????????????????????? - 1990???????????????????CERN(Conseil Europeen pour
la Recherche Nucleaire)???????????????????????????
?????????????????????????????????????????????????
????????????????????????????HTML(HyperText Markup
Language)????????????HTTP(HyperText Transfer
Protocol)???????
6- ???????URL(Uniform Resource Locator)??????????????
???????????HTTP???????????URL?????????????????????
???????????Web??????????HTTP????(????Web????)?????
????HTML??????????/??/??/??????????????? - ??????????????????????????????????????????????????
??????????????????????????????????????????????????
?????????????????????????????????????????????????
Web?????????????
7- ??????????Web?????1993????????NCSA(The National
Center for Supercomputing Applications)??????Mosai
c(????)???????????????Mosaic??????????? - Web?????Windows?Machintosh?UNIX?Linux??OS/2???????
????????????????????????????????????????????????
?????????????????????????????? - ??????????????????????????????????????????????????
??????????????????????????????
Netscape
Mosaic
Opera
Internet Explorer
8- ???????????Web??????HTTP?????FTP(??????)?POP3(????
?)?NNTP(???????)?Gopher?????????????????????????UR
L????????????????????????(????)??????????????? - ????????????????????????????????????????????95??Wi
ndows95???????????????????????TCP/IP??????OS??????
????????????????????????????
92.HTML
- HTML??
- HTML???????????????????????????????????????(??????
???????????????)????? - HTML??????????????????????????????HTML????????????
??????????HTML???????????????????????????????????
?????????????IBM????????????????HTML?????????????
???????? - HTML?????????????????????HTML4.01?????????????????
??????????????????????Web?????????????????????????
???????/?????????????????(???Netscape?MS
Internet Explorer?HTML4.0 a??????????)
10- HTML???
- HTML????????????
- ????????ltgt???????????????????
- ?????????????????lt..gt???????????lt/..gt???????????
?????????????????? - HTML?????ltHTMLgt????lt/HTMLgt?????
- ???????/????????????????????????
- HTML??????????/???Web?????????????
- HTML?????????Web???????????????????
- ?????ltPREgt?????
- ?????????/????????????
- ?????????????????????
- ?????(?)????????????????????
112-1.HTML????1
?lthtmlgtlt/htmlgt HTML??????????? ?lttitlegtlt/title
gt ??????????????????? ?ltbodygtlt/bodygt
HTML?????????????????? ???????????????????? ?ltc
entergtlt/centergt ?????????????? ?lth1gtlt/h1gt
????(header)????????????? ????????????????????
lth2gt,lth3gt,lth4gt,lth5gt,lth6gt?? ?lthrgt
???????????lt/hrgt?????? ????? HTML???????????????
?? ????????????? ?ltbrgt ???????????????
????????lt/brgt?????? ?ltbgtlt/bgt
?????(bold)??? ?ltulgtlt/ulgt ?????????(???????????
) ?ltligt ??????????? ?????????????
lthtmlgt ltheadgt lttitlegt???????????lt/titlegt
lt/headgt ltbodygt ltcentergt lth1gtHTML?????lt/h1gt
lt/centergt lthrgt ???????? ???????? lthrgt
????????ltbrgt ???????? lthrgt ltbgt????????
????????lt/bgt lthrgt ltulgt ltligt????????
ltligt???????? lt/ulgt lt/bodygt lt/htmlgt
? ? ? ? ? ? ? ? ? ? ?
122-2.HTML????2
?ltagtlt/agt ???????????? ltagt????href???????????
?????? (??????????)???? ??????????????????????
??? ?????????????????? ?ltagtlt/agt
???????????? ?HTML??????????????????????
?(??????????)??????????? ?ltimggt ????????????
ltimggt????src????????????? ?????????????????????
??????
lthtmlgt ltheadgt lttitlegt???????????lt/titlegt
lt/headgt ltbodygt ltcentergtlth2gt??????????lt/h2gtlt/
centergtltbrgt lta href"http//www.ibm.com/jp/"gt??I
BM?????(?????)lt/agt ltbrgt lta href"/book/title/ind
ex.html"gt?????(???????)lt/agt lthrgt
ltcentergtlth2gt?????????????lt/h2gtlt/centergtltbrgt
ltimg src"http//www.ibm.com/mast_logo_anim_jp.gif
"gt lt/bodygt lt/htmlgt
? ? ?
132-3.iSeries???HTML
- iSeries????HTML?????????
- iSeries??HTML????????????????2???????????/???????
???????????????? - IFS(?????????? Integrated File System)
- OS/400 V3R1?????????????????????????IFS?????????
- ??IFS?UNIX,Windows???????????????????????HTML?????
?????????? - PC??????HTML?????????????(GIF,JPEG?)?????(ASCII?
??)?????? - ??????(/QSYS.LIB)
- ?????OS/400?????????????EBCDIC???????????
- RPG/COBOL??????????????????????????????????(DB2/4
00)?????????(???IFS???????????????????????????
?????) - ????????HTML?????????????????ASCII????????????????
?????????????????????????
14- IFS???????????????
- IFS??????
- ???HTML??????????????????IFS????????????????????
?????????(???)????iSeries(HTTP????)????????(????)?
??????? - ??????????????IFS????????????????(??255????)??????
?????????IFS??????????? - ????????????
- RPG/COBOL????????????CGI?????????????????HTML?????
?????????????CGI????????EBCDIC???????HTML????????
?????????????????ASCII????????????????? - RPG/COBOL?????????????????????????????????????????
????(CGI????????)???????
152-4.CCSID
- CCSID(?????????ID)
- iSeries??PC??????????ODBC?????????????????????????
????(??????)????????????????????iSeries?PC?????
????????????????? - iSeries???????????????????EBCDIC??PC/UNIX?ASCII???
??????????????????????????????????????????????????
??????? - Web???????????????????????????????iSeries?????????
?????????????????????????????????????????????OS/
400??????????????????????????????????????????????
??? - ????????????????????????????????????????????CCSID(
Coded Character Set IDentifier)???
16- CCSID?????
- CCSID??????????????????????????????/???/??????????
???????? - ?????CCSID????????????????EBCDIC?????????????????
??? - ????????????????5026???5035?????65535??????(?65535
??????????????????)Pcom??5026/5035????????????93
0???939???????????
CCSID Code Page Character Set Encoding ??
00037 00037 00037 1100 ????????????????
00437 00037 01212 2100 US PC
00930 00290 / 00300 01172 / 01001 1301 ??????????4370??(5026???)
00932 00897 / 00301 01122 / 00370 2300 Japan PC(DOS?JIS??)
00939 01027 / 00300 01172 / 01001 1301 ??????????4370??(5035???)
00943 01041 / 00301 01172 / 00370 2300 Japan PC(Windows??)
05026 00290 / 00300 01172 / 00370 1301 ??????????1880??
05035 01027 / 00300 01172 / 00370 1301 ??????????1880??
65535 ?????????CCSID
17- CCSID??????????
- CCSID??????????????????????????Pcom?????5250?????
???????(??????)?????????????3???????????????????? - ???????????CCSID (DSPFD???)
- ?????????(??)CCSID (DSPJOB???)
- ??????Pcom?CCSID (Pcom????????????)
- ????????????????????????????????????????CCSID????
??????????????????????????OS/400?????????????????/
???????? - ???Web?????????????CCSID??????????????????????????
??????????????FTP??????????ODBC?????????????????
??
18- CCSID???(CCSID?????????????)
- iSeries??????
- ????? QCCSID
- ????????????CCSID
- CHGJOB??????CCSID?????
- (????? QLANGID)
- (????????????LANGID)
- iSeries???????
- ???????(???????????????????????)????????????????
?????????????????????????????????????????????????
???????? - iSeries??????
- ??????????
- DDS??????????CCSID???????????????
???????????????? - DDS????????????(CRTPF????)?CCSID????
- ???????
- ?????????????(CRTSRCPF????)?CCSID????
- ????????/????????
- ????????CCSID??????????
193.HTTP
- HTTP???????
- Web???????TCP/IP??????80??????????????????????????
????????????????????????????????????????????????
- ???????????????????????(HTML?????????????????????
??????????????)???????????????????????????????????
????????????(???????????????????????????)?????????
???????????????????? - ??????????????????????????????????????????????????
??????(???????)???????????????????????????????????
??????????????????
20????? http
????? www.ibm.com
??????? /jp
????? index.html
http//www.ibm.com/jp/index.html
TCP/IP??????
- ??????????????????????
- Web???????????
- HTML??????????????????????
????? index.html
213-1.iSeries HTTP????
- iSeries HTTP????
- iSeries(AS/400)???????HTTP????
- IBM HTTP Server for iSeries (Original)
- OS/400 V3R2??OS????(???ICS,ICSS?????)
- IBM HTTP Server for iSeries (powered by Apache)
- OS/400 V4R5??OS????
- Domino
- OS/400 V4R2??Domino???????
- I/NET Web Server/400
- OS/400 V3R1????
- Netscape Enterprise Server for AS/400 (?????)
22- IBM HTTP Server for iSeries (Original)????
- HTTP??????
- HTTP 1.1
- Proxy / ?????
- ????
- ?????????
- ???????????
- Web??????????
- CGI (ILE-RPG,ILE-COBOL,ILE-C,Java)
- SSI
- Net.Data
- Java Servlet
- ??????
- ??????(Basic??)
- ???(SSL)
- ??????
- ????
- ???????????????????
23- IBM HTTP Server for iSeries (Original)???
- iSeries??HTTP????????????????????
- WRKACTJOB????
- ????????????????QTMHHTTP????????
- ??HTTP???????????????????????OS/400??????????????
??????????????????????????????????????????????
????????
S65FF18A
01/11/16 172256 CPU
2.1 ???? 000036 ?????? 243
??????????,?????????????
2 ?? 3 ?? 4 ?? 5 ?? 6 ??
7?????? ??? 8?????????? ??? 13
?? ...
OPT ???????/?????
????? ???? CPU ?? ??
QBATCH QSYS SBS .0
DEQW QCMN
QSYS SBS .0
DEQW QCTL QSYS
SBS .0 DEQW
QSYSSCD QPGMR BCH .0
PGM-QEZSCNEP EVTW QHTTPSVR QSYS
SBS .0 DEQW
KOBA_WCS QTMHHTTP BCH .0
PGM-QZHBHTTP CNDW KOBA_WCS
QTMHHTTP BCI .0 TIMW
KOBA_WCS QTMHHTTP BCI .0
TIMW KOBA_WCS QTMHHTTP
BCI .0 TIMW
KOBA_WCS QTMHHTTP BCI .0
TIMW QINTER QSYS SBS
.0 DEQW QPADEV0001
QSECOFR INT .0 CMD-WRKACTJOB RUN
?? .. ?????????????
gt
F3 ?? F5 ???? F7 ?? F10 ??????
F11 ?? ???? ??? F12
??? F23?????? ??? F24?? ???
24QSYS.LIB(EBCDIC)
HTTP???????????? QHTTPSVR.LIB
HTTP???????
HTTP?????????? QUSRSYS.LIB
CGI?????
?????
HTML???? Net.Data??? -?????? -???????
Net.Data????
?????
?????
HTML????
Net.Data???
Java Servlet
IFS(ASCII)
253-2.HTTP??????
- IBM HTTP Server for iSeries (Original)??
- ??????
- ????????
- IP????(?????)???????????????????
- Web??????????
- CGI?Net.Data????Java?
- ????????
- SSL?? ????????
- (Firewall?????)
- ????
- TCP/IP?????????
- IP????(?????)??????????????????????? etc
- HTTP?????????
- HTTP??????
- ????????????
- ??????????
- ????(Map?Pass?Exec)
- ???????
- ??????????
- ????
- Welcome???
- DirectAccess ??/??
- ?????????(??????)
26- ???????????
- iSeries(AS/400) RISC?????????
- OS/400 V4Rx , V5R1????????
- TCP/IP???????LAN???
- Ethernet , Token-Ring , ATM etc
- ???????????
- ???????OS/400 V4R5???
- PTF???
??
5769-TC1 BASE AS/400 TCP/IP TCP/IP?????
5769-DG1 BASE IBM HTTP SERVER FOR AS/400 HTTP????
?????
5769-AC2,3 BASE CRYPTO ACCESS PROVIDER 56-BIT FOR AS/400 ???(SSL)
5769-SS1 34 OS/400 - ?????????????? ??????(ID??)
??
5769-SS1 12 OS/400 - ??????? ??/???????
5769-XE1 BASE ?????????? WINDOWS ??????? ??/???????
273-3.HTTP??????????
- IBM HTTP Server for iSeries (Original)??????
- ????
- ?????/???????
- ?????/?????????
- ?TCP/IP?????
- ?????IP???????????????????????????
etc(???????????????????????) - ?HTTP?????????
- ????HTTP?????????
- ?HTTP????????????????
- HTTP????????????????????????????
- ?HTTP?????????
- ???????HTTP???????????????????
- ????
- ???????
- ???? etc.
- ?HTTP???????/??
- ??
- ?? 5250???????
- ?? Web????????? (5250?????)
28- ????????
- HTTP???????????(???????)?????????????????????????
???????????????????????????? - ????????????5????
- ????
- ????????????????
- ??????????
- ??????????Web???(HTML????)
- ????
- Web??????HTTP?????????????????????????
- ????
- URL???????????????????????????
- ??
- ????????????????????
293-3.?????/???????
- ?????/???????
- ?????
- CCSID 5035 (?????????)
- ?????QCCSID???????????HTTP??????????(????????????
?????????????????) - ?????????
- 5250??????
- ???????????????? 939 (?????????)
- iSeries?????????????CCSID?5035??? CHGJOB
CCSID(5035) - Web????
- JavaScript??????????????
- Proxy?????????????0???
- ?TCP/IP?????
- ???????
303-3.?HTTP?????????
- ?HTTP?????????
- HTTP????????????????
- CHGHTTPA????
HTTP ????? (CHGHTTPA)
?????????,?????????????
???? . . . .
. . . . . . . NO YES, NO, SAME
??????????
?? . . . . . . .
. . . . . 10 1-9999, SAME, DFT
?? . . . . . . . . . . . . 40
1-9999, SAME, DFT, NOMAX ??????????????
gt 00943 1-65533, SAME, DFT
SERVER ?????????
EBCDIC/ASCII ???????
CCSID ?? , SAME, CCSID, DFT
?????? . . . . . . . ?? ,
LIBL, CURLIB
ASCII/EBCDIC TABLE ??? . . CCSID
?? , SAME, CCSID, DFT ?????? . . . . .
. . ?? , LIBL, CURLIB
?? F3 ?? F4??????? F5
???? F12 ???? F13
???????? F24 ?????
? ? ?
?STRTCP????TCP/IP????????HTTP?????????????????????
STRTCPSVR?????HTTP????????????????????????????
?????(iSeries)???????????????
???????????????????????????????
?????????????????/???????????? ???????????MIME????
??????????CGI?EBCDIC?ASCII????
????ASCII-CCSID????943?Windows????????SJIS???????
313-3.????HTTP?????????
- ????HTTP?????????
- HTTP???????/?????????????????????????????????????
?????????????????????? - WRKHTTPCFG CFG(ADMIN)
- ???HTTP???????/??
- STRTCPSVR SERVER(HTTP) HTTPSVR(ADMIN)
HTTP ?????
???? S65FF18A ??? . . . . . . . . . .
. . . ADMIN
??????????,?????????????
1 ?? 2 ?? 3 ??? 4 ?? 5 ??
13 ??
OPT ???? ??
00010
00020 HTTP Admin server CUSTOMER
configuration 00030
00040 DefaultFsCCSID
5026
00050 DefaultNetCCSID 943
00060
ScriptTimeOut 3600 minutes
00070 OutputTimeOut
3600 minutes
00080 InputTimeOut 3600 minutes
?? F3 ?? F5 ???? F6 ??????
F12 ??? F17 ??? F18 ??? F19 ?????
???5????????????????(??????????????????) ????/???
???????????????????????
32- ???HTTP?????????
- ???HTTP???????????????????????
- WRKACTJOB SBS(QHTTPSVR)
- ???HTTP??????????1??
- ???HTTP???????????(???????)????????????HTTP?????1
?????????
???????? S65FF18A
01/11/15 214209 CPU .0 ????
000000 ?????? 243
??????????,?????????????
2 ?? 3 ??
4 ?? 5 ?? 6 ?? 7?????? ???
8?????????? ??? 13 ?? ...
OPT ???????/????? ????? ???? CPU
?? ?? QHTTPSVR
QSYS SBS .0 DEQW
ADMIN QTMHHTTP BCH
.0 PGM-QZHBHTTP CNDW
ADMIN QTMHHTTP BCI .0
TIMW ADMIN
QTMHHTTP BCI .0 TIMW
ADMIN QTMHHTTP BCI
.0 TIMW
ADMIN QTMHHTTP BCI .0
TIMW ?????????????
gt
F3 ?? F5 ???? F7 ??
F10 ?????? F11 ??
???? ??? F12 ??? F23?????? ??? F24??
???
333-3.?HTTP????????????
- ?HTTP????????????????
- HTTP?????????????2????????
- ?????????????????
- ??????????????????????
- ??????????????????????????
- 5250???????
- ????(????????????)????????
- ???????/????????????????????
34- ???????????
- ???????????QUSRSYS??????????
- ?????????????????????????????????QUSRSYS/??????QA
TMHINSTC,QATMHTTPC????????? - ?????????(??????)?????????????????????????????????
ltlt??????gtgt ?????? QUSRSYS/QATMHINSTC
ltltHTTP??????gtgt ?????? QUSRSYS/QATMHTTPC
????????? STRTCPSVR SERVER(HTTP)
HTTPSVR(WEB01)
????
????
CONFIG
WEB01
WEB02
DEFAULT
WEB01
WEB02
HostName mallas04.nagoya.japan.ibm.com
Port 80
DNS-Lookup Off
UserID SERVER
BindSpecific On
DefaultFsCCSID 5035
DefaultNetCCSID 943
Enable GET
Enable HEAD
Enable
POST Protection Protect01
-r /QSYS.LIB/QUSRSYS.LIB/QATMHTTPC.FILE/WEB01.MBR
-AutoStartY
35- ???HTTP??????????
- Web????????URL?????
- http//????2001/
- Basic???????????????????QSECOFR??????????????????
?AS/400??????????????? ????????Top?????? (????????
????????????????????????) ????HTTP???????????IBM
HTTP Server for AS/400???????????
36- ?????????
- ????(?????)?????
- ????(?????)?????????????????????
37?????HTTP??????? ?????? ???????????
????????????? ??????????????
??????????? ?HTTP??????????? ??????????????
?????????? ??????????????? ??????????????
???????????? ???????????? ??????????????
?????????????? ??????????????? ????
?
?
?
?
?
38???????????????? HTTP???????????? ??????? ??????
?????????? ??? ????????????????
?????? ???????????? ???????HTTP????
????????????? ???????HTTP?????
?????? ???????????? ???????????????
?????????????? ??????????????? ???????????
?
?
?
?
?
393-3.?HTTP?????????
HTTP???????????? ???????????????? ???????????
?????HTTP??????? ?????? ??????????? ?????(????
????FQDN) ???? ?????????? ?????????????????
??DNS??????????? ??????????????
??????????????? ??????????(????
???)?????? ????????????(????)
?
?
?
?
?
?
40?????????????? ???????URL??????? ?????????? (??
?http//www.ibm.com/??) ????????????????? ???????
??????????? ??????????????? ?????????????????
??????????????? ???index.html?default.html ?
welcome.html??????? ???????
?
?
?
41???????????????? ??????Web??????HTTP ???????????
????? ??????HTML??????? ??????GET???????? ???????
????????? PUT?????????????? ?DELETE????? ????????
????????? ???????????????? ??????????????? ??????
??????????????????? ????????????? ?????????????
????? ????GET?HEAD???? ??CGI????????POST
????????
?
?
?
42????????????? ???????????????U RL???????????(??
? ????)???????????? ????????????? ???????????????
? ???????Pass???? ?URL?????????????
????URL?????? ???????(/)???? ???????????iSerie
s? ???????????? ??,?????????????
???????????????? ???????????????() ?????????
?
?
?
?
???????? -?????? http//www.xxx.co.jp/a.html(????
?) ?????? -????(www.xxx.co.jp)??? ????
/WebDocs/a.html(??? ??)??????
43??????????????? ????????? ???????????? ?????????
???????? ????????????????? ?????? ???????????
? ?????????????? ????????? ??????????????
??????CERN???? ???????????????
??????????????? ?????????????? ????????
DDS???????????? ????????????RPG
?Query?????????
?
?
?
?
44?????????????? ?????????????????
?? ???????????????? ??????????????
????????????? ?????IFS?????????
(????????)??????? DDS????????????
??(????????)???? ???????IFS??/Log??
?????????????? ?????? AccessLog.QCYYMMDD
???????????? C ?? , YY ? MM ? , DD
? ????1?????????? ????????????
?
?
45???????????? ???????????????????????????? ??????
????? ??????? ??? ????????????? ????????????1??
?????????????????? ??????????????????????????
46??????? ?? ???
HostName HTTP???????????????????????????????TCP/IP???????????? ??
Port HTTP????????????????????????TCP/IP???????????????80??????? 80
Enable CGI??????????????????????????? HEAD , GET ?
Disable CGI??????????????????????????? POST , PUT?
Exec ???????????CGI?????????(URL?)????????????????(???????)???????? ??
Map ??????????????(URL?)????????????????(????????????????)???????? ??
Pass ??????????????????URL(????URI)????????????????????????????????????????????????????Map???????????????????????????? ??
DirAccess ????????????????????????????????????????????????? Off
Welcome ???????????????????????????HTML???????????? ??
AlwaysWelcome Welcome????????????????????????????? On
AccessLog ???????????????????????????????? ??
ErrorLog ??????????????? ??
473-3.?HTTP???????/??
???????????HTTP?? ?????/????????? ??????????????
??? ?? ???????????????? ?????? ???/????????
????? ?????????????? ??????/?????? ????52
50???? WRKACTJOB?????????? ???????????????
?
?
?
48HTTP??(CHGHTTPA????)? ????YES????????? ?????????
??????/? ???????????????? ???????????????? ??????
?????
493-4.5250?????????
- 5250?????????
- ???????HTTP????????Web??????????????????????5250??
??????/???????????? - WRKHTTPCFG CFG(HTTP???????)
- ??????????WEB01????????? WRKHTTPCFG CFG(WEB01)
HTTP ?????
???? S65FF18A ??? . . . . . . . . .
. . . . WEB01
??????????,?????????????
1 ?? 2 ?? 3 ??? 4 ?? 5 ??
13 ??
OPT ???? ??
00010 HTTP
CONFIGURATION FILE
00020 Welcome index.html
00030
HostName mallas04.nagoya.japan.ibm.com
00040 BindSpecific
Off
00050 Port 80
00060
UserID SERVER
00070 DNS-Lookup Off
00080 RuleCaseSense Off
00090 Imbeds
Off SSIOnly
00100 AlwaysWelcome On
00110
DirAccess Off
?? ... F3
?? F5 ???? F6 ?????? F12 ??? F17
??? F18 ??? F19 ?????
??????????????????????
HTTP ?????
???? S65FF18A ??? . . . . . . . . .
. . . . WEB01
??????????,?????????????
1 ?? 2 ?? 3 ??? 4 ?? 5 ??
13 ??
OPT ???? ??
00120 Disable CONNECT
00130 Disable DELETE
00140
Disable PUT
00150 Enable GET
00160 Enable HEAD
00170 Enable
OPTIONS
00180 Enable POST
00190
Enable TRACE
00200 Pass /
/WebDocs/
?? F3
?? F5 ???? F6 ?????? F12 ??? F17
??? F18 ??? F19 ?????
??????????????????????
50- ?????????????
- 5250???????????
- HTTP?????????
- CHGHTTPA
- HTTP??????(????????/??)
- WRKHTTPCFG
- HTTP???????/??
- STRTCPSVR SERVER(HTTP) HTTPSVR(???????)
- ENDTCPSVR SERVER(HTTP) HTTPSVR(???????)
- ??????
- ?????HTTP??????QUSRSYS????????????????????????????
??????????????????????
QATMHTTP FILE PF-DTA HTTP SERVER ATTRIBUTES FILE
QATMHINSTA FILE PF-DTA ADMIN INSTANCE FILE
QATMHINSTC FILE PF-DTA HTTP SERVER INSTANCE FILE
QATMHTTPA FILE PF-DTA USER ADMIN CONFIG PHYSICAL FILE
QATMHTTPC FILE PF-DTA HTTP SERVER CONFIGURATION FILE
514.CGI
- CGI??
- HTML?HTTP???????????????????????????????????HTML??
???????????????????????????????????????????
????????????Web??????????????????????????
?????????Web???????????????????????? - ?????Web?????Web??????????????????????CGI(Common
Gateway Interface)??????????CGI?HTTP?????????????
????????????????? - HTML????????????ltformgt????????Web?????????????????
????????????????????HTML??????????????????????????
(CGI)????Web?????????????????????????????????????
????????????????/???????????????????/?????????????
?????????????? - CGI??HTTP?????????????IBM HTTP Server for iSeries
(Original)?CGI??????1.1???????????
52- ???????????????????????????
CGI ?????
- URL??????????HTTP??????????????
- ????????????????
TCP/IP??????
- Web???????????
- HTML??????????????????????
534-1.iSeries?CGI
- iSeries?CGI
- ????/????(??)
- CGI???????UNIX??????????(??)???????????????iSe
ries??C???????????????????????????????????????????
???? - iSeries??CGI??????????????????????????????????????
????API????????????????API????????????????????
??????(??)
???
CGI????? (RPG/COBOL) ????API??? ????API???
HTTP????
????
????
????
????
????
54- (??)
- ????/???????????????????????????(????????????)????
????????????????????C???????????????????????? - ?????????????????????????????????????????????????
??????????????????????????????????????????????????
????????????????????????????????????? - ??????????????????????????????????????????????????
????????????? - iSeries????C?????????????????????????RPG/COBOL????
???????????????????HTTP???????????????API????????
?/???????????????
????
????
??????
??????
554-2.???????????
- ???????
- ???????API??????????????(??????)?????????????????
?????????ILE??????????? - ILE-RPG , ILE-COBOL , ILE-C
- ?????API???????????????3????????
- ???? QtmhGetEnv
- ???? QtmhRdStin
- ???? QtmhWrStout
- EBCIDC??ASCII????????????
- ????????????????????????????CCSID?????????????API
???????????????????????????????????????????????? - ???HTTP???????????????????????????????????????????
???????
56??????(??)
???
HTTP????
CGI?????
CGI????? (RPG,COBOL) CALLB QtmhGetEnv ????QUER
Y_STRING ???????????? ???? ??(HTML)??? CAL
LB QtmhWrStout
IBM??? ????????? QTCP/QTMHCGI
????
???? QtmhGetEnv
???? QtmhRdStin
??? ????API
????
???? QtmhWrStout
57- ????
- HTTP??????????????????????????HTTP????????????????
???????????????????????????????? - ????????????????????HTTP????????????CGI???????????
????????GET???POST?2???????????? - GET????
- ?????????????????????
- ??????????????????????
- POST????
- ?????????????????????
- ?????????????????????????
- ????????????????CGI??????????????????????????????
??????????POST??????????????? - ??????????????????????????????????CGI????????????H
TML????????
58- ????
- ???CGI??????????????????????????????????HTTP?????C
GI??????????????????????CGI??????????????????? - IBM HTTP Server for iSeries (Original)????????????
????????????
???? ?? ?
SERVER_NAME HTTP?????????(IP?????DNS??) www.ibm.com
SERVER_PORT ?????????????? 80
QUERY_STRING ??????(????)??????? CUSTNO01050
REQUEST_METHOD ????????? GET
SCRIPT_NAME ?????CGI????????? /cgi-bin/CGI01.PGM
REMOTE_HOST ?????????????????? xxx.ibm.com
REMODE_ADDR ??????????????IP???? 9.170.143.201
CONTENT_TYPE POST????????????????????????? application/x-www-form-urlencoded
CONTEN_LENGTH ??????(POST???) 12
IBM_CCSID_VALUE ????????CCSID 5035
59- ?????????/?????
- GET?????????
- ????GET???????QUERY_STRING???????????????????????
??????CGI????????????????????????? - ??QUERY_STRING????????????????????????????????????
???????????????????? - ???HTML???TEKIYO????????????????????????123ABCabc?
???? ?????????QUERY_STRING???????????????? - ?????????(???RFC1630,RFC1738????????)
- HTML???????????????????????????????????????????
???????????? - ????????7???ASCII????8???ASCII(SJIS????????????)??
???(??)?????(-/\?)??????????16??????????(triplet
?????)?????? - ????(????)??????????
HTML????????? 123ABCabc?????
????QUERY_STRING TEKIYO123ABCabcB1B2B38ABF
8E9A2B26
60- POST?????????
- ???????POST????HTML?????????????????????????????QU
ERY_STRING???????CGI??????????????CONTENT_LENGTH?
????????????????????????????? - ????
- ??????????????????????GET???????????????POST??????
???????????????????????????????????????????????? - ????????????????????????????????????????????CGI??
??????????????????????????????????????????????
(????????????????) ???iSeries???????????????????
??????(??????????????????????????)?????????????
614-3.CGI??????????HTTP??
- CGI?????????
- CGI????????????HTML??
- HTML????????????????????
62?ltformgtlt/formgt ??????????????
???????HTTP???? ??????? ???????method???
????????action??? CGI?????????????
?????GET???????? ?/cgi-bin???????????
?????CGI01??????? ?????????????? ???ltinputgt
?????????????? ????? (iSeries???????????)
????????type???? ????????????????
????????text????? ?????submit??????
???????reset?????
ltHTMLgt ltHEADgtltTITLEgtWelcome to iSeries CGI
Programlt/TITLEgtlt/HEADgt ltBODY bgcolor"ffffff"gt lt
centergtltH1gtCGI(ILE-RPG)lt/H1gtlt/centergt ltHRgt ltcent
ergtltH2gt?????????lt/H2gtlt/centergt ltFORM
method"GET" action"/cgi-bin/CGI01.PGM"gt
5?????????????????????????ltBRgtltBRgt ltINPUT
TYPE"TEXT" NAME"CUSTNO" SIZE"6" MAXLENGTH"5"
VALUE""gt ltINPUT TYPE"SUBMIT" VALUE"??"gt
ltINPUT TYPE"RESET" VALUE"???"gt lt/FORMgt
ltHRgt lt/BODYgt lt/HTMLgt
?
? ? ?
63- CGI???????????????
- HTTP????????????
- ???????HTML??????????????????????????????iSeries??
???????????????????????? - HTTP??????????????????????????????????
- HTTP?????????????
???????Exec???? ? URL?????????????
????URL?????? ???????(/)???? ???????????iSerie
s? ???????????? ??RPG??????CGI??
??????????????? ???????
?
?
?
64??????????????? ?/cgi-bin????????????? ???????????
????? ??? ???iSeries????????? ??????????????????
?????????????????? ?????????????IFS? ????????????
???? ???? /QSYS.LIB/???????.LIB ???????????????
? ????????????????? ???????????????? ????????????
???????????????? ???????????????? ????????????
Exec /cgi-bin/.pgm /QSYS.LIB/CGI.LIB/
65- CGI??????
- HTTP???????CGI??
- CGI??????OS/400????????(EBCDIC???)????????????????
?????????????EBCDIC?ASCII?????????????????????????
????????????????????????????????????
????????CGI??????? ??CGI????????? ?????(OS/400)?
?CCSID ??????? ?????????5035? ???????(????)??
CCSID ??????? ???Windows????943?
?
?
?
?
66- HTTP??????????
- CGI?????HTTP?????????
Exec?????????????? ?CGI????????? DefaultFsCCSID??
?????? ??DefaultNetCCSID?????? ????EBCDIC?ASCII???
? ?????
674-4.CGI????????
- iSeries????CGI????????
- ILE-RPG???CGI?????
- ??????????
- ????API???????????????????????????????CCSID??????
???????? - CRTSRCPF FILE(CGILIB/QRPGLESRC) RCDLEN(112)
IGCDTA(YES) CCSID(5035) - SEU????????????????Y???????????N????????SEU??????
??F13???????????????? - ?????????
- 5250????????????????????????
- ???????????939?
- ??????????????????????????
- CHGJOB CCSID(5305)
68- CGI??????????
- ?????????????
- CGI????????????????????????QTMHHTP1?????????(????
????????)? - ?????????
- CGI???????????????????(???F??????????????????????
????)????????????????????HTTP????????????????????
???????????????????????CGI????????????????????????
- ????? QUSRLIBL ???????
- CGI????????????????QTMHHTP1?????????????????????
???????? - CGI????????QCMDEXC??????????????????????(?????????
?OVRDBF????) - ??????
- CGI????????????????????????QTMHHTP1??????????????
?????????????????????????????????????????
69- CGI????????????
- ??????
- ???????API????????????
- ??????????????????????
- ???????????
- CRTRPGMOD MODULE(CGILIB/xxx)
SRCFILE(CGILIB/QRPGLESRC) SRCMBR(MODULE)
DBGVIEW(ALL) (DBGVIEW????????????????) - ????????????????????????????????????
- ???????????QTCP/QTMHCGI?
- CRTPGM PGM(CGILIB/xxx) MODULE(PGM)
BNDSRVPGM(QTCP/QTMHCGI)
ILE-RPG?????
PGM xxx
ILE-RPG???
ILE-RPG?????
MODULE xxx CALLB QtmhRdStin CALLB QtmhWrStout
QtmhGetEnv
QtmhRdStin
QtmhWrStout
QtmhCvtDb
MODULE xxx
????? xxx
????? CRTRPGMOD
???? CRTPGM
QhtmGetEnv
SRVPGM QtmhRdStin
QTMHCGI QtmhWrStout
QtmhCvtDb
70- CGI??????????
- ??????
- CGI???????????????HTTP????????????????????????????
?????????????????????????????????????????? - TCP/IP????????????????
- OS/400?????????????????
- ????????????????
- HTTP??????????????QHTTPSVR?????????DEQW??????CGI??
????????????????????????????????CGI???????????????
??????CHGHTTPA??????????NBRSVR(2
2)????????1?????????????? - ??????????????/????(QTMHHTTP)/???????????????????
????????????????????????? - STRSRVJOB JOB(?????/????/????)
- STRDBG
- STRDBG??????????????????DBGVIEW(ALL)?????????????
?????????????????????????????????? - ???(????????)??????????
- ??????????ENDDBG,ENDSRVJOB???????????
714-5.CGI?????????
- CGI??????????
- ??????????CGI???????????????????????????
- ?????????????????????
- ?????????????5??????????
- ?????????????????????????(CHAIN??)
- ???HTML???????????????
- ????????????GET????????????
CGI????? CGILIB/CGI01
HTTP????
IBM??? ????????? QTCP/QTMHCGI
CGI????? CGILIB/CGI01 CALLB QtmhGetEnv ????QUE
RY_STRING ???????????? ???? ??(HTML)???
CALLB QtmhWrStout
???? QtmhGetEnv
???? QtmhRdStin
??? ????API
???? QtmhWrStout
72?????????
???????
73- ????HTML
- ??????(ltformgtlt/formgt)???
?ltformgtlt/formgt ?????????? -methodGET
-actionCGI?????? ?????GET????????
?/cgi-bin??????????? ?????CGI01???????
?????????????? ????HTTP???????
??????CGILIB?????? ?????????? ???ltinputgt
???????????????? -???????????? -??????
-???????????
ltHTMLgt ltHEADgtltTITLEgtWelcome to iSeries CGI
Programlt/TITLEgtlt/HEADgt ltBODY bgcolor"ffffff"gt lt
centergtltH1gtCGI(ILE-RPG)lt/H1gtlt/centergt ltHRgt ltcent
ergtltH2gt?????????lt/H2gtlt/centergt ltFORM
method"GET" action"/cgi-bin/CGI01.PGM"gt
5?????????????????????????ltBRgtltBRgt ltINPUT
TYPE"TEXT" NAME"CUSTNO" SIZE"6" MAXLENGTH"5"
VALUE""gt ltINPUT TYPE"SUBMIT" VALUE"??"gt
ltINPUT TYPE"RESET" VALUE"???"gt lt/FORMgt
ltHRgt lt/BODYgt lt/HTMLgt
?
? ? ?
74 FTOKMSP IF E K DISK ?D ??????
API QtmhGetEnv ?????? DENBUFF S
2048A INZ DENBUFFLN S
9B 0 INZ(2048) DENACTLN S
9B 0 DENVARNAME S 20A
INZ('QUERY_STRING') DENVARLN S
9B 0 INZ(12) ?D ?????? API 'QtmhWrStout'
?????? DOUT S 2048A
INZ DOUTLN S 9B 0
INZ(2048) D ???????? ?DHTML S
80 DIM(14) PERRCD(1) CTDATA
???????????APIQtmhGetEnv????????? -ENBUFF
?????????????????(?????) -ENBUFFLN ?????????
-ENDACTLN ??????????????? -ENVARNAME
??????????? -ENVARLN ????????????
?????????????QUERY_STRING?????????????????????
-ENVARNAME QUERY_STRING -ENVARLN 12
(QUERY_STRING?????) ?????????APIQtmhWrStout??
??????? -OUT