cancel
Showing results for 
Search instead for 
Did you mean: 

Premature end of file error

Former Member
0 Kudos

Hi,

I have one transaction configured with one pco query, which returns 5 column one row.

After executing the trx I could see the results properly in tracer but when assign the same pco query results to outputxml (xml type) variable

and execute with xacute query it returns "Premature end of file error for default XML datatypes" error.

After going through scn I came to know that if we assign xml variable with welformed xml then issue would be resolved.

So assigned the xml structure to outputxml variable then error disappeared but it is giving result as empty.

I have assigned below code to xml variable.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<Rowsets>

<Rowset>

<Row>

</Row>

</Rowset>

</Rowsets>

But  when I have created one simple TRX with pcoquery which return only 2 column  1 row , and assigned pcoresults to outputxml .Then it is giving proper results  with Xacute query.

I am using 14.3 build 24.

Pls help me to  resolve this issue .

Regards,

Rakesh.

Accepted Solutions (0)

Answers (2)

Answers (2)

saumya_govil
Active Contributor
0 Kudos

Hi Rakesh,

Your research is correct. This error comes when the we write an XML in the transaction and it is not correctly written.

The suggestion by Rohit should ideally work fine.

Please check if the output parameter that needs to contain the Query result is of type XML. Also, not sure if you directly assign the result in the output parameter or loop through it in the transaction and only assign selected results?

1. If direct assign, then assign the output parameter to the result using 'Assign XML' selection in assignment block.

2. Else, you can also create an MII XML Output Document using the custom action and append Rows to it.

3. For manual appends, I would suggest to change the output parameter to:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<Rowsets>

<Rowset>

<Row/>

</Rowset>

</Rowsets>

Hope this helps!

Regards,

Saumya Govil

Former Member
0 Kudos

Hi Rakesh,

I tried the mentioned scenario on on MII 14.0 SP4 Patch 0 and it worked fine.

Following are the steps which I performed:

1. created a PCo Query with 5 cols and 1 row(TagRetrieve Query with Current View and 5 Tags).

2. created a transaction with an output parameter of type xml and assigned the PCo query result to the output param.

3. create an Xacute query and used the above transaction.

You are on SP3. Try upgrading the system to SP4.

Regards,

Rohit Negi.