Hi again.
New day, new questions. I have been reading (hostconfig 7.1) about the ability to modify compile procedures especially Cobol and came up with a question not answered in the documentation.
We would need to define a two-step extenstion to the Cobol compile Proc to, for code containing SQL, be able to:
- Do compiles
- Do remote syntax checks
- Do code completion from included copies
The reason for this is that traditionally (and because it is mandatory) the programmers either leave schema-names blank or use a
generic schemaname that will be replaced by spaces when doing a traditional compile. In the source it looks somewhat like this:
Select c1, c2 From Tablex when..., or Select c1, c2 from DB2B.Tablex When...
What we do as of now (outside of RDz) is, in three or four JCL steps:
- Parse the source expanding all Copy and Exec Sql Include
- Process the expanded source with FileManager/Mvs replacing all known schema-names with Space
- Run either DB2 precompile/Cobol Compile or Cobol Compile with DB2 co-processor
This three-step operation is what we would like to execute from Rdz .
To be able to make this happen in RDz we would need to run the extra two steps ahead of the Rdz "standard" compile step. For this to happen we would need to:
- In the first step somehow get hold of the SYSLIB concatenation (that normally goes into the COBOL.SYSLIB override. We also would need to generate more or less the same list of DS-names as a SYSIN in the same step.
- In the second step we don´t need to do anything since its static JCL
- In the third step we need to replace the generated sysin, that points to the source dataset that is to be compiled with the output (temp dataset) from step two above.
I have seen the ability to add extra step definitions to existing procedures in the property sheet in RDz but it don´t seems to be enough (variable list of COPY-libs). The property sheet for these extra steps are somewhat vanilla (of obvious reasons).
So, the long and the short of this is: Does anybody have an idea if this might be feasible and if so; How?
Best regards, Lars