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: 2033
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 Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts ISPF - How to come out of ISPF Panel parasmalik20 TSO/ISPF 5 Tue Feb 21, 2017 7:44 pm


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