MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

append the members of "PO" type data set to dest.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Uttank
Beginner


Joined: 12 Feb 2004
Posts: 12
Topics: 9

PostPosted: Fri Mar 04, 2005 8:31 am    Post subject: append the members of "PO" type data set to dest. Reply with quote

Dear sir,
I am facing one problam.... i want to append one particular partition
data set(PO) s members to another particular data set(PO). Here i am getting the problam i used iebcopy utility and option shr and mod also i used but i am getting resulst here is the what ever members are there
in one particular data set copy to the same members into another particualr data set.



EX:

1 po cantain 3 members :

PO: RRRRR
members: a:
b:
c:

i want to create one new PO: BBBBB and apend all the above a,b and c
members into one meber.

pls suggest the solution...



Thanking you.





of the particualr data set(PO)
There is a problem, i need to take a back-up of all the memer of a perticular data set (PO) into another data set (PO). Eventually the member of source data set is deleted after execution of the job. we want to keep the data of member of
Back to top
View user's profile Send private message Yahoo Messenger
nevilh
Beginner


Joined: 11 Aug 2004
Posts: 115
Topics: 0

PostPosted: Fri Mar 04, 2005 9:52 am    Post subject: Reply with quote

try
Code:

//S1       EXEC PGM=IEBGENER                     
//SYSPRINT DD SYSOUT=*                           
//SYSIN    DD DUMMY                             
//SYSUT1   DD DISP=SHR,DSN=RRRRR(A)             
//         DD DISP=SHR,DSN=RRRRR(B)             
//         DD DISP=SHR,DSN=RRRRR(C)             
//SYSUT2   DD DISP=SHR,DSN=BBBBB(D)
/*
Back to top
View user's profile Send private message
Uttank
Beginner


Joined: 12 Feb 2004
Posts: 12
Topics: 9

PostPosted: Sat Mar 05, 2005 12:06 am    Post subject: Reply with quote

The solution which was given would require me to hardcode the member name of the PO dataset RRRRR.And there are 45 such PO dataset with multiple member(and there 31 members in each dataset).

The issue was for example :

The data set RRRRR.SEQ [dsorg(PO),RECFM(FB),LRECL(80)]
has the following members
A (90 rows)
B (100 rows)
C (100 rows)

And as per the requirement I need to copy this to another dataset BBBBB.SEQ [dsorg(PO),RECFM(FB),LRECL(80)]

It works when the first time I execute the JCL which is as follows :

//APPEND EXEC PGM=IEBCOPY
//SYSUT1 DD DSN=H1.RRRRR.SEQ,DISP=SHR
//SYSUT2 DD DSN=H1BBBBB.SEQ.,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*

Note : H1 is for the high qualifier name.

And we had used both the option in sysut2(destination folder),Disp=shr and Disp=mod.



Now in the second day the dataset RRRRR.SEQ ,the following members are being sent

A (100 rows)
D (100 rows)


If I execute the same JCL ,tonly member D gets copied.
And I get the following message in JCL o/p.

"1 OF 2 MEMBERS COPIED FROM INPUT DATA SET REFERENCED BY SYSUT1"


I want to know whether is it possible to replace or append the member A in the destination dataset ,i.e BBBBB.SEQ

BBBBB.SEQ
A (100 Rows or 190 Rows)
B (100 rows)
C (100 rows)
D (100 rows)

If so pls pass on the JCL syntax.????


Thanks
Uttank.
Back to top
View user's profile Send private message Yahoo Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Mar 05, 2005 3:42 pm    Post subject: Reply with quote

look up the the control cards for IEBCOPY, particularly how to replace a member. You are not giving any control cards so the default is to copy all members without replace. Also, IEBCOPY doesn't have a SYSOUT ddname.
Back to top
View user's profile Send private message Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Sun Mar 06, 2005 9:36 pm    Post subject: Reply with quote

Quote:

The data set RRRRR.SEQ [dsorg(PO),RECFM(FB),LRECL(80)]
has the following members
A (90 rows)
B (100 rows)
C (100 rows)

And as per the requirement I need to copy this to another dataset BBBBB.SEQ [dsorg(PO),RECFM(FB),LRECL(80)]




uttank,

Try this jCl. The program IEBPTPCH flatten all the members of a pds into a sequential file. This utility puts a header for each member in the pds which looks as follows:

Code:

MEMBER NAME  xxxxxxxx


This also creates the output with ANSI carriage control character. so if the input pds is a FB recfm dataset with 80 bytes as lrecl , this utility creates an FBA recfm dataset with 81 bytes as lrecl. So we remove these in the sort step and create a new member. Make sure that your Output pds exists in step0200

code:
Code:

//STEP0100 EXEC PGM=IEBPTPCH
//SYSUT1   DD DSN=YOUR SORUCE PDS,
//            DISP=SHR                   
//SYSUT2   DD DSN=&T,DISP=(,PASS),SPACE=(CYL,(10,10),RLSE)
//SYSPRINT DD SYSOUT=*                                 
//SYSIN    DD *                                         
    PUNCH TYPORG=PO                                       
//*             
//STEP0200 EXEC PGM=SORT                               
//SYSOUT    DD SYSOUT=*                               
//SORTIN    DD DSN=&T,DISP=(OLD,PASS)                   
//SORTOUT   DD DSN=YOUR TARGET PDS(NEW MEM),                 
//             DISP=OLD,RECFM=FB               
//SYSIN     DD *
   SORT FIELDS=COPY                                   
   OMIT COND=(1,11,CH,EQ,C'MEMBER NAME')  $ REMOVE MEMBER HEADINGS
   OUTREC FIELDS=(2,80)                   $ TO REMOVE ANSI CHARACTER 
/*



Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group