Page 1 of 1

Separate the pds and member in rexx.

PostPosted: Thu Aug 30, 2012 7:40 am
by Nizar16
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

Re: Separate the pds and member in rexx.

PostPosted: Thu Aug 30, 2012 8:27 am
by dick scherrer
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.

Re: Separate the pds and member in rexx.

PostPosted: Thu Aug 30, 2012 9:02 am
by Nizar16
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

Re: Separate the pds and member in rexx.

PostPosted: Thu Aug 30, 2012 12:21 pm
by mongan
parse var ds dsname '(' member ')' .