Hi Dave,
This has worked for me in the past: (maybe there is a more elegant way of doing this - this code is quite old)
APIStdIn(CgiBuffer:CgiBufLen:CgiRspLen:CgiError);
If %SubSt(Cgibuffer:1:2) = '??';
CgiBuffer = xlatwCCSIDs('0':%TrimR(CgiBuffer):819:37);
EndIf;
inString = %Trim(CgiBuffer);
FileHandle = open(%Trim(w_outFileName):flags:mode: 819);
Dataline = %Trim(inString);
TrimLine = %TrimR(Dataline) + CrLf;
callp write(FileHandle:%Addr(TrimLine):%Len(%TrimR(TrimLine)));
Callp close(FileHandle);
Best Regards,
Toni Schaake - Senior Analyst Developer
Mediscor PBM (Pty) Limited Reg. No 2005/012049/07
Baobab Building
River Falls Office Park
Rose Avenue Centurion 0157
PO Box 8796 Centurion 0046
South Africa
Tel: +27 12 6748058
Web-site: www.mediscor.co.za email: Toni.Schaake@xxxxxxxxxxxxxx
This e-mail is subject to a disclaimer which may be read here.
-----Original Message-----
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Dave
Sent: Wednesday, 09 November 2022 16:31
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx>
Subject: [WEB400] stdin and IFS
Hi,
Discovering rather late in life XML-INTO for RPG, and reading it from a file already saved on the IFS.
How can I create my IFS file from the xml data sent in stdin via http? I'm on V7R1.
Thanks!
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx Before posting, please take a moment to review the archives at
https://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.