Copy members of 1 pds to another pds using a list of members



IBM's Command List programming language & Restructured Extended Executor

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

Postby Robert Sample » Wed Oct 12, 2011 8:46 pm

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.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

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

Postby Akatsukami » Wed Oct 12, 2011 9:04 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby thangaraaj555 » Thu Oct 13, 2011 2:10 pm

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
thangaraaj555
 
Posts: 10
Joined: Thu Oct 13, 2011 12:17 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Akatsukami » Thu Oct 13, 2011 4:50 pm

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?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby enrico-sorichetti » Thu Oct 13, 2011 4:56 pm

topic has already reached the main sewer :D
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

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

Postby expat » Thu Oct 13, 2011 5:44 pm

Did it go down the batch pipes :D
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

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

Postby NicC » Thu Oct 13, 2011 7:05 pm

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:
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby dick scherrer » Thu Oct 13, 2011 10:14 pm

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).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby thangaraaj555 » Fri Oct 14, 2011 12:03 pm

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..
thangaraaj555
 
Posts: 10
Joined: Thu Oct 13, 2011 12:17 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Sat Oct 15, 2011 12:04 am

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" . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Previous

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post