Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10375
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: 10375
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 Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
This topic is locked: you cannot edit posts or make replies. Rexx to Grab ISMF Information. upendrasri All Other Mainframe Topics 16 Sun Nov 26, 2017 12:35 am
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us