Question

I used the below jcl to modify the existing ps. I was able to modify the parameters. but i am getting an I/o error.

//TXXXXXSP JOB (MOD),'PRAMOD',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),

// NOTIFY=&SYSUID
//FIXPDS EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD DSN=XXXXXX.CREATE.GDG,
// DISP=MOD,SPACE=(TRK,(10,10,0),RLSE),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
//SYSUT1 DD *
/*
//

Was it helpful?

Solution

It looks as though you are trying to change the attributes of a dataset by specifying DISP=MOD. The documented purpose of MOD is to indicate either that the data set exists and records are to be added to the end of it or a new data set is to be created.

However, it can be used to change the attributes of a dataset. I would suggest that you need to be careful doing this as you can easily corrupt your dataset. For example it might be reasonable to change the DCB for an existing PS, but if that PS data already contained data you could corrupt it. I've not tried this but I believe you can increase the space providing you don't pass 16 extents. I believe you can even change a PS into a PDS again, don't expect to be able to see the any data again.

I think the main point of this is that it is not recommended. Rather than run the risks maybe use your job to copy the dataset using LIKE and overriding the things you want to change. Then when your happy delete the old dataset and rename the new one to the old name.

The following examples have been done from memory so there may be minor syntactical errors with them. You need to specify SPACE but remove any other parameter that you do no need to 'fix'.

Eg. for PS

//FIXPS    EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*                            
//SYSUT1   DD DSN=XXXXXX.CREATE.GDG,DISP=SHR     
//SYSUT2   DD DSN=XXXXXX.CREATE.GDG.NEW, 
//            DISP=(NEW,CATLG,DELETE), 
//            SPACE=(TRK,(10,10,0),RLSE),UNIT=SYSDA,
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),           
//            LIKE=XXXXXX.CREATE.GDG             

Eg. for PDS

//FIXPDS    EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*                            
//SYSUT1   DD DSN=XXXXXX.CREATE.GDG,DISP=SHR     
//SYSUT2   DD DSN=XXXXXX.CREATE.GDG.NEW, 
//            DISP=(NEW,CATLG,DELETE), 
//            SPACE=(TRK,(10,10,0),RLSE),UNIT=SYSDA,
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),           
//            LIKE=XXXXXX.CREATE.GDG             
//SYSUT3   DD UNIT=SYSDA,SPACE=(TRK,(30,30),RLSE) 
//SYSUT4   DD UNIT=SYSDA,SPACE=(TRK,(30,30),RLSE) 
//SYSIN    DD *                                   
 C I=SYSUT1,O=SYSUT2                              
/*                                        

For more info see DISP parameter in chapter 12 of the JCL reference manual http://publibz.boulder.ibm.com/epubs/pdf/iea2b6b0.pdf

OTHER TIPS

"It's not wise to upset a wookie." I strongly recommend that if you wish to actually change attributes of a PDS then actually allocate an X version of the library in question then copy all of the members to it, then run a compare to make certain there were no bits or bytes that got corrupted, then delete the old library and rename the new one to the old name.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top