How To
Summary
Sometimes we need to test printing in various national language environments. The code page template created following this document is a tool that can be used to test any single-byte code page.
Objective
Objective is to have test national language data for testing printing for any single-byte code page.
Steps
Run below code block from "Run SQL Scripts" in Access Client Solution to create the table holding test data.
CREATE OR REPLACE TABLE QGPL.NLSTEST (DD CHAR (40 ) CCSID 65535 NOT NULL WITH
DEFAULT);
INSERT INTO QGPL.NLSTEST VALUES('Test NLS codepage');
INSERT INTO QGPL.NLSTEST VALUES('-----------------');
INSERT INTO QGPL.NLSTEST
VALUES('*...+... 1 ...+... 2 ...+... 3 ...+... 4');
INSERT INTO QGPL.NLSTEST
VALUES('hex 4- 5- 6- 7- 8- 9- a- b- c- d- e- f-');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF04040'
CONCAT X'404040504040604040704040804040904040A04040B04040C0'
CONCAT X'4040D04040E04040F04040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF14040'
CONCAT X'414040514040614040714040814040914040A14040B14040C1'
CONCAT X'4040D14040E14040F14040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF24040'
CONCAT X'424040524040624040724040824040924040A24040B24040C2'
CONCAT X'4040D24040E24040F24040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF34040'
CONCAT X'434040534040634040734040834040934040A34040B34040C3'
CONCAT X'4040D34040E34040F34040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF44040'
CONCAT X'444040544040644040744040844040944040A44040B44040C4'
CONCAT X'4040D44040E44040F44040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF54040'
CONCAT X'454040554040654040754040854040954040A54040B54040C5'
CONCAT X'4040D54040E54040F54040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF64040'
CONCAT X'464040564040664040764040864040964040A64040B64040C6'
CONCAT X'4040D64040E64040F64040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF74040'
CONCAT X'474040574040674040774040874040974040A74040B74040C7'
CONCAT X'4040D74040E74040F74040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF84040'
CONCAT X'484040584040684040784040884040984040A84040B84040C8'
CONCAT X'4040D84040E84040F84040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAF94040'
CONCAT X'494040594040694040794040894040994040A94040B94040C9'
CONCAT X'4040D94040E94040F94040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAC14040'
CONCAT X'4A40405A40406A40407A40408A40409A4040AA4040BA4040CA'
CONCAT X'4040DA4040EA4040FA4040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAC24040'
CONCAT X'4B40405B40406B40407B40408B40409B4040AB4040BB4040CB'
CONCAT X'4040DB4040EB4040FB4040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAC34040'
CONCAT X'4C40405C40406C40407C40408C40409C4040AC4040BC4040CC'
CONCAT X'4040DC4040EC4040FC4040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAC44040'
CONCAT X'4D40405D40406D40407D40408D40409D4040AD4040BD4040CD'
CONCAT X'4040DD4040ED4040FD4040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAC54040'
CONCAT X'4E40405E40406E40407E40408E40409E4040AE4040BE4040CE'
CONCAT X'4040DE4040EE4040FE4040');
INSERT INTO QGPL.NLSTEST VALUES(X'CAC64040'
CONCAT X'4F40405F40406F40407F40408F40409F4040AF4040BF4040CF'
CONCAT X'4040DF4040EF4040FF4040');
Next step is to create sample spool from the table.
Sample is for Cyrillic (adjust as needed), again run this from "Run SQL Scripts".
CL: OVRPRTF FILE(QSYSPRT) CHRID(1150 1025) OVRSCOPE(*JOB) USRDTA(TEST) HOLD(*YES)
SAVE(*YES) SPLFNAME(TEST);
CL: CPYF FROMFILE(QGPL/NLSTEST) TOFILE(QSYSPRT);
At this point, you have sample spool tagged with needed code page.
WRKSPLF SELECT(*CURRENT *ALL *ALL TEST)
from green screen should be able to find the test spool.
from green screen should be able to find the test spool.
You can print sample spool and examine if all characters print as they should.
You can compare output with published code page template.
Some code page templates are available here:
cleanup
DROP TABLE QGPL.NLSTEST
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CP9AAM","label":"Print-\u003EHost Print Transform or HPT"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
13 March 2025
UID
ibm16471313