[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: http_parse_xml_stmf issue



Spaces are valid characters in filenames in most of the IFS. That is why they are significant. Most GUIs will remove trailing spaces, but command line will sometimes let you put them in. Makes it hard to get rid of them when you can't "see" what they really are.

If this was a QSYS file name, the name would be invalid.

Mike Krebs

> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mohamed Musthafa Safarulla
> Sent: Tuesday, January 05, 2010 4:50 PM
> To: HTTPAPI and FTPAPI Projects
> Subject: Re: http_parse_xml_stmf issue
> 
> Yeah. Thanks for your time Thomaz. That is the issue.
> 
> But was wondering spaces should not be an issue.
> 
> Thanks,
> Musthafa
> 
> On Tue, Jan 5, 2010 at 1:00 PM, Thomas Raddatz
> <thomas.raddatz@xxxxxxxxxxx>wrote:
> 
> > Musthafa,
> >
> > You did not tell us the type of 'FileParm'. However I strongly assume
> that
> > it is a string variable
> > longer than 12 bytes and without the VARYING keyword.
> >
> > I case that 'FileParm' has been defined as 20A your file name is not
> > 'TestFile.xml' but 'TestFile.xml
> >       ________' where the underscores are BLANKS.
> http_parse_xml_stmf()
> > does not trim the file name
> > (peFile) but directly passes it to open(peFile: ...).
> >
> > You may either use the trim() built-in to fix the problem (which is
> what
> > you are already doing) or
> > define 'FileParm' as:
> >
> >      D  peFile         S           nnnnA   varying
> >
> > Replace 'nnnn' with a length of your choice.
> >
> > Thomas.
> >
> > Mohamed Musthafa Safarulla schrieb:
> > >    I am trying to parse an XML file using http_parse_xml_stmf.
> > >    When the FileParm parameter is populated as
> > >    FileParm = 'TestFile.xml'
> > >    filename = '/tmp/MG/incoming/' + FileParm it was not working.
> > >    filename = %trim('/tmp/MG/incoming/' + FileParm) it is working.
> Am i
> > >    missing anything?
> > >    Just using the example18.
> > >    --
> > >    Thanks,
> > >    Musthafa
> > >
> > >
> > >
> > > -------------------------------------------------------------------
> -----
> > >
> > > -------------------------------------------------------------------
> ----
> > > This is the FTPAPI mailing list.  To unsubscribe, please go to:
> > > http://www.scottklement.com/mailman/listinfo/ftpapi
> > > -------------------------------------------------------------------
> ----
> > ---------------------------------------------------------------------
> --
> > This is the FTPAPI mailing list.  To unsubscribe, please go to:
> > http://www.scottklement.com/mailman/listinfo/ftpapi
> > ---------------------------------------------------------------------
> --
> >
> 
> 
> 
> --
> Thanks,
> Musthafa
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------