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
 

 

Combining two Strings with a "/"

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

New User


Joined: 10 Feb 2010
Posts: 7
Location: Germany

PostPosted: Mon Mar 22, 2010 8:58 pm    Post subject: Combining two Strings with a "/"
Reply with quote

Hi,

I have two Strings in my CLIST:

Code:
SET &MYPARM2 = &STR(111/12)                                     
SET &MYPARM = &STR(DDDD/DD)


and I try to combine it, like this:

Code:
SET &MYPARM = &STR(DDDD/DD)&MYPARM2


If there is no "/" in "MYPARM2", then it works.

But if there is one I get the message "THIS STATEMENT HAS AN EXPRESSION WITH A CHARACTER DATA ITEM USED NUMERICALLY".

Why an what can I do?
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: Mon Mar 22, 2010 9:09 pm    Post subject:
Reply with quote

Not sure if &NRSTR might work, I gave up CLISTs decades ago icon_lol.gif
Something like this works for me

Result is ABC/DEFGHI/CBA

Code:
SET STR1 = ABC/DEF
SET STR2 = GHI/CBA
SET STR3 = &NRSTR(&STR1.&STR2)
WRITE &STR3
Back to top
View user's profile Send private message
FloGerman

New User


Joined: 10 Feb 2010
Posts: 7
Location: Germany

PostPosted: Tue Mar 23, 2010 12:15 pm    Post subject:
Reply with quote

expat wrote:
Not sure if &NRSTR might work, I gave up CLISTs decades ago icon_lol.gif
Something like this works for me

Result is ABC/DEFGHI/CBA

Code:
SET SSTR1 = ABC/DEF
SET STR2 = GHI/CBA
SET STR3 = &NRSTR(&STR1.&STR2)
WRITE &STR3


I get the same error Message, as before. Thanks for help, but I should do this in REXX ;-)
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Mar 24, 2010 5:16 am    Post subject:
Reply with quote

Hi,

try the following
Code:
SET &STR1 = &STR(ABC/DEF)         
SET &STR2 = &STR(GHI/CBA)         
SET &STR3 = &STR(&STR1.&STR2)     
WRITE &STR3                       
SET &STR4 = &STR(111/12)         
SET &STR5 = &STR(DDDD/DD)         
SET &STR6 = &STR(&STR4.&STR5)     
WRITE &STR6                       



Gerry
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 Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts "DFSRRC00 vs IKJEFT01" for ... arunsoods All Other Mainframe Topics 5 Fri Aug 12, 2016 9:54 pm
No new posts Combining contents of 2 files in to s... sprikitik SYNCSORT 1 Fri Jan 22, 2016 2:16 pm


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