Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 8117
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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us