The SYSCP utility is used to obtain information on code pages and ICU (International Components for Unicode) data files available in the current Natural mainframe environment. In addition, you can use the SYSCP utility to change the code page assignment of a source object or convert code pages for a source object.
This helps avoid problems that can occur when a code page is not defined or enabled in Natural or when source objects are converted to an incorrect code page or Unicode format.
For detailed information on how Natural supports Unicode and code pages and Unicode-specific items, see the descriptions and presentations in the SYSEXV application and Related Topics below.
Note:
The use of the SYSCP utility can be controlled by Natural
Security. For detailed information, see the section
SYSCP - Code Page
Administration - Utility Profiles in the Natural
Security documentation.
The SYSCP Utility - Code Page Administration documentation covers the following topics:
Unicode and Code Page Support: Natural documentation
Unicode: Unicode Consortium at web site at http://www.unicode.org/
ICU: IBM ICU Documentation at web site http://www-01.ibm.com/software/globalization/icu/index.jsp
IBM Converter Explorer documentation at web site http://demo.icu-project.org/icu-bin/convexp
Instructions for invoking and terminating the SYSCP utility and performing a function are provided in the following section.
To invoke the SYSCP utility
Enter the following system command:
SYSCP
A SYSCP menu similar to the example below appears:
11:19:07 ***** NATURAL SYSCP UTILITY ***** 2007-06-13 User SAG - Menu - ICU Version 3.6 Unicode Version 5.0 Function _ Code Page Maintenance of Sources _ All Code Pages _ Unicode Properties _ Help _ Exit Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit Canc |
The current ICU and Unicode versions are indicated at the top of the screen.
The functions contained in the menu are explained in the remainder of this documentation.
To execute a SYSCP function
In the SYSCP menu, place the cursor in the input field next to the required function and press ENTER.
Or:
In the SYSCP menu, in the input field next to the required function,
enter any character and press ENTER.
Note:
In the Command line of any SYSCP utility screen, you can enter any
Natural system command. A system command terminates the SYSCP utility.
To terminate SYSCP
Press PF3 or PF12.
Or:
From the SYSCP menu, choose Exit.
The
functions are used to list the code page information of source objects contained in a Natural library, change code page assignments of source objects and convert code pages for source objects.All code page maintenance functions reference the standard IANA name (see also Cmd in All Code Pages); you cannot use a code page name other than IANA when you execute a code page maintenance function.
The results of a code page maintenance function are output on a report screen, which is described in Function Result Report.
When you invoke
, a maintenance menu similar to the example below appears:07:34:21 ***** NATURAL SYSCP UTILITY ***** 2009-08-27 User SAG - Code Page Maintenance of Sources - Code Function L List Code Page Information of Sources C Check Conversion of Unassigned Sources A Assign Code Page Information to Sources K Check Conversion of Assigned Sources T Convert to Different Code Page R Remove Code Page Information from Sources ? Help . Exit Code ...... _ Library ... SYSTEM__ DBID ...... _____ FNR ..... _____ Password .. Cipher .. Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit Canc |
The fields and functions contained in the
menu and the options and features provided by the functions are explained in the following section:The fields contained in the
menu are explained in the following table:Field | Explanation |
---|---|
Code |
The code to be entered for the function to be executed, for
example, |
Library |
The name of the Natural library that contains the source objects for which to execute a code page maintenance function. The name entered by default is the name of the current library as
specified with the system variable |
DBID | The database ID (DBID) of the Natural system file where the
specified library is stored.
If no value (or |
FNR |
The file number (FNR) of the Natural system file where the specified Natural library is stored. If no value (or |
Password | If the specified system file is password protected, you must supply the appropriate 8-character Adabas password. |
Cipher |
If the specified system file is enciphered, you must supply the appropriate 8-digit Adabas cipher code. |
This function is used to list the code page information for all source objects contained in a Natural library as shown in the following example:
14:50:26 ***** NATURAL SYSCP UTILITY ***** 2006-10-19 User SAG - List Code Page Information of Sources - Listed Library SAGTEST Cmd Name Code Page Type --- *________ *________________________________ *__________ __ LDA1 IBM01147 Local __ LDA2 IBM01147 Local __ LDA3 IBM037 Local __ LDA4 IBM01147 Local __ MAP1 IBM01147 Map __ MAP2 IBM037 Map __ MAP3 IBM01147 Map __ MAP4 Map __ PGM1 Program __ PGM2 IBM01147 Program __ PGM3 IBM01147 Program __ PROG1 IBM01147 Program __ PROG2 Program __ PROG3 IBM037 Program __ PROG4 IBM01147 Program Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit -- - + ++ Canc |
The fields and columns contained in the List Code Page Information of Sources screen are explained in the following table:
Field/Column | Explanation | ||
---|---|---|---|
Listed Library | See Library in Code Page Maintenance of Sources Menu. | ||
Cmd |
Input field for the following line command to be executed for a selected source object:
This line command corresponds to the command |
||
Name | The name of the source object. | ||
Code Page | The code page information (IANA name) of the source object. This column appears empty for a source object that is not assigned a code page. | ||
Type | The type of Natural object such as a program or a map. |
You can shorten the list of objects displayed on the List Code Page Information of Sources screen by specifying selection criteria.
To specify selection criteria
In the input fields that appear underneath the column headings Name and Code Page, replace the default asterisk (*) with any of the input values listed in Name Specification.
In the input field underneath the column heading Type, replace the default asterisk (*) with one or more (maximum is 11) of the following type codes without a separator character:
Code | Object Type | Code | Object Type |
---|---|---|---|
P |
Program | A |
Parameter data area |
N |
Subprogram | G |
Global data area |
S |
Subroutine | L |
Global data area |
M |
Map | C |
Copycode |
H |
Helproutine | T |
Text |
M |
Macro | R |
Report |
7 |
Function | Z |
Recording |
3 |
Dialog | 4 |
Class |
5 |
Processor | ||
* |
All Types |
This function is used to check whether an unassigned source object can be converted to a code page.
An unassigned source object is an object without code page information which was originally saved under a Natural version where code page information was not yet supported. Since no code page information is provided, you need to decide which code page to specify for the source object to be checked for conversion. This depends on the character set used in the source.
If you invoke the
function, a screen similar to the example below appears:14:56:51 ***** NATURAL SYSCP UTILITY ***** 2006-10-19 User SAG - Check Conversion of Unassigned Sources - Check if source objects that have no code page information can be converted from a given code page to a target code page. Use selection list .. Y Source code page .... IBM01147______________________________________________ Target code page .... IBM01140______________________________________________ Object name ......... *________ Library ............. SAGTEST_ DBID ...... 10___ FNR ..... 32___ Password .. Cipher .. Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit Canc |
The fields contained in the Check Conversion of Unassigned Objects screen are explained in the following table:
Field | Explanation |
---|---|
Use selection list | Specifies whether selective processing or automated processing is used for the specified source objects: see Object Selection List. |
Source code page |
The name of the code page to be used to check whether the specified source objects (to which no code pages are yet assigned) can be converted from this code page to the code page entered in the Target code page field. If the conversion check is successful, the code page specified in Target code page can be used with the function. The default name entered is the IANA name as returned by the
|
Target code page |
The name of the code page to check for conversion of the specified unassigned source objects. The default name entered is the IANA name as returned by the
|
Object name | The name of a single source object or a range of names to be processed: see Name Specification for valid input values. |
Library | See Library in Code Page Maintenance of Sources Menu. |
DBID | See DBID in Code Page Maintenance of Sources Menu. |
FNR | See FNR in Code Page Maintenance of Sources Menu. |
Password | See Password in Code Page Maintenance of Sources Menu. |
Cipher | See Cipher in Code Page Maintenance of Sources Menu. |
This function is used to assign a code page to an unassigned source object. The source code of this object is not converted to the specified code page.
You can also use the function to change the code page information for a source object to which a code page is already assigned. In this case, only the code page name (IANA name) changes; the source code of this object is not converted.
The fields contained in the Assign Code Page Information to Sources screen are explained in the following table:
Field | Explanation | ||||
---|---|---|---|---|---|
Use selection list | Specifies whether selective processing or automated processing is used for the specified source objects: see Object Selection List. | ||||
Forced assignment |
Specifies whether to process source objects that have already code page information or source objects without code page information. Possible values are:
|
||||
Code page | The name of the code page to be assigned to the specified
source objects.
The default name entered is the IANA name as returned by the
|
||||
Object name | The name of a single source object or a range of names to be processed: see Name Specification for valid input values. | ||||
Library | See Library in Code Page Maintenance of Sources Menu. | ||||
DBID | See DBID in Code Page Maintenance of Sources Menu. | ||||
FNR | See FNR in Code Page Maintenance of Sources Menu. | ||||
Password | See Password in Code Page Maintenance of Sources Menu. | ||||
Cipher | See Cipher in Code Page Maintenance of Sources Menu. |
This function is used to test whether an assigned source object can be converted from its current code page (as entered in the object directory information) to another code page.
An assigned source object is an object which has code page information.
The fields contained in the Check Conversion of Assigned Sources screen are explained in the following table:
Field | Explanation |
---|---|
Use selection list |
Specifies whether selective processing or automated processing is used for the selected source objects: see Object Selection List. |
Current code page | The name of the code page or a range of names to be used as an
object selection criterion: see
Name
Specification for valid input values.
The default setting is asterisk (*) indicating all code pages. |
New code page |
The name of the code page to check for conversion of the specified assigned source objects. The default name entered is the IANA name as returned by the
|
Object name | The name of a single source object or a range of names to be processed: see Name Specification for valid input values. |
Library | See Library in Code Page Maintenance of Sources Menu. |
DBID | See DBID in Code Page Maintenance of Sources Menu. |
FNR | See FNR in Code Page Maintenance of Sources Menu. |
Password | See Password in Code Page Maintenance of Sources Menu. |
Cipher | See Cipher in Code Page Maintenance of Sources Menu. |
This function is used to convert an assigned source object from its current code page (as entered in the object directory information) to another code page. You cannot convert an unassigned source object.
The fields contained in the Convert to Different Code Page screen are explained in the following table:
Field | Explanation |
---|---|
Use selection list |
Specifies whether selective processing or automated processing is used for the specified source objects: see Object Selection List. |
Current code page | The name of the code page or a range of names to be used as an
object selection criterion: see
Name
Specification for valid input values.
The default setting is asterisk (*) indicating all code pages. |
New code page |
The name of the code page into which to convert the specified source objects. The default name entered is the IANA name as returned by the
|
Object name | The name of a single source object or a range of names to be processed: see Name Specification for valid input values. |
Library | See Library in Code Page Maintenance of Sources Menu. |
DBID | See DBID in Code Page Maintenance of Sources Menu. |
FNR | See FNR in Code Page Maintenance of Sources Menu. |
Password | See Password in Code Page Maintenance of Sources Menu. |
Cipher | See Cipher in Code Page Maintenance of Sources Menu. |
This function is used to remove the code page information (as entered in the object directory) from an assigned source object.
Caution:
Be aware that the code page information is removed without
conversion of the source code.
The fields contained in the Remove Code Page Information from Sources screen are explained in the following table:
Field | Explanation |
---|---|
Use selection list | Specifies whether selective processing or automated processing is used for the specified source objects (see Object Selection List). |
Current code page | The name of the code page or a range of names to be used as an object selection criterion: see Name Specification for valid input values. The default setting is the IANA name as returned by the *CODEPAGE system variable (see the System Variables documentation). |
Object name | The name of a single source object or a range of names to be processed: see Name Specification for valid input values. |
Library | See Library in Code Page Maintenance of Sources Menu. |
DBID | See DBID in Code Page Maintenance of Sources Menu. |
FNR | See FNR in Code Page Maintenance of Sources Menu. |
Password | See Password in Code Page Maintenance of Sources Menu. |
Cipher | See Cipher in Code Page Maintenance of Sources Menu. |
You can specify a name or a range of names as a selection criterion.
In the list of options below, value is any combination of one or more characters:
Input | Items Selected | |
---|---|---|
value | All items with names equal to value. | |
* | All items. | |
? | All items with any single character for each question mark (?) entered. | |
Leading characters | value* |
All items with names that start with value.
Example: |
Wildcard | value? |
A wildcard. All items with names that start with value and end with any single character for each question mark (?) entered.
Example: |
value? value? |
All items that match value combined with asterisk (*) and question mark (?) in any order.
Example: |
|
value*value? | ||
*value?value* | ||
Start value | value> |
All items with names greater than or equal to value.
Example: |
End value | value< |
An end value: All items with names less than or equal to value.
Example: |
You can set the Use selection list option to determine whether selective processing or automated processing is used for a maintenance function. If selective processing is used, a selection list of the specified objects is displayed on a selection screen before executing the function.
The Use selection list option does not apply to the function.
Possible settings of Use selection list are as follows:
Y
|
Yes. |
N
|
No. |
An object selection list looks similar to the example shown below:
16:28:43 ***** NATURAL SYSCP UTILITY ***** 2006-10-19 User SAG - Check Conversion of Assigned Sources - Target code page IBM01140 Cmd Name Code Page Message --- -------- -------------------------------- ------------------------------ __ LDA1 IBM01147 __ LDA2 IBM01147 __ LDA3 IBM01147 __ LDA4 IBM01147 __ MAP1 IBM01147 __ MAP2 IBM01147 __ MAP3 IBM01147 __ PGM2 IBM01147 __ PGM3 IBM01147 __ PROG1 IBM01147 __ PROG3 IBM01147 __ PROG4 IBM01147 Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit All X Canc |
The fields and columns contained in an object selection screen are described in the following table:
Field/Column | Explanation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Target code page | The code page to be used to check or perform a source-object assignment or conversion. | ||||||||||
Cmd |
|
||||||||||
Name | The name of the source object that meets the specified selection criteria. | ||||||||||
Code Page | The current code page information of the source object. | ||||||||||
Message | This column only contains text when you have finished executing the maintenance function. In this case, the column contains a message that indicates the processing status of the source object. See also Function Result Report. |
After a maintenance function has finished executing, the processing results are shown on a report screen. A report screen looks similar to an object selection screen an example of which is shown in Object Selection List.
The fields and columns contained in a result report screen are explained in the following table:
Field/Column | Explanation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Target code page | The code page used to check or perform a source-object assignment or conversion. | ||||||||||||
Cmd | Input not possible. | ||||||||||||
Name | The name of the source object that meets the specified selection criteria. | ||||||||||||
Code Page | The current code page information of the source object. | ||||||||||||
Message |
This column contains a message that indicates the processing status of the source objects selected for processing. The messages indicate successful execution of a function or possible error reasons. Possible messages are:
|
This function is used to list all code pages available in your current Natural environment as shown in the following example:
17:21:36 ***** NATURAL SYSCP UTILITY ***** 2007-08-02 User SAG - All Code Pages - Cmd Stat Name Units --- ---- ---------------------------------------------------------------- ----- _ D UTF-8 1 - 3 _ D UTF-16 2 - 2 _ D UTF-16BE 2 - 2 _ D UTF-16LE 2 - 2 _ D UTF-32 4 - 4 _ D UTF-32BE 4 - 4 _ D UTF-32LE 4 - 4 _ D UTF16_PlatformEndian 2 - 2 _ D UTF16_OppositeEndian 2 - 2 _ D UTF32_PlatformEndian 4 - 4 _ D UTF32_OppositeEndian 4 - 4 _ D UTF-7 1 - 4 _ D IMAP-mailbox-name 1 - 4 _ D SCSU 1 - 3 Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit Sort - + Canc |
You can use the following PF keys:
PF8 (or ENTER) scrolls down one page in the list.
PF7 scrolls up one page in the list.
PF5 sorts the list in ascending order by code page name.
Depending on the size of the list, you may have to increase the size of the
sort buffer by using the SORT
profile parameter as
described in SORT - Control of Sort
Program in the Parameter Reference
documentation.
The columns contained in the All Code Pages screen are explained in the following table:
Column | Explanation | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Cmd |
|
||||||||||||||||||
Stat |
|
||||||||||||||||||
Name | The internal ICU name. | ||||||||||||||||||
Units | The code units (minimum and maximum numbers of bytes) assigned to the code points. |
This section covers the following topics:
This function is used to list all code points of the selected code page as shown in the following example:
13:38:33 ***** NATURAL SYSCP UTILITY ***** 2007-08-06 +--------------------------- Code Points of UTF-8 ----------------------------+ ! CP: 00000000 U: 0000 NULL ! ! CP: 00000001 U: 0001 ? START OF HEADING ! ! CP: 00000002 U: 0002 ? START OF TEXT ! ! CP: 00000003 U: 0003 ? END OF TEXT ! ! CP: 00000004 U: 0004 ? END OF TRANSMISSION ! ! CP: 00000005 U: 0005 ? ENQUIRY ! ! CP: 00000006 U: 0006 ? ACKNOWLEDGE ! ! CP: 00000007 U: 0007 ? BELL ! ! CP: 00000008 U: 0008 ? BACKSPACE ! ! CP: 00000009 U: 0009 ? CHARACTER TABULATION ! ! CP: 0000000A U: 000A ? LINE FEED (LF) ! ! CP: 0000000B U: 000B ? LINE TABULATION ! ! CP: 0000000C U: 000C ? FORM FEED (FF) ! ! CP: 0000000D U: 000D ? CARRIAGE RETURN (CR) ! ! CP: 0000000E U: 000E ? SHIFT OUT ! ! CP: 0000000F U: 000F ? SHIFT IN ! +-----------------------------------------------------------------------------+ _ D ibm-912_P100-1995 1 - 1 _ D ibm-913_P100-2000 1 - 1 _ N ISCII,version=0 1 - 4 _ N ISCII,version=1 1 - 4 Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit LByte Prop -- - + << > Canc |
The list contains the following information:
The byte sequence of the code page code points (CP
).
The byte sequence of the corresponding Unicode code points
(U
).
The Unicode character. If the character cannot be interpreted by the
current terminal emulation, the substitution character (as defined in the code
page; here: ?
) is displayed instead.
The normative name of the Unicode character.
The PF keys provided for each code point list are explained in the following table:
PF Key | Function |
---|---|
PF4 | Not applicable to a code page with a 1-byte unit
as the maximum.
Opens the Leading Bytes of Code Point window (see the relevant section) in which you can enter the byte range you want to view. Press PF3 or ENTER to confirm your current input of leading bytes and to close the window. Press PF12 to cancel your current input and to close the window. |
PF5 | Invokes the Unicode Properties screen (see the relevant section) for the list item where the cursor is placed. |
PF6 | Resets the first (non-leading) byte of the byte range to the hexadecimal value 0x00. |
PF7 | Scrolls up one page in the selected byte range
(see also Specifying
Leading Bytes).
In a UTF-16 or UTF-32 code page, you can scroll through all byte ranges. |
PF8 |
Scrolls down one page in the selected byte range
(see also Specifying
Leading Bytes).
In a UTF-16 or UTF-32 code page, you can scroll through all byte ranges. |
PF10 | Moves to the leftmost screen position. |
PF11 | Moves to the right of the screen. |
This function does not apply to a code page with a 1-byte unit as the maximum.
You can use the Leading Byte of Code Point window to view the byte range (hexadecimal values 0x00 to 0xFF) of a particular leading byte for a code point.
In the following example of a UTF-8 code page, the hexadecimal values 0x22 and 0x32 have been entered as the leading bytes:
+--------- Leading Bytes of Code Point ---------+ ! ! ! Maximum number of bytes .. 3 ! ! ! ! ! ! Enter leading bytes ...... 00 22 32 00 ! ! ! ! ! ! ! +-----------------------------------------------+ |
After pressing PF3 (or ENTER) the code point list then displays the bytes from hexadecimal 0x00223200 to 0x002232FF.
Note:
For byte-swapped code pages such as UTF-16LE or UTF-32LE, the bytes
are read and displayed in a reversed byte order.
You can test code-point conversion from a selected code page to the
default code page (value of *CODEPAGE
)
defined with the CP
profile
parameter:
from an alphanumeric character string to Unicode code points and vice versa, or
from hexadecimal values to Unicode code points and vice versa.
The example below shows the conversion window of a code page (here:
ibm-1140_P100-1997
) which contains the following information:
the number of byte units (minimum and maximum numbers of bytes) assigned to the code points,
an alphanumeric character string and its equivalent hexadecimal values and
the corresponding Unicode code points.
+------------------- Test Conversion of ibm-1140_P100-1997 -------------------+ ! ! ! Code page units .. 1 - 1 (minimum, maximum of bytes) ! ! ! ! ! ! Code Page Characters ! ! Alphanumeric .. ABC ! ! Hexadecimal ... C1 C2 C3 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 ! ! 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 ! ! ! ! Unicode ! ! Code points ... 0041 0042 0043 0020 0020 0020 0020 0020 0020 0020 ! ! 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 ! ! 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 ! ! 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 ! ! ! ! ! ! ! +-----------------------------------------------------------------------------+ |
To convert a character or code point
Activate the field where you want to enter the literal string or code unit sequence to be converted:
Press PF6 to enter a literal string in the Alphanumeric field (default input field).
Or:
Press PF7 to enter hexadecimal values in the
Hexadecimal field.
Or:
Press PF8 to enter Unicode code points in the
Unicode field.
Press ENTER.
The value entered in one of the fields is converted to its equivalent code points or literal string.
This function is used to display whether a Unicode character property
is true (yes
) or false (no
) for a character contained
in the default code page (value of *CODEPAGE
)
as shown in the example of the letter A
in code page
IBM01140
below:
14:43:19 ***** NATURAL SYSCP UTILITY ***** 2008-09-23 User SAG - Unicode Properties - Default code page ... IBM01140 Alpha character ..... A C1 hexadecimal Substitution .. ? 3F Unicode code point .. 0041 Unicode char. name .. LATIN CAPITAL LETTER A Alphabetic .......... yes Control ........ no Alphanumeric ........ yes Space .......... no Lower case .......... no Whitespace ..... no Upper case .......... yes Blank .......... no Digit ............... no Punctuation .... no Hexadecimal ......... yes Combining ...... no Graphic ............. yes Surrogate ...... no Printable ........... yes Right to left .. no Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit Uni Canc |
In the Alpha character field, you can enter the character whose properties you want to view. Press PF5 if you want to enter a Unicode code point.
For explanations of the Unicode character properties displayed on the screen, refer to Unicode Consortium's documentation Unicode Character Database at web site http://www.unicode.org/Public/4.1.0/ucd/UCD.html.