Skip to Main Content
IBM Z Software


This portal is to open public enhancement requests against IBM Z Software products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Future consideration
Workspace COBOL Compilers
Categories z/OS
Created by Guest
Created on Jul 12, 2023

Implement: 01 var1 LIKE var2.

Often variables are defined in copybooks or DCLGEN copybooks. There are times when the definition in that copybook changes slightly and it would be nice if a developer could simply rely on the compiler to use the picture of the copybook variable as the picture in the developer's own working storage variable. Example:

COPYBOOK ABCDE looks like this:

01  ABCDE-STRUCTURE.

    02  ABCDE-ACCOUNT-X.

            03  ABCDE-ACCOUNT              PIC 9(9).

    02  ABCDE-PROJECT-NAME          PIC X(16).

    02  ABCDE-PROJECT-DATE           PIC X(10).

Then, if any of those fields change size the program would automatically adapt to those differences after recompilation. Certainly, if they got considerably smaller there might be an issue with the VALUE clauses and the compiler would correctly error out, but in most relatively small changes there would likely be no harm.

PROGRAM's WORKING STORAGE:

COPY ABCDE.

01  REPORT-HEADER.

    02  HEADER-ACCOUNT                      LIKE ABCDE-ACCOUNT-X    VALUE 'ACCOUNT'.

    02  FILLER                                              PIC X(02) VALUE SPACES.

    02  HEADER-PROJECT                       LIKE ABCDE-PROJECT-NAME VALUE 'PROJECT'.

    02  FILLER                                             PIC X(02) VALUE SPACES.

    02  HEADER-DATE                               LIKE ABCDE-PROJECT-DATE VALUE 'DATE'.

01  REPORT-RECORD.

    02  REPORT-ACCOUNT                       LIKE ABCDE-ACCOUNT.

    02  FILLER                                             PIC X(02) VALUE SPACES.

    02  REPORT-PROJECT                       LIKE ABCDE-PROJECT-NAME.

    02  FILLER                                             PIC X(02) VALUE SPACES.

    02  REPORT-DATE                               LIKE ABCDE-PROJECT-DATE.

 

PROCEDURE DIVISION.

...

WRITE OUTPUT-FILE FROM REPORT-HEADER.

...

{loop}

MOVE ABCDE-ACCOUNT              TO REPORT-ACCOUNT.

MOVE ABCDE-PROJECT               TO REPORT-PROJECT.

MOVE ABCDE-DATE                       TO REPORT-DATE.

WRITE OUTPUT-FILE FROM REPORT-RECORD.

PERFORM READ-INPUT-FILE.

Idea priority Medium
  • Guest
    Reply
    |
    Dec 10, 2023

    Hi,

    I think « LIKE » and « TYPEDEF » does not address same needs:

    • TYPEDEF presupposes the implementation of data description standards based on a data standardisation approach: all data of the same type use a same description.

    • LIKE concerns the reuse of a description for another description: the description of one data follows the evolution of another description, the changes applied to the source description apply to the descriptions of the data that references the source description. There is no idea of standardization.

    Two different needs, two different solutions.


    Thanks.


  • Admin
    Basil Kanneth
    Reply
    |
    Sep 20, 2023

    This Idea is being accepted for now. In parallel, we are investigating the implementation of TYPEDEF to see if it will meet the requirements for this Idea.

    1 reply
  • Admin
    Basil Kanneth
    Reply
    |
    Aug 7, 2023

    This Idea is being investigated further and needs more time.