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

RE: Post XML data & expecting XML file in return



Thanks Mike, I'll give it a shot.



Worth Holmes
IT Application Dev Lead

Kemper Services Group
8360 LBJ Freeway, Suite 400, Dallas, TX 75243
972.690.5500 x1656 / 817.938.3889 Cell
903.561.1838 Fax
wholmes1@xxxxxxxxxx
kemper.com

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike Krebs
Sent: Monday, August 13, 2012 5:55 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: Post XML data & expecting XML file in return

>String in this instance is 1341 bytes.
What I was hinting at is the declared size. The +2 is not the best practice for finding the data portion of STRING since IBM gave us:
%ADDR(varying-length variable : *DATA)

>Attached is the XML document after I wrote the input XMLSTRING to a data file, and then did a CVTTOPCD to the XML file. Below is a screen shot of STMTIN.XML, showing the 'SUB'.  When I remove it, the error message is removed, and the file is valid.

Well, there you probably found your problem. When I saved it on my system, the hex editor I used revealed

3C 2F 50 4F 53 3E 0D 0A 1A
<  /  P  O  S  >  .  .  .

The extra characters are CR, LF, SUB.

They shouldn't be there. If I interpreted correctly, you are saving a file on the IFS, modifying it, copying it using CVTTOPCD (home grown command?), reading that file into STRING and then using that to send the data? Something in that string is appending the rogue data. Chop it off and maybe you are good to go? As a test maybe something like this?

StrLen = %Len(String) - 3;






-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

CONFIDENTIALITY NOTICE: This communication may contain confidential information intended only for the addressee(s). If you received this communication in error, please notify the sender and delete it from your system.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------