IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Change all command - Without disturbing spaces


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Wed Sep 19, 2007 8:01 pm
Reply with quote

Hi,

In my rexx code I'm using an ISREDIT command to change a variable name into a value. I.e,

"C ALL #MDYY" dateval

Where dateval = 09092007

The dataset that I'm going to apply this edit command can have either of the below format:

XXXXXXXX #MDYY UUUUU (2 spaces between the variable and next char)
OR
XXXXXXXX #MDYY#YDMM (no space between the variable and next char)

When I apply the change command, it changes the 2 space after the variable to one space (If no space available, it works fine) as shown below:

XXXXXXXX 09092007 UUUUU (only one space in between)
OR
XXXXXXXX 09092007#YDMM

But I do not want the 2 spaces to be reduced to one in the first case...Do you know if there is any way to do this with CHANGE command??

Any help on this would be highly appreciated. Thanks!
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Sep 19, 2007 11:55 pm
Reply with quote

Try this (note the quotes):
Code:
dateval = '09092007  '
ADDRESS ISREDIT "C ALL '#MDYY  ' &DATEVAL"


By the way, the reason ISPF changes the two blanks into one is documented in the fine manual.

O.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 20, 2007 12:03 am
Reply with quote

Hello,

When the value has no space(s) between the 2 "fields", i believe other code is needed.

Another thought might be to change the "#MDYY" to ##MMDDYY which will be the same length as the date and no shifting will occur. . . icon_confused.gif
Back to top
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Thu Sep 20, 2007 1:16 am
Reply with quote

Thanks a lot!!

As Dick mentioned, using a variable name of the same length of the value was my only option and I'm using it in my program. Now things are working fine (though i had to do lot of changes icon_wink.gif ).

The fine manual was helped me to understand why this was happening...

Thanks again! icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 20, 2007 1:53 am
Reply with quote

You're welcome.

Thanks for letting us know it is working icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
Search our Forums:

Back to Top