× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jeff,

The following runs correctly on IBM i 6.1. In debug and stepping thru it
steps into statement 11 and after statement 11 is executed the value of
variable worked is '1'.



Display Module Source

Program: #TESTJY Library: MAGLIB Module: #TESTJY
1 D FldA s 1A
2 D FldB s 7S 0
3 D worked s n inz
4
5 /free
6 FldA = 'Y' ;
7
8 FldB = 0012345 ;
9 If FldA = 'Y'
10 and FldB > *ZERO ;
11 worked = *on ;
12 else ;
13 worked = *off ;
14 EndIf ;
15
More...
Debug . . .

F3=End program F6=Add/Clear breakpoint F10=Step F11=Display
variable
F12=Resume F17=Watch variable F18=Work with watch F24=More keys

WORKED = '1'


Jeff Young wrote on 01/05/2012 08:14:00 AM:

From: Jeff Young <jyoung0950@xxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Date: 01/05/2012 08:16 AM
Subject: *ZERO vs *ZEROS
Sent by: rpg400-l-bounces@xxxxxxxxxxxx

All,
I have the following code:
FldA 1A
FldB 7S 0

FldA = 'Y'
FldB = 0012345
/Free
If FldA = 'Y'
and FldB > *ZERO
.
.
.
.
EndIf

When I run this code using the *ZERO, the If fails and control transfers
to
the EndIf;
When I change the code to use *ZEROS, it works fine.

Running 6.1.1.
PTF TL60215

Why does it not work with *ZERO?

Thanks,




--
Jeff Young
Sr. Programmer Analyst
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


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.