Wednesday, October 10, 2012

Why newly created dataset properties are overriden?

I created a dataset using ZFile.bpxwdyn() method. I copied some content form other dataset to it using
 new ZFile(ZFile.getSlashSlashQuotedDSN(inputDatasetName, true).

But ZFile constructor has overriden some of the properties of "inputDatasetName".

Root cause:

I missed to pass attributes along with ZFile constructor as shown below(highlighted in blue color):

new ZFile(ZFile.getSlashSlashQuotedDSN(inputDatasetName, true),"rb,type=record,recfm=fb,lrecl=80,noseek");

Analysis:
That means ZFile constructor will have some defualt values assigned to it. So if we don't pass any it will take default.