View previous topic :: View next topic
|
Author |
Message |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI,
My variable DDNAME has value
DDNAME=DEV2.TEST.SAMPLE
I want to store "DEV2.TEST.SAMPLE" to DSN variable like this
DSN="DEV2.TEST.SAMPLE"
Which rexx command will append characters to the string?
Regards
R KARTHIK |
|
Back to top |
|
|
satheeshkamal
New User
Joined: 09 Jan 2007 Posts: 28 Location: Chennai
|
|
|
|
Just use
[/code]
DSN = DSNAME
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Your request is not clear at all...
Quote: |
I want to store "DEV2.TEST.SAMPLE" to DSN variable like this
DSN="DEV2.TEST.SAMPLE" |
You already achieved what You asked for
but what You are showing is a simple assignment
DSN = DDNAME
why not search the REXX manuals for the "concatenate" operator
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJOSE20 |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I'm assuming you want the concatenation operand (two single OR bars, ||)
Gerry |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI,
Actually following piece of code works for both open a member in a PDS
and PS file by placing cursor in that line.
CODE I
Code: |
/* REXX */
ADDRESS ISREDIT MACRO
"ISREDIT (LIN,COL) = CURSOR"
"ISREDIT (DATA) = LINE .ZCSR"
IF SUBSTR(DATA,1,2) = "//" THEN
DO
A=POS("=",DATA)+1
B=POS(",",DATA)
C=B-A
DSN=SUBSTR(DATA,A,C)
"ISPEXEC EDIT DATASET('"DSN"')"
END
|
But when I try below the code
CODE II
Code: |
/* REXX */
DSN=DEV2.RK.JCL(ALLDUPS)
"ISPEXEC EDIT DATASET('"DSN"')"
|
It is throwing
2 +++ DSN=DEV2.RK.JCL(ALLDUPS)
IRX0043I Error running SAMPLE, line 2: Routine not found
***
And when i try
Code: |
/* REXX */
DSN="DEV2.RK.JCL(ALLDUPS)"
"ISPEXEC EDIT DATASET('"DSN"')"
|
It is working.....
I did not place extra " in CODE I. But there working...Why?
Regards
R KARTHIK |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
in REXX things are self defining
if You use a variable not initialized the variable name will be the value assigned
var will contain the string "donaldduck
Code: |
donaldduck = 1
var = donaldduck |
var will contain the value 1
dsn=qual1.qual2.qual3
the right side expression is considered a stemmmed variable
composed by the three variables qual1 qual2 qual3
and since qual1 qual2 qual3 are not initialized
the result will be a good dataet name
but that's a coding error
if You repeat the error with a member name added
the right hand side will be considered as a function call |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI enrico-sorichetti,
Now i understand. Thanks for ur detailed reply and helping freshers like me....
Cheers
R KARTHIK |
|
Back to top |
|
|
|