IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to merge two members in a PDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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 Developer


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

PostPosted: Sat Jun 03, 2006 2:05 am
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 All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts JCL to merge two files side by side DFSORT/ICETOOL 3
No new posts One to Many merge SYNCSORT 7
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Duplicate several members of/in one l... JCL & VSAM 7
Search our Forums:


Back to Top