View previous topic :: View next topic
|
Author |
Message |
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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. . . |
|
Back to top |
|
|
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
|
|
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 ).
The fine manual was helped me to understand why this was happening...
Thanks again! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome.
Thanks for letting us know it is working |
|
Back to top |
|
|
|