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

Re: http_parse_xml_stmf issue



   Trailing blanks shouldnt be an issue, right? my xml name was
   "testfile.xml        "
   Thanks,
   Musthafa

   On Tue, Jan 5, 2010 at 6:06 PM, Mike Krebs
   <[1]mkrebs@xxxxxxxxxxxxxxxxxx> wrote:

     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: [2]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:[3]ftpapi-
   > [4]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
   > <[5]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:
   > > > [6]http://www.scottklement.com/mailman/listinfo/ftpapi
   > > >
   -------------------------------------------------------------------
   > ----
   > >
   ---------------------------------------------------------------------
   > --
   > > This is the FTPAPI mailing list.  To unsubscribe, please go to:
   > > [7]http://www.scottklement.com/mailman/listinfo/ftpapi
   > >
   ---------------------------------------------------------------------
   > --
   > >
   >
   >
   >
   > --
   > Thanks,
   > Musthafa
   ----------------------------------------------------------------------
   -
   This is the FTPAPI mailing list.  To unsubscribe, please go to:
   [8]http://www.scottklement.com/mailman/listinfo/ftpapi
   ----------------------------------------------------------------------
   -

   --
   Thanks,
   Musthafa

References

   1. mailto:mkrebs@xxxxxxxxxxxxxxxxxx
   2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   3. mailto:ftpapi-
   4. mailto:bounces@xxxxxxxxxxxxxxxxxxxxxx
   5. mailto:thomas.raddatz@xxxxxxxxxxx
   6. http://www.scottklement.com/mailman/listinfo/ftpapi
   7. http://www.scottklement.com/mailman/listinfo/ftpapi
   8. 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
-----------------------------------------------------------------------