skip to main content

Data Division : Data Description : IS IDENTIFIED clause

IS IDENTIFIED clause
The IS IDENTIFIED clause specifies that a data item belongs to an XML structure, a JSON structure or HTTP parameters.
XML structures represent XML streams or XML files.
JSON structures represent JSON streams.
HTTP parameters are used to exchange information between a COBOL program and a HTTP client in the EIS environment.
Please refer to the XMLStream Class (com.iscobol.rts.XMLStream) documentation for details about how to handle XML streams or XML files. Refer to JSONStream Class (com.iscobol.rts.JSONStream) documentation for details about how to handle JSON streams. Refer to isCOBOL Evolve: EIS for details about HTTP parameters.
General format
  IS IDENTIFIED { BY    } Xml-Field [IS { ATTRIBUTE   }] 
                { USING }               { ELEMENT RAW }
  [ NAMESPACE IS NameSpace-Data ]
  [ COUNT IN Count-Item ]
Syntax rules
1.
Xml-Field is a Nonnumeric Literal, as defined in the Definitions section in the Preface of this document.
2.
NameSpace-Data is a Nonnumeric Literal or Data Item as defined in the Definitions section in the Preface of this document.
3.
Count-Item is a Numeric Data Item as defined in the Definitions section in the Preface of this document.
General rules
1.
If the IS IDENTIFIED clause is specified for a subordinate item, the IS IDENTIFIED clause must be specified in the first entry of the record description the item belongs to.
2.
When the IS ATTRIBUTE phrase is not specified,
a.
the data item identifies a field in the XML structure and Xml-Field represents the name of the field;
b.
the PICTURE clause cannot be specified, the value of the field in the stream of the file will be the content of subordinate data items;
c.
subordinate items cannot have the IS IDENTIFIED phrase specified, unless the IS ATTRIBUTE phrase is specified.
3.
When the IS ATTRIBUTE phrase is specified,
a.
the data item must be a subordinate item of an item for which the IS IDENTIFIED clause without the IS ATTRIBUTE phrase is specified;
b.
c.
if the PICTURE clause is specified, the value of the attribute will be the content of the data item;
d.
if the PICTURE clause is not specified, the value of the attribute will be the content of the subordinate data items.
4.
The RAW clause causes that special XML characters are not escaped. This allows to write everything in a tag, even new XML tags.
5.
The NAMESPACE clause specifies the value of the xmlns attribute of the field. The namespace URL must be provided. For example, the following XML element:
<MyElement xmlns:p="http://www.awebsite.com/app/elements/v1.0">
is described as follows in the COBOL program:
01 MyElement identified by "MyElement"
namespace "http://www.awebsite.com/app/elements/v1.0".
6.
7.
Count-Item is not updated automatically and is evaluated by the classes that handle XML documents.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left