Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Change all command - Without disturbing spaces

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Change all command - Without disturbing spaces
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: 2360
Location: Israel

PostPosted: Wed Sep 19, 2007 11:55 pm    Post subject:
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

Site Director


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

PostPosted: Thu Sep 20, 2007 12:03 am    Post subject:
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    Post subject: Reply to: Change all command - Without disturbing spaces
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

Site Director


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

PostPosted: Thu Sep 20, 2007 1:53 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us