Topic
6 replies Latest Post - ‏2012-10-15T09:37:02Z by niis
niis
niis
4 Posts
ACCEPTED ANSWER

Pinned topic COBOL Compile Options: TEST(....EJPD),LIST

‏2012-10-10T07:59:44Z |
Could anyone help me answer the following questions?

Q1. What is the difference in compiled module if EJPD sub-option is used instead of NO-EJPD sub-option?

Q2. What is the difference in compiled module if LIST is used instead of using NOLIST option?

  • Enterprise COBOL 4.2 is used.

My customer is planning to use IBM Debug Tool (debug function and code coverage utility) and need to change the compile options to use the tool in development environment.

Currently, my customer is using the following options for both development and production environments:
TEST(NOHOOK, NOEJPD), NOLIST, …..

but I need to change as the following for debugging purpose in development phase.
TEST(NOHOOK,EJPD), LIST , …..

I am thinking of unifying these options if there are no big differences in two "modules" (in fact, the module size seems to be the same)

Thanks for any suggestions!
Updated on 2012-10-15T09:37:02Z at 2012-10-15T09:37:02Z by niis
  • BillWoodger
    BillWoodger
    75 Posts
    ACCEPTED ANSWER

    Re: COBOL Compile Options: TEST(....EJPD),LIST

    ‏2012-10-10T09:59:37Z  in response to niis
    LIST/NOLIST is not going to affect the generated code (therefore module size) in any way. LIST will produce a substantially bigger compile listing.

    According to the manual (a useful resource for such questions) NOEJPD/EJPD "have an effect only if the TEST(NOHOOK) and OPTIMIZE compiler options are specified."

    If you see no change in module size, then you have NOOPT and the EJPD will not actually do anything as far as the compile itself is concerned, however the sub-option chosen will be reflected in the value of bit 7 (starting from zero) of signature information byte 27, and being set correctly may be required anyway.
    You can reduce module size when using TEST with the sub-option SEPARATE, where much of the information will be held in a file separate from the object produced.
    • niis
      niis
      4 Posts
      ACCEPTED ANSWER

      Re: COBOL Compile Options: TEST(....EJPD),LIST

      ‏2012-10-11T12:28:23Z  in response to BillWoodger
      Thanks for your prompt response to my inquiry.

      I'm still a little bit confused by the following statements in Debug tool user's guide:

      "For all programs in both test and production environments, specify the following compiler options:
      TEST(NOHOOK,SEPARATE,EJPD),LIST,MAP,SOURCE,NONUMBER,XREF(SHORT).
      The TEST compiler option is required if you plan to use Debug Tool for z/OS to debug a program. The TEST option is optional if you plan to use Fault Analyzer for z/OS or Application Performance Analyzer for z/OS.
      The SEPARATE sub-option produces a SYSDEBUG file.
      NOHOOK and SEPARATE produce a production-ready module that can still be
      debugged.
      If the OPT option is also used, EJPD might reduce optimization but enables the
      debugger’s JUMPTO and GOTO commands. These commands are disabled when OPT and NOEJPD are both used."

      Especially, the last sentence make me confused.

      Does it mean even if I choose TEST(NOHOOK,SEPARATE,NOEJPD),(NOT EJPD) I still can use GOTO and JUMTO commands and also can modify variables with predictable results as far as NOOPTIMIZE(default)is used, as you mentioned "NOEJPD/EJPD "have an effect only if the TEST(NOHOOK) and OPTIMIZE compiler options are specified".
      • BillWoodger
        BillWoodger
        75 Posts
        ACCEPTED ANSWER

        Re: COBOL Compile Options: TEST(....EJPD),LIST

        ‏2012-10-11T14:24:43Z  in response to niis
        As I read it, if you use NOOPT then the setting of EJPD/NOEJPD is irrelevant. Just looking at the Cobol manual, you (obviously) can't tell if the bit set to indicate that EJPD was used is interrogated by Debug Tool, but from what you've now posted I'd say "no, it isn't", so with NOOPT you should have full functionality and don't worry about EJPD.
        • niis
          niis
          4 Posts
          ACCEPTED ANSWER

          Re: COBOL Compile Options: TEST(....EJPD),LIST

          ‏2012-10-15T09:37:02Z  in response to BillWoodger
          Bill,

          Great thanks!

          Regards,

          niis.
  • SystemAdmin
    SystemAdmin
    403 Posts
    ACCEPTED ANSWER

    Re: COBOL Compile Options: TEST(....EJPD),LIST

    ‏2012-10-12T20:24:00Z  in response to niis
    Q1. What is the difference in compiled module if EJPD sub-option is used instead of NO-EJPD sub-option?

    A1) The compiler will generate less optimized code to allow users to change the flow of the program via Debug TOol JUMPTO/GOTO commands. The program will have significantly less efficient generated code with EJPD. From the COBOL compiler perspective, I would recommend using OPT and NOEJPD, but if your Debug Tool users want to use the GOTO/JUMPTO feature of Debug Tool, and you are compiling with OPTIMIZE, then you must take the performance hit and use EJPD.

    COBOL is the Language of the Future!
    Tom
    • niis
      niis
      4 Posts
      ACCEPTED ANSWER

      Re: COBOL Compile Options: TEST(....EJPD),LIST

      ‏2012-10-15T09:29:58Z  in response to SystemAdmin
      Tom,

      Thanks for your response!

      Regards,

      ni