×
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.
%Subst(Hours:1) is going to = '11111111' so it <> '1'
%Subst(Hours:8) = '1' so it = '1'
You need %Subst(Hours:1:1)
~Zach
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kim Spears
Sent: Thursday, June 12, 2008 1:40 PM
To: RPG programming on the AS400 / iSeries
Subject: Data structure issue
Hi All,
I am trying to check some numbers in a data structure and am getting
some strange results.
D hours DS
D zHour1 1 0 INZ(1)
D zHour2 1 0 INZ(1)
D zHour3 1 0 INZ(1)
D zHour4 1 0 INZ(1)
D zHour5 1 0 INZ(1)
D zHour6 1 0 INZ(1)
D zHour7 1 0 INZ(1)
D zHour8 1 0 INZ(1)
C SELECT
C WHEN %SUBST(hours:1) = '1'
C 'oneFound' dsply
C WHEN %SUBST(hours:8) = '1'
C 'eightFound' dsply
C ENDSL
C EVAL *INLR = *ON
The program finds the eighth element, but misses the first element. Any
ideas?
NOTICE: This electronic mail message and any files transmitted with it are intended
exclusively for the individual or entity to which it is addressed. The message,
together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.
As an Amazon Associate we earn from qualifying purchases.
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.