Full name
David Dow
Submitted by David on Fri, 03/25/2011 - 14:20
Forums

Hi,

I'm trying to use the ILOB_Replace() function to update an ILOB loaded from an XML file in the IFS.  The file will then be sent with the ILOB_HttpRequest() function.

I've been unable to get is working, all that is output is the unchanged original XML.

I've attached my sample code and XML file if someone can assist.

Many thanks,

David.

Bent Rønne

Mon, 03/28/2011 - 15:15

Hi David!

The problem is that your server job and your XML file runs with deferent codepage. This means that the constant you are searching for will not be found. The XML file is in ASCII and your program is running in EBCDIC.

You can make a simple change in your program to fix your problem simply by using a IceBreak function called XlateStr(). The function takes three parameters:

  1. input string (Varying, max 32k)
  2. from CCSID (0=>Current job) (number)
  3. to CCSID  (0=> Current job) (number)

The function returns the converted string from the input string with same attributes.

So all you have to do is to change your program in the function call to ILOB_Replace like:

ILOB_Replace( wP_reqDATA
   : XlateStr('##CLASS##': 0: 1252)
   : XlateStr(wÆ_Class: 0: 1252)
  );
  ILOB_Replace( wP_reqDATA
    : XlateStr('##CORR_ID##': 0 :1252)
   : XlateStr(wÆ_Corr_ID: 0 : 1252)
 );

I hope this will help you

Regards

Bent Ronne

SMTP Error: Could not authenticate.