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 Aug 25, 2023

Enterprise Cobol V6+ - Disable RULES controls locally

Hi,

The RULES compilation option allows to perform compile-time checks on the proper use of data formats.

We have activated the RULES compilation option to educate our developers on the proper use of data formats, and we are satisfied with it.

However, it is sometimes necessary to deviate from these rules, in particular when setting up a framework.

We would like to have a mechanism that would allow us to locally disable RULES controls without disabling them globally.

We have proposed to implement a >>RULES(ON|OFF) directive, see COBOLVUE-I-206.
After reflection this is not the right solution because it would suffice to code >>RULES(OFF) at the beginning of the source code so that there is no longer any control of RULES.

We suggest setting up either a compiler directive or a normalized comment, which would be placed before a COBOL statement and which would disable the RULES checks only for this statement.
This could be a >>NORULES compiler directive, or a *NORULES comment placed immediately before the statement that should not be checked and should not trigger a compile-time warning message .

 

Idea priority Low
  • Admin
    Basil Kanneth
    Reply
    |
    Nov 20, 2023

    This Idea is being accepted and will be further updated once put into plan. Thanks.

  • Admin
    Basil Kanneth
    Reply
    |
    Sep 25, 2023

    Thank you for the additional information. We are currently reviewing it.

  • Guest
    Reply
    |
    Sep 21, 2023

    Hi,

    Here is a use case: validating a date data-item.


      001535               * DATE FORMAT S : SSAAMMJJ                                        ADADDATE   
    
    001536 01 5-DATE-S. *> DAT6C ADADDATE
    001537 05 YYYY. ADADDATE
    001538 10 CC. *> DAT61C ADADDATE
    001539 15 CC9 PIC 99. ADADDATE
    001540 10 YY. *> DAT62C ADADDATE
    001541 15 YY9 PIC 99. ADADDATE
    001542 05 MM PIC XX. *> DAT63CC ADADDATE
    001543 05 DD PIC XX. *> DAT64C ADADDATE


    001563 * CALCUL ANNEE BISSECTILE ADADDATE
    001564 01 5-DATE-M4 PIC 99 BINARY. *> LEAP-REM ADADDATE


    003454C * VALIDATION D'UNE DATE ADAPDATE
    003455C VALIDER-DATE SECTION. ADAPDATE
    003456C * par défaut, date invalide ADAPDATE
    003457C set 5-DATE-INVALIDE to true ADAPDATE 1406
    003458C evaluate true ADAPDATE
    003459C * conditions invalidité de la date ADAPDATE
    003460C when 5-DATE-S not numeric ADAPDATE 1533
    003461C when MM in 5-DATE-S < '00' or > '12' ADAPDATE 1539 1533
    003462C when DD in 5-DATE-S < '00' or > '31' ADAPDATE 1540 1533
    003463C when DD in 5-DATE-S > '30' and (MM in 5-DATE-S = '04' ADAPDATE 1540 1533 1539 1533
    003464C or '06' ADAPDATE
    003465C or '09' ADAPDATE
    003466C or '11') ADAPDATE
    003467C when DD in 5-DATE-S > '29' and MM in 5-DATE-S = '02' ADAPDATE 1540 1533 1539 1533
    003468C 1 exit section ADAPDATE
    003469C * calcul année bissextile sur 29/02 ADAPDATE
    003470C when MM in 5-DATE-S = '02' and DD in 5-DATE-S = '29' ADAPDATE 1539 1533 1540 1533
    003471C * siecle mutiple de 400 bissextile ADAPDATE
    003472C 1 if YY in 5-DATE-S = '00' ADAPDATE 1537 1533
    003473C 2 compute 5-DATE-M4 = CC9 in 5-DATE-S / 4 ADAPDATE 1561 1536 1533

    ==003473==> IGYPA3084-W **RULES(NOLAXPERF)** The sending operand "CC9 (NUMERIC INTEGER)" in an
    arithmetic expression was an inefficient type. "BINARY" or
    "PACKED-DECIMAL" would give better run-time performance.

    003474C 2 compute 5-DATE-M4 = CC9 in 5-DATE-S - 5-DATE-M4 * 4 ADAPDATE 1561 1536 1533 1561

    ==003474==> IGYPA3084-W **RULES(NOLAXPERF)** The sending operand "CC9 (NUMERIC INTEGER)" in an
    arithmetic expression was an inefficient type. "BINARY" or
    "PACKED-DECIMAL" would give better run-time performance.

    003475C * année multiple de 4 bissextile ADAPDATE
    003476C 1 else ADAPDATE
    003477C 2 compute 5-DATE-M4 = YY9 in 5-DATE-S / 4 ADAPDATE 1561 1538 1533

    ==003477==> IGYPA3084-W **RULES(NOLAXPERF)** The sending operand "YY9 (NUMERIC INTEGER)" in an
    arithmetic expression was an inefficient type. "BINARY" or
    "PACKED-DECIMAL" would give better run-time performance.

    003478C 2 compute 5-DATE-M4 = YY9 in 5-DATE-S - 5-DATE-M4 * 4 ADAPDATE 1561 1538 1533 1561

    ==003478==> IGYPA3084-W **RULES(NOLAXPERF)** The sending operand "YY9 (NUMERIC INTEGER)" in an
    arithmetic expression was an inefficient type. "BINARY" or
    "PACKED-DECIMAL" would give better run-time performance.

    003479C 1 end-if ADAPDATE
    003480C 1 if 5-DATE-M4 not = 0 ADAPDATE 1561
    003481C 2 exit section ADAPDATE
    003482C 1 end-if ADAPDATE
    003483C end-evaluate ADAPDATE
    003484C * si aucune anomalie alors date valide ADAPDATE
    003485C set 5-DATE-VALIDE to true. ADAPDATE 1405
    003486C VALIDER-DATE-FN. ADAPDATE
    003487C exit section. ADAPDATE

    It would be possible to transfer areas CC9 and YY9 to a working area in packed-decimal or binary format before doing the calculation, but this would unnecessarily complicate the code when in any case that is what the compiler will do itself .


     003473:                   compute 5-DATE-M4 = CC9 in 5-DATE-S / 4                ADAPDATE                                          
    
    0011F0 E370 96C8 0171 003473 LAY R7,5832(,R9) £
    0011F6 E601 7000 0134 003473 VPKZ VRF16,0(,R7),0x1 £ CC9
    0011FC E610 0004 0849 003473 VLIP VRF17,0x4,0
    001202 E600 1080 2E7A 003473 VDP VRF16,VRF16,VRF17,0x2,8
    001208 E6A0 0000 0450 003473 VCVB R10,VRF16,0,0
    00120E E3A0 9700 0170 003473 STHY R10,5888(,R9) £

    003474: compute 5-DATE-M4 = CC9 in 5-DATE-S - 5-DATE-M4 * 4 ADAPDATE
    001214 E601 7000 0134 003474 VPKZ VRF16,0(,R7),0x1 £ CC9
    00121A E670 0080 0450 003474 VCVB R7,VRF16,8,0
    001220 B927 0077 003474 LHR R7,R7
    001224 E3A0 9700 0195 003474 LLH R10,5888(,R9) £ 5-DATE-M4
    00122A 89A0 0002 003474 SLL R10,2
    00122E 1B7A 003474 SR R7,R10
    001230 1077 003474 LPR R7,R7
    001232 E370 9700 0170 003474 STHY R7,5888(,R9) £
    001238 A7F4 0026 003474 J L0160
    00123C 003477 L0159: EQU *

    003477: compute 5-DATE-M4 = YY9 in 5-DATE-S / 4 ADAPDATE
    00123C E370 96C8 0171 003477 LAY R7,5832(,R9) £
    001242 E601 7002 0134 003477 VPKZ VRF16,2(,R7),0x1 £ YY9
    001248 E610 0004 0849 003477 VLIP VRF17,0x4,0
    00124E E600 1080 2E7A 003477 VDP VRF16,VRF16,VRF17,0x2,8
    001254 E6A0 0000 0450 003477 VCVB R10,VRF16,0,0
    00125A E3A0 9700 0170 003477 STHY R10,5888(,R9) £

    003478: compute 5-DATE-M4 = YY9 in 5-DATE-S - 5-DATE-M4 * 4 ADAPDATE
    001260 E601 7002 0134 003478 VPKZ VRF16,2(,R7),0x1 £ YY9
    001266 E670 0080 0450 003478 VCVB R7,VRF16,8,0
    00126C B927 0077 003478 LHR R7,R7
    001270 E3A0 9700 0195 003478 LLH R10,5888(,R9) £ 5-DATE-M4
    001276 89A0 0002 003478 SLL R10,2
    00127A 1B7A 003478 SR R7,R10
    00127C 1077 003478 LPR R7,R7
    00127E E370 9700 0170 003478 STHY R7,5888(,R9) £
    001284 003480 L0160: EQU *


    Filtering by MSGEXIT will not meet the need: it is not the level of severity of the message that is in question, it is the context of detection of the performance problem that is in question.

    In other contexts the detection of the performance problem must apply and the message must be issued.

    Also note that the IGYPA3084-W message can be issued on a code deemed non-performing, while this same code can be eliminated by the OPTIMIZE(1) option if it is not referenced (dead code).

  • Admin
    Basil Kanneth
    Reply
    |
    Sep 20, 2023

    Hi Denis, can you please describe in detail what in your framework that requires you to break the RULES that you currently have set?

    Would MSGEXIT() work for your scenario?