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
 

 

Trying to concatenate a variable with a string in ISPF Macro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Trying to concatenate a variable with a string in ISPF Macro
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 12, 2011 5:17 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Jul 12, 2011 7:08 pm    Post subject: Reply to: Trying to concatenate a variable with a string in
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    Post subject: Reply to: Trying to concatenate a variable with a string in
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    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 Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm


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