Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

LMS-specific application of extended character sets

LMS supports the use of special (national) character sets, so each member can be assigned a character set through allocation of a coded character set name (CCSN). This is passed on to interfaces and taken into account in outputs.

If XHCS is not offered at the relevant interface, the default “no code” is always used.

To also enable selection via wildcards in the MODIFY-ELEMENT-ATTRIBUTES and SHOW-ELEMENT-ATTRIBUTES statements, the overlaying of “name” with <filename 1..20 without-cat-id-user-id-generation-version with-wildcards> is offered.

LMS itself does not require a specific character set and does not evaluate the default setting of the user ID. Internal LMS sort processes, e.g. of the member designations, take place independently of the selected CCS.

A character set can be assigned to every member in a PLAM library, and LMS always transfers the source member’s CCSN to the target member. The CCSN is a descriptive attribute and is output together with the directory.

As of PLAM V3.4A the CCSN of newly created elements will be derived from the CCSN of the library file unless the program creating the element doesn't specify a value of its own.

Setting CCSNs implicitly

CCSNs are set implicitly during the processing of members in the following cases:

  • Adding members with ADD-ELEMENT
    If a member is added using the LMS statement ADD-ELEMENT, the catalog attribute CCS for the member is also transferred. However, the CCSN is not stored in the attribute record (record type 164) to avoid inconsistencies. The layout of record type 164 is described in the “LMS Subroutine Interface” manual [1 (Related publications)].

    If a module from the EAM file is added using ADD-ELEMENT, it receives the “no code” attribute.

  • Adding members from SYSDTA
    If a member from the system file SYSDTA is added, the selected character set is determined, and the name of that character set is assigned to the member as an attribute.

  • Processing members with EDT
    Extended character sets are supported by EDT. When calling EDT, LMS passes the CCSN of the relevant member to EDT and then writes the member back with the value selected in EDT. If the input member is not specified, “no code” will be assumed as the input CCSN.

    With EDT V17.0 the CCSN of an element newly created with EDIT-ELEMENT is the value determined by /MODIFY-TERMINAL-OPTIONS.

    With EDT V16.6B this behaviour can be achieved by using the optional Rep A0538001. Without this Rep the value of the CCSN is *NONE.

    Elements with ISO character set can't be extracted as ISAM files with EBCDIC ISAM keys.

  • Copying members
    When members are copied with the LMS statement COPY-ELEMENT, LMS always assigns the CCSN of the source member to the target member.

  • Storing members with WRITE-MODE=*EXTEND
    If a member is written back with WRITE-MODE=*EXTEND, LMS checks the CCSNs of the source and the target. If they do not match, processing is aborted and error message LMS0277 is issued.

Setting CCSNs explicitly

To set a CCSN explicitly, use the LMS statement MODIFY-ELEMENT-ATTRIBUTES. LMS does not check whether the specified CCSN is authorized in the system.

Note
For SAM node files, the net coded character set name (NETCCSN) may be stored as a file attribute with the element. It is possible to change CCSN using the statement MODIFY-ELEMENT-ATTRIBUTES, but it is not possible to modify NETCCSN in a member. That means that after changing CCSN and extracting a member the processing of the resulting SAM node file might be rejected if ONETSTOR is not able to perform the desired code conversion. In this case, suitable character sets should be set using the command MODIFY-FILE-ATTRIBUTES.

Logging CCSNs

The LMS statement SHOW-ELEMENT-ATTRIBUTES with the operand
INFORMATION=*MAXIMUM outputs the assignment of character sets to the members. In the case of members having the “no code” CCSN, this attribute is not displayed in the directory.

Example

The character set EDF03IRV is assigned to the TEST member by the LMS statement MODIFY-ELEMENT-ATTRIBUTES and is stored under the new name TEST1. The member attributes are then output with SHOW-ELEMENT-ATTRIBUTES.

//MOD-ELEM-ATTR (LIB=TESTLIB,ELEM=TEST,TYPE=S), -
//              NEW-ATT=PAR(ELEM=TEST1;CODED-CHAR-SET=EDF03IRV)
OUTPUT LIBRARY= :X:$USERID.TESTLIB
        MODIFY (S)TEST/001(001)2012-06-22 AS (S)TEST1/001(0001)/2012-06-22
//SHOW-ELEM-ATTR (ELEM=TEST1),INFORMATION=*MAXIMUM
INPUT  LIBRARY= :X:$USERID.TESTLIB
TYPE       = S
NAME       = TEST1
VERSION    = 001                                  VARIANT    = 0001
USER-DATE  = 2012-06-22   CRE-DATE   = 2012-06-24 MOD-DATE   = 2012-06-24
USER-TIME  =   13:07:37   CRE-TIME   =   14:38:12 MOD-TIME   =   14:41:40
STORAGE    = FULL         COD-CH-SET = EDF03IRV
STATE      = FREE
ELEM-SIZE  = 1
       1 (S)-ELEMENT(S) IN THIS TABLE OF CONTENTS 

Evaluating and transferring CCSNs

The CCSN is evaluated when members are output.

  • Outputting members to file
    The file is given the CCSN of the member.

  • Outputting members to SYSOUT
    When member records are output to SYSOUT (also in edited form) by means of the SHOW-ELEMENT statement, the CCS of the relevant member is used.

    If SYSOUT is assigned to a file, the user must explicitly assign the desired character set to this file using the BS2000 command MODIFY-FILE-ATTRIBUTES.

  • Outputting members to SYSLST
    When member records are output to SYSLST, the CCSN is not evaluated.

    If SYSLST is assigned to a file, the user must explicitly assign the desired character set to this file using the BS2000 command MODIFY-FILE-ATTRIBUTES.

  • Outputting members to a library member
    If member output is redirected to a library member by means of the LMS statement MODIFY-LOGGING-PARAMETERS, the member receives the “no code” CCSN. Nonetheless, this member can be assigned a character set explicitly with the LMS statement MODIFY-ELEMENT-ATTRIBUTES.

  • Outputting the directory
    When the directory or other member information generated by LMS is output, the “no code” CCSN is always assumed.