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
 

 

Which rexx command will append characters to the string?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu May 29, 2008 11:40 am    Post subject: Which rexx command will append characters to the string?
Reply with quote

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
View user's profile Send private message

satheeshkamal

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Thu May 29, 2008 11:44 am    Post subject:
Reply with quote

Just use

[/code]
DSN = DSNAME
Code:
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10233
Location: italy

PostPosted: Thu May 29, 2008 11:45 am    Post subject: Reply to: Which rexx command will append characters to the s
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu May 29, 2008 11:47 am    Post subject:
Reply with quote

Hi,
I'm assuming you want the concatenation operand (two single OR bars, ||)

Gerry
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu May 29, 2008 12:06 pm    Post subject: Reply to: Which rexx command will append characters to the s
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10233
Location: italy

PostPosted: Thu May 29, 2008 12:17 pm    Post subject: Reply to: Which rexx command will append characters to the s
Reply with quote

in REXX things are self defining icon_biggrin.gif

if You use a variable not initialized the variable name will be the value assigned

Code:
var = donaldduck

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu May 29, 2008 12:47 pm    Post subject: Reply to: Which rexx command will append characters to the s
Reply with quote

HI enrico-sorichetti,

Now i understand. Thanks for ur detailed reply and helping freshers like me....

Cheers
R KARTHIK
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm


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