Re: stdin and IFS

Toni Schaake <[email protected]> Wed, 9 Nov 2022 14:51:28 +0000
Newsgroups gmane.comp.systems.as400.web
Message-ID <JNAP275MB12437B4BDDDB00093C3BC8FEA13E9@JNAP275MB1243.ZAFP275.PROD.OUTLOOK.COM>
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: [email protected]

This e-mail is subject to a disclaimer which may be read here.

-----Original Message-----
From: WEB400 <[email protected]> On Behalf Of Dave
Sent: Wednesday, 09 November 2022 16:31
To: Web Enabling the IBM i (AS/400 and iSeries) <[email protected]>
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: [email protected] To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/web400.

-- 
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.