Giter VIP home page Giter VIP logo

Comments (6)

dajsen avatar dajsen commented on August 13, 2024

Sorry, don't like that solution. If it's implemented then I would like to have a choice, do the spin through or not...
Doesn't it work if you set the isSQL-option in file.props, or do you find it a bit messy ?

from dbb-zappbuild.

nlopez1-ibm avatar nlopez1-ibm commented on August 13, 2024

Good point. Setting this in a prop file hard codes it for all programs in the project. Not ideal. With spinning across dependencies we can be more selective.

from dbb-zappbuild.

dajsen avatar dajsen commented on August 13, 2024

No, it's set on module-level.
OK, so you have your SQL-code in a lot of copybooks right ? More than 50% of your code, otherwise you will 'pay' for it in every build instead of dealing with it only in the modules involved...

from dbb-zappbuild.

nlopez1-ibm avatar nlopez1-ibm commented on August 13, 2024

Kind of - yes. Plus I worry about always passing the "SQL" compiler options for non-DB2 programs. I'm not sure thats a good practice.

from dbb-zappbuild.

dennis-behm avatar dennis-behm commented on August 13, 2024

Probably, I have missed something in the discussion. You can overwrite the isSQL property on a file level. If you have a couple of programs, then you can add these files to this list. If you have naming conventions to indicate, you can also use wildcards. Here is an example for isCICS from the Mortgage sample:

isCICS = true :: **/cobol/epsmlist.cbl, **/cobol/epscsmrt.cbl

Within buildUtils.isSQL, this file property 'overwrite' is taken into consideration.

def isSQL(LogicalFile logicalFile) {
boolean isSQL = logicalFile.isSQL()
if (!isSQL) {
String sqlFlag = props.getFileProperty('isSQL', logicalFile.getFile())
if (sqlFlag)
isSQL = sqlFlag.toBoolean()
}

I assume, your previous build environment carries these information. Mapping the programs of type 'db2', with an extract of all the pgms in your dbb collection, can give you the delta where you need to set the isSQL pgm in file.properties.

The proposed enhancement is expected to be expensive, because you would need to scan / query all copybooks referenced for the given COBOL file (for a userBuild and pipelineBuild).

from dbb-zappbuild.

drbruce-git avatar drbruce-git commented on August 13, 2024

Just a side comment pointing out that we already scan all copybooks referenced by a COBOL program so that we can identify and resolve them in the local Git repository to copy them to the copybook data set. This is done in BuildUtilities.copySourceFiles. It even creates a list of dependencies (https://github.com/IBM/dbb-zappbuild/blob/development/utilities/BuildUtilities.groovy#L81) that we could return from the method and check to see if any are marked isSQL.

I was mistaken. The dependency resolver returns physical dependencies which do not contain the isSQL flag. Looks like we would have to scan the dependencies a second time to get the logical files. This might be a good candidate for a stand alone sample in the DBB samples repository that customers that need it can integrate in their copy of zAppBuild.

from dbb-zappbuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.