Separate the pds and member in rexx.



IBM's Command List programming language & Restructured Extended Executor

Separate the pds and member in rexx.

Postby Nizar16 » Thu Aug 30, 2012 7:40 am

Hi All,

I need to separate the pds and member from the single input.
Consider an example,

INPUT:
A527971.REXX.PDS(SAMPLE)

The input should be validate , I want pds in one variable and member in one variable.
Can any one help me pls...

Thanks,
Nizar
Nizar16
 
Posts: 6
Joined: Mon Jul 23, 2012 8:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: Separate the pds and member in rexx.

 

Re: Separate the pds and member in rexx.

Postby dick scherrer » Thu Aug 30, 2012 8:27 am

Hello,

Post what you have done so far.

Tell us where there is a problem or where you are stuck.

There are many examples in the forum that you could look thru for something like what you want.

We are here to help, not to do the work for you.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Separate the pds and member in rexx.

Postby Nizar16 » Thu Aug 30, 2012 9:02 am

Hi dick,
consider this as an exampl sample code
/******REXX******/                                           
       Do until ds <> ' '                                     
         say ' Enter the dataset-name and member(enter EXIT to come out)'
         pull ds        /* to get the dataset name */         
         upper ds                                             
         if ds = 'EXIT' then                                 
            exit                                             
       end                                                   
       dd = strip(ds)                                         
       pds="'"||dd||"'"                                       
                                                             
       if sysdsn(pds) ¬= 'OK' then                           
        Do                                                   
          Say sysdsn(pds)                                     
          Exit                                               
        end                   
Code'd

it validate the pds and menber tat's fine i need to separate the pds and member..? and write it to one temp variable
Nizar16
 
Posts: 6
Joined: Mon Jul 23, 2012 8:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: Separate the pds and member in rexx.

Postby mongan » Thu Aug 30, 2012 12:21 pm

parse var ds dsname '(' member ')' .
User avatar
mongan
 
Posts: 212
Joined: Tue Jan 11, 2011 8:32 pm
Has thanked: 1 time
Been thanked: 5 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post