Ask/Clarify the questions on TSO, CLIST & REXX
Moderators: Veera , Moderator Group
simo78
Member
Posts: 35 Joined: Tue Aug 11, 2009 12:20 am
Location: Munich
Post
by simo78 » Tue Apr 16, 2013 1:31 pm
Hello together!
Could someone help me with this problem,please?
Code: Select all
/*rexx*/
nr = "001"
text = "mytext/1 aa>44"
"MYVAR"!!nr = nr!!"-"!!text
say MYVAR001
Thanks
Anuj Dhawan
Moderator
Posts: 1625 Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India
Post
by Anuj Dhawan » Tue Apr 16, 2013 7:28 pm
Forgot to describe the problem?
Regards,
Anuj
simo78
Member
Posts: 35 Joined: Tue Aug 11, 2009 12:20 am
Location: Munich
Post
by simo78 » Wed Apr 17, 2013 12:28 pm
Sorry, you're right.
I just want to concatenate the variable "nr" and the variable "text" in a new variable called myvar + <nr> but I got this error
Code: Select all
IKJ56621I INVALID COMMAND NAME SYNTAX
4 *-* "MYVAR"!!nr = nr!!"-"!!text
+++ RC(-3) +++
MYVAR001
NicC
Active Member
Posts: 650 Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm
Post
by NicC » Wed Apr 17, 2013 12:52 pm
x = y||z
x = 'string in y'z
x = 'string in y' z
etc - I cannot be bothered to repeat what is in the manual a) because it would take too long and b) I would have to open the manual.
looking closer it would appear that you are trying to assign a string to a string which is impossible.
Regards
Nic
Pedro
Member
Posts: 2 Joined: Fri Jun 21, 2013 5:29 am
Location: Silicon Valley
Post
by Pedro » Fri Jun 21, 2013 5:31 am
Try to use a stem variable instead of composing a variable name.
-or- use the INTERPRET instruction
Pedro Vera
Free tutorials from mainframegurukul
JCL Tutorial Covers all important JCL concepts.
Cobol Tutorial This tutorials covers all Cobol Topics from STRING to COMP-3.
DB2 Tutorial DB2 Tutorial focuses on DB2 COBOL Programming.
SORT Tutorial This Tutorial covers all important aspects of DFSORT with examples
CICS Tutorial This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Mainframe Interview questions
Mainframe Tools and others