Change command append blanks

19 views
Skip to first unread message

Lars Höglund

unread,
Dec 9, 2021, 2:26:17 AM12/9/21
to ispf-...@nd.edu

Can somebody explain why this command append blanks

 

Command ===> c all '"' ''                                     Scroll ===> CSR 

****** ***************************** Top of Data ******************************

=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--

000001 "AAAAAAAA"!"BBBBBBBBBBBBBBBBBBBB  "!1.!1.!1.!"CCCCCC  "!"DDDD"         

****** **************************** Bottom of Data ****************************

 

Result

 

Command ===>                                                  Scroll ===> CSR 

****** ***************************** Top of Data ******************************

=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--

==CHG> AAAAAAAA!BBBBBBBBBBBBBBBBBBBB     !1.!1.!1.!CCCCCC    !DDDD            

****** **************************** Bottom of Data ****************************

 

Shouldn’t the result be

 

Command ===>                                                  Scroll ===> CSR 

****** ***************************** Top of Data ******************************

=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--

000001 AAAAAAAA!BBBBBBBBBBBBBBBBBBBB  !1.!1.!1.!CCCCCC  !DDDD                 

****** **************************** Bottom of Data ****************************

 

//Lasse

Marvin Knight

unread,
Dec 9, 2021, 5:13:19 AM12/9/21
to ispf-...@nd.edu
Lars,
   Refer to the following in the ISPF Edit and Edit Macro manual:
 
Effect of CHANGE command on column-dependent data
Column-dependent data is groups of nonblank source data separated by two or more blanks, such as a
table. When you use CHANGE to change column-dependent data, ISPF attempts to maintain positional
relationships. For instance, if you change a long word to a short word, the editor pads the short word with
blanks. This padding maintains the column position of any data to the right of the change by preventing it
from shifting left.
When only one blank separates words, as in most text data, padding does not occur. Changing a long word
to a short word causes data to the right of the change to shift left.


Your data has multiple spaces between the actual data so it fits the Column-dependant data definition above.  Hence Edit maintained the
column position.


Marvin Knight





From:        "Lars Höglund" <Lars.H...@alecta.se>
To:        "ispf-...@nd.edu" <ispf-...@nd.edu>
Date:        12/09/2021 01:26 AM
Subject:        [EXTERNAL] [ISPF-L] Change command append blanks
Sent by:        ispf-...@nd.edu




Can somebody explain why this command append blanks Command ===> c all '"' '' Scroll ===> CSR ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender

This message came from outside your organization.


ZjQcmQRYFpfptBannerEnd
--
You received this message because you are subscribed to the Google Groups "ISPF discussion list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ispf-l-list...@nd.edu.
To view this discussion on the web visit
https://groups.google.com/a/nd.edu/d/msgid/ispf-l-list/AM7PR03MB650032923129ADB75736C9F08D709%40AM7PR03MB6500.eurprd03.prod.outlook.com.



Jeremy Nicoll

unread,
Dec 9, 2021, 1:06:07 PM12/9/21
to ispf-...@nd.edu
On Thu, 9 Dec 2021, at 07:26, Lars Höglund wrote:
> Can somebody explain why this command append blanks

- as explained in another reply. To achieve what you wanted, you could
first change all spaces in the lines concerned to some character not in
the current data, then do your change, then reverse the first change.

--
Jeremy Nicoll - my opinions are my own.

Paul Gilmartin

unread,
Dec 9, 2021, 1:20:39 PM12/9/21
to ISPF-List
On Dec 9, 2021, at 11:05:40, Jeremy Nicoll wrote:
>
> On Thu, 9 Dec 2021, at 07:26, Lars Höglund wrote:
>> Can somebody explain why this command append blanks
>
> - as explained in another reply. To achieve what you wanted, you could
> first change all spaces in the lines concerned to some character not in
> the current data, then do your change, then reverse the first change.
>
Ummm... Suppose you have 3 consecutive blanks, " " and you change them
To "¾¾¾". Does changing them back proceed from left to right, so at
some point you have " ¾". That should trigger the column-aware behavior,
so changing the third "¾" lets it collapse to nothing.

-- gil

Paul Gilmartin

unread,
Dec 9, 2021, 1:24:25 PM12/9/21
to ISPF-List
On Dec 9, 2021, at 11:05:40, Jeremy Nicoll wrote:
>
> On Thu, 9 Dec 2021, at 07:26, Lars Höglund wrote:
>> Can somebody explain why this command append blanks
>
> - as explained in another reply. To achieve what you wanted, you could
> first change all spaces in the lines concerned to some character not in
> the current data, then do your change, then reverse the first change.
>

Lars Höglund

unread,
Dec 9, 2021, 1:48:03 PM12/9/21
to ispf-...@nd.edu

Thanks, missed that.

 

Then I have to use Sort or why not a Rexx

 

//Lasse

Daryl Wells

unread,
Dec 9, 2021, 2:07:50 PM12/9/21
to ISPF discussion list, Lars Höglund
You can use REXX. I always run my REXX "remove character" routine and I usually write to a new dataset (temp) so that I am not destructive, I pass the character that I want to change from and to and the output dataset.

Lars Höglund

unread,
Dec 9, 2021, 2:17:24 PM12/9/21
to Daryl Wells, ISPF discussion list

To make it “quick” I’ll use Sort

 

OPTION COPY                       

INREC FINDREP=(INOUT=(C'"',C''))  

 

//Lasse

Jeremy Nicoll

unread,
Dec 9, 2021, 3:13:23 PM12/9/21
to 'Paul Gilmartin' via ISPF discussion list
Gah! You're clearly more awake than I am.

Bob Bridges

unread,
Dec 9, 2021, 3:38:02 PM12/9/21
to ispf-...@nd.edu
Well, when doing one of these "change char", "change back" operations you always have to choose your temporary char with care, to be sure it isn't already in there somewhere. If it's a long enough dataset that I can't be confident I'll pick something unique, I usually go for a hex 0 or a hex 1 or something like that.

---
Bob Bridges, robhb...@gmail.com, cell 336 382-7313

/* Miss Manners has also observed that when children are truly allowed to express their preferences, uninfluenced by the dreary adult expectation that they must all be artistic and original little noble savages, they come out resoundingly in favor of rigid traditionalism. The devotion to ritual exhibited by the average toddler in regard to his bedtime routine would make a nineteenth-century English butler look like a free spirit. -from "Miss Manners' Guide to Rearing Perfect Children" by Judith Martin */

-----Original Message-----
From: ispf-...@nd.edu <ispf-...@nd.edu> On Behalf Of Jeremy Nicoll
Sent: Thursday, December 9, 2021 15:13

Gah! You're clearly more awake than I am.

--- On Thu, 9 Dec 2021, at 18:24, 'Paul Gilmartin' via ISPF discussion list wrote:
> Ummm... Suppose you have 3 consecutive blanks, " " and you change them
> To "¾¾¾". Does changing them back proceed from left to right, so at
> some point you have " ¾". That should trigger the column-aware
> behavior, so changing the third "¾" lets it collapse to nothing.

> --- On Dec 9, 2021, at 11:05:40, Jeremy Nicoll wrote:
>> ....To achieve what you wanted, you could first change all spaces in the lines
Reply all
Reply to author
Forward
0 new messages