zowe / zss

Zowe System Services Server for enabling low-level microservices
Eclipse Public License 2.0
13 stars 45 forks source link

Fix byte allocation by using DALAVGR instead of DALTRK or DALCYL #585

Closed 1000TurquoisePogs closed 8 months ago

1000TurquoisePogs commented 1 year ago

In https://github.com/zowe/zss/pull/530 a mistake was made where the code assumed either DALTRK or DALCYL must be set. That's not true - if neither are set, allocation is going to be in bytes, which then requires DALAVGR but also block length to be specified. In our API, avgr can be set directly, but because the "space" field also exists for specifying trk/cyl, "space" can contain byte types which would mean the same thing as avgr, so there's 2 ways to say you are working with bytes. This PR checks to prevent setting DALAVGR twice, but gives the user the freedom to set it one way or the other.