Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2086
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts exec macro in the end of edit anatol CLIST & REXX 8 Fri Sep 22, 2017 5:10 am
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us