Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

String descriptors

In a string descriptor, the first 2 bytes specify the maximum length for the string. This maximum length is always held in native format.

The third byte contains various flags (to indicate, for example, if the string length in a VARYING string is held in littleendian or bigendian format or if the data in a WIDECHAR string is held in littleendian or bigendian format).

In a string descriptor for a nonvarying bit string, the fourth byte gives the bit offset.

In a string descriptor for a CHARACTER string, the fourth byte encodes the compiler CODEPAGE option.

The declare for a string descriptor is:

declare
  1 dso_string based( null() ),
    2 dso_string_length          fixed bin(15),
    2 dso_string_flags,
      3 dso_string_is_varying           bit(1),
      3 dso_string_is_varyingz          bit(1),
      3 dso_string_has_nonnative_len    bit(1), /* for varying     */
      3 dso_string_is_ascii             bit(1), /* for char        */
      3 dso_string_has_nonnative_data   bit(1), /* for wchar       */
      3 *                               bit(1), /* reserved, '0'b  */
      3 *                               bit(1), /* reserved, '0'b  */
      3 *                               bit(1), /* reserved, '0'b  */
    2 * union,
      3 dso_String_Codepage      ordinal ccs_Codepage_Enum,
      3 dso_string_bitofs        fixed bin(8) unsigned,
    2 dso_string_end     char(0);

The possible values for the codepage encoding are defined via:

define ordinal
  ccs_Codepage_Enum
    ( ccs_Codepage_01047  value(1)
     ,ccs_Codepage_01140
     ,ccs_Codepage_01141
     ,ccs_Codepage_01142
     ,ccs_Codepage_01143
     ,ccs_Codepage_01144
     ,ccs_Codepage_01145
     ,ccs_Codepage_01146
     ,ccs_Codepage_01147
     ,ccs_Codepage_01148
     ,ccs_Codepage_01149
     ,ccs_Codepage_00819
     ,ccs_Codepage_00813
     ,ccs_Codepage_00920
     ,ccs_Codepage_00037
     ,ccs_Codepage_00273
     ,ccs_Codepage_00277
     ,ccs_Codepage_00278
     ,ccs_Codepage_00280
     ,ccs_Codepage_00284
     ,ccs_Codepage_00285
     ,ccs_Codepage_00297
     ,ccs_Codepage_00500
     ,ccs_Codepage_00871
     ,ccs_Codepage_01026
     ,ccs_Codepage_01155
    ) unsigned prec(8);

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)