Value-String.xml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="STRING">
  5. <title>STRING</title>
  6. <para><emphasis
  7. role="bold">[</emphasis><emphasis>StringType</emphasis><emphasis
  8. role="bold">] STRING<indexterm>
  9. <primary>STRING</primary>
  10. </indexterm>[</emphasis><emphasis>n</emphasis><emphasis
  11. role="bold">]</emphasis></para>
  12. <para>A character string of <emphasis>n</emphasis> bytes, space padded (not
  13. null-terminated). If <emphasis>n </emphasis>is omitted, the string is
  14. variable length to the size needed to contain the result of the cast or
  15. passed parameter. You may use set indexing into any string to parse out a
  16. substring<indexterm>
  17. <primary>STRING value type</primary>
  18. </indexterm>.</para>
  19. <para>The optional <emphasis>StringType</emphasis> may specify ASCII or
  20. EBCDIC. If the <emphasis>StringType</emphasis> is missing, the data is in
  21. ASCII format. Defining an EBCDIC STRING Attribute as a string constant value
  22. implies an ASCII to EBCDIC conversion. However, defining an EBCDIC STRING
  23. Attribute as a hexadecimal string constant value implies no conversion, as
  24. the programmer is assumed to have supplied the correct hexadecimal EBCDIC
  25. value.</para>
  26. <para>Example:</para>
  27. <programlisting>STRING1 MyString := IF(SomeAttribute &gt; 10,'1','0');
  28. // declares MyString a 1-byte ASCII string
  29. EBCDIC STRING3 MyString1 := 'ABC';
  30. //implicit ASCII to EBCDIC conversion
  31. EBCDIC STRING3 MyString2 := x'616263';
  32. //NO conversion here</programlisting>
  33. <para>See Also: <link linkend="LENGTH">LENGTH</link>, <link
  34. linkend="TRIM">TRIM</link>, <link linkend="Set_Ordering_and_Indexing">Set
  35. Ordering and Indexing</link>, <link linkend="String">Hexadecimal
  36. String</link></para>
  37. </sect1>