Code Pages for Eliminating and Identifying Invalid Characters _____________________________________________________________ Data check errors are caused if the print dataset contains invalid characters. Invalid characters are bytes that are not represented as code points in the font used for printing the data. Ideally, the print job should not contain this type of invalid data. But many jobs do. For example, print data may contain one or more bytes of X'00', which is not a legitimate code point in IBM-supplied code pages. You can instruct PSF to ignore all invalid characters by specifying DATACK=BLOCK or BLKCHAR in job control. However, this will not help identify the invalid characters. Fur- thermore coax-attached printers perform extensive recovery action for an invalid character even with data checks blocked to PSF. To prevent data check recovery action on these printers, data checks must be eliminated in the font code page. This package supplies 3 code pages which can be useful for identifying invalid characters and for eliminating invalid character data checks. All three are copies of the PSF-supplied T1D0BASE code page with the format characters (SF010000 - SF110000) removed. This will enable them to be used with most IBM-supplied character sets including the typographic fonts. However, these code pages may not con- tain all the characters needed for your font. If that is the case, you may need to tailor your own code page, as de- scribed below. 1. T1RSTEST blocks invalid character data checks, so that no errors are generated, and prints a "(" sign for any characters not defineded in the code page, so that the invalid data can be located and identified. 2. T1RSBASE defines X'00' as a legitimate blank character. Data bytes other than X'00' that are not mapped in T1D0BASE will generate a data check error. 3. T1RSBASX blocks data checks for all invalid code points. Any invalid data will be printed as a blank and no error messages will be generated. Use with caution. This code page may not contain all the characters of the code page you replace it with. Any characters it does not contain will simply disappear with no error messages. To use one of these code pages with a font character set you can do either of the following: ù Rename the supplied code page with the name of the code page currently used in the font, making sure to rename or move the original code page to save it.) If the ori- ginal code page was recently used for printing, you must re-IML the printer to remove the original from printer storage. A re-IML is not required if you use the USERLIB feature of PSF/MVS V2 (MVS/ESA only) or the SEND option of PSF/VM to access your new font members. or: ù Create a new Coded Font (Xnnnnn) member that matches the supplied code page with the desired character set. Ref- erence the new font name in your print job. For DCF jobs, you may reference the character set and code page name directly without creating a coded font member. Tailoring a Code Page to Eliminate Errors In some cases, the supplied code pages may not be satisfac- tory. These code pages print a limited set of characters: those defined in T1D0BASE, minus the format characters (SF010000 - SF110000). If the print data contains other characters, such as fractions or foreign characters, you will need a code page that will print these characters. The only way to guarantee that you will print the correct char- acters is to use the code page designed for the font. You can modify that code page to eliminate invalid character er- rors. You will need 2 tools from the AFP Font Collection for Windows 5648-B45. CP2FF and FF2CP. Use CP2FF to transform the code page into a flat file that you can edit. After you have ed- ited the flatfile, use FF2CP to convert the flat file back into your modified code page. The editing you do depends on what you want to accomplish. To eliminate errors cause by invalid X'00's in the print data, map X'00' to the space character: SP010000. First lo- cate the mapping for SP010000 in the flat file listing of your code page. It should look very much like this: GCID=SP010000 VAL=0 PRT=0 INC=0 CP=40 Duplicate this entry, replacing CP=40 with CP=00. So now you have two entries for SP010000: GCID=SP010000 VAL=0 PRT=0 INC=0 CP=40 GCID=SP010000 VAL=0 PRT=0 INC=0 CP=00 Now use FF2CP to re-create the code page and you're done. To elminate errors caused by any invalid character, change the invalid character specification in the flat file. Near the top of the file find the definition for the default (DEF) character: CPC DEF=SP010000 VAL=1 PRT=0 INC=0 VSC=4040 VSF=1 Change VAL=1 to VAL=0. Now every character that is not mapped, and so uses the default character, will be VALID and will not cause an error. Since the default character is the space character (SP010000), a blank will print instead of the invalid character. If you wish to print something other than a blank for any unmapped characters, simply change DEF=SP010000 to the char- acter you want to print. For example DEF=SC040000 will print a cent-sign for any invalid character. Specify VAL=0 so the invalid character will not cause an error. Note: channel-attached printers identify the code point of invalid characters in the sense bytes associated with the PSF/MVS error message. In an MVS environment, following the error message APS708I will be message APS830I with sense byte information and a field that says: "Element Identifier=00xx". "xx" is the code point that caused the error.