In a recent note, Dave Salt said: > Date: Tue, 10 Oct 2006 02:50:30 +0000 > > There was a discussion on the ISPF listserv just last week about how to > remove leading spaces. For example, if the following were entered on a > command line: > > ===> SORT ADDRESS D > > The panel can easily parse the command into 3 separate values, but there is > no easy way for it to remove the leading spaces from in front of the 'D'. > The only way it can be done right now (using pure panel logic) is to keep > chopping off one space at a time and checking what's left. As the number of > leading spaces is unknown, and panels don't have looping logic, this means > writing dozens and dozens of 'truncate/test' lines to ensure however many > leading spaces were entered can all be removed. Very ugly, and easily solved > if panels had looping logic. > I don't know the capabilities of ISPF computation. Is it possible to remove 64 leading spaces, then 32, 16, 8, 4, 2, 1; thus removing up to 95 spaces in 7 truncate/tests rather than "dozens and dozens"? I've done this with other editors.
Not to deny the value of iteration, but this appears to be a task for regular expressions, SNOBOL4 patterns, even lowly Rexx parse. I understand ISPF couples closely with Rexx; would a Rexx function suffice to strip the blanks? -- gil -- StorageTek INFORMATION made POWERFUL ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

