Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Rexx STRIP Equivalent function in CLIST

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

Active User


Joined: 28 Sep 2017
Posts: 101
Location: India

PostPosted: Mon Mar 16, 2020 9:57 pm    Post subject: Rexx STRIP Equivalent function in CLIST
Reply with quote

Hi All,

Am writing a CLIST to execute a command.

My CLIST Starts as below

Code:

PROC 1 DSN


But DSN = 'TEST.FILE'

As per the CLIST , I want DSN = TEST.FILE (Without quotes)

Do we have any Rexx STRIP equivalent function in CLIST?
or Any other suggestions to remove quotes in CLIST?

Thanks!
Back to top
View user's profile Send private message

Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 235
Location: Bamberg, Germany

PostPosted: Mon Mar 16, 2020 10:36 pm    Post subject:
Reply with quote

You can use &SYSINDEX, &SUBSTR and &LENGTH built-in functions to test for occurance of quotes and copy what's needed. See CLIST built-in functions
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 689
Location: Whitby, ON, Canada

PostPosted: Tue Mar 17, 2020 6:11 am    Post subject:
Reply with quote

Or convert it to Rexx. That is my preferred solution except in rare cases.
Back to top
View user's profile Send private message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 101
Location: India

PostPosted: Tue Mar 17, 2020 11:40 am    Post subject:
Reply with quote

Hi Joerg,

Thank you for your suggestions. Its working fine now.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 235
Location: Bamberg, Germany

PostPosted: Tue Mar 17, 2020 12:18 pm    Post subject:
Reply with quote

@upendrasri: Mind sharing your code snippet? Would be helpful for others as well. icon_wink.gif
Back to top
View user's profile Send private message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 101
Location: India

PostPosted: Tue Mar 17, 2020 3:04 pm    Post subject:
Reply with quote

Hi Joerg,

I have used the below code

Code:

SET DSN = 'TEST.UPEN.FILE'
SET A = &LENGTH(&DSN)
SET B = &A - 1
SET C = &SUBSTR(2:&B,&DSN)


OUTPUT as below :
Code:

TEST.UPEN.FILE
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 Compare multiple files using JCL/Rexx... tanvi110788 JCL & VSAM 4 Tue May 19, 2020 5:47 pm
No new posts In JCL Procedure how we can execute R... Dhananjayulu Neeli CLIST & REXX 7 Sat May 16, 2020 12:01 am
No new posts Calling a Rexx from within another Rexx ManuelPacheco CLIST & REXX 3 Wed Apr 22, 2020 2:45 pm
No new posts Naming a newly opened screen using REXX Ben12345 CLIST & REXX 2 Fri Apr 17, 2020 5:48 am
This topic is locked: you cannot edit posts or make replies. Macro REXX - ISRE741 Command not exec... sandeep prajapati CLIST & REXX 1 Fri Apr 17, 2020 12:48 am

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