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: 2025
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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts I am unable to use SWAPBAR ON command... mrsidhu12 TSO/ISPF 3 Thu Sep 01, 2016 1:10 pm


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