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 

Create IEBUPDTE format data from an existing PDS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
dtf
Beginner


Joined: 10 Dec 2004
Posts: 110
Topics: 8
Location: Colorado USA

PostPosted: Fri Mar 18, 2005 1:52 pm    Post subject: Create IEBUPDTE format data from an existing PDS Reply with quote

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
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Mar 18, 2005 2:13 pm    Post subject: Reply with quote

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)                           
/*


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
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Mar 18, 2005 2:39 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dtf
Beginner


Joined: 10 Dec 2004
Posts: 110
Topics: 8
Location: Colorado USA

PostPosted: Fri Mar 18, 2005 3:13 pm    Post subject: Reply with quote

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.

Code:
./ ADD    NAME=TRACE002 
./ ADD    NAME=TRACE003 
./ ADD    NAME=TRACE004 
./ ADD    NAME=TRACE006 
./ ADD    NAME=TRACE007 
./ ADD    NAME=TRACE008 
./ ADD    NAME=TRACE009 
./ ADD    NAME=TRACE010 
./ ADD    NAME=TRACE02X 
./ ADD    NAME=TRACE024 
./ ADD    NAME=TRACEAID 
./ ADD    NAME=BRKPRTN   
./ ADD    NAME=BR14     
./ ADD    NAME=CASETEST 
./ ADD    NAME=CASETSTJ 
./ ADD    NAME=DEV       
./ ADD    NAME=DUMBX01   
./ ADD    NAME=INFO     

________
CB1000


Last edited by dtf on Tue Feb 01, 2011 1:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Mar 18, 2005 4:14 pm    Post subject: Reply with quote

dtf,
Quote:

Here is the order that the members appear in the output.


The reason for this is that IEBPTPCH pgm read your PDS directory in that order.

Direct the output of step0100 to a dataset or sysout and check it.

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 -> Utilities 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