Page 1 of 1

Problem in copying a PDS

PostPosted: Thu Jan 08, 2009 2:41 pm
by ansh_4702
Hi,
I am to take the bkup of a PDS in to another PDS,for this i am using following JCL:
//STEPNAME EXEC PGM=IEBCOPY                                         
//SYSPRINT DD SYSOUT=*                                             
//MYDD1    DD DSN=PGM.PROD.JCLLIB.BACKUP,DISP=SHR           
//MYDD2    DD DSN=PGM.JCLLIB.BACKUP.JAN09,             
//         DISP=(,CATLG,DELETE),UNIT=TEST,SPACE=(CYL,(30,3),RLSE)
//SYSIN    DD *                                                     
           COPY INDD=MYDD1,OUTDD=MYDD2                             
/*                                                                 
//                 

After execution,when we try to open the o/p, it says "invalid record format".
Please advice.
The attributes of i/p pds is as follows:
General Data Current Allocation
Allocated tracks . : 12
Allocated extents . : 1
Maximum dir. blocks : 50


Organization . . . : PO Current Utilization
Record format . . . : FB Used tracks . . . . : 12
Record length . . . : 80 Used extents . . . : 1
Block size . . . . : 27920 Used dir. blocks . : 12
1st extent tracks . : 12 Number of members . : 68
Secondary tracks . : 10
Data set name type : PDS

Re: Problem in copying a PDS

PostPosted: Thu Jan 08, 2009 7:45 pm
by MrSpock
If MYDD2 is supposed to be a PDS, then you failed to provide a value in the SPACE parameter for the directory blocks. It should look something like this:

//MYDD2    DD DSN=PGM.JCLLIB.BACKUP.JAN09,             
//         DISP=(,CATLG,DELETE),UNIT=TEST,SPACE=(CYL,(30,3,255),RLSE)


SPACE Syntax.

Re: Problem in copying a PDS

PostPosted: Fri Jan 09, 2009 1:45 am
by Bill Dennis
If your input is 12 tracks then 30 cylinders seems like overkill!

Re: Problem in copying a PDS

PostPosted: Fri Jan 09, 2009 12:25 pm
by ansh_4702
Thanks MrSpock ,
Its working now !!!

Re: Problem in copying a PDS

PostPosted: Sun Mar 21, 2010 4:36 am
by Unshriven
I have that same situation. I did not define directory blocks either but thought that either they would be provided by SMS or take the attributes of the file that was being copied? Is this a wrong assumption?

Re: Problem in copying a PDS

PostPosted: Sun Mar 21, 2010 6:35 am
by dick scherrer
Hello,

thought that either they would be provided by SMS or take the attributes of the file that was being copied? Is this a wrong assumption?
How would SMS know before the process begins that the output is to be a pds?

Not all utilities automatically copy the input dcb info when it is not wpecified in the output definition.

Re: Problem in copying a PDS

PostPosted: Sun Mar 21, 2010 8:25 am
by Unshriven
I would assume it would inherit the attributes of the infile. When you copy a dataset in ISPF, it will ask you if you want to carry over the attributes. Of course, I'm new to this and it may be a falicious assumption.

Re: Problem in copying a PDS

PostPosted: Sun Mar 21, 2010 9:06 am
by dick scherrer
Hello,

When you copy a dataset in ISPF, it will ask you if you want to carry over the attributes.
Yes, it will. As long as you are using ispf/copy. Some batch utilities also copy dcb info unless told otherwise.

Of course, I'm new to this and it may be a falicious assumption.
Yes, it is. . . Unfortunately, things work as they work - not necessarily as something else works. . .