Different COBOL source generation for MOVE
search cancel

Different COBOL source generation for MOVE

book

Article ID: 411569

calendar_today

Updated On:

Products

CA 2E

Issue/Introduction

When performing a source comparison between 2E 8.7.4 source generation for COBOL ILE (HLL = CBI) with the sources from previous 2E versions (i.e.  8.7 GA and 8.6), notice differences of the MOVE statements.

For example:

Function

CLMD04MDL (8.7.4)

CLMD08MDL (8.7)

CBI001

MOVE SPACES TO WQ0012

MOVE SPACES TO WQ0013

MOVE SPACES TO WQ0014

MOVE SPACES TO WQ0022

MOVE ' ' TO WQ0012

MOVE ' ' TO WQ0013

MOVE ' ' TO WQ0014

MOVE ' ' TO WQ0022

CBI004

MOVE ZEROS TO WQ0244

MOVE ZEROS TO WQ0270

MOVE ZEROS TO WQ0455

MOVE ZEROS TO WQ0481

MOVE ZEROS TO WQ0533

MOVE ZEROS TO WQ0559

MOVE ZEROS TO WQ0611

MOVE ZEROS TO WQ0637

MOVE 0 TO WQ0244

MOVE 0 TO WQ0270

MOVE 0 TO WQ0455

MOVE 0 TO WQ0481

MOVE 0 TO WQ0533

MOVE 0 TO WQ0559

MOVE 0 TO WQ0611

MOVE 0 TO WQ0637

When trying to regenerate those CBI functions and then compare (i.e 8.7 GA vs 8.7.4), those MOVE lines are exactly the same.

Is there any explanation to this? 

Environment

CA 2E 8.7.x

Resolution

The 2E Engineering team took a look at the difference in the generation around SPACES and 0's across the 2E releases.

Attached is a document which details a list of changes. Each column in the document corresponds to a particular release of 2E. Each change in a specific release (over the previous release) has been highlighted in orange.

The entire story started prior to 2E 8.6, when a solution for problem C22E 444 was provided on top of 2E 8.5 GA. It was subsequently included in 2E 8.6 GA. As part of this, 0 was generated instead of ZEROS, to prevent compilation failure.

This is the difference we see in the generation between 2E 8.5 GA and 2E 8.6 GA (Column A and B in the attached document).

Subsequently 2 more problems were addressed in this area (C22E 475 and C22E 479).

  • C2E 475 dealt with generation of ' ' instead of SPACES, to prevent compilation failure
  • C22E 479 standardized the generation of ZEROS and 0s

C22E 475 and C22E 479 were included in 2E 8.5 CUM PTF A and also 2E 8.6 CUM PTF C and released in 2014, prior to 2E 8.7 GA. Due to this, in the attached document, we can see similar issues in the generated code, when code is generated in models which are at 2E 8.5 CUM PTF A and 2E 8.6 CUM PTF C levels.

The same fixes have also been included in 2E 8.7 GA, which is why the code at 2E 8.5 CUM PTF A/2E 8.6 CUM PTF C looks similar to that at 2E 8.7 GA.

It was later identified that an error was introduced as part of changes in C22E 475, which is a duplicate initialization statement - "MOVE ' ' TO " after every initialization with SPACES. This was fixed as part of C22E 583. In addition, for comparison statements inside internal DBF functions, SPACES was returned instead of '', for comparison statements. "IF (' ' = ' ') THEN" is generated as "IF (SPACES = ' ') THEN".

There is another unrelated problem specifically related to fixing the issue of initialization of DT#, TS# and TM# fields with Blanks. This was resolved as part of a fix for C22E 580, where upon generation, the CON value *BLANK is replaced with the corresponding values of 0001-01-01 (for DT#)/00.00.00(for TM#)/0001-01-01-00.00.00.00000(for TS#), instead of the erroneous SPACES/' '. 

Fixes for both C22E 580 and C22E 583 were included in 2E 8.7 CUM PTF A and then included in 2E 8.7.1 subsequently. These changes have made their way to 2E 8.7.4 as well.

Therefore the three (3) main changes that we can see from 2E 8.7 GA to 2E 8.7.4 will be related to C22E 583 (removal of extra duplicate like for statements related to initialization with SPACES), Generation of SPACES instead of '', for comparison statements inside internal DBF functions and correct initialization of the DT#/TM#/TS# fields.

Moreover, the code generated at 2E 8.7 CUM PTF A should be similar to 2E 8.7.4.

Therefore the generation at 2E 8.7.4 is the best error free version of the CBI code generation at this point in time.

Additional Information

The attached spreadsheet is for reference purposes to highlight the evolution of the CBI code generation across 2E releases and specific fixes related to CBI code generation in each 2E release.

We recommend customers to be on the most current 2E release + patch level.

Attachments

CBI_Generation_Differences_across_2E Releases.xlsx get_app