This Question is Possibly Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
6 Replies Last post: Sep 25, 2009 2:46 AM by asrudd  
Click to view lbjerges's profile   11 posts since
Apr 21, 2009

Sep 16, 2009 2:07 PM

Modifying procs

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:

  1. Parse the source expanding all Copy and Exec Sql Include
  2. Process the expanded source with FileManager/Mvs replacing all known schema-names with Space
  3. 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

Click to view asrudd's profile   8 posts since
Jul 8, 2009
1. Sep 21, 2009 1:27 AM in response to: lbjerges
Re: Modifying procs
Lars

And I thought that we had complex compilation jobs.
The COBOL Settings page provides 3 procedure names: ELAXFCOP, ELAXFCOT and ELAXFCOC.
In general, each of these procedures (or their proxy, namely your replacement procedure which can also have a different name) is passed the associated step options (the SYSTSIN Instructions are handled differently). Your customised procedure can process these options as required; for example, the replacement ELAXFCOP procedure does not need to perform a DB2 precompilation. The replacement procedures could also invoke a batch REXX procedure to process the source you mentioned in item 2.

This is a very simplified answer to your question.

PS. I will be presenting a session on Customising the RDz Job Generation Process at the forthcoming GSE Conference.

Regards
Tony

Click to view wilbert's profile   9 posts since
Sep 28, 2008
2. Sep 21, 2009 1:35 PM in response to: asrudd
Re: Modifying procs

Hi Tony,

For those of us who will not be able to attend the GSE conference, can you share your presentation with us?

Thanks,

Wilbert

Click to view asrudd's profile   8 posts since
Jul 8, 2009
4. Sep 23, 2009 6:53 AM in response to: lbjerges
Re: Modifying procs
Lars

The popup you show applies only to the remote syntax check, the actual remote job submission tolerates error feedback in conjunction with the DB2 precompiler (at our installation we use our in-house written error feedback for the DB2 precompiler, actually the COBOL compiler output - my "Extended Error Feedback" document describes how this can be done).

The job submitted for the remote syntax check is similar to the remote job submission, but does not include any precompilers. Probably for the reason that it cannot interpret their error messages.

Click to view asrudd's profile   8 posts since
Jul 8, 2009
6. Sep 25, 2009 2:46 AM in response to: lbjerges
Re: Modifying procs

Lars

Because the remote syntax check does not support customised jobs, the only way to do what you require is to customise the normal RDz job generation process. You could "simulate" a syntax-only job by forcing job termination after the compile and so avoid performing a BIND and LinkEdit and by defining subprojects with just one program (provided this is appropriate for your job structure - in our case it is, because we almost never statically link programs).

The compiler provides as ADATA records the information you require from the COPY statements.
After running the COBOL compiler, you could analyse the SYSADATA file to obtain the information you require, and, I assume, modify you source accordingly and submit another COBOL compilation.
With the exception of the source modification and recompilation, this is essentially what I do for extended error feedback - in this case I create a customised SYSXMLSD file.

Tony


Bottom Banner