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 

Copying a member from concatenated PDS

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


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Wed Mar 26, 2003 2:54 pm    Post subject: Copying a member from concatenated PDS Reply with quote

I am trying to set up a compile proc that will pull the source from either a PDS containing modified code or from the default library. It will only exist in the modified code library if we have changed it. The SYSIN for the compile does not allow for concatenation so my thinking is that I use a utility to copy the member to a temporary dataset.

I have tried IEBCOPY but it does not allow for concatenation either.

What utility should I use?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Mar 26, 2003 3:43 pm    Post subject: Reply with quote

Bithead,

If I understand your problem correctly , all you want is pass the new souce code (if it is modified) or else use the existing code.

I think an override from the JCL will quite enough. To explain this clearly let us take you have a COMPILE proc as shown below.Here PDS.SOURCE is your defualt pds which contains original source code.


Code:

//COMPILE PROC SOURCE='PDS.SOURCE',                         
//             MEM='PROGRAM1'     
//*                                     
//STEP0100  EXEC PGM=IGYCRCTL,                                       
//             PARM=('MAP,SOURCE,OBJECT,NODECK,DATA(24),TERM,NOCMPR2')
//STEPLIB   DD DSN=SYS1.SIGYCOMP,                                     
//             DISP=SHR                                               
//SYSPRINT  DD SYSOUT=*                                               
//SYSTERM   DD SYSOUT=*                                               
//SYSUT1    DD UNIT=DISK,SPACE=(CYL,(10,2))                           
//SYSUT2    DD UNIT=DISK,SPACE=(CYL,(10,2))                           
//SYSUT3    DD UNIT=DISK,SPACE=(CYL,(10,2))                           
//SYSUT4    DD UNIT=DISK,SPACE=(CYL,(10,2))                           
//SYSUT5    DD UNIT=DISK,SPACE=(CYL,(10,2))                           
//SYSUT6    DD UNIT=DISK,SPACE=(CYL,(10,2))                           
//SYSUT7    DD UNIT=DISK,SPACE=(CYL,(10,2))                           
//SYSLIN    DD DSN=LOADSET.LOADSET,                                   
//             DISP=(MOD,PASS),                                       
//             UNIT=DISK,                                             
//             SPACE=(CYL,(1,1),RLSE)                                 
//SYSIN     DD DSN=&SOURCE(&MEM),                                     
//             DISP=SHR                                               
//*


If the modified source code exists you can override from the JCL as follows.
Code:

//COMPILE EXEC COMPILE,                     
//             SOURCE='YOUR MODIFIED PDS SOURCE LIB',
//             MEM='NEW PROGRAM'                 


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Wed Mar 26, 2003 3:48 pm    Post subject: Reply with quote

Kolusu,

You are correct in your assumption. The problem is that there are many programs and I need to be assured that I always pick the modified code if it exists so I would prefer not to have to change all the compile jobs.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Mar 26, 2003 5:00 pm    Post subject: Reply with quote

Bithead,

Here is an approach you can try so that your compile will always pick the modified source code if it exists.A brief explanation of the job.

Step10 will extract all the member names from the default source lib
step20 will extract all the member names from the modified source lib.

We take these 2 inputs and porcess thru DFSORT/ICETOOL( change the pgm name to SYNCTOOL if you have syncsort at your shop.

The first copy operator takes in the member name file of default source lib and strip off just the member names( the LISTDSI function adds some grabage along with the member names) and add a constant of 01 .

The second copy operator takes in the member name file of modified source lib and strip off just the member names( the LISTDSI function adds some grabage along with the member names) and add a constant of 01 .

Now the sort operator sorts on the membername and sums on the constants,so any matching members will have a sum of 2. For these records we create compile cards as follows
FILE OUT1:

Code:

//COMP0001 EXEC COMPILE,                         
//             SOURCE='YOUR MODIFIED SOURCE PDS'
//             MEM='MATCH   '                   


FILE OUT2 will have all the members which are not modified. you can remove this file if you really dont need to complile the members which are not modified.

Code:

//COMP0001 EXEC COMPILE,                           
//             SOURCE='YOUR DEFAULT SOURCE PDS'   
//             MEM='PDS     '                     


Code:

//STEP10   EXEC PGM=IKJEFT01                                     
//SYSTSPRT DD DSN=&M1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE),UNIT=SYSDA,
//            RECFM=FB,LRECL=80                                   
//SYSPRINT DD SYSOUT=*                                           
//SYSIN    DD DUMMY                                               
//SYSTSIN  DD   *                                                 
  LISTDS 'YOUR DEFAULT SOURCE LIB' MEMBERS                           
//*   
//STEP20   EXEC PGM=IKJEFT01                                     
//SYSTSPRT DD DSN=&M2,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE),UNIT=SYSDA,
//            RECFM=FB,LRECL=80                                   
//SYSPRINT DD SYSOUT=*                                           
//SYSIN    DD DUMMY                                               
//SYSTSIN  DD   *                                                 
  LISTDS 'YOUR MODIFIED SOURCE LIB' MEMBERS                         
//*                                                                               
//STEP30   EXEC PGM=ICETOOL                                         
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN1      DD DSN=&M1,DISP=(OLD,PASS)                               
//IN2      DD DSN=&M2,DISP=(OLD,PASS)                               
//T1       DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(1,2),RLSE),UNIT=SYSDA 
//T2       DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(1,2),RLSE),UNIT=SYSDA 
//CON      DD DSN=&T1,DISP=OLD,VOL=REF=*.T1                           
//         DD DSN=&T2,DISP=OLD,VOL=REF=*.T2                           
//OUT1     DD SYSOUT=*
//OUT2     DD SYSOUT=*
//TOOLIN   DD *                                 
  COPY FROM(IN1) TO(T1) USING(CTL1)             
  COPY FROM(IN2) TO(T2) USING(CTL1)             
  SORT FROM(CON) USING(CTL2)                     
//CTL1CNTL DD    *                                     
  OPTION COPY,SKIPREC=9                                 
  OMIT COND=(1,1,CH,NE,C' ')                           
  OUTREC FIELDS=(3,8,2X,C'01')                         
//CTL2CNTL DD    *                                     
  SORT FIELDS=(1,8,CH,A)                               
  SUM FIELDS=(11,2,ZD)                                 
  OUTFIL FNAMES=OUT1,INCLUDE=(11,2,ZD,EQ,2),           
  OUTREC=(C'//COMP',SEQNUM,4,ZD,C' EXEC COMPILE,',/,   
          C'//             SOURCE=',X'7D',             
          C'YOUR MODIFIED SOURCE PDS',X'7D',/,         
          C'//             MEM=',X'7D',1,8,X'7D',80:X) 
  OUTFIL FNAMES=OUT2,SAVE,                             
  OUTREC=(C'//COMP',SEQNUM,4,ZD,C' EXEC COMPILE,',/,   
          C'//             SOURCE=',X'7D',             
          C'YOUR DEFAULT SOURCE PDS',X'7D',/,           
          C'//             MEM=',X'7D',1,8,X'7D',80:X) 
/*                                                     


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Premkumar
Moderator


Joined: 28 Nov 2002
Posts: 77
Topics: 7
Location: Chennai, India

PostPosted: Wed Mar 26, 2003 11:01 pm    Post subject: Reply with quote

Bithead,

This IEBCOPY job should help you.
Code:

//COPY01    EXEC PGM=IEBCOPY                       
//DEFAULT   DD   DISP=SHR,DSN=DEFAULT.CODE.LIB     
//MODIFIED  DD   DISP=SHR,DSN=MODIFIED.CODE.LIB   
//MERGED    DD   DISP=OLD,DSN=MERGED.CODE.LIB     
//SYSIN     DD   *                                 
COPY1 COPY OUTDD=MERGED,INDD=(DEFAULT,(MODIFIED,R))
//SYSPRINT  DD   SYSOUT=*                         
Back to top
View user's profile Send private message Send e-mail
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Thu Mar 27, 2003 9:22 am    Post subject: Reply with quote

If you are generating a job from an ISPF skel and can insert control cards with variable data, you could copy only the desired member rather than the whole PDS.
Code:
MERGE COPY OUTDD=MERGED,INDD=DEFAULT         
 S M=ASM                                 
MERGE2 COPY OUTDD=MERGED,INDD=((MODIFIED,R))   
 S M=ASM                                 


Bill
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Mar 27, 2003 10:31 am    Post subject: Reply with quote

See ISRSCAN. It is a standard part of ISPF, used in compiler JCL generation (options 5?) and this is exactly what it is intended for.
Back to top
View user's profile Send private message Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Thu Mar 27, 2003 1:27 pm    Post subject: Reply with quote

Hi All. I have decided to go with Premkumar's solution. This allows me to compile or assemble groups of or individual programs and pick up either the modified code or the default code. When the modified code is fully tested, it can be move to the default code library without impacting the JCL. Thnaks to all who answered. Very Happy
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Mar 27, 2003 9:42 pm    Post subject: Reply with quote

That seems like quite a bit of overhead having to keep 3 potentially very large data sets. Wouldn't it be easier to just copy the required member to a sequential data set for SYSIN and keep the concatenations on the SYSLIB DD?
Back to top
View user's profile Send private message Visit poster's website
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Fri Mar 28, 2003 8:56 am    Post subject: Reply with quote

This is in effect what I am doing. I have chaged the compile Proc so that I can run any compile against it without having to change anything. The maintenance library is usually empty except for vendor fixes which I need to apply every month. The 3rd library is a temporary dataset.
Back to top
View user's profile Send private message
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