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

Trying to concatenate a variable with a string in ISPF Macro


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

New User


Joined: 19 Feb 2009
Posts: 10
Location: Bangalore

PostPosted: Tue Jul 12, 2011 5:05 pm
Reply with quote

Hi,

I'm coding an ISPF Edit Macro. I'm using the folowing code to insert:
"ISREDIT LINE_AFTER .ZCSR = 'This is the start of PARA1'"

Now I need to include the PARA1 name also so that the inserted line will look like:

'This is the start of PARA1: ABC'

I have taken the Para name into a variable XYZ(using the substring, POS functions). I am now trying to execute the code as:

"ISREDIT LINE_AFTER .ZCSR = 'This is the start of PARA1: (xyz)'".

But this code is not working. Can anybody please share any idea? Please let me know if there is any confusion/doubt.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 12, 2011 5:17 pm
Reply with quote

I usually build the data as a variable and then insert the variable
Code:
"ISREDIT LINE_AFTER .ZCSR = (variable_name)"
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Jul 12, 2011 7:08 pm
Reply with quote

Rexx will try to resolve the string first. The stuff within quotes does not get resolved: outside of quotes is.
Code:
variable_name = "This is the start of PARA1: "para1
Back to top
View user's profile Send private message
Soumya Roy

New User


Joined: 19 Feb 2009
Posts: 10
Location: Bangalore

PostPosted: Wed Jul 13, 2011 3:10 pm
Reply with quote

Hi All,

Thanks for your suggestions.

I was able to execute the code like:
STRING = " This is the start of the Para "PARA1"';"
"LINE_AFTER .ZCSR = (STRING)"
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
Search our Forums:

Back to Top