Replace Data Set member



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Replace Data Set member

Postby snobile » Sun May 10, 2009 9:00 pm

Good evening,

I'm currently visiting a z/OS course in university and we have some homework today. The problem is that I don't know where my error is.

The task is:

Replace FHK0008.COPY.CNTL(JOBCARD) with FHKMSTR.ES10V3.CNTL(JOBCARD) with the IEBCOPY option REPLACE.

I took the example from the DFSMSdfp Utilities IEBCOPY (http://publibz.boulder.ibm.com/epubs/pdf/dgt2u111.pdf)

The JCL script looks like the following:

//STEP1     EXEC PGM=IEBCOPY                                           
//SYSPRINT  DD   SYSOUT=A                                               
//OUT1      DD   DSN=FHK0008.COPY.CNTL,DISP=(OLD,KEEP)                 
//IN1       DD   DSN=FHKMSTR.ES10V3.CNTL,DISP=(OLD)                     
//SYSUT3    DD   UNIT=SYSDA,SPACE=(TRK,(1))                             
//SYSIN     DD   *                                                     
COPYOPER  COPY OUTDD=OUT1,INDD=IN1                                               
                 SELECT MEMBER=(JOBCARD,R)                                   
/*



The log looks like the following:

********************************* TOP OF DATA **********************************
                   J E S 2  J O B  L O G  --  S Y S T E M  M V S 1  --  N O D E
                                                                               
15.26.49 JOB09688 ---- SUNDAY,    10 MAY 2009 ----                             
15.26.49 JOB09688  IRR010I  USERID FHK0008  IS ASSIGNED TO THIS JOB.           
15.26.49 JOB09688  ICH70001I FHK0008  LAST ACCESS AT 15:18:15 ON SUNDAY, MAY 10, 2009
15.26.49 JOB09688  $HASP373 FHK0008W STARTED - INIT 5    - CLASS A - SYS MVS1   
15.26.49 JOB09688  IEF861I FOLLOWING RESERVED DATA SET NAMES UNAVAILABLE TO FHK0008W
15.26.49 JOB09688  IEF863I DSN = FHK0008.COPY.CNTL FHK0008W RC = 04             
15.26.49 JOB09688  IEF863I DSN = FHKMSTR.ES10V3.CNTL FHK0008W RC = 04           
15.26.49 JOB09688 *IEF099I JOB FHK0008W WAITING FOR DATA SETS                   
        1 //FHK0008W JOB (UNIVER),'FHK0008',MSGCLASS=H,MSGLEVEL=(1,1),                        JOB09688
          //         NOTIFY=&SYSUID.,CLASS=A                                   
          //********************************************************************
          //* JOBSUBMITTED FROM FHK0008.ES10.CNTL(FHKUEB32) ***                 
          //* DOC: REPLACE FHK0008.COPY.CNTL(JOBCARD) ***                       
          //*      WITH FSKMSTR.ES10V3.CNTL(JOBCARD) ***                       
           //*******************************************************************
           IEFC653I SUBSTITUTION JCL - (UNIVER),'FHK0008',MSGCLASS=H,MSGLEVEL=(1,1),NOTIFY=FHK0008,CLASS=A
         2 //STEP1     EXEC PGM=IEBCOPY                                         
         3 //SYSPRINT  DD   SYSOUT=A                                           
         4 //OUT1      DD   DSN=FHK0008.COPY.CNTL,DISP=(OLD,KEEP)               
         5 //IN1       DD   DSN=FHKMSTR.ES10V3.CNTL,DISP=(OLD)                 
         6 //SYSUT3    DD   UNIT=SYSDA,SPACE=(TRK,(1))                         
         7 //SYSIN     DD   *                                                   
 ICH70001I FHK0008  LAST ACCESS AT 15:18:15 ON SUNDAY, MAY 10, 2009             
******************************** BOTTOM OF DATA ********************************


Greetz Snobile
snobile
 
Posts: 2
Joined: Sun May 10, 2009 8:42 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Replace Data Set member

Postby MrSpock » Mon May 11, 2009 3:46 am

Have you looked into those IEF861I,IEF863I, and IEF099I error messages?
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Replace Data Set member

Postby snobile » Mon May 11, 2009 8:16 pm

Hello MrSpock,

MrSpock wrote:Have you looked into those IEF861I,IEF863I, and IEF099I error messages?

obviously I haven't looked into it as detailed as I should have, but the problem is resolved know. Someone else opened the FHKMSTR.* data set in exclusive mode and blocked it for everyone else due some JCL errors.

The above code isn't correct at all, had to do some changes and now it works fine:

000001 //FHK0008L JOB (UNIVER),'FHK0008',MSGCLASS=H,MSGLEVEL=(1,1),           
000002 //         NOTIFY=&SYSUID.,CLASS=A                                     
000003 //**********************************************************************
000004 //* JOBSUBMITTED FROM FHK0008.ES10.CNTL(FHKUEB32) ***                   
000005 //* DOC: REPLACE FHK0008.COPY.CNTL(JOBCARD) ***                         
000006 //*      WITH FHKMSTR.ES10V3.CNTL(JOBCARD) ***                         
000007 //**********************************************************************
000008 //STEP1     EXEC PGM=IEBCOPY                                           
000009 //SYSPRINT  DD   SYSOUT=*                                               
000010 //OUT1      DD   DSN=FHK0008.COPY.CNTL,                                 
000011 //            LIKE=FHK0008.ES10.CNTL,DISP=OLD                           
000012 //IN1       DD   DSN=FHKMSTR.ES10V3.CNTL,DISP=SHR                       
000013 //SYSIN     DD   *                                                     
000014 COPYOPER    COPY OUTDD=OUT1                                             
000015                  INDD=IN1                                               
000016             SELECT MEMBER=((JOBCARD,,R))                               
000017 /*                                                                     


Greetz Snobile
snobile
 
Posts: 2
Joined: Sun May 10, 2009 8:42 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post