-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostwebservice.rpgle
More file actions
30 lines (26 loc) · 1.05 KB
/
postwebservice.rpgle
File metadata and controls
30 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SOURCE CODE:
H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('QC2LE':'YASH/YASHWANT')
*---------Procedure declaration for write data on web-----------*
Dwritetoweb pr extproc('QtmhWrStout')
D Datavar 65535A Options(*varsize)
D Datavarlen 10I 0 const
D Errorcode 8000A Options(*Varsize)
*-------Error data structure used as a parameter for errcode----*
DErrDs ds qualified
D BytesProv 10I 0 Inz(0)
D BytesAvail 10I 0 Inz(0)
*
D CRLF C x'0d25'
D DATA S 5000A
*--------------Main Program---------------*
/Free
// setting up header
DATA = 'Content-type: Text/html' + CRLF + CRLF ;
writetoweb(DATA: %len(%trim(DATA)): ErrDs);
DATA = 'This data will written on web'+ CRLF;
writetoweb(DATA: %len(%trim(DATA)): ErrDs);
DATA = 'Hey Yashwant, Welcome to the web services';
writetoweb(DATA: %len(%trim(DATA)): ErrDs);
*Inlr = *On;
Return;
/End-Free