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 Delivered
Workspace PL/I Compilers
Created by Guest
Created on Jan 26, 2017

Add simplified ASSERT COMPARE statement with actualValue, expectedValue and optional comparison type

We would like to reduce coding and duplicity. Given the 1st Use Case example in which we test the function calculateDate we want to remove the variable calculatedDate as well as the duplicate code ('02.01.2014').

So we would like to get a new simplified ASSERT COMPARE (actualValue,expectedValue[,comparisonType]) statement:
- The actualValue as 1st parameter and the expectedValue as 2nd parameeter must match but can be of any type.
- The comparisonType as 3rd parameter is like that in the ALLCOMPARE built-in function and optional with 'EQ' as default.

The actualValue and expectedValue need to be converted to a string to be passed to ibmpas* routine.

Idea priority Low
  • Guest
    Reply
    |
    Jan 31, 2017

    this was delivered as part of APAR PI75582 / PTF UI44364

    The new ASSERT COMPARE statement provides a more information-rich way to test an assertion that the actual value of an expression compares correctly with an expected value.

    Its syntax is
    ASSERT COMPARE( , [ , ] ) [ TEXT( ) ]

    The statement asserts that the value of the compares to that of the according to the specified (or implied) operator.

    The operator must be one of the same values as permitted as the third argument to the ALLCOMPARE built-in function, and its default value is 'EQ'.

    The and must be scalar expressions that have comparable types.

    If the assertion fails, then
    the compiled code calls the routine IBMPASC. This routine has 9 parameters. The first 5 have the same meanings and values as the 5 parameters to the routines IBMPAST and IBMPASU. The remaining 4 parameters are, in order,
    A BYVALUE POINTER giving the address of a string representing the value of the
    A BYVALUE FIXED BIN(31) giving the length of that string.
    A BYVALUE POINTER giving the address of a string representing the value of the
    A BYVALUE FIXED BIN(31) giving the length of that string.

    The strings representing the actual and expected expressions depend on the type of those expressions. If the comparands have
    Computational types other than GRAPHIC or WIDECHAR, then the strings will be the value of the expressions converted to CHARACTER
    POINTERs or HANDLEs, then the strings will be their HEX values
    ORDINALs, then the strings will be their ORDINALNAME values
    Any other type, then the strings will be null strings

  • Guest
    Reply
    |
    Jan 27, 2017

    This would be useful