Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
UTF-8 not valid encoding format in XML GENERATOR

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
naveenkumars

New User


Joined: 17 Jun 2010
Posts: 3
Location: India

PostPosted: Thu Mar 01, 2012 8:42 pm    Post subject: UTF-8 not valid encoding format in XML GENERATOR
Reply with quote

Hi,

Can anyone please help me with below issue. How can I set encoding format as UTF-8?

XML GENERATE XMLBuffer FROM DataSet COUNT IN NumOfChars
S ""UTF-8"" was found as an "ENCODING" phrase operand, but it was not
a valid encoding. The statement was discarded.
WITH Encoding "UTF-8"
WITH XML-Declaration
WITH ATTRIBUTES.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 01, 2012 11:02 pm    Post subject:
Reply with quote

The manual tells you much -- if you read it. For example, in the COBOL Language Reference manual on the XML GENERATE statement:
Quote:
ENCODING phrase
The ENCODING phrase, if specified, determines the encoding of the generated XML document.

codepage
Must be an unsigned integer data item or unsigned integer literal and must represent a valid coded character set identifier (CCSID). Must identify one of the code pages supported for COBOL XML processing as described in The encoding of XML documents (Enterprise COBOL Programming Guide).
If identifier-1 references a data item of category national, codepage must specify 1200, the CCSID for Unicode UTF-16.

If identifier-1 references a data item of category alphanumeric, codepage must specify 1208 or the CCSID of a supported EBCDIC code page as listed in The encoding of XML documents (Enterprise COBOL Programming Guide).

If codepage is an identifier, it must not overlap identifier-1 or identifier-3.


and from the Programming Guide for the cited reference above:
Quote:
Table 71. Coded character sets for XML documents

CCSID
Description

1208
UTF-8(1)

1047
Latin 1 / Open Systems

1140, 37
USA, Canada, . . . Euro Country Extended Code Page (ECECP), Country Extended Code Page (CECP)

1141, 273
Austria, Germany ECECP, CECP

1142, 277
Denmark, Norway ECECP, CECP

1143, 278
Finland, Sweden ECECP, CECP

1144, 280
Italy ECECP, CECP

1145, 284
Spain, Latin America (Spanish) ECECP, CECP

1146, 285
UK ECECP, CECP

1147, 297
France ECECP, CECP

1148, 500
International ECECP, CECP

1149, 871
Iceland ECECP, CECP

| 1. Supported for the XML PARSE statement in the ENCODING phrase if | XMLPARSE(XMLSS) is in effect

In other words, the encoding is an integer, not a text literal as you put it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us