Problem in copying a PDS



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

Problem in copying a PDS

Postby ansh_4702 » Thu Jan 08, 2009 2:41 pm

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
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Problem in copying a PDS

 

Re: Problem in copying a PDS

Postby MrSpock » Thu Jan 08, 2009 7:45 pm

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.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Problem in copying a PDS

Postby Bill Dennis » Fri Jan 09, 2009 1:45 am

If your input is 12 tracks then 30 cylinders seems like overkill!
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Problem in copying a PDS

Postby ansh_4702 » Fri Jan 09, 2009 12:25 pm

Thanks MrSpock ,
Its working now !!!
ansh_4702
 
Posts: 33
Joined: Thu Jan 08, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Problem in copying a PDS

Postby Unshriven » Sun Mar 21, 2010 4:36 am

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?
Unshriven
 
Posts: 11
Joined: Tue Jul 21, 2009 8:37 am
Location: Irving Texas
Has thanked: 0 time
Been thanked: 0 time

Re: Problem in copying a PDS

Postby dick scherrer » Sun Mar 21, 2010 6:35 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Problem in copying a PDS

Postby Unshriven » Sun Mar 21, 2010 8:25 am

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.
Unshriven
 
Posts: 11
Joined: Tue Jul 21, 2009 8:37 am
Location: Irving Texas
Has thanked: 0 time
Been thanked: 0 time

Re: Problem in copying a PDS

Postby dick scherrer » Sun Mar 21, 2010 9:06 am

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post