IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

XML Generate - compilation error


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Thu May 14, 2009 10:06 am
Reply with quote

Hi everyone,

I am able to run below instruction.

XML GENERATE WS-BUFFER-ONE FROM TRANSACTION
COUNT IN WS-XML-COUNT

but when I am coding with encoding ....it's giving me compilation error.

What does it mean to me?

Does it have any issue with COBOl version I am using?

XML GENERATE WS-BUFFER-ONE FROM TRANSACTION
COUNT IN WS-XML-COUNT
WITH ENCODING 1208
WITH XML-DECLARATION
END-XML
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 14, 2009 11:46 am
Reply with quote

Hello,

Suggest you post the compilation error - including the message id(s).
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Thu May 14, 2009 12:19 pm
Reply with quote

Plx find the error massage.

XML GENERATE WS-BUFFER-ONE FROM TRANSACTION
COUNT IN WS-XML-COUNT
WITH ENCODING 1208

IGYPS2072-S "WITH" was invalid. Skipped to the next verb, period or procedure-name

definition.

WITH XML-DECLARATION
END-XML
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu May 14, 2009 3:11 pm
Reply with quote

Hi,

From the manuals

Quote:
To transform COBOL data to XML, use the XML GENERATE statement as in the example below.

XML GENERATE XML-OUTPUT FROM SOURCE-REC
COUNT IN XML-CHAR-COUNT
ON EXCEPTION
DISPLAY 'XML generation error ' XML-CODE
STOP RUN
NOT ON EXCEPTION
DISPLAY 'XML document was successfully generated.'
END-XML



I have always used this SYNTAX and it works. I seriously doubt whether "WITH" can be used.
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Thu May 14, 2009 3:22 pm
Reply with quote

This syntax will not include version and encoding information in my XML output.(<?xml version="1.0" encoding="utf-8" standalone="yes"?>)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu May 14, 2009 5:19 pm
Reply with quote

Post in BBcode format the actual compiler output. Also post the definition for TRANSACTION.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top