Created
November 10, 2014 13:10
-
-
Save JohnArchieMckown/1eb78ec2e19519f31b50 to your computer and use it in GitHub Desktop.
Transcribed from an email on ISPF-L about a routine by Doug Nadel How to add characters so that ISPF edit recognizes them as belonging in a "word" as opposed to being a word separator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Rexx ispf edit macro to add characters to the meaning of word */ | |
| /* */ | |
| /* This changes internal tables to force specific characters to be */ | |
| /* considered part of a word. For example, In COBOL, The dash is */ | |
| /* valid in a name. If you have code */ | |
| /* MOVE ABC-DEF TO ABC. */ | |
| /* and you issue */ | |
| /* CHANGE ABC XYZ WORD */ | |
| /* the result is */ | |
| /* MOVE XYZ-DEF XYZ. */ | |
| /* By using this command to allow dash to be part of a word, you'd */ | |
| /* Get this resilt instead: */ | |
| /* MOVE ABC-DEF XYZ. */ | |
| /* Add the characters you want to be part of a word below. This */ | |
| /* macro only needs to be run once per ISPF session but works fine */ | |
| /* as an initial macro or session macro (see manual for ZUSERMAC) */ | |
| /*--------------------------------------------------------------------*/ | |
| wordchars = "-_" | |
| /*--------------------------------------------------------------------*/ | |
| Address isredit | |
| "MACRO" | |
| tldp = ptr(ptr(24 + ptr(112 + ptr(132 + ptr(540))))) | |
| tablep = ptr(24 + ptr(20 + ptr(96 + ptr(56 + tldp)))) | |
| Do While wordchars <> "" | |
| Parse Var wordchars char 2 wordchars | |
| Call storage d2x(tablep + c2d(char)),1,"00"x | |
| End | |
| Return | |
| ptr: Return c2d(bitand(storage(d2x(Arg(1)),4),"7FFFFFFF"x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment