On Thu, 6 Apr 2017 22:33:07 +0000, Frank Swarbrick wrote: >Perhaps there is a way to use another codepage. It's been a while since I >wrote the program and did my testing. Specifying codepage(1047) makes it work >and I haven't looked any further. > It would seem that if there is an option to specify a codepage it should be possible to specify a page other than just the one.
I find: Edit and Edit Macros z/OS Version 2 Release 2 SC19-3621-01 Chapter 3. Managing data Finding, seeking, changing, and excluding data Specifying the search string Regular expressions (string, string1) A regular expression in a FIND, CHANGE, or EXCLUDE command allows you to search for a string matching a regular expression. ISPF uses the IBM C regcomp and regexec functions to compile and execute a regular expression specified with a FIND, CHANGE, or EXCLUDE command. These are supported by the C runtime library and the C runtime library must be available. ISPF queries the host code page defined for your TN3270 session. If the code page is one of the following: 00037 00273 00277 00871 00875 00924 01123 01140 01141 01156 01157 01158 00278 00280 00284 00285 00290 00297 00424 00425 00500 00838 00870 00930 00933 00935 00937 00939 01025 01026 01027 01047 01112 01122 01142 01143 01144 01145 01146 01147 01148 01149 01153 01154 01155 01160 01165 01364 01371 01388 01390 01399 04971 05123 08482 12712 ISPF uses the IBM C setlocale function with LC_ALL to set the corresponding C locale. setlocale() would seem to be the key. But the user's data must be in the codepage of the programmer's code. Irritatingly, when I use a regex in a Rexx ISPF Edit macro, it uses the codepage of the attached terminal. There seems to be no way to tell ISPF what codepage the macro is actually written in. >On Thu, 6 Apr 2017 18:29:31 +0000, Frank Swarbrick wrote: > >>I have been successful in invoking the following "regular expression" >>functions from the z/OS XL C/C++ Runtime Library: regcomp(), regexec and >>regfree(). -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
