Lora,

Evaluate both fields in hex to make sure they are equal in every byte. You
may have low-values instead of spaces.
EVAL ACEMPNOI :x
EVAL WS_COMM_BEGIN :x

If the if field is coming from a CICS BMS map it probably has low-values in
it.

Jerry Thomas

-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of loravara@xxxxxxxxxxx
Sent: Sunday, January 27, 2008 8:06 PM
To: 'COBOL Programming on the iSeries/AS400'
Subject: [COBOL400-L] CICS Problem

I'm a very new CICS programmer, and I'm running into a problem.

I'm trying to compare two data items. Both are PIC X(09). Both will
contain numbers, though.

At one point in the CICS program, I have:

IF ACEMPNOI = WS-COMM-BEGIN
NEXT SENTENCE
ELSE
PERFORM 1100-START-BROWSE THRU 1100-EXIT.

The problem is, the Else branch always triggers when the program reaches
this statement, as though the two data values are different, even when I can
verify that they are not.

ACEMPNOI is the field that receives the account number from the CICS map.
WS-COMM-BEGIN is the field in the DFHCOMMAREA that contains the last
ACEMPNOI that was searched on. I save it to this COMMAREA data item
whenever the program executes a successful STARTBR.

What am I doing wrong here?

Any advice would be appreciated.

Thanks.

Lora


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.