Performance issues during writing several members in a PDS

General discussion on the JZOS batch launcher and toolkit
Post Reply
PascalF
Posts: 1
Joined: Thu Aug 26, 2010 8:48 am

Performance issues during writing several members in a PDS

Post by PascalF »

Hi,

To create/update the contents of a PDS member I use ZFile APIs (write method write for binary or thru an OutputStream for text).

But in my use case I have hundreds members per PDS to write.

Does JZOS automatically perform an open and a close of the PDS for each member written (which could be the cause of these performance issues)?
If true, is there any way to do that only once per PDS?
Or to use another API?

Thanks
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

ZFile is a thin wrapper around the IBM z/OS C Library. Unfortunately, there is no way in the C library to process multiple members of a PDS (using say, BPAM), so each ZFile instance that you open on a PDS member will go through OPEN/CLOSE on the member.

It might be somewhat more efficient to allocate a DD to your PDS, and then to open the ZFile like this for each member:

new ZFile("//DD:MYDD(MEMBER1)") ;

This would avoid going through allocation for each member.
Post Reply