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: 106
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: 292
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: 690
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: 106
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: 292
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: 106
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 CA Sysview - JCL or Rexx - Read or Ex... Jasi CA Products 4 Wed Aug 05, 2020 9:19 pm
This topic is locked: you cannot edit posts or make replies. Invoke REXX thru JCL to expand the co... spizen556 CLIST & REXX 2 Sun Jul 26, 2020 3:53 pm
No new posts Unable to scroll in REXX panel KeshavKunal CLIST & REXX 4 Tue Jul 21, 2020 3:55 pm
No new posts REXX tool to extract all files starti... KeshavKunal CLIST & REXX 4 Tue Jul 21, 2020 3:43 pm
No new posts IOF reading using REXX paval21 CLIST & REXX 0 Mon Jun 15, 2020 9:44 pm

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