IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Modify the shareoptions of VSAM in Define Parameters


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 19, 2020 3:05 pm
Reply with quote

You can of course use IGGCSI00 (basic example usually found in SYS1.SAMPLIB) to get the SHR parameters.
Back to top
View user's profile Send private message
chavinash2004

New User


Joined: 30 Jun 2010
Posts: 37
Location: hyderabad

PostPosted: Tue Mar 31, 2020 11:48 am
Reply with quote

Thanks a lot for your help Marso.

Have a great day ahead:)

Stay safe from corona.
Back to top
View user's profile Send private message
chavinash2004

New User


Joined: 30 Jun 2010
Posts: 37
Location: hyderabad

PostPosted: Tue Mar 31, 2020 11:50 am
Reply with quote

Thanks a lot for your help expat.

Have a great day ahead:)

Stay safe from corona.
Back to top
View user's profile Send private message
chavinash2004

New User


Joined: 30 Jun 2010
Posts: 37
Location: hyderabad

PostPosted: Thu Apr 09, 2020 8:22 pm
Reply with quote

Joerg.Findeisen wrote:
This works for me.
Code:
/* REXX */                                                     
address "ISREDIT"                                             
"macro"                                                       
                                                               
"c r'(SHR|SHAREOPTIONS)"!!,                                   
"[ ]*\([ ]*[1-4]([ ]+|[ ]*,[ ]*)[34][ ]*\)' 'SHR (2 3)' all"   
                                                               
exit


Hi Joerg,

Sorry to bother again on this topic.

Since you given very simple command to solve my issue. I'm posting my question again.

I just encountered another scenario. If user added "0" prefix then the code not working. I have provided the examples below.

Not working in below Scenario:
Code:

SHR   (04 03)
SHR   (01 03)
SHR   (04 04)


Working fine in below Scenario:

If "0" prefix is not there then it's working fine.

Code:

SHR   (4 3)
SHR   (1 3)
SHR   (4 4)


Input:

Code:

SHR (3 3) -                       
SHR (03 03) -                     
       STAGE SHR (1 3) NERAS -   
       SHAREOPTIONS(2 3) -       
       SHR(3,3) -                 
       SHR(2,3) -                 
       SHR(4,3) -                 
       SHR (04,03) -             
       SHR(4,4) -                 
       SHR(04,04) -               
       SHR(3,3) -                 
       SHR (1,3) -               
       SHR (01,03) -             
         SHR    ( 3   4 )         
         SHR  (3 , 4 )           
        SHAREOPTIONS (    1 , 4) 
        SHAREOPTIONS (    2 , 1) 
        SHAREOPTIONS (    1 , 2) 
        SHAREOPTIONS (    1 , 3) 
        SHAREOPTIONS (   01 , 03)
        SHAREOPTIONS ( 4 , 4)     
        SHAREOPTIONS ( 2 , 4)     
        SHAREOPTIONS ( 4, 3)     


Output:

We can see which are "0" as prefix did not changed.

Code:

SHR (2 3) -                       
SHR (03 03) -                     
       STAGE SHR (2 3) NERAS -   
       SHR (2 3) -               
       SHR (2 3) -               
       SHR (2 3) -               
       SHR (2 3) -               
       SHR (04,03) -             
       SHR (2 3) -               
       SHR(04,04) -               
       SHR (2 3) -               
       SHR (2 3) -               
       SHR (01,03) -             
         SHR (2 3)               
         SHR (2 3)               
        SHR (2 3)                 
        SHR (2 3)                 
        SHR (2 3)                 
        SHR (2 3)                 
        SHAREOPTIONS (   01 , 03)
        SHR (2 3)                 
        SHR (2 3)                 
        SHR (2 3)                 

Can we add some thing in this command to resolve this issue.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


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

PostPosted: Fri Apr 10, 2020 12:13 pm
Reply with quote

Try the following update, please.

Input:
Code:
/* REXX */                                                     
address "ISREDIT"                                             
"macro"                                                       
                                                               
"c r'(SHR|SHAREOPTIONS)"||,                                   
"[ ]*\([ ]*[0]?[1-4]([ ]+|[ ]*,[ ]*)[0]?[34][ ]*\)' 'SHR (2 3)' all"   
                                                               
exit


Output:
Code:
SHR(2 3) -                         
SHR(2 3) -                         
       STAGE SHR(2 3) NERAS -     
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
         SHR(2 3)                 
         SHR(2 3)                 
        SHR(2 3)                   
        SHAREOPTIONS (    2 , 1)   
        SHAREOPTIONS (    1 , 2)   
        SHR(2 3)                   
        SHR(2 3)                   
        SHR(2 3)                   
        SHR(2 3)                   
        SHR(2 3)
Back to top
View user's profile Send private message
chavinash2004

New User


Joined: 30 Jun 2010
Posts: 37
Location: hyderabad

PostPosted: Fri Apr 10, 2020 1:24 pm
Reply with quote

Joerg.Findeisen wrote:
Try the following update, please.

Input:
Code:
/* REXX */                                                     
address "ISREDIT"                                             
"macro"                                                       
                                                               
"c r'(SHR|SHAREOPTIONS)"||,                                   
"[ ]*\([ ]*[0]?[1-4]([ ]+|[ ]*,[ ]*)[0]?[34][ ]*\)' 'SHR (2 3)' all"   
                                                               
exit


Output:
Code:
SHR(2 3) -                         
SHR(2 3) -                         
       STAGE SHR(2 3) NERAS -     
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
       SHR(2 3) -                 
         SHR(2 3)                 
         SHR(2 3)                 
        SHR(2 3)                   
        SHAREOPTIONS (    2 , 1)   
        SHAREOPTIONS (    1 , 2)   
        SHR(2 3)                   
        SHR(2 3)                   
        SHR(2 3)                   
        SHR(2 3)                   
        SHR(2 3)


Thank you Joerg. It worked.

Looks like you are Master of shortcuts icon_smile.gif.

Good to see you in this forum.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts define 1 DCB parms for multiple outpu... JCL & VSAM 9
No new posts How to modify file content using REXX CLIST & REXX 3
No new posts Map VSAM Dataset to a Table/Tablespace DB2 5
This topic is locked: you cannot edit posts or make replies. REXX to find /* Define and write the ... CLIST & REXX 5
No new posts Recreating VSAM cluster catalog info ... All Other Mainframe Topics 6
Search our Forums:

Back to Top