View previous topic :: View next topic
|
Author |
Message |
upendrasri
Active User
Joined: 28 Sep 2017 Posts: 121 Location: India
|
|
|
|
Hi All,
Am writing a CLIST to execute a command.
My CLIST Starts as below
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1255 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Or convert it to Rexx. That is my preferred solution except in rare cases. |
|
Back to top |
|
|
upendrasri
Active User
Joined: 28 Sep 2017 Posts: 121 Location: India
|
|
|
|
Hi Joerg,
Thank you for your suggestions. Its working fine now. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1255 Location: Bamberg, Germany
|
|
|
|
@upendrasri: Mind sharing your code snippet? Would be helpful for others as well. |
|
Back to top |
|
|
upendrasri
Active User
Joined: 28 Sep 2017 Posts: 121 Location: India
|
|
|
|
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 :
|
|
Back to top |
|
|
|