Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
Posted: Fri Mar 18, 2005 1:52 pm Post subject: Create IEBUPDTE format data from an existing PDS
Is there a way to unload a PDS to a sequential file such that each member is seperated by a ./add card so this data can then be run through IEBUPDTE to add members to another PDS?
________
indica strains
Last edited by dtf on Tue Feb 01, 2011 1:51 pm; edited 1 time in total
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Fri Mar 18, 2005 2:13 pm Post subject:
DTf,
The following JCL will be useful if you want to create a PDS when you move to a new work place. Download the output of step0200 as a text file and upload it to the new work mainframe with following DCB parameters
Code:
DCB=(LRECL=80,RECFM=FB)
Now run step0300 to create the PDS
Code:
//*************************************************************
//* THIS STEP FLATTENS THE PDS TO SEQUENTIAL FILE *
//*************************************************************
//STEP0100 EXEC PGM=IEBPTPCH
//SYSUT1 DD DSN=YOUR SOURCE PDS,
// DISP=SHR
//SYSUT2 DD DSN=&P,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PUNCH TYPORG=PO
/*
//*************************************************************
//* THIS STEP GENERATES CONTOL CARDS TO RE-CREATE THE PDS *
//*************************************************************
//STEP0200 EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//IN DD DSN=&P,DISP=(OLD,PASS)
//T1 DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE),RECFM=FB
//T2 DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE),RECFM=FB
//CONCAT DD DSN=*.T1,DISP=(OLD,PASS),VOL=REF=*.T1
// DD DSN=*.T2,DISP=(OLD,PASS),VOL=REF=*.T2
//OUT DD DSN=&O,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE),RECFM=FB
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
SORT FROM(CONCAT) USING(CTL2)
//CTL1CNTL DD *
INREC FIELDS=(2,80,SEQNUM,8,ZD)
OUTFIL FNAMES=T1,INCLUDE=(1,11,CH,EQ,C'MEMBER NAME'),
OUTREC=(C'./ ADD NAME=', $ CONTROL CARD FOR IEBUPDTE
14,8, $ MEMBER NAME
57X, $ PAD WITH SPACES
81,8) $ SEQNUM
OUTFIL FNAMES=T2,SAVE $ THE ACTUAL CONTENT OF THE MEMBER
//CTL2CNTL DD *
SORT FIELDS=(81,8,ZD,A) $ SORT ON SEQNUM
OUTFIL FNAMES=OUT,OUTREC=(1,80) $ STRIP THE SEQNUM
/*
//*************************************************************
//* THIS STEP CREATES PDS FROM A SEQUENTIAL FILE *
//*************************************************************
//STEP0300 EXEC PGM=IEBUPDTE,PARM=NEW
//*
//SYSUT2 DD DSN=YOUR NEW PDS,
// DISP=(NEW,CATLG,DELETE),
// UNIT=PROD,
// SPACE=(CYL,(10,10,100),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=&O,DISP=(OLD,PASS)
/*
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Mar 18, 2005 2:39 pm Post subject:
If you have z/OS DFSORT V1R5 PTF UQ95213 or DFSORT R14 PTF UQ95213 (Dec, 2004), you can use DFSORT's new IFTHEN parameter to replace Kolusu's STEP0200 with one copy pass instead of copy and sort passes, as follows:
Code:
//STEP0200 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&P,DISP=(OLD,PASS)
//SORTOUT DD DSN=&O,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE),RECFM=FB
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(2,11,CH,EQ,C'MEMBER NAME'),
BUILD=(C'./ ADD NAME=', $ CONTROL CARD FOR IEBUPDTE
15,8, $ MEMBER NAME
80:X)), $ PAD WITH SPACES
IFTHEN=(WHEN=NONE,BUILD=(2,80)) $ DATA RECORDS FOR MEMBER
/*
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
Posted: Fri Mar 18, 2005 3:13 pm Post subject:
Kolusu, it worked great, thanks. I am a little bit mystified by the output though..... I would have expected it to be in MEMBER name order. I wonder why it is not.
Here is the order that the members appear in the output.
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