How to copy one PDS to Other PDS of different LRECL



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

Re: How to copy one PDS to Other PDS of different LRECL

Postby Akatsukami » Fri Dec 23, 2011 3:59 pm

:roll:

This topic was started at 0445 22 December 2011 UTC-6. When I got into my office about 0820, I looked in my sandbox JCL library to see if I had any IEBCOPY JCL, which I did. I made SYSUT1 my control card library (LRECL=80), made SYSUT2 allocate a new PDS with LRECL=120, and submitted the job -- no control. It ran, clean and green, copying every member of the control card library to the new PDS.

I suspect amit_pune has baked the dog in some way that he's too embarassed to admit. His alleged JCL looks inferior, but should run; I'll check it more carefully when I get back to my office in a few hours.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: How to copy one PDS to Other PDS of different LRECL

Postby MrSpock » Fri Dec 23, 2011 8:23 pm

When I first saw this topic, I wondered why there was even an issue. Then I tried a small IEBCOPY job to copy some members from an 80-byte PDS to a 120-byte PDS and it failed. Then I thought about a multi-step process: unload using IEBPTPCH, SORT to increase the record lenths to 120, then IEBUPDTE to create the new PDS. Unfortunately, that failed to work as well. So, writing a program to use the ISPF LMMCOPY service does seem to be the best option.
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: How to copy one PDS to Other PDS of different LRECL

Postby enrico-sorichetti » Fri Dec 23, 2011 10:35 pm

Konnichiwa Akatsukami Sama!
i might have overlooked something but my tests behaved differently

run1
 ****** ***************************** Top of Data ******************************
 000001 //ENRICO1  JOB NOTIFY=&SYSUID,                                         
 000002 //             REGION=0M,                                               
 000003 //             MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X                       
 000004 //*                                                                     
 000005 //CLEANUP EXEC PGM=CLEANUP                                             
 000006 //STEPLIB   DD DISP=SHR,DSN=ENRICO.TEST.LOAD                           
 000007 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 000008 //*                                                                     
 000009 //IEB     EXEC PGM=IEBCOPY                                             
 000010 //SYSUT1    DD DISP=SHR,DSN=ENRICO.TEST.JCL                             
 000011 //SYSUT2    DD DISP=(NEW,CATLG),                                       
 000012 //             DSN=ENRICO.TEST.JCL2,                                   
 000013 //             SPACE=(CYL,(8,8,8)),                                     
 000014 //             DCB=(RECFM=FB,LRECL=80)                                 
 000015 //SYSPRINT  DD SYSOUT=*                                                 
 000016 //SYSIN     DD DUMMY                                                   
 ****** **************************** Bottom of Data ****************************


everything worked as per SYSPRINT DATA
********************************* TOP OF DATA **********************************
                                         IEBCOPY MESSAGES AND CONTROL STATEMENTS
IEB1135I IEBCOPY  FMID HDZ1A10  SERVICE LEVEL NONE     DATED 20080414 DFP    3,3
IEB1035I ENRICO1   IEB      18:50:12 FRI 23 DEC 2011 PARM=''                   
IEB      COPY      INDD=SYSUT1,OUTDD=SYSUT2         GENERATED STATEMENT         
IEB1013I COPYING FROM PDS   INDD=SYSUT1   VOL=STOR04 DSN=ENRICO.TEST.JCL       
IEB1014I           TO PDS  OUTDD=SYSUT2   VOL=STOR01 DSN=ENRICO.TEST.JCL2       
IEB167I FOLLOWING MEMBER(S) COPIED FROM INPUT DATA SET REFERENCED BY SYSUT1     
IEB154I A        HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ALLOCAT  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ALLOCAT2 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ALLOCAT3 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I EXECIOW  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I EXECIO01 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I EZACFSM1 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I GDGTEST1 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ICGCSI1  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I IDCAMS1  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I IEBGENER HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I IEBGENR2 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I IEBGENR3 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I IEBGENR4 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I IKJT01   HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I IPOUPDTE HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I IRXJCL   HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ISFT01   HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ISFT02   HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ISPT01   HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I LISTIDR  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I LOADXMI  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I LOADXMI2 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I LOADXMI3 HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I OVERLAY  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I PDSAVE   HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I RXSTREAM HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I SRCHFOR  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I STREAMW  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I SYSDSN1  HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I YES      HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I Z        HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ZDSNAMES HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ZPROCS   HAS BEEN SUCCESSFULLY COPIED                                   
IEB154I ZZ       HAS BEEN SUCCESSFULLY COPIED                                   
IEB1098I 35 OF 35 MEMBERS COPIED FROM INPUT DATA SET REFERENCED BY SYSUT1       
IEB144I THERE ARE 117 UNUSED TRACKS IN OUTPUT DATA SET REFERENCED BY SYSUT2     
IEB149I THERE ARE 2 UNUSED DIRECTORY BLOCKS IN OUTPUT DIRECTORY                 
IEB147I END OF JOB - 0 WAS HIGHEST SEVERITY CODE                               
******************************** BOTTOM OF DATA ********************************


the second run changing the output lrecl to 120 just blowed in my face :D

********************************* TOP OF DATA **********************************
                         J E S 2  J O B  L O G  --  S Y S T E M  S Y S 1  --  N
                                                                               
18.51.15 JOB05541 ---- FRIDAY,    23 DEC 2011 ----                             
18.51.15 JOB05541  IRR010I  USERID ENRICO   IS ASSIGNED TO THIS JOB.           
18.51.15 JOB05541  ICH70001I ENRICO   LAST ACCESS AT 18:50:12 ON FRIDAY, DECEMBE
18.51.15 JOB05541  $HASP373 ENRICO1  STARTED - INIT 1    - CLASS A - SYS SYS1   
18.51.15 JOB05541  IEF403I ENRICO1 - STARTED - TIME=18.51.15                   
18.51.15 JOB05541  +CLEANUP - ENRICO.TEST.JCL2 deleted (STOR01)                 
18.51.15 JOB05541  IEF404I ENRICO1 - ENDED - TIME=18.51.15                     
18.51.15 JOB05541  $HASP395 ENRICO1  ENDED                                     
------ JES2 JOB STATISTICS ------                                               
  23 DEC 2011 JOB EXECUTION DATE                                               
           16 CARDS READ                                                       
           74 SYSOUT PRINT RECORDS                                             
            0 SYSOUT PUNCH RECORDS                                             
            4 SYSOUT SPOOL KBYTES                                               
         0.00 MINUTES EXECUTION TIME                                           
        1 //ENRICO1  JOB NOTIFY=&SYSUID,                                       
          //             REGION=0M,                                         
          //             MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X                     
          //*                                                                   
          IEFC653I SUBSTITUTION JCL - NOTIFY=ENRICO,REGION=0M,MSGLEVEL=(1,1),CLA
        2 //CLEANUP EXEC PGM=CLEANUP                                           
        3 //STEPLIB   DD DISP=SHR,DSN=ENRICO.TEST.LOAD                         
          //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          //*                                                                   
        4 //IEB     EXEC PGM=IEBCOPY                                           
        5 //SYSUT1    DD DISP=SHR,DSN=ENRICO.TEST.JCL                           
        6 //SYSUT2    DD DISP=(NEW,CATLG),                                     
          //             DSN=ENRICO.TEST.JCL2,                                 
          //             SPACE=(CYL,(8,8,8)),                                   
          //             DCB=(RECFM=FB,LRECL=120)                               
        7 //SYSPRINT  DD SYSOUT=*                                               
        8 //SYSIN     DD DUMMY                                                 
ICH70001I ENRICO   LAST ACCESS AT 18:50:12 ON FRIDAY, DECEMBER 23, 2011         
IEF236I ALLOC. FOR ENRICO1 CLEANUP                                             
IEF237I 0AB4 ALLOCATED TO STEPLIB                                               
IEF237I 0AB1 ALLOCATED TO $CLEANUP                                             
IEF285I   ENRICO.TEST.JCL2                             UNCATALOGED           
IEF285I   VOL SER NOS= STOR01.                                                 
IEF285I   ENRICO.TEST.JCL2                             DELETED                 
IEF285I   VOL SER NOS= STOR01.                                                 
CLEANUP - ENRICO.TEST.JCL2 deleted (STOR01)                                     
IEF142I ENRICO1 CLEANUP - STEP WAS EXECUTED - COND CODE 0000                   
IEF285I   ENRICO.TEST.LOAD                             KEPT                     
IEF285I   VOL SER NOS= STOR04.                                                 
IEF373I STEP/CLEANUP /START 2011357.1851                                       
IEF374I STEP/CLEANUP /STOP  2011357.1851 CPU    0MIN 00.06SEC SRB    0MIN 00.00S
IEF236I ALLOC. FOR ENRICO1 IEB                                                 
IEF237I 0AB4 ALLOCATED TO SYSUT1                                               
IGD100I 0AB3 ALLOCATED TO DDNAME SYSUT2   DATACLAS (        )                   
IEF237I JES2 ALLOCATED TO SYSPRINT                                             
IEF237I DMY  ALLOCATED TO SYSIN                                                 
IEF142I ENRICO1 IEB - STEP WAS EXECUTED - COND CODE 0008                       
IEF285I   ENRICO.TEST.JCL                              KEPT                     
IEF285I   VOL SER NOS= STOR04.                                                 
IEF285I   ENRICO.TEST.JCL2                             CATALOGED               
IEF285I   VOL SER NOS= STOR03.                                                 
IEF285I   ENRICO.ENRICO1.JOB05541.D0000101.?           SYSOUT                   
IEF373I STEP/IEB     /START 2011357.1851                                       
IEF374I STEP/IEB     /STOP  2011357.1851 CPU    0MIN 00.05SEC SRB    0MIN 00.01S
IEF375I  JOB/ENRICO1 /START 2011357.1851                                       
IEF376I  JOB/ENRICO1 /STOP  2011357.1851 CPU    0MIN 00.11SEC SRB    0MIN 00.01S
                                         IEBCOPY MESSAGES AND CONTROL STATEMENTS
IEB1135I IEBCOPY  FMID HDZ1A10  SERVICE LEVEL NONE     DATED 20080414 DFP    3,3
IEB1035I ENRICO1   IEB      18:51:15 FRI 23 DEC 2011 PARM=''                   
IEB      COPY      INDD=SYSUT1,OUTDD=SYSUT2         GENERATED STATEMENT         
IEB120I SYSUT1   VALIDATION ERROR                                               
IEB1034E RECORD LENGTHS UNEQUAL BETWEEN INDD SYSUT1   (80) AND OUTDD SYSUT2   (1
IEB1030I DDNAME SYSUT1   REFERS TO PDS  DATA SET ON VOLUME STOR04 NAMED ENRICO.T
IEB1030I DDNAME SYSUT2   REFERS TO PDS  DATA SET ON VOLUME STOR03 NAMED ENRICO.T
IEB166I NO MEMBERS COPIED TO DATA SET REFERENCED BY SYSUT2                     
IEB151I JOB HAS TERMINATED WITH ERROR(S)                                       
IEB147I END OF JOB - 8 WAS HIGHEST SEVERITY CODE                               
******************************** BOTTOM OF DATA ********************************
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: How to copy one PDS to Other PDS of different LRECL

Postby NicC » Fri Dec 23, 2011 11:20 pm

You can do it in one execution of IEBGENER. You need to generate a MEMBER record for each member and specify MAXFLDS, MAXLITS which would be the same for each member.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How to copy one PDS to Other PDS of different LRECL

Postby amit_pune » Mon Dec 26, 2011 10:42 am

Akatsukami wrote:I suspect amit_pune has baked the dog in some way that he's too embarassed to admit. His alleged JCL looks inferior, but should run; I'll check it more


Hi

I have always clear and good intensions.
It was a sensitive issue (a subject I raised) for me and that's why I asked a help from all associated experts.
And i dont know how your JCL executed with diff. LRECL in IEBCOPY.

Thanks!
amit_pune
 
Posts: 11
Joined: Thu Dec 22, 2011 4:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to copy one PDS to Other PDS of different LRECL

Postby amit_pune » Mon Dec 26, 2011 10:45 am

Thanks MrSpock and NicC and all those who shared their solutions and thoughts for this topic .

I close this ticket here.

Thx a lot.
amit_pune
 
Posts: 11
Joined: Thu Dec 22, 2011 4:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to copy one PDS to Other PDS of different LRECL

Postby dick scherrer » Mon Dec 26, 2011 10:50 am

Hello,

You're welcome - good to hear it is working :)

And i dont know how your JCL executed with diff. LRECL in IEBCOPY.
It may be worth a bit of your time to try to determine why the difference. . .

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How to copy one PDS to Other PDS of different LRECL

Postby Nik22Dec » Wed Dec 28, 2011 11:31 am

Hi,

It seems that the LRECL & the BLKSIZE of the input & output PDSs are not matching. Try looking at the input PDS's properties & then, replicate them in the job. You can also try running the below given JCL with the output PDS already created manually to understand where you are going wrong.

//STEP1 EXEC PGM=IEBCOPY
//SYSUT1 DD DSN=*Input PDS*,DISP=SHR
//SYSUT2 DD DSN=*Output PDS*,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY INDD=SYSUT1,OUTDD=SYSUT2
/*
//

Tanks & Regards,
Nikhil
Thanks,
Nik
User avatar
Nik22Dec
 
Posts: 68
Joined: Mon Dec 26, 2011 6:38 pm
Has thanked: 2 times
Been thanked: 0 time

Re: How to copy one PDS to Other PDS of different LRECL

Postby dick scherrer » Wed Dec 28, 2011 11:43 am

Hello,

It seems that the LRECL & the BLKSIZE of the input & output PDSs are not matching.
Yes, this has been known since the beginning of the topic.

The question for some of us is why it works on some systems and not on others. . .

Your reply does not appear to address this. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post