Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Redirect the data of a PDS Memeber to Spool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
naveenmsc

New User


Joined: 28 Dec 2003
Posts: 4
Location: visakhapatnam

PostPosted: Sun Dec 28, 2003 1:29 pm    Post subject: Redirect the data of a PDS Memeber to Spool
Reply with quote

1) How can I copy only one member in PDS file to another member
2) how can I redirect the data of a PDS Memeber to Spool.
Back to top
View user's profile Send private message

sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Tue Dec 30, 2003 6:16 pm    Post subject:
Reply with quote

Hi naveenmsc,

1) Use following code. I think it will help.

Code:

//COPY    EXEC PGM=IDCAMS
//IN       DD DSN=INPUT....PDS(INMEMBER),DISP=SHR
//OUT      DD DSN=OUTPUT...PDS(OUTMEMBER),DISP=SHR
//SYSIN    DD *
   REPRO INFILE(IN) OUTFILE(OUT)
//SYSOUT DD SYSOUT=*
//*


INPUT....PDS and OUTPUT....PDS can be same.

2) Can you please try following code -

Code:

//COPY    EXEC PGM=IDCAMS
//IN       DD DSN=INPUT....PDS(INMEMBER),DISP=SHR
//OUT      DD SYSOUT=*
//SYSIN     DD *
   REPRO INFILE(IN) OUTFILE(OUT)
//*


Please reply if these works good.

Regards,
Sandip.
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Wed Jan 07, 2004 8:24 pm    Post subject: to copy only one member of a pds
Reply with quote

Hi Naveen,

If Iam not wrong, you can use IEBGENER utility to copy only one member of a pds to other.You can go for IDCAMS if it is related to VSAM.
Mentioning the member name along with its pds in SYSUT1 step and destination in SYSUT2 step you can copy the required member

If something is wrong in what I said please someone correct me.


THANKS AND REGARDS
ANURADHA
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Jan 08, 2004 3:24 am    Post subject:
Reply with quote

You can also use IEBCOPY, batch FileAid, and God knows what else.

Regards, Jack.
Back to top
View user's profile Send private message
harikrishnanrajeev

EXPERT


Joined: 28 Jan 2004
Posts: 37
Location: Trivandrum

PostPosted: Wed Jan 28, 2004 8:35 pm    Post subject:
Reply with quote

Hello all,

I have a small doubt, i don't know whether i am right. Pls correct me if i am wrong.

In the case of IEBGENER , the first SYSUT1 cannot be a PDS Member. It has to be sequential.

I saw Anuradha's posting that IEBGENER can be used to copy a member of a PDS to a member of another PDS.

I am bit confused. Hope somebody can clear it.

regards

Hari.
Back to top
View user's profile Send private message
Sharan

New User


Joined: 22 Dec 2003
Posts: 6
Location: Banaglore

PostPosted: Sat Jan 31, 2004 12:13 pm    Post subject:
Reply with quote

Hello Hari,

In IEBGENER we can have SYSUT1 as a PDS member or as a PS. SYSUT2 again can either be a PDS member or a PS. The following piece of code copies a PDS member to another PDS member.

Code:

//*****************  JOB CARD  ********************
//STEP1    EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*                                   
//SYSUT1   DD DSN=PDS1(MEM1),               
//            DISP=SHR                                   
//SYSUT2   DD DSN=PDS2(MEM2),               
//            DISP=(NEW,CATLG,DELETE),                   
//            UNIT=SYSDA,SPACE=(TRK,(2,2,1),RLSE),       
//            DCB=(PDS1)                     
//SYSIN    DD DUMMY                                     
//SYSUDUMP DD SYSOUT=*



However copying members from one PDS to another PDS is much simpler with the utility IEBCOPY. It gives you various options which cannot be handled by IEBGENER.


Thanks,
Sharan
Back to top
View user's profile Send private message
prasad_yadav20

New User


Joined: 12 Mar 2005
Posts: 13
Location: hyderabad

PostPosted: Mon Apr 18, 2005 5:10 pm    Post subject: is iebgener used for copying member of one pds to another?
Reply with quote

hi friend u said using IEBGENER we can copy one pds member to another pds member i think this is only for copying one ps to another ps only.pls clarify my doubt

Sharan wrote:
Hello Hari,

In IEBGENER we can have SYSUT1 as a PDS member or as a PS. SYSUT2 again can either be a PDS member or a PS. The following piece of code copies a PDS member to another PDS member.

Code:

//*****************  JOB CARD  ********************
//STEP1    EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*                                   
//SYSUT1   DD DSN=PDS1(MEM1),               
//            DISP=SHR                                   
//SYSUT2   DD DSN=PDS2(MEM2),               
//            DISP=(NEW,CATLG,DELETE),                   
//            UNIT=SYSDA,SPACE=(TRK,(2,2,1),RLSE),       
//            DCB=(PDS1)                     
//SYSIN    DD DUMMY                                     
//SYSUDUMP DD SYSOUT=*



However copying members from one PDS to another PDS is much simpler with the utility IEBCOPY. It gives you various options which cannot be handled by IEBGENER.


Thanks,
Sharan
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Apr 18, 2005 8:51 pm    Post subject: Re: Redirect the data of a PDS Memeber to Spool
Reply with quote

Sharan's answer is correct.
Back to top
View user's profile Send private message
sandhyaragav

New User


Joined: 05 Apr 2006
Posts: 14

PostPosted: Wed Apr 05, 2006 1:52 pm    Post subject: How to copy member of a pds to a new member of an old pds
Reply with quote

Hi,

Can you please let me know.

How to copy the member of a pds to a NEW member of an existing pds
without using the sysin parameter.

I have tried out the solution provided by Sandip. But this does not
work for creating a new member in an existing pds.

It gives an error saying that the new member does not exist( which is obviously coz the new member does not exist and we have given DISP=SHR for the destination pds).

Please suggest.

Regards
Sandhya
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Apr 05, 2006 5:53 pm    Post subject: Re: Redirect the data of a PDS Memeber to Spool
Reply with quote

I don't know what you've tried, but for a simple COPY function, the IEBGENER program is usually used. I don't know why you would get an error, since the only two possible DISPOSITION options for a PDS are SHR or OLD. You can't specify NEW because the target PDS already exists, and DISP=MOD processing is mutually exclusive for a PDS.

Code:

//STEP0001 EXEC PGM=IEBGENER                                     
//SYSUT1   DD   DISP=SHR,DSN=INPUT.PDS(MEMBER1)     
//*         
//SYSUT2   DD   DISP=SHR,DSN=OUTPUT.PDS(MEMBER2) or
//SYSUT2   DD   DISP=OLD,DSN=OUTPUT.PDS(MEMBER2)
//*
//SYSPRINT DD   SYSOUT=*                                         
//SYSIN    DD   DUMMY         
//*

- Or -
Code:

//STEP0001 EXEC PGM=SORT
//SORTIN   DD   DISP=SHR,DSN=INPUT.PDS(MEMBER1)     
//*         
//SORTOUT  DD   DISP=SHR,DSN=OUTPUT.PDS(MEMBER2) or
//SORTOUT  DD   DISP=OLD,DSN=OUTPUT.PDS(MEMBER2)
//*
//SYSOUT   DD   SYSOUT=*                                         
//SYSIN    DD   *
  OPTION COPY
/*                                                                             


works whether MEMBER2 already exists or not.

Also, if you're working exclusively with PDS's, you may want to use the IEBCOPY program as an alternative.
Back to top
View user's profile Send private message
unni_nss

New User


Joined: 20 Sep 2005
Posts: 19

PostPosted: Wed Apr 05, 2006 8:19 pm    Post subject: Re: Redirect the data of a PDS Memeber to Spool
Reply with quote

hi sandhya,

the IEBGENER is usually copies from PS to PS and also from a PDS(Containing one memeber) to another PS.But now i came to know that using IEBGENER also u can copy a memeber of PDS to PDS by specifying the particular memebe name in the JCL step.But in all these cases the memeber shul exist.But we can create a new member by using IEBUPDTE and same time we can give some inputs this also.

correct me if i am wrong in this context!
Back to top
View user's profile Send private message
GeneNorman

New User


Joined: 26 May 2006
Posts: 8
Location: Madison, Wisconsin USA

PostPosted: Fri Jun 09, 2006 2:15 am    Post subject: Re: Redirect the data of a PDS Memeber to Spool
Reply with quote

The point that you all seem to be missing is this: When you specify a PDS member in JCL using the DATA.SET(MEMBER) format the operating system treats it as if it were a sequential (ps) dataset. You can substitute a member for any input or output sequential dataset with the same lrecl.
Back to top
View user's profile Send private message
jinal_mca

New User


Joined: 05 Jan 2007
Posts: 23
Location: Pune, India

PostPosted: Tue Jan 23, 2007 4:03 pm    Post subject: Solution of first question
Reply with quote

Ur first question is
1) How can I copy only one member in PDS file to another member

Utility named IEBCOPY is used to copy member of pds to pds.
Utility named IEBGENER is used to copy Ps to Ps.

If u need syntax also then let m know.

cya
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us