IBM / dbb-zappbuild

zAppBuild is a generic build solution for building z/OS applications using Apache Groovy build scripts and IBM Dependency Based Build (DBB) APIs.
Apache License 2.0
42 stars 144 forks source link

Highlighting and improving Transfer use cases #251

Closed FALLAI-Denis closed 8 months ago

FALLAI-Denis commented 2 years ago

Hi,

The zAppBuild model provides for the management of the types of elements to be made available and packaged without transformation: Transfer.properties and Transfer.groovy.

As far as we are concerned, the provision of elements without transformation represents 80% to 90% of our element types, while elements with transformation, essentially programs, represent more than 80% of the elements occurrences. What matters for an IBM DBB administrator is the number of element types, and their differents transformation processes, rather than the number of elements occurrences.

The Transfer processing type should be highlighted in the same way as the other processing types.

In addition, all item types with Transfer processing are not necessarily sources in LRECL 80 format, and some are not eligible for PDS handling. The Transfer.properties and Transfer.groovy models should provide a processing case using a PDS other than LRECL 80, and a processing case using a sequential file (not PDS).

Thanks.

dennis-behm commented 2 years ago

Hi @FALLAI-Denis ,

thanks for providing feedback on the implementation of the Transfer element type. When you refer to highlighting the Transfer element type - are you looking for some samples? Have you checked out the sample in https://github.com/IBM/dbb-zappbuild/main/samples/application-conf/file.properties#L39-L48

To your idea about supporting additional datasets characteristics:

I think an additional PropertyMapping probably satisfies your needs to define the dataset characteristics, same how it used in . However, I feel, that the configuration would be a bit clumsy.

What do you think about such a configuration for control cards. The last setting would allow to map files to the dataset characteristics:

#
# PropertyMapping to map files using the Transfer.groovy language script to different target datasets 
#
transfer_datasetMapping = transfer_jclPDS :: **/*.jcl
transfer_datasetMapping = transfer_controlCardPDS :: **/*.ccard
#
# file mapping for overwriting the default deployType of the Transfer.groovy language script 
#
transfer_deployType = JCL :: **/*.jcl
transfer_deployType = CONTROLCARD :: **/*.ccard
#
# --> dataset characteristics mapping
transfer_datasetOptions= transfer_srcOptions :: **/*.jcl
transfer_datasetOptions= transfer_controlCardOptions :: **/*.ccard

An additional new setting is required in build-conf/Transfer.properties

#
# dataset creation options
transfer_srcOptions=cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
transfer_controlCardOptions=cyl space(1,1) lrecl(133) dsorg(PO) recfm(F,B) dsntype(library)

Based on those single assignments of the property values, a user might (unfortunately) incorrectly map a file, which might lead to truncation and an exception. But this might be happening in your existing setup as well.

What are your thoughts on the above proposal?

Dennis

FALLAI-Denis commented 2 years ago

Hi @dennis-behm

When you refer to highlighting the Transfer element type - are you looking for some samples?

Yes, but also indicate it explicitly on the "README.md" of page https://github.com/IBM/dbb-zappbuild/blob/main/languages

Regarding the implementation proposal.

I will study it (I am new to DBB, zAppbuild, and the groovy language, and I need time to assimilate everything).

There is always a risk that a user declares information that alters the functioning of zAppbuild for Transfers, but this is also true globally.

There is always a risk that a user declares information that alters the functioning of zAppbuild for Transfers, but this is also true globally.

Our intention is to have no configuration at the Git Repository level ("application-conf" folder) because we consider that the constructions must always work identically regardless of the Git Repository being processed: these are global company-level rules that must apply and not specific cases related to Applications (Git Repository level). It is likely that we still have exceptions to manage for certain Applications / Git Repositories, but we will not document this exception management to users (not to give them the temptation to do things that we do not want).

dennis-behm commented 8 months ago

The transfer script has been enhanced in zAppBuild 3.5.0 https://github.com/IBM/dbb-zappbuild/releases/tag/3.5.0

The management of default build configuration has been implemented as part of zAppBuild 3.4.0 https://github.com/IBM/dbb-zappbuild/releases/tag/3.4.0