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
 

 

how to merge two members in a PDS

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

New User


Joined: 03 May 2006
Posts: 2

PostPosted: Fri Jun 02, 2006 3:35 pm    Post subject: how to merge two members in a PDS
Reply with quote

Hi,

I have 2 members in a PDS

MEMBERA - 3 RECORDS
D
E
F
MEMBERB- 5 RECORDS
A
B
C
1
G

I would like MEMBERB to look like this
A
B
C
D
E
F
G

i would like to skip a row in the memberB and add all the contents of MEmberA, if they are datasets i can do it through ICETOOL, how do we do this if they are members in a PDS. Can we do this in JCL as it is too much work to do manually for many members.
Back to top
View user's profile Send private message

GANAPATH

New User


Joined: 06 Mar 2006
Posts: 35

PostPosted: Sat Jun 03, 2006 1:40 am    Post subject: Re: how to merge two members in a PDS
Reply with quote

the same way as u do for datasets


//ICE1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//REPORT DD SYSOUT=*
//*
//IN001 DD DSN=THE.PDS(MEMBERB),DISP=SHR
//TOOLIN DD *
COPY FROM(IN001) TO(OUT001) USING(S002)
/*
//S002CNTL DD *
OPTION STOPAFT=3
/*
//OUT001 DD DSN=&&OUT1,
// DISP=(NEW,CATLG,CATLG),
// UNIT=SYSDA,
// SPACE=(TRK,(1,0),RLSE)
//*
//ICE2 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//REPORT DD SYSOUT=*
//*
//IN001 DD DSN=THE.PDS(MEMBER3),DISP=SHR
//TOOLIN DD *
COPY FROM(IN001) TO(OUT002) USING(S002)
/*
//S002CNTL DD *
OPTION SKIPREC=4
/*
//OUT002 DD DSN=&&OUT2,
// DISP=(NEW,CATLG,CATLG),
// UNIT=SYSDA,
// SPACE=(TRK,(1,0),RLSE)
//*
//ICE3 EXEC PGM=SORT
//SORTIN DD DSN=&&OUT1,DISP=SHR
// DD DSN=THE.PDS(MEMBERA),DISP=SHR
// DD DSN=&&OUT2,DISP=SHR
//SORTOUT DD DSN=THE.PDS(MEMBERB),DISP=SHR
//SYSOUT DD SYSOUT=A
//SORTWK01 DD UNIT=3390,SPACE=(CYL,(1,1))
//SORTWK02 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//SYSIN DD *
SORT FIELDS=COPY


Hope this helps.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Jun 03, 2006 2:05 am    Post subject:
Reply with quote

sqljunkie,

I believe a DFSORT/ICETOOL job like the one below will do what you asked for. I assumed your input pds has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

Code:

//S1    EXEC PGM=ICETOOL
//TOOLMSG   DD SYSOUT=*
//DFSMSG    DD SYSOUT=*
//MBRA DD DSN=userid.xxx.PDS(MEMBERA),DISP=SHR
//MBRB DD DSN=userid.xxx.PDS(MEMBERB),DISP=OLD
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//TOOLIN DD *
COPY FROM(MBRA) TO(T1)
COPY FROM(MBRB) USING(CTL1)
SORT FROM(T1) TO(MBRB) USING(CTL2)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(81:SEQNUM,8,ZD)
  OUTFIL FNAMES=T1,OMIT=(81,8,ZD,EQ,4),BUILD=(1,80)
/*
//CTL2CNTL DD *
  SORT FIELDS=(1,1,CH,A)
/*
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 SQL Merge error -254 Robin Sulsona DB2 8 Wed Jun 01, 2016 8:28 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts SAS MERGE to DFSORT Musab Ahmed DFSORT/ICETOOL 6 Mon Feb 01, 2016 5:44 pm
No new posts Merge two files having two trailer re... R.Manivannan DFSORT/ICETOOL 7 Wed Nov 25, 2015 9:18 pm


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