Page 2 of 2

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Wed Oct 12, 2011 8:46 pm
by Robert Sample
I could have used it but the dataset name's are not known. I know the members name only. So I am stuck.
Suggestion: until you find out the dataset names, you will continue to be stuck. There is absolutely no way to tell a computer "find the PDS(s) containing these members and copy them to there" -- you MUST know the dataset name to start with -- since there could dozens or even hundreds of datasets with the exact same member names. You can decide what the output data set name is, but you cannot get away with not knowing the input dataset name.

I STRONGLY recommend you find a career other than IT, as it is obvious you have no business being anywhere near a computer. IT professionals read manuals, answer most of their questions themselves, and experiment when necessary to find out how to perform tasks asssigned to them. You have not shown even the barest minimum curiosity and initiative required for someone working in IT.

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Wed Oct 12, 2011 9:04 pm
by Akatsukami
Samrita S wrote:HI,

My requiement is to copy some members of 1 pds to another pds. The members list will be given in a ps file file. So I have to use this PS file as a refernce in the code. Please can anyone help me.

To be frank, Samrita, as BillyBoyo indicates, you display a level of cluelessness that indicates either that you are having us on or that someone sprinkled a bit of flour on you and told you that that was your anointing as a software developer.

Assuming that it is the latter, and that you are nonetheless willing and eager to learn, but simply do not know where to start:

  1. MrSpock has given you the link to the IEBCOPY reference. Use it.
  2. Create an ISPF skeleton for the IEBCOPY JCL. Make the input and output data set names variables, i.e,:
    //BAR      DD   DSN=&IN,DISP=SHR
    //FOO      DD   DSN=&OUT,DISP=SHR

    Make the SELECT card an iterated table construct:
    )DOT WHATBL               
      SELECT MEMBER=(&WHATEVER)
    )ENDDOT                   
  3. Create a Rexx exec that takes the input library, the output library, and the list of members as arguments. Suck up the list using EXECIO and copy it to an ISPF table for use in file tailoring. Assuming you have one member name per line in your list data set, the logic will look like:
    address ispexec "TBCREATE WHATBL NAMES(WHATEVER) NOWRITE REPLACE" 
    "ALLOC DA('"what"') FI(TULUT1) SHR"                               
    "EXECIO * DISKR TULUT1 (STEM WHAT. FINIS"                         
                                                                       
    do i = 1 to what.0                                                 
      whatever = strip(what.i)                                         
      address ispexec "TBADD WHATBL"                                   
    end                                                               
  4. Tailor the skeleton and submit the job.

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Thu Oct 13, 2011 2:10 pm
by thangaraaj555
Hi Samrita,

This answer might take time, but i suppose it ll work... guess all your dataset start with some common name... like your mainframe-id.*

so go to 3.4..

type ur-id(i mean your common starting qualifier).*

then give srchfor (membername)...

Then find the dataset and copy using IEBCOPY utility..

Hope this helps!

Regards,

Raj

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Thu Oct 13, 2011 4:50 pm
by Akatsukami
thangaraaj555 wrote:guess all your dataset start with some common name... like your mainframe-id.*

Since that has never been the case in any shop where I have worked, why would you guess that?

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Thu Oct 13, 2011 4:56 pm
by enrico-sorichetti
topic has already reached the main sewer :D

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Thu Oct 13, 2011 5:44 pm
by expat
Did it go down the batch pipes :D

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Thu Oct 13, 2011 7:05 pm
by NicC
Since that has never been the case in any shop where I have worked, why would you guess that?


Always been the case in the places I have turned up at - almost wrote 'worked' :lol:

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Thu Oct 13, 2011 10:14 pm
by dick scherrer
Hello,

My requiement is to copy some members of 1 pds to another pds. The members list will be given in a ps file file.
If all of the members are in "1 pds", then the name must be known - so simply use it.

Most places allow people to have datasets with their own high level qualifier(s), but general use things (source, procs, jcl, sort control, etc) do no have any particular user's hlq(s).

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Fri Oct 14, 2011 12:03 pm
by thangaraaj555
Akatsukami wrote:
thangaraaj555 wrote:guess all your dataset start with some common name... like your mainframe-id.*

Since that has never been the case in any shop where I have worked, why would you guess that?



for the application I work, we have common starting qualifier... I said it might work... why because, once i was looking for igycrytl member, but i don know the dataset, i was able to find by searching that in the system libraries, by giving the common system qualifier, like sys1.*

its just an idea.. i hope this forum is to give a suggestion to a user.. and i have exactly done that..

Re: Copy members of 1 pds to another pds using a list of mem

PostPosted: Sat Oct 15, 2011 12:04 am
by dick scherrer
Hello,

i hope this forum is to give a suggestion to a user..
Yes, we appreciate good suggestions.

i was able to find by searching that in the system libraries, by giving the common system qualifier, like sys1.*
Only now did you mention SYS1. (which would be "system stuff" like igycrytl).

Earlier mentioned was the "mainframe-id" which would probably not be where to find real "things" . . .