|
View previous topic :: View next topic
|
| Author |
Message |
sqljunkie
New User
Joined: 03 May 2006 Posts: 2
|
|
|
|
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 |
|
 |
GANAPATH
New User
Joined: 06 Mar 2006 Posts: 35
|
|
|
|
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 |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|